Results 1 to 4 of 4

Thread: [resquest] safe strike

  1. #1
    Normal User
    Join Date
    Aug 2012
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5

    [resquest] safe strike

    someone have any safe strike (exori vis, exori flam, exori frigo.. etc) working? i cant do it

    thanks

  2. #2
    iScripter Eli's Avatar
    Join Date
    Mar 2012
    Posts
    3,764
    Mentioned
    492 Post(s)
    Tagged
    2 Thread(s)
    Quoted
    956 Post(s)
    Reputation
    586
    Rep Power
    10
    Code:
     local function isPlayerOnTile(POSITION_X, POSITION_Y, POSITION_Z)
        local TILE_DATA = gettile(POSITION_X, POSITION_Y, POSITION_Z)
        
        for CURRENT_INDEX = 0, TILE_DATA.count - 1 do
            if (TILE_DATA.items[CURRENT_INDEX].id == 99 and TILE_DATA.items[CURRENT_INDEX].count <= 0x40000000) then
                return true
            end
        end
        
        return false
    end
    
    
    if (30 >= target.hppc and target.id > 0 and paround(4) > 0) then
        local POSITIONS, FREE_DIRECTIONS = {{X = 0, Y = -1, DIR = [[n]]}, {X = 1, Y = 0, DIR = [[e]]}, {X = 0, Y = 1, DIR = [[s]]}, {X = -1, Y = 0, DIR = [[w]]}}, {}
            
        if (isPlayerOnTile(posx + POSITIONS[getcreature(id).direction + 1].X, posy + POSITIONS[getcreature(id).direction + 1].Y, posz)) then
            for _, POSITION in ipairs(POSITIONS) do
                if (not isPlayerOnTile(posx + POSITION.X, posy + POSITION.Y, posz)) then
                    table.insert(FREE_DIRECTIONS, POSITION.DIR)
                end
            end
            
            if(#FREE_DIRECTIONS > 0) then
                local TURN_DIRECTION = FREE_DIRECTIONS[math.random(#FREE_DIRECTIONS)]
    
    
                while ((({[[n]], [[e]], [[s]], [[w]]})[getcreature(id).direction + 1]) ~= TURN_DIRECTION) do
                    turn(TURN_DIRECTION) wait(25, 75)
                end
            end
        end
    end
    by sirmate

  3. #3
    Normal User
    Join Date
    Aug 2012
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    thanks, btw i need his library?

  4. #4
    iBot User
    Join Date
    Sep 2012
    Posts
    18
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    1 Post(s)
    Reputation
    10
    Rep Power
    5
    where do i put this?

Posting Permissions

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