Results 1 to 8 of 8

Thread: How to make anty stuck script - tips?

  1. #1
    Normal User
    Join Date
    Aug 2013
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    4

    How to make anty stuck script - tips?

    Hello i'm making my script and my question is how can i protect it before stuck ?
    atm i'm using
    PHP Code:
    if islocation(xxxthen
        gotolabel
    (yyy)
    return
    end 
    after every floor change : after i rope/enter stairs i have stand -> action
    but it looks like its not enough cuz sometimes [rare] he just stack is there any other way to add some check-ups actions ?
    Last edited by kapusta; 01-22-2014 at 06:29 PM.

  2. #2
    zami84's Avatar
    Join Date
    May 2012
    Posts
    316
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    1 Post(s)
    Reputation
    48
    Rep Power
    5
    Lua Code:
     if posz ~= 7 then gotolabe("xxx")
    end

    working while changnin floors

  3. #3
    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
    I dont put location checks after EVERY rope/ladder/hole ect, it causes more problems.

    What happens is you drop down, but there is a delay in tibia, but the bot drops down, tries to do the stand, but cant because it thinks it's above still because the bot is faster than tibia, then does location check, still thinks its above, then jumps back to another label, then you get stuck.


    I make groups of wpts like, Wpts from Resupply to Hunt loop, label it ReachHunt then do a single islocation check to see if you are at hunt, if not, it loops all the way back.

    IF it ever fails to rope/drop down, ect, it doesnt matter, it will always recover.

    My Suggestion is to you is to use minimal wpts.Eg Only use wpts for where you need to be, not tonnes of node/walk wpts leading to the place, so you can do 1 big loop, and if it does need to loop around, you dont make your char walk back and forth again and again.

    You can grab some of my free scripts and look at how I do wpts. I have several loops. 1 Loop for Resupply, 1 for Reach hunt, 1 for the hunt loop, 1 for leaving hunt back to depo. back to start.
    Last edited by pink_panther; 01-22-2014 at 09:04 PM.

  4. #4
    Normal User
    Join Date
    Aug 2013
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    4
    I will do that =)
    btw:
    a)
    PHP Code:
     if posz ~= 7 then gotolabe("xxx")
    end 
    means floor other than 7 right ?
    b)
    what is the max distance between wpts?
    c)
    [before i looked at ur scripts]
    for example i'm already on hunt like wpts 1 - 2 - 3 - 4 and loop[way back?] 5 - 6 - 7 - 9 if he bugg at wpt 3? he will still going cuz he find way on wpt 5?
    d)
    in some scripts i found if not isolocation() then ... but there is not written wpt in brackets so how he know what wpt i mean ?
    Last edited by kapusta; 01-23-2014 at 06:14 AM.

  5. #5
    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 kapusta View Post
    I will do that =)
    btw:
    a)
    PHP Code:
     if posz ~= 7 then gotolabe("xxx")
    end 
    means floor other than 7 right ?
    b)
    what is the max distance between wpts?
    c)
    [before i looked at ur scripts]
    for example i'm already on hunt like wpts 1 - 2 - 3 - 4 and loop[way back?] 5 - 6 - 7 - 9 if he bugg at wpt 3? he will still going cuz he find way on wpt 5?
    d
    in some scripts i found if not isolocation() then ... but there is not written wpt in brackets so how he know what wpt i mean ?
    a) ~= means Does not equal

    b) about 50

    c) i dont know what you mean

    d) islocation() takes the x,y,z of the action wpt it runs on.

  6. #6
    Normal User
    Join Date
    Aug 2013
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    4
    OK i look at ur scripts and i know what to change but i still doesnt understant 2 functions:
    PHP Code:
    gotolabel(wpt.id-2
    what the formula mean inside the bracket
    and
    PHP Code:
    if islocation(3
    what the number mean inside the bracket

    /\ thats the last questions and topic will be solved =) Thanks for tips

  7. #7
    iBot User
    Join Date
    Aug 2012
    Posts
    805
    Mentioned
    18 Post(s)
    Tagged
    2 Thread(s)
    Quoted
    38 Post(s)
    Reputation
    180
    Rep Power
    7
    PHP Code:
    gotolabel(wpt.id-2
    it will turn to 2 wpts before, ex.

    stand1
    stand2
    action gotolabel(wpt.id-2) -- it will skip to stand1

    PHP Code:
    if islocation(3
    3 means you can be +-3 fields (range) near action x,y,z

  8. #8
    Normal User
    Join Date
    Aug 2013
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    4
    Thanks for answers. Please change prefix for SOLVED =)

Posting Permissions

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