XenoBot Forums - Powered by vBulletin

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Position Checker

  1. #1

    Join Date
    Dec 2013
    Posts
    14
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Position Checker

    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.

  2. #2

    Join Date
    Apr 2013
    Posts
    314
    Mentioned
    65 Post(s)
    Tagged
    0 Thread(s)
    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

  3. #3

    Join Date
    Dec 2013
    Posts
    14
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Could you look on this script ?
    Attached Files Attached Files

  4. #4

    Join Date
    Apr 2013
    Posts
    314
    Mentioned
    65 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by flax97 View Post
    Could you look on this script ?
    Hi,

    Your problem is the following (starting around line 96):

    lua code:

    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.

    lua code:

    elseif (labelName == "resetBP") then
    Walker.Stop()
    if (HideEquipment) then
    Client.HideEquipment()
    wait(1000, 1500)
    end
    Self.CloseContainers()
    Self.OpenMainBackpack(true):OpenChildren({LootBP,true}, {StackBP, true}, {GoldBP, true})
    Walker.Start()
    end




    Regards,
    O4T
    Last edited by only4tibia; 05-24-2014 at 11:27 AM.

  5. #5

    Join Date
    Dec 2013
    Posts
    14
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    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.

  6. #6
    Senior Member ppgab's Avatar
    Join Date
    Mar 2014
    Location
    Brazil
    Posts
    986
    Mentioned
    86 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by flax97 View Post
    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")

  7. #7

    Join Date
    Dec 2013
    Posts
    14
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    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

  8. #8

    Join Date
    Dec 2011
    Posts
    146
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    @flax97 you need to add this before your functions starts:
    registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")

  9. #9

    Join Date
    Dec 2013
    Posts
    14
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Sorry i had this lane in my script before start the topic. This is not my problem.
    Last edited by flax97; 05-25-2014 at 12:33 AM.

  10. #10

    Join Date
    Apr 2013
    Posts
    314
    Mentioned
    65 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by flax97 View Post
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •