Results 1 to 7 of 7

Thread: Leaving respawn.

  1. #1
    iBot User
    Join Date
    May 2013
    Posts
    35
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    9 Post(s)
    Reputation
    10
    Rep Power
    4

    Leaving respawn.

    Trying to figure out why the bot leaves EVERY single time it hits this waypoint. did i do something wrong?

    Code:
    if cap <= 30 then gotolabel('Refill')
        else gotolabel('hunt')
        end
    end
    if itemcount("Mana Potion") < 10 then gotolabel('Refill')
        else gotolabel('hunt')
        end
    end

  2. #2
    iBot User
    Join Date
    May 2012
    Location
    Poland
    Posts
    102
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    6 Post(s)
    Reputation
    10
    Rep Power
    5
    try this

    Code:
    if itemcount(Mana Potion) < 10 
         or 
           cap <= 30 
             then 
                 gotolabel("Refill")
             else
                 gotolabel("hunt")
    end
    Last edited by majlolbk; 03-08-2014 at 06:43 PM.

  3. #3
    Normal User
    Join Date
    May 2012
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    useful

  4. #4
    Focus Group bofing's Avatar
    Join Date
    Jun 2012
    Location
    Poland
    Posts
    664
    Mentioned
    18 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    52 Post(s)
    Reputation
    95
    Rep Power
    6
    Quote Originally Posted by Boznian View Post
    Trying to figure out why the bot leaves EVERY single time it hits this waypoint. did i do something wrong?

    Code:
    if cap <= 30 then gotolabel('Refill')
        else gotolabel('hunt')
        end
    end
    if itemcount("Mana Potion") < 10 then gotolabel('Refill')
        else gotolabel('hunt')
        end
    end
    you got a wrong made action, too many "end" inside it

    PHP Code:
    if cap <= 30 then gotolabel('Refill')
        else 
    gotolabel('hunt')
    end

    if itemcount("Mana Potion") < 10 then gotolabel('Refill')
        else 
    gotolabel('hunt')
    end 
    or better, this one:
    PHP Code:
    if cap <= 30 or itemcount("Mana Potion") < 10 then gotolabel('Refill')
        else 
    gotolabel('hunt')
    end 

  5. #5
    iBot User
    Join Date
    May 2013
    Posts
    35
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    9 Post(s)
    Reputation
    10
    Rep Power
    4
    i figured out the issue and it was none of those. i used " instead of ' next to mana potion. therefore it didnt work properly what so ever...

  6. #6
    iBot User walukasz's Avatar
    Join Date
    Feb 2012
    Location
    Poland
    Posts
    312
    Mentioned
    39 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    25 Post(s)
    Reputation
    67
    Rep Power
    5
    Quote Originally Posted by Boznian View Post
    i figured out the issue and it was none of those. i used " instead of ' next to mana potion. therefore it didnt work properly what so ever...
    If this is what you figured out then you failed badly. " or ' does not matter here if you use it consequently both "Mana Potion" and 'Mana Potion' is ok, only problem would be "Mana Potion' or 'Mana Potion"

    Your problem was 2 extra ends that give you syntax error and action is not even executed, action you should use is, as bofing gave you

    Lua Code:
    if cap <= 30 or itemcount("Mana Potion") < 10 then 
    	gotolabel('Refill')
    else 
    	gotolabel('hunt')
    end

  7. #7
    iBot User
    Join Date
    May 2013
    Posts
    35
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    9 Post(s)
    Reputation
    10
    Rep Power
    4
    Honestly when i changed it over to ' it started running fine... but if you say so it must be. thanks anyways

Posting Permissions

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