DragonsBreath
02-19-2016, 02:58 AM
Greetings!
So, I'm new at Xenobot. But I'm starting to get it down with scripts and such.. or somewhat. Can someone lend me a hand in helping me figure out how to make it so when my character reaches level 20, for instance, it will go to the label in walker called "Lowerfloor"?
Probably a newby question, but I can't figure it out for the life of me, and search results aren't helping too much. xD
Anyway, thank you for your time and help! :D
-DB
My attempt at scripting this:
registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
function onWalkerSelectLabel(labelName)
if (labelName == "Checklevel") then
if (Self.Level() >= 20) then
Walker.Goto("Lowerfloor")
print([[Moneytime!]])
else
Walker.Goto("Start")
print([[Not quite!]])
end
end
end
So, I'm new at Xenobot. But I'm starting to get it down with scripts and such.. or somewhat. Can someone lend me a hand in helping me figure out how to make it so when my character reaches level 20, for instance, it will go to the label in walker called "Lowerfloor"?
Probably a newby question, but I can't figure it out for the life of me, and search results aren't helping too much. xD
Anyway, thank you for your time and help! :D
-DB
My attempt at scripting this:
registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
function onWalkerSelectLabel(labelName)
if (labelName == "Checklevel") then
if (Self.Level() >= 20) then
Walker.Goto("Lowerfloor")
print([[Moneytime!]])
else
Walker.Goto("Start")
print([[Not quite!]])
end
end
end