Results 1 to 9 of 9

Thread: ALMOST Flawless avoid beam

  1. #1
    iBot User
    Join Date
    Jan 2013
    Posts
    303
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    18 Post(s)
    Reputation
    19
    Rep Power
    4

    Lightbulb ALMOST Flawless avoid beam

    I have just made this action to avoid beam while hunting in "Keep Away" stance
    but the deal is, it still need 2 things and i dont know how to do that

    first thing: It have to avoid ramps/stair and holes and i dont know all the ids
    second thing: i think that tilewalkable() may not be working properly

    so, here it go:

    Lua Code:
    --------Action by Felipepiva--------
    local   EAST    = positive(posx + 1)
    local   WEST    = positive(posx - 1)
    local   NORTH   = positive(posy - 1)
    local   SOUTH   = positive(posy + 1)
    local   UNWALKABLE = {2025, 2029, 2030, 2043, 2044, 2045, 2046, 2047, 2048, 2059, 2060, 2061, 2445, 2446, 2447,
     2448, 2449, 2450, 2451, 2452, 2453, 2454, 2465, 2466, 2467, 2468, 2524, 2904, 2959, 2960, 2961, 2962, 2963, 2964,
     2975, 2976, 2979, 2982, 2986, 2997, 2998, 2999, 3000, 3484, 3485, 3486, 3487, 3510, 3511, 3512, 3513, 5046, 5055,
     5056, 6109, 6110, 6111, 6112, 6367, 6368, 6369, 6370, 7860, 7861, 7862, 7863, 9132,
     9141, 10208, 10210, 10211, 10212, 10213, 10214, 10215}
     
    if target.posx == posx then
        local rand = math.random(1,2)
            if     (rand == 1) and tilewalkable(EAST , posy, posz) == true 
            and isitemontile(EAST , posy, posz) ~= UNWALKABLE  then move('e')
                else if tilewalkable(WEST , posy, posz) == true 
                and isitemontile(WEST , posy, posz) ~= UNWALKABLE then move('w')
        end
        if (rand == 2) and tilewalkable(WEST , posy, posz) == true
       and isitemontile(WEST , posy, posz) ~= UNWALKABLE then move('w')
            else if tilewalkable(EAST , posy, posz) == true 
           and isitemontile(EAST , posy, posz) ~= UNWALKABLE then move('e') 
        end
            end
    end
    end
    if target.posy == posy then
        local rand = math.random(1,2)
            if     (rand == 1) and tilewalkable(posx , NORTH, posz) == true
          and isitemontile(posx, NORTH, posz) ~= UNWALKABLE  then move('n')
                else if tilewalkable(posx , SOUTH, posz) == true 
              and isitemontile(posx, SOUTH, posz) ~= UNWALKABLE then move('s')
        end
      if (rand == 2) and tilewalkable(posx , SOUTH, posz) == true 
      and isitemontile(posx, SOUTH, posz) ~= UNWALKABLE then move('s')
            else if tilewalkable(posx , NORTH, posz) == true 
           and isitemontile(posx, NORTH, posz) ~= UNWALKABLE then move('n') 
        end
            end
    end
    end
    Last edited by felipepiva; 06-02-2014 at 06:29 PM.

  2. #2
    iBot User
    Join Date
    Jan 2013
    Posts
    303
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    18 Post(s)
    Reputation
    19
    Rep Power
    4
    bring up my post

    Anyone can fix this?

  3. #3
    iBot User
    Join Date
    Jan 2013
    Posts
    303
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    18 Post(s)
    Reputation
    19
    Rep Power
    4
    Anyoneeeee???
    Bumpbumpbump

  4. #4
    iBot User
    Join Date
    Jan 2013
    Posts
    303
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    18 Post(s)
    Reputation
    19
    Rep Power
    4
    bummmmmmmmmmmmmmmmmmp

  5. #5
    iBot User
    Join Date
    Jan 2013
    Posts
    303
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    18 Post(s)
    Reputation
    19
    Rep Power
    4
    BUMP

  6. #6
    iBot User
    Join Date
    Jan 2013
    Posts
    303
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    18 Post(s)
    Reputation
    19
    Rep Power
    4
    Bumpbumpbump

  7. #7
    iBot User
    Join Date
    Jan 2013
    Posts
    303
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    18 Post(s)
    Reputation
    19
    Rep Power
    4
    Bumpzooooor

  8. #8
    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
    mmmm Kind of dont care since it will probably just be fixed in ibot+

    The mount of effort it would require doesn't justify for the little difference it would make and for it to just be made redundant bot the functionality of the bot

    Also, looking at what you've done...

    For the isitemontile() = UNWALKABLE, this is comparing to an array, so it is only ever going to check 2025, the first item in the array. You'd need to make a loop around this so it check all the ids.

    Also, its also redundant, because istilewalkable() already checks if its walkable, regardless of items

    What you would need to do is make the loop check all IDS of stirs/ladders/holes, ect. But I'm not figuring out what all those ids are, theres too many.

    Apart from that, in theory it could work.

    Furthermore, I'm not sue if iftilewalkable() considers holes/stairs a walkable id. It is walkable, but its also changing floor, so im not sure what it would consider them.

    then again, I don't know how "smart" move() is, move() might even avoid stairs/holes

    But ultimately, I personally don't care, because most mobs use waves and aoe attacks, not just beams. and even still, you're probably going to get hit by a lot of beams.
    Last edited by pink_panther; 05-29-2014 at 12:35 AM.

  9. #9
    iBot User
    Join Date
    Jan 2013
    Posts
    303
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    18 Post(s)
    Reputation
    19
    Rep Power
    4
    Quote Originally Posted by pink_panther View Post
    mmmm Kind of dont care since it will probably just be fixed in ibot+

    The mount of effort it would require doesn't justify for the little difference it would make and for it to just be made redundant bot the functionality of the bot

    Also, looking at what you've done...

    For the isitemontile() = UNWALKABLE, this is comparing to an array, so it is only ever going to check 2025, the first item in the array. You'd need to make a loop around this so it check all the ids.

    Also, its also redundant, because istilewalkable() already checks if its walkable, regardless of items

    What you would need to do is make the loop check all IDS of stirs/ladders/holes, ect. But I'm not figuring out what all those ids are, theres too many.

    Apart from that, in theory it could work.

    Furthermore, I'm not sue if iftilewalkable() considers holes/stairs a walkable id. It is walkable, but its also changing floor, so im not sure what it would consider them.

    then again, I don't know how "smart" move() is, move() might even avoid stairs/holes

    But ultimately, I personally don't care, because most mobs use waves and aoe attacks, not just beams. and even still, you're probably going to get hit by a lot of beams.
    i get that, this action was suposed to avoid beams from hf fighters to bot on inqui

    so, lets wait for ibot+

Posting Permissions

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