View Full Version : Position Checker
flax97
05-23-2014, 09:07 PM
Hello I have a problem with lua.Why i cant load this function ?
elseif (label == "BeforeDoor1") then
if not (Self.Position().x == 32821) and (Self.Position().y == 31111) and (Self.Position().z == 7) then
gotoLabel("UseDoor1")
end
XenoScript Error:
Line #: 115
Error: 'end' expected (to close 'function' at line 27) near 'elseif'
This is an error with user-input and should not be reported as a bug with XenoBot.
only4tibia
05-23-2014, 09:14 PM
Read the error. You didn't close the function at line 27, which I would assume is your walker function. Close this function to fix your error. If that is your last elseif label then just add another end after that end.
Regards,
O4T
flax97
05-24-2014, 08:01 AM
Could you look on this script ?
only4tibia
05-24-2014, 11:23 AM
Could you look on this script ?
Hi,
Your problem is the following (starting around line 96):
if (labelName == "UseDoor1") then
Walker.Stop()
Self.UseItemFromGround(32821, 31112, 7)
Walker.Start()
end
if (labelName == "UseDoor2") then
Walker.Stop()
Self.UseItemFromGround(32821, 31112, 7)
Walker.Start()
end
if (labelName == "Targeting") then
Targeting.Start()
end
if (labelName == "NonTargeting") then
Targeting.Stop()
end
You need to change these "if" to 'elseif'. The reason why it is doing nothing on these labels is because with the 'if', it is grouped with the following label and therefore never using the lua you provided. Change the above 'if's to 'elseif' and let me know if you have further problems. You will also need to remove the 'end' from each as well.
elseif (labelName == "resetBP") then
Walker.Stop()
if (HideEquipment) then
Client.HideEquipment()
wait(1000, 1500)
end
Self.CloseContainers()
Self.OpenMainBackpack(true):OpenChildren({LootBP,t rue}, {StackBP, true}, {GoldBP, true})
Walker.Start()
end
Regards,
O4T
flax97
05-24-2014, 02:51 PM
Now is something like this. I am novice in a scripting and i don't understand some things. Could you help me if possible ?
16:45 XenoScript Error:
Script: Blue Djinn Yalahar.lua
Error: attempted to call non-existant event listener
This is an error with user-input and should not be reported as a bug with XenoBot.
ppgab
05-24-2014, 03:30 PM
Now is something like this. I am novice in a scripting and i don't understand some things. Could you help me if possible ?
16:45 XenoScript Error:
Script: Blue Djinn Yalahar.lua
Error: attempted to call non-existant event listener
This is an error with user-input and should not be reported as a bug with XenoBot.
registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
flax97
05-24-2014, 08:02 PM
Really don't understand this bug / problem. Someone could fix it if possible .Please and sorry, but i am novice and i can't repair it
EverlasteR
05-25-2014, 12:01 AM
flax97 you need to add this before your functions starts:
registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
flax97
05-25-2014, 12:29 AM
Sorry i had this lane in my script before start the topic. This is not my problem.
only4tibia
05-25-2014, 03:39 PM
Sorry i had this lane in my script before start the topic. This is not my problem.
The .lua I helped you with first is different than the one you are having problems with now. This one, as your error shows, is blue djiin yalahar. If you could show us the lua for this one as well, someone may be able to help.
Regards,
O4T
flax97
05-25-2014, 03:50 PM
Here u are this script i can't repair it.
only4tibia
05-26-2014, 02:01 AM
Here u are this script i can't repair it.
Hey,
Saw a few things wrong with it. Fixed those. Try it and let me know how it goes.
Regards,
O4T
flax97
05-26-2014, 01:21 PM
Thank you very much. You are so helpful. Scriptis working without problem.
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.