Author Topic: TheReapers Mace and Shield Donator - Get some funky glasses today!  (Read 37162 times)

0 Members and 2 Guests are viewing this topic.

Offline roadrunner

  • Full Member
  • ***
  • Posts: 107
  • Activity:
    0%
  • Reputation Power: 2
  • roadrunner has no influence.
  • Gender: Male
  • Respect: +28
  • Referrals: 1
    • View Profile
Re: TheReapers Mace and Shield Donator - Get some funky glasses today!
« Reply #30 on: May 17, 2013, 02:10:13 PM »
+1
thank you TM !!  it's going to take me a little studying to make sure i comprehend all that accurately but i'll try & post my results.
i'm still left wondering why the script has not gone thru the 'setup' phase when i start it & how i can get that part to 'activate' so i can set the library NPC rune, house rune and such.

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13301
  • Activity:
    0%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: TheReapers Mace and Shield Donator - Get some funky glasses today!
« Reply #31 on: May 17, 2013, 02:22:41 PM »
+1
The easiest way to decypher how a script is running is to add a "pause" command into the code and the use function keys F7 and F8 to step through the code to see where it's executing.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline Bookwyrm

  • Elite
  • *
  • *
  • Posts: 357
  • Activity:
    0%
  • Reputation Power: 5
  • Bookwyrm has no influence.
  • Gender: Male
  • Better Civilization Through Medication
  • Respect: +34
  • Referrals: 0
    • View Profile
Re: TheReapers Mace and Shield Donator - Get some funky glasses today!
« Reply #32 on: May 17, 2013, 04:05:04 PM »
+1

i'm still left wondering why the script has not gone thru the 'setup' phase when i start it & how i can get that part to 'activate'

Look (or use the search function) through the early part of the script. Likely there will be a line that says something like "run setup=False" chance false to true and the setup should run.
"The most preposterous notion that H. Sapiens has ever dreamed up is that the Lord God of Creation, Shaper and Ruler of all the Universes, wants the saccharine adoration of His creatures, can be swayed by their prayers, and becomes petulant if He does not receive this flattery. Yet this absurd fantasy, without a shred of evidence to bolster it, pays all the expenses of the oldest, largest, and least productive industry in all of history."   Lazarus Long

"The second most preposterous notion is that copulation is inherently sinful."   L.L. 

Offline roadrunner

  • Full Member
  • ***
  • Posts: 107
  • Activity:
    0%
  • Reputation Power: 2
  • roadrunner has no influence.
  • Gender: Male
  • Respect: +28
  • Referrals: 1
    • View Profile
Re: TheReapers Mace and Shield Donator - Get some funky glasses today!
« Reply #33 on: May 17, 2013, 04:16:14 PM »
+1
thank you Bookwyrm
and if you could maybe help me figure out how to adjust the buttons so it stops making axe and makes buckler, this thing might run for me! *Crosses all 10 fingers & 10 toes and crosses legs also!!*

Offline Bookwyrm

  • Elite
  • *
  • *
  • Posts: 357
  • Activity:
    0%
  • Reputation Power: 5
  • Bookwyrm has no influence.
  • Gender: Male
  • Better Civilization Through Medication
  • Respect: +34
  • Referrals: 0
    • View Profile
Re: TheReapers Mace and Shield Donator - Get some funky glasses today!
« Reply #34 on: May 17, 2013, 04:19:23 PM »
+1
Working on it. But I have a house full of girls running around at the moment. Gotta get them settled in a bit more. :)
"The most preposterous notion that H. Sapiens has ever dreamed up is that the Lord God of Creation, Shaper and Ruler of all the Universes, wants the saccharine adoration of His creatures, can be swayed by their prayers, and becomes petulant if He does not receive this flattery. Yet this absurd fantasy, without a shred of evidence to bolster it, pays all the expenses of the oldest, largest, and least productive industry in all of history."   Lazarus Long

"The second most preposterous notion is that copulation is inherently sinful."   L.L. 

Offline roadrunner

  • Full Member
  • ***
  • Posts: 107
  • Activity:
    0%
  • Reputation Power: 2
  • roadrunner has no influence.
  • Gender: Male
  • Respect: +28
  • Referrals: 1
    • View Profile
Re: TheReapers Mace and Shield Donator - Get some funky glasses today!
« Reply #35 on: May 17, 2013, 04:29:07 PM »
+1
ok, i see this at very near top of script:

==================================
; Remove the ";" below to reset the script should you wish to change any of the setup
; gosub TM_NGFS_DeleteName TheReapers_Mace_and_Shield_Donator
; halt
;==================================

and then i see this a lil farther down:

;==================================
; Skips setup if save file exists
if %TR_save = 2
   {
   goto Start
   }
; Deletes save if previously used V1.0 of script
if %TR_save = 1
   {
   gosub TR_wipe_old_save
   }

not seeing any "run setup=False" 

 i'm not going anywhere, no plans this evening, so take your time. i'm most thankful for the help!!

Offline Bookwyrm

  • Elite
  • *
  • *
  • Posts: 357
  • Activity:
    0%
  • Reputation Power: 5
  • Bookwyrm has no influence.
  • Gender: Male
  • Better Civilization Through Medication
  • Respect: +34
  • Referrals: 0
    • View Profile
Re: TheReapers Mace and Shield Donator - Get some funky glasses today!
« Reply #36 on: May 17, 2013, 05:26:56 PM »
+1
Ok. Ran into a major snag for debugging this. I can't set this script up to run at my keep because you can't lock down an anvil in a recall accessible spot. So... if I can't run the script I can't debug it :'(.
But to find the X,Y coords you need there are two different ways to do it.

On the right hand side of the EUO screen expand the "Other Stuff" section. There you will find #CURSORX: xxx and CURSORY: xxx. The values you see are the current location of your cursor on your monitor. It can be any number from 1 to whatever the max of your screen resolution allows so expect 1,2,3, or 4 digit numbers to be there.

Also if you look at the very bottom of the EUO screen you will see several different strings of numbers. The one that matters to you should be in the fourth little box from the left side of the window. (Hint: it will be the one that changes as you move your cursor  ;)) this is another spot to find your X,Y coords and will match what can be found in the "Other Stuff" section.

Run the script so that it opens up the crafting menu and positions it where it is supposed to be. Pause or stop the script at this point. Position your cursor of the button that you need to clik for bucklers. Write down the Coords shown for X & Y. If there is more than one level of the menu to navigate do the same until you get to make the buckler.

in the script...
Code: [Select]
; Makes bucklers
sub TR_make_bucklers
repeat
gosub TR_menu_button
if %TR_shard = free
   {
   gosub TM_AdvJournalScan world VALID_ADVANCE The_world_will_
   if #result = #true
      {
      sound
      wait 30s
      if %debug = 2
         {
         display ok World save detected.
         }
      }
   }
finditem %plain_ingots C_ , #backpackID
if #findkind = -1
   {
   gosub TR_get_ingots
   }
else
    {
    if #findstack < 40
       {
       gosub TR_get_ingots
       }
    }
finditem %tinker_tools C_ , #backpackID
if #findkind = -1
   {
   display ok You need at least one tinkers tool in your backpack to run this script, halting!
   halt
   }
if #findcnt < 2
   {
   gosub TR_make_tinkers_tool
   }
finditem %smiths_hammer C_ , #backpackID
if #findkind = -1
   {
   gosub TR_make_hammer
   }
set #lobjectID #findID
wait 5
event macro 17 0
wait 5
set #contPosX 0
set #contPosY 0
wait 5
if %TR_make_first_buckler = 1
   {
   click 285 415 dmc ;[color=pink]Change these Coords[/color]
   }
else
    {
    click 30 170 dmc ;[color=pink]Change these Coords[/color]
    wait 5
    set #contPosX 0
    set #contPosY 0
    wait 5
    click 235 70 dmc
    set %TR_make_first_buckler 1
    }
gosub TR_waitfor_generic_gump
finditem %buckler C_ , #backpackID
until #findcnt > %max_buckler_amount
set %TR_no_bucklers #findcnt
return
   
I believe that should be the right section to change. I could very well be wrong. If so I hope one of the others can point you in the right direction. It appears that there should only be two sets of coords to change.
"The most preposterous notion that H. Sapiens has ever dreamed up is that the Lord God of Creation, Shaper and Ruler of all the Universes, wants the saccharine adoration of His creatures, can be swayed by their prayers, and becomes petulant if He does not receive this flattery. Yet this absurd fantasy, without a shred of evidence to bolster it, pays all the expenses of the oldest, largest, and least productive industry in all of history."   Lazarus Long

"The second most preposterous notion is that copulation is inherently sinful."   L.L. 

Offline Bookwyrm

  • Elite
  • *
  • *
  • Posts: 357
  • Activity:
    0%
  • Reputation Power: 5
  • Bookwyrm has no influence.
  • Gender: Male
  • Better Civilization Through Medication
  • Respect: +34
  • Referrals: 0
    • View Profile
Re: TheReapers Mace and Shield Donator - Get some funky glasses today!
« Reply #37 on: May 17, 2013, 05:30:45 PM »
+1
ok, i see this at very near top of script:

==================================
; Remove the ";" below to reset the script should you wish to change any of the setup
; gosub TM_NGFS_DeleteName TheReapers_Mace_and_Shield_Donator
; halt
;==================================

and then i see this a lil farther down:

;==================================
; Skips setup if save file exists
if %TR_save = 2
   {
   goto Start
   }
; Deletes save if previously used V1.0 of script
if %TR_save = 1
   {
   gosub TR_wipe_old_save
   }

not seeing any "run setup=False" 

 i'm not going anywhere, no plans this evening, so take your time. i'm most thankful for the help!!

OK right there where it says to remove the ; on the next line? Delete out the ; on the line that says " ;gosub TM_NGFS_DeleteName TheReapers_Mace_and_Shield_Donator"
and the same on the ;halt line.
run the script and it should erase your saved setup.
replace the ;'s at the beginning of the lines then run script again and you should be able to redo your setup
"The most preposterous notion that H. Sapiens has ever dreamed up is that the Lord God of Creation, Shaper and Ruler of all the Universes, wants the saccharine adoration of His creatures, can be swayed by their prayers, and becomes petulant if He does not receive this flattery. Yet this absurd fantasy, without a shred of evidence to bolster it, pays all the expenses of the oldest, largest, and least productive industry in all of history."   Lazarus Long

"The second most preposterous notion is that copulation is inherently sinful."   L.L. 

Offline roadrunner

  • Full Member
  • ***
  • Posts: 107
  • Activity:
    0%
  • Reputation Power: 2
  • roadrunner has no influence.
  • Gender: Male
  • Respect: +28
  • Referrals: 1
    • View Profile
Re: TheReapers Mace and Shield Donator - Get some funky glasses today!
« Reply #38 on: May 17, 2013, 05:42:59 PM »
+1
man, i thank you Bookwyrm!  i actually got all the 'buttons' mapped out & working now i'm trying to get the script to show me the inital setup portion. ii see your post on how to remove those ";" and about to test it to see if that works

if this doesn't work, what is the name of this 'file' the script saves the setup variables as? i could delete that file & it should make the script run setup that way, right?

Offline roadrunner

  • Full Member
  • ***
  • Posts: 107
  • Activity:
    0%
  • Reputation Power: 2
  • roadrunner has no influence.
  • Gender: Male
  • Respect: +28
  • Referrals: 1
    • View Profile
Re: TheReapers Mace and Shield Donator - Get some funky glasses today!
« Reply #39 on: May 17, 2013, 05:53:09 PM »
+1
ok!!!  it may not be the RIGHT way but i did get the setup menu by changing the "2" in this section to a "0"

;==================================
; Skips setup if save file exists
if %TR_save = 2
   {
   goto Start
   }
; Deletes save if previously used V1.0 of script
if %TR_save = 1
   {
   gosub TR_wipe_old_save
   }

now to see if it'll make bucklers & do the turn in, i'll keep ya posted!

thank you all, especially Bookwyrm, for all the wonderful help!!

**UPDATE**
;==================================
; Wipes out of date save
sub TR_wipe_old_save
gosub TM_NGFS_DeleteName TheReapers_Mace_and_Shield_Donator
return

remove that lead ";"  and that activates the setup menus!!

now to adjust the donation buttons because it's not working exactly right at library. that should be sorta simple after all the othher button location changes :)
**UPDATE**
the character lands at NPC and opens the donation gump but he starts yelling the amount of bucklers made but doesn't actually target them to donate. any ideas on how i'd fix this?  i can forward my 'fixed' OSI shard version that makes smith hammer & buckler shield to anybody that is willing to work on this. i'd really like to be able to have this script totally functioning again for all users. :)
« Last Edit: May 17, 2013, 06:33:16 PM by roadrunner »

Offline roadrunner

  • Full Member
  • ***
  • Posts: 107
  • Activity:
    0%
  • Reputation Power: 2
  • roadrunner has no influence.
  • Gender: Male
  • Respect: +28
  • Referrals: 1
    • View Profile
Re: TheReapers Mace and Shield Donator - Get some funky glasses today!
« Reply #40 on: May 18, 2013, 03:51:36 AM »
+1
OK guys & gals, imagine me on bended knees, hands clasped, i am seriously at the end of my knowledge on this. i need some serious HELP!
 the guy who joined SUO w/ me was who i sat down w/ last night and together we managed to map out the buttons and got the script functioning correctly for the OSI shards. imagine my surprise when i jumped into browser to post that & saw Bookwyrm's post on that exact section of code we had just finished altering. 

so the script starts, makes tinker tool, makes smith hammer, makes bucklers (50 as it's s'posed to), it recalls to library, opens the donation gump, and here is where is snags! i know over the years the donation 'formula' has changed many times but i don't remember us being able to click on item donation type 'blue button' and 'say'  "50" and the NPC take 50 bucklers from your main backpack. maybe this script was written originally for a free shard that allowed that method.

what i need: to know what part of this script to change, and to change it to either have it target each buckler in backpack to donate (click donate button/ target a buckler) ORRRrrr after it makes the 50 bucklers (since the NPC only takes the bucklers but does NOT take the bag they are in) have it put all 50 bucklers into a bag (backpack) and then recall to library, click donate bag button, select 'donate all' on that new gump popup, and viola', done, haul ass home to make 50 more.
pretty please give an old man some help here and let's get this script working! it's so close to being done and i truly want, WITH Trailmyx's permission!!, to RE-post the finished product for OSI shard users. i think (because i see players asking for these mace & shield glasses almost daily) this script would be in high demand. so i plead with you real scripters, help us get this script working, please, and as always, Thank You in advance for any & all help!!!

Offline UoLugnutz

  • Full Member
  • ***
  • Posts: 123
  • Activity:
    0%
  • Reputation Power: 2
  • UoLugnutz has no influence.
  • Respect: +25
  • Referrals: 0
    • View Profile
Re: TheReapers Mace and Shield Donator - Get some funky glasses today!
« Reply #41 on: May 18, 2013, 04:56:53 AM »
+1
I dont have UO installed at work so can only show ya the direction to go. Look for the sub below.
Code: [Select]
;==================================
; Hands in the bucklers
sub TR_Hand_in
set %TR_temp_weight #weight
repeat
set #lobjectID %TR_Donation_NPC
event macro 17 0
gosub TR_waitfor_generic_gump
set #contPosX 0
set #contPosY 0
wait 5
click 40 260 dmc
wait 10
msg %TR_no_bucklers $
wait 10
until #weight < %TR_temp_weight
set %TR_Status_bucklers ( %TR_Status_bucklers + %TR_no_bucklers )
set %TR_no_bucklers 0
gosub TR_update_status
return
;==================================

Now this is looks like the donation sub were the problem is. Now think if you were to do the donation manually how it works. You click on the buckler bullet and then asked how many to donate. You enter in 50 and hit enter and all is well. You character does not say 50 on the game screen but the number is entered into the gump. The msg %TR_no_bucklers $ command is like typing 50 on your keyboard and hitting enter. So unless the buckler option is clicked anything typed in will show in game as if you were talking since the gump was not selected. This is why you are spamming 50 because the click for the buckler donation is wrong. This sub has a Repeat/Untill loop untill the weight changes as a check that something was donated. Since nothing is donated because the click for bucklers is wrong it is stuck inside that loop. If you fix the click for buckler all will be well in the world.

Offline roadrunner

  • Full Member
  • ***
  • Posts: 107
  • Activity:
    0%
  • Reputation Power: 2
  • roadrunner has no influence.
  • Gender: Male
  • Respect: +28
  • Referrals: 1
    • View Profile
Re: TheReapers Mace and Shield Donator - Get some funky glasses today!
« Reply #42 on: May 18, 2013, 05:24:24 AM »
+1
ok, so what you're telling me is the script wasn't clicking the ''bullet'' (what i call 'blue dot') correctly before it started saying "50"  "50" "50"  "50", right?
and thus, i need to figure out which 'click coords' point to the donation gump, adjust the ones for the buckler bullet, and the rest should work, right?

from what you pasted, i need to at least verify "click 40 260 dmc"  is accurate, and if not, fix it.

***UPDATE!!!***
ok, after busy weekend i got around to tracking down the buckler 'button' coords & changed'em to 291  320.
that still doesn't do anything 'different'. toon still lands beside the NPC, opens donation menu, menu moves from center left of screen to far left of screen with "50" on the gump to the right of the buckler image. and the toon still yells "50" a few times, then without donating any items, recalls home to begin making more.

i also discovered 1 other 'minor' glitch. the toon makes a new Tinker Tool every time it wants to make a smith hammer. needless to say, a few trips to library & i'd have a backpack full of tools and no item count space left for bucklers.

i know you legendary scripters are well beyond this sort of thing, but as a bonafide newbie, i beg of your expertise to help me get this script usable. Thank you all for your input & advice!!
« Last Edit: May 21, 2013, 05:35:26 AM by roadrunner »

Offline roadrunner

  • Full Member
  • ***
  • Posts: 107
  • Activity:
    0%
  • Reputation Power: 2
  • roadrunner has no influence.
  • Gender: Male
  • Respect: +28
  • Referrals: 1
    • View Profile
Re: TheReapers Mace and Shield Donator - Get some funky glasses today!
« Reply #43 on: May 26, 2013, 03:48:00 AM »
+1
ok TM, i got the F7 & F8 figured out. i ran it thru the hand in sections, it's a 2 part sub : hands in the bucklers   && wait for hand in gump

Code: [Select]
; Hands in the bucklers
sub TR_Hand_in
set %TR_temp_weight #weight
repeat
set #lobjectID %TR_Donation_NPC
event macro 17 0
gosub TR_waitfor_generic_gump
set #contPosX 0
set #contPosY 0
wait 10
click 39 268 dmc
wait 10
msg %TR_no_bucklers $
wait 10
until #weight < %TR_temp_weight
set %TR_Status_bucklers ( %TR_Status_bucklers + %TR_no_bucklers )
set %TR_no_bucklers 0
gosub TR_update_status
return
;==================================
; Wait for hand-in gump
sub TR_waitfor_generic_gump
set %TR_time #scnt
repeat
if You_create_ in #sysmsg
   {
   break
   }
if #scnt > ( %TR_time + 10 )
   {
   break
   }
wait 0
until #contname = generic_gump
wait 5

the script jumps from the 1 into the other and back & forth with the return & waitfor generic gump commands.  i'm just not 'seeing' where it's actually supposed to physically 'click' (target) the bucklers so they vanish from backpack 1 by 1 to be 'donated'.  i see where it reads character weight, and how weight is to drop so script knows they are donated, i just not seeing where it would have to target the bucklers, thus it's way over my head on how i'd fix it.

***UPDATE***

Ok, in previous posts i've said the "50" the character is "saying" has now been coming up ON the donation gump. well, my little 'grab & bag side script goofed up so i was donating this batch of 50 manually and the "50" on the gump is the client reading how many are in backpack left to donate because it's counted down as i donated each one without me typing anything, no script running. just to be clear, as i targeted each buckler it went 50, 49,48,47, etc.  and i just click blue dot & target bucklers. so again, i'm very confused on this part of this script. :(

Another update is the script will, as UOLugnutz posted, continuously 'loop' at the donation NPC now. it's clicking the donation button but not targeting the bucklers, so weight doesn't lower, so it loops on & on. (i let it run for a few minutes to see just to be sure!)
« Last Edit: May 26, 2013, 07:58:21 AM by roadrunner »

Offline roadrunner

  • Full Member
  • ***
  • Posts: 107
  • Activity:
    0%
  • Reputation Power: 2
  • roadrunner has no influence.
  • Gender: Male
  • Respect: +28
  • Referrals: 1
    • View Profile
Re: TheReapers Mace and Shield Donator - Get some funky glasses today!
« Reply #44 on: May 26, 2013, 02:14:31 PM »
+1
 ;D  well, it took me contacting a friend that is a professional programmer (his real 9-5 job) and he re-wrote the hand in sub for this script & it's now fully operational hands free!!
we went the quick & easy route and incorporated UO Asssit into the script but when that breaks he said he'd write a new independent sub that is stand alone.
i'm not complaining, it makes what it's supoosed to, it donates as it's supposed to, and all i'm required to do is log it in and keep it supplied with ingots. :D

if anyone that plays OSI shards, and has UO Assist active, would like a copy of the donation sub i'm using, contact me & we'll work it out. i can't "publish" what's not mine.
i've really learned a lot messing w/ this script & it's really inspired me to learn more. maybe some work by "Roadrunner" will be coming soon!

Tags: