Results 1 to 4 of 4

Thread: Need Hotkey player attack

  1. #1
    iBot User
    Join Date
    May 2012
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5

    Need Hotkey TO ALERT player attack

    Need Hotkey player attack hehe becosue when i run to dp my alarm off and if someone trap me and attack alarm dont work;/ so i need hotkeys for this alarm thansk
    Last edited by pysio; 09-10-2012 at 06:24 PM.

  2. #2
    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
    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])
       settargeting("off")
       setcavebot("off")
         if UseRune == true and itemcount(WhatRune) > 0 then
            useitemontarget(WhatRune, ptable[1])
            wait(2000)
         end
    else
    settargeting("on")
    setcavebot("on")
    end
    or
    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
    Last edited by soder; 09-04-2012 at 09:25 PM.

  3. #3
    iBot User
    Join Date
    May 2012
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    hmm but i need only hotkey for alarm when player attack me :P i dont wanna attack player heheh i need only sound when player attack me :P

  4. #4
    iBot User
    Join Date
    May 2012
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    Bump i need hotkey to alert player attack !

Posting Permissions

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