Results 1 to 8 of 8

Thread: Anti Skull

  1. #1
    Normal User
    Join Date
    Jun 2012
    Location
    Canada
    Posts
    33
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    6 Post(s)
    Reputation
    9
    Rep Power
    0

    Anti Skull

    I'm looking for a script that avoids facing a player at all costs... So when I'm hunting with spells, they can't force me to take skull... Anybody can help? Thanks.

  2. #2
    Normal User
    Join Date
    Jun 2012
    Location
    Canada
    Posts
    33
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    6 Post(s)
    Reputation
    9
    Rep Power
    0
    Also, if 2 or more players come onto screen, I would like it to stop targetting and stop cavebotting

  3. #3
    Normal User
    Join Date
    Jun 2012
    Location
    Sweden
    Posts
    1,671
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    8 Post(s)
    Reputation
    132
    Rep Power
    9
    Change direction, credits to Sirmate
    PHP Code:
    local function isPlayerOnTile(POSITION_XPOSITION_YPOSITION_Z)
        
    local TILE_DATA gettile(POSITION_XPOSITION_YPOSITION_Z)
        
        for 
    CURRENT_INDEX 0TILE_DATA.count do
            if (
    TILE_DATA.items[CURRENT_INDEX].id == 99 and TILE_DATA.items[CURRENT_INDEX].count <= 0x40000000then
                
    return true
            end
        end
        
        
    return false
    end


    if (30 >= target.hppc and target.id and paround(4) > 0then
        local POSITIONS
    FREE_DIRECTIONS = {{0= -1DIR = [[n]]}, {10DIR = [[e]]}, {01DIR = [[s]]}, {= -10DIR = [[w]]}}, {}
            
        if (
    isPlayerOnTile(posx POSITIONS[getcreature(id).direction 1].Xposy POSITIONS[getcreature(id).direction 1].Yposz)) then
            
    for _POSITION in ipairs(POSITIONS) do
                if (
    not isPlayerOnTile(posx POSITION.Xposy POSITION.Yposz)) then
                    table
    .insert(FREE_DIRECTIONSPOSITION.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_DIRECTIONwait(2575)
                
    end
            end
        end
    end 
    Stop targeting & cavebot
    PHP Code:
    if (paround(7,false) >= 2then
        settargeting
    ("no")
        
    setcavebot("no")
    else
        
    settargeting("yes")
        
    setcavebot("yes")
    end 

  4. #4
    Normal User
    Join Date
    Jun 2012
    Location
    Canada
    Posts
    33
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    6 Post(s)
    Reputation
    9
    Rep Power
    0
    Thanks A lot! This thread can be closed now

  5. #5
    iBot User
    Join Date
    Jul 2012
    Posts
    246
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    7
    Rep Power
    0
    where u change dirrections?``

  6. #6
    iBot User
    Join Date
    Jul 2012
    Posts
    246
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    7
    Rep Power
    0
    Quote Originally Posted by soder View Post
    Change direction, credits to Sirmate
    PHP Code:
    local function isPlayerOnTile(POSITION_XPOSITION_YPOSITION_Z)
        
    local TILE_DATA gettile(POSITION_XPOSITION_YPOSITION_Z)
        
        for 
    CURRENT_INDEX 0TILE_DATA.count do
            if (
    TILE_DATA.items[CURRENT_INDEX].id == 99 and TILE_DATA.items[CURRENT_INDEX].count <= 0x40000000then
                
    return true
            end
        end
        
        
    return false
    end


    if (30 >= target.hppc and target.id and paround(4) > 0then
        local POSITIONS
    FREE_DIRECTIONS = {{0= -1DIR = [[n]]}, {10DIR = [[e]]}, {01DIR = [[s]]}, {= -10DIR = [[w]]}}, {}
            
        if (
    isPlayerOnTile(posx POSITIONS[getcreature(id).direction 1].Xposy POSITIONS[getcreature(id).direction 1].Yposz)) then
            
    for _POSITION in ipairs(POSITIONS) do
                if (
    not isPlayerOnTile(posx POSITION.Xposy POSITION.Yposz)) then
                    table
    .insert(FREE_DIRECTIONSPOSITION.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_DIRECTIONwait(2575)
                
    end
            end
        end
    end 
    Stop targeting & cavebot
    PHP Code:
    if (paround(7,false) >= 2then
        settargeting
    ("no")
        
    setcavebot("no")
    else
        
    settargeting("yes")
        
    setcavebot("yes")
    end 

    what do u mean with change dirrections? this one didnt work for me atleast oi copy and pasted it in actions, but stil dont work

  7. #7
    Normal User
    Join Date
    Jun 2012
    Location
    Sweden
    Posts
    1,671
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    8 Post(s)
    Reputation
    132
    Rep Power
    9
    If a player is in front of you when targeting a monster and it got less than 30% HP it will change direction.

  8. #8
    iBot User
    Join Date
    Jul 2012
    Posts
    246
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    7
    Rep Power
    0
    but u said i have to change cordinates or something ? do i need to edit something?

Posting Permissions

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