Results 1 to 2 of 2

Thread: if playerattacking then kill this player.

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

    if playerattacking then kill this player.

    Hello.


    When i was hunting someone started attacking me. My 42 EK was killed by 12 paladin.
    I am looking for script like this~:

    Code:

    if playerattacking then
    setcavebot("off")
    wait(300)
    settargeting("off")
    wait(300)
    attack("enemy")
    end

    and script, if this attacking player disapear from screen bot will setcavebot and targeting on.





    ALSO:
    how to drop 1 royal spear when cap is lower than XXX

  2. #2
    Normal User
    Join Date
    May 2012
    Posts
    80
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    4 Post(s)
    Reputation
    11
    Rep Power
    5
    Code:
    -Script Made by Nosekim
    --Attack PK
    
    local SafeList = {"Uncle Barry", "Brabo", "Lord'Paulistinha"}
    local UseRune = true --set true or false
    local WhatRune = "sudden death rune"
    
    
    --do not change below
    
    local pgot = getcreatures("ps")
    local ptable = {}
    local pqtd = pgot.count 
    local msgs = getmessages("Server Log")
    local qtd = msgs.count-1
    
    
    for i=0,pqtd-1 do
       for k=3,5 do
            if msgs[qtd].text:find("You lose (%d+) hitpoints due to an attack by "..pgot[i].name..".") and pgot[i].skull == k then
               table.insert(ptable, pgot[i].name)
            end
       end
    end
    
    if #ptable > 0 and not table.find(SafeList, ptable[1]) then
       attack(ptable[1])
       if getsettings("Settings\\CaveBot\\Enabled") == "yes" or getsettings("Settings\\Targeting\\Enabled") == "yes" then
       settargeting("off")
       setcavebot("off")
         if UseRune == true and itemcount(WhatRune) > 0 then
            useitemontarget(WhatRune, ptable[1])
            wait(2000)
         end
        end
    elseif #ptable == 0 and getsettings("Settings\\CaveBot\\Enabled") == 'no'
    or #ptable == 0 and getsettings("Settings\\Targeting\\Enabled") == 'no' then
    settargeting("yes")
    setcavebot("yes")
    end

    should work ;d

    credits to : Nosekim
    Last edited by gankbaka; 11-28-2012 at 03:51 PM.

Posting Permissions

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