PDA

View Full Version : Depositing cash in the bank!



metalhector222
05-11-2013, 01:43 AM
Greetings!

Now i have the next problem.

registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
function onWalkerSelectLabel(labelName)
if (labelName == "banco") then
setWalkerEnabled(false)
delayWalker(5000)
Self.SayToNpc({"hi","deposit all","yes"}, 65)
sleep(math.random(700, 1400))
delayWalker(2000)
setWalkerEnabled(true)
end
end


http://thumbs.subefotos.com/256b421d707538b44751b7e9fd7dcea0o.jpg (http://subefotos.com/ver/?256b421d707538b44751b7e9fd7dcea0o.jpg)

Stand
label called "banco"
scritp called "banco"

and

21:06 XenoScript Error:
Script: [One-Liner executed by XenoBot Walker]
Line #: 1
Chunk: [string "banco"]
Error: '=' expected near '<eof>'
This is an error with user-input and should not be reported as a bug with XenoBot.

puttzor
05-11-2013, 02:09 AM
first of all, please learn proper indentation if you want help, that is an eyesore. secondly, in a script like that you don't want the walker to execute it the script. right click your character and click scripter in the dropdown menu. From here you want to execute your script and make it run in the background. give your walker some waypoints after that and make it walk close to the banker with a stand command and then just write a label called banco. your script in the background will detect that your on a label called banco and execute everything in the if (labelName == "banco") statement.

puttzor
05-11-2013, 02:12 AM
so don't the walkers add script function!

try using some indentation, please!
registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")

function onWalkerSelectLabel(labelName)
if (labelName == "banco") then
setWalkerEnabled(false)
delayWalker(5000)
Self.SayToNpc({"hi","deposit all","yes"}, 65)
sleep(math.random(700, 1400))
delayWalker(2000)
setWalkerEnabled(true)
end
end

metalhector222
05-11-2013, 02:26 AM
Its working!

My bad was add the script in the walker.

I just copy and paster from here (http://forums.xenobot.net/showthread.php?5171-Tutorial-Simple-and-useful-LUA&p=54344&viewfull=1#post54344), that explains the not indentation.

I'm glad that you was helping me!

This is my first day testing scripts of Xenbot.

Thanks!

puttzor
05-11-2013, 02:30 AM
no problem! glad I could help :)