Results 1 to 6 of 6

Thread: Is location explain

  1. #1
    iBot User
    Join Date
    Sep 2013
    Posts
    38
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    7 Post(s)
    Reputation
    24
    Rep Power
    4

    Is location explain

    Any one can explain me how to make islocation loop? this little part of my script. In my mind is location check that cavebot can reach "next/previous" wpt and return false or true?

    Lua Code:
     
         <leave_depot>Stand 33167 31806 8 0</leave_depot>
          <w009>Stand 33169 31812 8 0</w009>
          <w006>Action 33173 31803 7 if not islocation()
    then
        gotolabel("leave_depot")
    end</w006>
     
    <go_bank>Stand 33173 31803 7 0</go_bank>


    and and it still loop even if bot reach every wpt propely....

  2. #2
    Focus Group MoS's Avatar
    Join Date
    Feb 2012
    Posts
    832
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    63 Post(s)
    Reputation
    77
    Rep Power
    6
    the action is reading the coordenades 33173 31803 7, make sure you create the action exactly where you want the bot to check it... i think if sould be like this:

    PHP Code:
    <leave_depot>Stand 33167 31806 8 0</ leave_depot>
          <
    w009>Stand >>>>>33169 31812 8<<<<< 0</ w009>
          <
    w006>Action>>>>>33169 31812 8<<<<< if not islocation() then gotolabel("leave_depot"end</ w006>
    <
    go_bank>Stand 33173 31803 7 0</ go_bank
    you know what i mean? the previous wpt... is what the action is going to check, so, the coord must be the same

    hope i was clear
    Ajudei você? ...............+REP
    -----------------------------------------
    Did I help you? ..........+REP

  3. #3
    iBot User
    Join Date
    Sep 2013
    Posts
    38
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    7 Post(s)
    Reputation
    24
    Rep Power
    4
    Now i understand more less.

    Anyway i change cordinates of this action to this what u write here and still looping...

  4. #4
    iBot User pink_panther's Avatar
    Join Date
    May 2012
    Location
    Australia
    Posts
    4,075
    Mentioned
    49 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    178 Post(s)
    Reputation
    309
    Rep Power
    10
    Quote Originally Posted by buluss View Post
    Now i understand more less.

    Anyway i change cordinates of this action to this what u write here and still looping...
    thats because your character is not standing at 33169 31812 8

    islocation() takes the xyz of the action this function is used in, if you are not on this corrordinates, it assumes false...

    You have "if not islocation() then" which means if you're not on this xyz (33169 31812 8) then go back to the leave_depo wpt.

    http://www.tibiaibot.com/forum/showt...-Documentation

  5. #5
    iBot User
    Join Date
    Sep 2013
    Posts
    38
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    7 Post(s)
    Reputation
    24
    Rep Power
    4
    Ok understand it now . Thank u again and problem solved.

  6. #6
    iBot User pink_panther's Avatar
    Join Date
    May 2012
    Location
    Australia
    Posts
    4,075
    Mentioned
    49 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    178 Post(s)
    Reputation
    309
    Rep Power
    10
    Awesome

Posting Permissions

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