ScriptUO
Official ScriptUO EasyUO Scripts => Scripting Chat => Topic started by: Coragin on February 24, 2010, 08:50:45 PM
-
Okay, the point of this sub is to take leftover gold in my backpack, drop it in a secure IN my bank. Then drag 2500 gold out of the secure IN my bank and drop it in my backpack.
Its taking it out of my pack fine, but the nit tells me I am out of gold (when I have over 1 mill in gold in the secure in my bank.)
set %gold POF
Display Ok Select Supply Container IN BANK.
set #targcurs 1
while #targcurs = 1
wait 1
set %secure #ltargetID
set #lobjectID #ltargetID
event macro 17
wait 20
gosub getgold
Sub GetGold
Finditem POF C_ , #backpackid
exevent drag #findid #findstack
exevent dropc %secure
finditem POF C_ , %secure
if #findkind = 0
{
display You are done. You are out of Gold.
halt
}
exevent drag #findid 2500
wait 10
exevent dropc #BackpackID
wait 20
Return
-
change
if #findkind = 0
{
display You are done. You are out of Gold.
halt
}
to
if #findkind = -1
{
display You are done. You are out of Gold.
halt
}
If no gold is found this variable will be -1.
-
Have you considered
msg Withdraw 2500 $
instead of drag/drop stuff?
-
I thought the exact same thing as soon as I read this Cerv! But scotch is also right about the -1.
In EasyUO, #false = -1, #true = 0
-
I concur that speaking 'withdraw' is probably a better option. Pair it with a journal scan for art_thou to recognize when you're out of gold.
-
Maybe even scan around to make sure there's a banker prior to the message as well.
Item type, event property, if banker notin #property - something those lines...
-
If I can pull directly from bank box I can stay hidden 100% of the time. Thats why I wanted to stay away from "withdraw", but I got it working, ran all night on a trial account and got me 40k of each reg. Just ran a secondary script that if I was attacked it would call guards.
-
Why not use the #gold and then withdraw the difference.
; statusbar must be open or #gold is not set
If #gold < 2500
{
set %Gold 2500 - #gold
msg Withdraw %Gold $
}