PDA

View Full Version : Script Error(?)



Machaveli
06-16-2012, 01:43 AM
-delete-

Spectrus
06-16-2012, 05:32 AM
first line of your file is dofile() calling itself...

it's gonna keep calling itself until it dies a horrible tragic death.

Machaveli
06-16-2012, 11:55 AM
-delete-

Machaveli
06-16-2012, 04:52 PM
-delete-

L!p3
06-16-2012, 05:05 PM
registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
function onWalkerSelectLabel(labelName)
if (labelName == "Check") then
delayWalker(3000)
if (Self.ItemCount(3031) >= 1500) then
gotoLabel("Gobank")
else
gotoLabel("Start")
end
elseif (labelName == "Deposit") then
delayWalker(3000)
Self.Say("Hi")
sleep(math.random(700, 1400))
Self.SayToNpc("Deposit all")
sleep(math.random(700, 1400))
Self.SayToNpc("Yes")
elseif (labelName == "End") then
delayWalker(3000)
gotoLabel("Start")
end
end

Check if it works.

Machaveli
06-16-2012, 05:27 PM
-delete-

Machaveli
06-16-2012, 05:31 PM
-delete-

L!p3
06-16-2012, 05:35 PM
Now it works, but with the script I am using, the depositer and everything goes perfectly, but the problem is that when it is standing next to the NPC, it says hi, deposit all then before it says 'yes', the bot walks off.

I was thinking if I make the script use the 'stand' action 3 times instead of once.. it will have enough time to say yes, could this solution work, or is there something even better and more organised than this?

Also, I do really appreciate the help your giving me.. thank you a lot!

You can use delayWalker(time) or while talking with the NPC just turn the Walker OFF.
As you are already using delayWalker, just set a high delay.


delayWalker(math.random(4000,8000))

Or setting walker on/off.


registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
function onWalkerSelectLabel(labelName)
if (labelName == "Check") then
delayWalker(3000)
if (Self.ItemCount(3031) >= 1500) then
gotoLabel("Gobank")
else
gotoLabel("Start")
end
elseif (labelName == "Deposit") then
setWalkerEnabled(false)
Self.SayToNpc({"hi", "deposit all", "yes"}, 65)
setWalkerEnabled(true)
elseif (labelName == "End") then
delayWalker(3000)
gotoLabel("Start")
end
end

I've changed the say method, the Self.SayToNpc have an internal delay, so u don't need to write sleep, wait, etc.
This delay can be changed just changing the last number, in this case the number 65.

Machaveli
06-16-2012, 05:45 PM
-delete-