
Originally Posted by
PunktG
i see bot got problem
in 2 part of this script
bot deposit all ,
withdraw gp for mp.
but part with withdraw gp for bolts he ignore
here he buy only some part of bolts
i got in setup 1500 and he buy 400-600 and leave
ofc all this before update was working
~ Try this function and the following will be an example
PHP Code:
function shopbuyitems(item, count)
count = tonumber(count) or 1
repeat
local amnt = math.min(count, 100)
if(Self.ShopBuyItem(item, amnt) == 0)then
return printf("ERROR: failed to buy item: %s", tostring(item))
end
wait(200,500)
count = (count - amnt)
until count <= 0
end
PHP Code:
elseif (labelName == "buyroyalspear") then
setWalkerEnabled(false)
delayWalker(7000)
Self.Say("hi")
sleep(math.random(800, 1700))
Self.SayToNpc("trade")
sleep(math.random(2000, 2400))
shopbuyitems(RoyalSpearID, (WantedRoyalSpears-Self.ItemCount(RoyalSpearID)))
sleep(math.random(800, 1700))
setWalkerEnabled(true)
@DarkstaR ~ Everything seems to be working great! I suppose the only problem I encountered was where I had multiple "break" labels in a Dworc script that I had ~heres an excerpt of the script particularly the place that worked prior to the update but not after:
PHP Code:
<item text="destroy:" tag="255"/>
<item text="destroy:" tag="255"/>
<item text="destroy:" tag="255"/>
<item text="destroy:" tag="255"/>
<item text="destroy:" tag="255"/>
<item text="destroy:" tag="255"/>
<item text="destroy:" tag="255"/>
<item text="destroy:" tag="255"/>
<item text="destroy:" tag="255"/>
<item text="destroy:" tag="255"/>
<item text="destroy:" tag="255"/>
<item text="destroy:" tag="255"/>
<item text="destroy:" tag="255"/>
<item text="destroy:" tag="255"/>
<item text="destroy:" tag="255"/>
<item text="destroy:" tag="255"/>
<item text="destroy:" tag="255"/>
<item text="destroy:" tag="255"/>
<item text="destroy:" tag="255"/>
<item text="destroy:" tag="255"/>
<item text="destroy:" tag="255"/>
<item text="destroy:" tag="255"/>
<item text="destroy:" tag="255"/>
<item text="destroy:" tag="255"/>
<item text="Stand (32631, 32878, 8)" tag="1"/>
Basically I guess it works as it is intended too now..... but basically it hits the first label executes it and of course it skips very fast throught the rest because I guess it assumes its already executed the action and has no need to do it again... so basically I created two labels in the LUA and it works now ~~~ example :
PHP Code:
<item text="destroy:" tag="255"/>
<item text="destroytwo:" tag="255"/>
<item text="destroy:" tag="255"/>
<item text="destroytwo:" tag="255"/>
<item text="destroy:" tag="255"/>
<item text="destroytwo:" tag="255"/>
<item text="destroy:" tag="255"/>
<item text="destroytwo:" tag="255"/>
<item text="destroy:" tag="255"/>
<item text="destroytwo:" tag="255"/>
<item text="destroy:" tag="255"/>
<item text="destroytwo:" tag="255"/>
<item text="destroy:" tag="255"/>
<item text="destroytwo:" tag="255"/>
<item text="destroy:" tag="255"/>
<item text="destroytwo:" tag="255"/>
<item text="destroy:" tag="255"/>
<item text="destroytwo:" tag="255"/>
<item text="destroy:" tag="255"/>
<item text="destroytwo:" tag="255"/>
<item text="destroy:" tag="255"/>
<item text="destroytwo:" tag="255"/>
<item text="destroy:" tag="255"/>
<item text="destroytwo:" tag="255"/>
<item text="Stand (32631, 32878, 8)" tag="1"/>
sorry for the super long post but
anyways great job!!!!!