UOGamers Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

  • To obtain new Razor updates, please reinstall Razor from our new website.

UO Steam Vesper Rewards Turn In (Unfinished)

Geaux

Sorceror
The first steam script I have written entirley on my own. I cant get it to donate a amount based on a varying amount pulled from a chest, I would like not to use a organizer but the set up atm requires the boards to be in multiples of 300. Any help would be appreciated.

//Set macro to Loop
//Place boards in increments of 300 inside your bank in a container
if not @findobject 'Board Box'
promptalias 'Board Box'
endif
if counttype 0x1bd7 0 'backpack' < 300
pause 500
useobject 'Board Box'
pause 500
movetype 0x1bd7 'Board Box' 'backpack' (0 0 0) 'any' 300
pause 500
endif
/////////////// Frostwood
if counttype 0x1bd7 1151 'backpack' > 299
pause 500
useobject 0x40034fd7
waitforgump 0x95a059a6 500
replygump 0x95a059a6 308
waitforprompt 500
promptmsg '300'
waitforgump 0x95a059a6 500
endif
///////////// Bloodwood
if counttype 0x1bd7 1194 'backpack' > 299
pause 500
useobject 0x40034fd7
waitforgump 0x95a059a6 500
replygump 0x95a059a6 307
waitforprompt 500
promptmsg '300'
waitforgump 0x95a059a6 500
endif
///////////// Heartwood
if counttype 0x1bd7 1193 'backpack' > 299
pause 500
useobject 0x40034fd7
waitforgump 0x95a059a6 500
replygump 0x95a059a6 306
waitforprompt 500
promptmsg '300'
waitforgump 0x95a059a6 500
endif
///////////// Oak
if counttype 0x1bd7 2010 'backpack' > 299
pause 500
useobject 0x40034fd7
waitforgump 0x95a059a6 500
replygump 0x95a059a6 303
waitforprompt 500
promptmsg '300'
waitforgump 0x95a059a6 500
endif
///////////// Ash
if counttype 0x1bd7 1191 'backpack' > 299
pause 500
useobject 0x40034fd7
waitforgump 0x95a059a6 500
replygump 0x95a059a6 304
waitforprompt 500
promptmsg '300'
waitforgump 0x95a059a6 500
endif
///////////// Normal
if counttype 0x1bd7 0 'backpack' > 299
pause 500
useobject 0x40034fd7
waitforgump 0x95a059a6 500
replygump 0x95a059a6 302
waitforprompt 500
promptmsg '300'
waitforgump 0x95a059a6 500
endif
///////////// Yew
if counttype 0x1bd7 1192 'backpack' > 299
pause 500
useobject 0x40034fd7
waitforgump 0x95a059a6 500
replygump 0x95a059a6 305
waitforprompt 500
promptmsg '300'
waitforgump 0x95a059a6 500
endif
 
Last edited:

Geaux

Sorceror
you're missing a space between the '' so it's defaulting to hue 0

Ok I fixed that part, it still wont pull any boards out tho and I get this error:
movetype: source not found

If I completely remove the 'any' part it will pull normal boards.
Is there a way to get it to pull any type of board? (I guess I could just set up a organizer.)

Is there a way for me to have it change the amount it tries to donate, say if i organize 300 but only have 275, can it read that there are 275 and change the promptmsg based on what i have in my backpack?
 

MB

Knight
wrong order syntax
movetype (graphic) (source) (destination) [(x y z)] [color] [amount] [range or search level]
 

Geaux

Sorceror
Is there a way for me to have it change the amount it tries to donate, say if i organize 300 but only have 275, can it read that there are 275 and change the promptmsg based on what I have in my backpack?

As it stands if there isnt 300 of a type it will keep giving a error message. If i use a organizer instead, and it pulls 250 normal and 50 heartwood, it wont try to turn either in.
 
Last edited:
Is there a way for me to have it change the amount it tries to donate, say if i organize 300 but only have 275, can it read that there are 275 and change the promptmsg based on what I have in my backpack?

As it stands if there isnt 300 of a type it will keep giving a error message. If i use a organizer instead, and it pulls 250 normal and 50 heartwood, it wont try to turn either in.

Unfortunately, you can't create arbitrary variables in UOS. You can create hard coded variables with lists and use them in for loops like this:

Code:
if not @listexists 'myList'
  createlist 'myList'
  pushlist 'myList' 'hello'
  pushlist 'myList' 'world'
endif
for 0 to myList
  headmsg myList[]
endfor

So I don't know if there is a better way to do what you are doing but I guess you could go crazy and make a list of 300...1. Or you could break it down and have it turn in, in chunks of 25 or less. Where you would still pull your 300 but you would do up to 12 turn ins in quick succession. Maybe something list this:
Code:
if not @listexists 'woodcount'
  createlist 'woodcount'
  pushlist 'woodcount' 25
  pushlist 'woodcount' 24
  ...
  pushlist 'woodcount' 1
endif
///////////// Yew
while counttype 0x1bd7 1192 'backpack' > 1
  for 0 to woodcount
    if counttype 0x1bd7 1192 'backpack' = woodcount[]
      pause 500
      useobject 0x40034fd7
      waitforgump 0x95a059a6 500
      replygump 0x95a059a6 305
      waitforprompt 500
      promptmsg woodcount[]
      waitforgump 0x95a059a6 500
      break
    endif
  endfor
endwhile
//do the same for the other wood types

So it will continue the while loop as long as you have 1 board. The for loop will try to donate 25 first so most times it will donate 25 until you have less than 25 boards and then it will keep going through the for loop until it finds the greatest amount of boards you have. Once it finds something, before the end of the if statement it does a break which should break out of the for loop and stay in the while loop as long as you have boards. This is just a prototype though, I have not tested it at all. I think you could optimize it by moving the pause and use object right above the while, because I think after you donate the donate gump still stays up.
 

MB

Knight
Do another loop around that of woodhues[] and you don't need to break down every number 1-25. I would do 300 then 100 then 25 then 5 then 1.

for 0 to 'woodhue'
while counttype 0x1bd7 woodhue[] 'backpack' > 1
for 0 to 'woodcount'
while counttype 0x1bd7 woodhue[] 'backpack' >= woodcount[]
turn in woodhue woodcount
endwhile
endfor
endwhile
endfor
 

Geaux

Sorceror
Thanks for the help I will attempt to plug in these changes after work. They don't make sense atm, maybe when I start plugging it will.
 

Geaux

Sorceror
But you should really just do this

Your right, but I don't play uo anymore and I was building for friend who plays a server that dosnt allow deeds. I came here because MB is probably the best steam script builder out there that is active on forums.
 

Geaux

Sorceror
I did this just to test if it would read the type of wood and with 100 yew in my bag it will not say the amount.

if not @listexists 'woodcount'
createlist 'woodcount'
pushlist 'woodcount' 300
pushlist 'woodcount' 100
pushlist 'woodcount' 25
pushlist 'woodcount' 1
endif
///////////// Yew
while counttype 0x1bd7 1192 'backpack' > 1
for 0 to woodcount
if counttype 0x1bd7 1192 'backpack' = woodcount[]
pause 500
msg woodcount[]
break
endif
endfor
endwhile
 

Geaux

Sorceror
This is what im at now. It works as long as it dosnt pull say for instance 61 frostwood and 39 blood wood when organizing. If it pulls 100 exactly of a cetain type it works. Also when i take all other boards out i cant get it to recoginize the normal boards.

if not @listexists 'woodcount'
createlist 'woodcount'
pushlist 'woodcount' 100
pushlist 'woodcount' 25
pushlist 'woodcount' 1
endif
///////////// Get more boards
if counttype 0x1bd7 'any' 'backpack' < 100
organizer 'Boards'
pause 500
while organizing
endwhile
endif
///////////// Yew
if counttype 0x1bd7 1192 'backpack' > 0
for 0 to 'woodcount'
if counttype 0x1bd7 1192 'backpack' == woodcount[]
pause 500
useobject 0x40034fd7
waitforgump 0x95a059a6 500
replygump 0x95a059a6 305
waitforprompt 500
promptmsg woodcount[]
waitforgump 0x95a059a6 500
break
endif
endfor
endif
///////////// Frostwood
if counttype 0x1bd7 1151 'backpack' > 0
for 0 to 'woodcount'
if counttype 0x1bd7 1151 'backpack' == woodcount[]
pause 500
useobject 0x40034fd7
waitforgump 0x95a059a6 500
replygump 0x95a059a6 308
waitforprompt 500
promptmsg woodcount[]
waitforgump 0x95a059a6 500
break
endif
endfor
endif
///////////// Bloodwood
if counttype 0x1bd7 1194 'backpack' > 0
for 0 to 'woodcount'
if counttype 0x1bd7 1194 'backpack' == woodcount[]
pause 500
useobject 0x40034fd7
waitforgump 0x95a059a6 500
replygump 0x95a059a6 307
waitforprompt 500
promptmsg woodcount[]
waitforgump 0x95a059a6 500
break
endif
endfor
endif
///////////// Heartwood
if counttype 0x1bd7 1193 'backpack' > 0
for 0 to 'woodcount'
if counttype 0x1bd7 1193 'backpack' == woodcount[]
pause 500
useobject 0x40034fd7
waitforgump 0x95a059a6 500
replygump 0x95a059a6 306
waitforprompt 500
promptmsg woodcount[]
waitforgump 0x95a059a6 500
break
endif
endfor
endif
///////////// Oak
if counttype 0x1bd7 2010 'backpack' > 0
for 0 to 'woodcount'
if counttype 0x1bd7 2010 'backpack' == woodcount[]
pause 500
useobject 0x40034fd7
waitforgump 0x95a059a6 500
replygump 0x95a059a6 303
waitforprompt 500
promptmsg woodcount[]
waitforgump 0x95a059a6 500
break
endif
endfor
endif
///////////// Ash
if counttype 0x1bd7 1191 'backpack' > 0
for 0 to 'woodcount'
if counttype 0x1bd7 1191 'backpack' == woodcount[]
pause 500
useobject 0x40034fd7
waitforgump 0x95a059a6 500
replygump 0x95a059a6 304
waitforprompt 500
promptmsg woodcount[]
waitforgump 0x95a059a6 500
break
endif
endfor
endif
///////////// Normal
//if counttype 0x1bd7 0 'backpack' > 0
// for 0 to 'woodcount'
// if counttype 0x1bd7 0 'backpack' == woodcount[]
// pause 500
//useobject 0x40034fd7
// waitforgump 0x95a059a6 500
// replygump 0x95a059a6 302
// waitforprompt 500
//promptmsg woodcount[]
//waitforgump 0x95a059a6 500
// break
// endif
// endfor
//endif
 

Geaux

Sorceror
if counttype 0x1bd7 1192 'backpack' >= woodcount[]

Works great, last question.

Is there a way when it pulls 10 frostwood and 90 bloodwood, if it turns in 10 frost wood first it then organizes again and keeps turning in the 10 instead of ever turning in the 90 bloodwood. Maybe make it get rid of all boards in bag before organizing again
 
I think you need to leave the breaks in and change your if statement for each wood type to a while statement. The way it is now, it will only do 100 of each type, and if you take out the breaks it will only do 100, then 25, then 1 of each type before going on to the next type. I think it should be:

///////////// Yew
while counttype 0x1bd7 1192 'backpack' > 0
for 0 to 'woodcount'
if counttype 0x1bd7 1192 'backpack' >= woodcount[]
pause 500
useobject 0x40034fd7
waitforgump 0x95a059a6 500
replygump 0x95a059a6 305
waitforprompt 500
promptmsg woodcount[]
waitforgump 0x95a059a6 500
break
endif
endfor
endwhile

Then if it, finds 100 it will turn in and then break out of the for loop. If you still have wood it will stay in the while loop and start the for loop again trying 100. Only when you don't have 100 will it try 25 and so on.
 

Geaux

Sorceror
What I got so far, its working perfect. With the exception that its not reading the number of each type and just using that amount, ie 24 boards takes 24 turn ints. I thought MB linked a way for it to read the amount n the bag then transfer that to the sysmsg.

if not @listexists 'woodcount'
createlist 'woodcount'
pushlist 'woodcount' 300
pushlist 'woodcount' 100
pushlist 'woodcount' 25
pushlist 'woodcount' 1
endif
///////////// Get more boards
if counttype 0x1bd7 'any' 'backpack' < 100
organizer 'Boards'
pause 500
while organizing
endwhile
endif
///////////// Yew
pause 500
if counttype 0x1bd7 1192 'backpack' > 0
for 0 to 'woodcount'
if counttype 0x1bd7 1192 'backpack' >= woodcount[]
pause 500
useobject 0x40034fd7
waitforgump 0x95a059a6 500
replygump 0x95a059a6 305
waitforprompt 500
promptmsg woodcount[]
waitforgump 0x95a059a6 500
endif
endfor
endif
///////////// Frostwood
pause 500
if counttype 0x1bd7 1151 'backpack' > 0
for 0 to 'woodcount'
if counttype 0x1bd7 1151 'backpack' >= woodcount[]
pause 500
useobject 0x40034fd7
waitforgump 0x95a059a6 500
replygump 0x95a059a6 308
waitforprompt 500
promptmsg woodcount[]
waitforgump 0x95a059a6 500
endif
endfor
endif
///////////// Bloodwood
pause 500
if counttype 0x1bd7 1194 'backpack' > 0
for 0 to 'woodcount'
if counttype 0x1bd7 1194 'backpack' >= woodcount[]
pause 500
useobject 0x40034fd7
waitforgump 0x95a059a6 500
replygump 0x95a059a6 307
waitforprompt 500
promptmsg woodcount[]
waitforgump 0x95a059a6 500
endif
endfor
endif
///////////// Heartwood
pause 500
if counttype 0x1bd7 1193 'backpack' > 0
for 0 to 'woodcount'
if counttype 0x1bd7 1193 'backpack' >= woodcount[]
pause 500
useobject 0x40034fd7
waitforgump 0x95a059a6 500
replygump 0x95a059a6 306
waitforprompt 500
promptmsg woodcount[]
waitforgump 0x95a059a6 500
endif
endfor
endif
///////////// Oak
pause 500
if counttype 0x1bd7 2010 'backpack' > 0
for 0 to 'woodcount'
if counttype 0x1bd7 2010 'backpack' >= woodcount[]
pause 500
useobject 0x40034fd7
waitforgump 0x95a059a6 500
replygump 0x95a059a6 303
waitforprompt 500
promptmsg woodcount[]
waitforgump 0x95a059a6 500
endif
endfor
endif
///////////// Ash
pause 500
if counttype 0x1bd7 1191 'backpack' > 0
for 0 to 'woodcount'
if counttype 0x1bd7 1191 'backpack' >= woodcount[]
pause 500
useobject 0x40034fd7
waitforgump 0x95a059a6 500
replygump 0x95a059a6 304
waitforprompt 500
promptmsg woodcount[]
waitforgump 0x95a059a6 500
endif
endfor
endif
///////////// Normal
pause 500
if counttype 0x1bd7 0 'backpack' > 0
for 0 to 'woodcount'
if counttype 0x1bd7 0 'backpack' >= woodcount[]
pause 500
useobject 0x40034fd7
waitforgump 0x95a059a6 500
replygump 0x95a059a6 302
waitforprompt 500
promptmsg woodcount[]
waitforgump 0x95a059a6 500
endif
endfor
endif
 
Top