Results 1 to 6 of 6

Thread: Anti KS

  1. #1
    iBot User Vigilante Alert's Avatar
    Join Date
    Jun 2012
    Posts
    218
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    12
    Rep Power
    5

    Anti KS

    I did this action but my problem is in stopattack(). The problem is when have ppl in screen that persist in stop attack, i just want that stop to not kill his monster but not the mine.

    PHP Code:
    if paround(15) > 0 then
    setsettings
    ("Settings\\Targeting\\Monsters\\Lizard High Guard\\MustAttackMe""yes")
    wait(100)
    setsettings("Settings\\Targeting\\Monsters\\Lizard Legionnaire\\MustAttackMe""yes")
    wait(100)
    setsettings("Settings\\Targeting\\Monsters\\Lizard Zaogun\\MustAttackMe""yes")
    wait(100)
    setsettings("Settings\\Targeting\\Monsters\\Lizard Dragon Priest\\MustAttackMe""yes")
    wait(100)
    setsettings("Settings\\Targeting\\Monsters\\Killer Caiman\\MustAttackMe""yes")
    stopattack()
    else
    setsettings("Settings\\Targeting\\Monsters\\Lizard High Guard\\MustAttackMe""no")
    wait(100)
    setsettings("Settings\\Targeting\\Monsters\\Lizard Legionnaire\\MustAttackMe""no")
    wait(100)
    setsettings("Settings\\Targeting\\Monsters\\Lizard Zaogun\\MustAttackMe""no")
    wait(100)
    setsettings("Settings\\Targeting\\Monsters\\Lizard Dragon Priest\\MustAttackMe""no")
    wait(100)
    setsettings("Settings\\Targeting\\Monsters\\Killer Caiman\\MustAttackMe""no")
    end 
    any suggestion?
    The action work, I helped you, so thank doing:
    Rep +
    A action funcionou, eu ajudei vc, então agradeça fazendo:
    Rep +
    Its to increase my reputation as helper.

  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:
    local r = 5 -- Range.
    local safelist = {'Bubble', 'Eternal Oblivion'} -- The bot WILL KS this players. Add more to this if you want.
    table.insert(safelist, name) -- Do not edit it.
    local ppos = {}
    local pinfo = _getcreatures("psf")
    local cinfo = _getcreatures("msf")
    
    for a = 1, pinfo.count do
        local ab=a-1
        if not table.find(safelist, pinfo[ab].name) then
            table.insert(ppos, {x = pinfo[ab].x, y = pinfo[ab].y})
        end
    end
    
    for b = 1, cinfo.count do
        local ignore = false
        local bb=b-1
        if cinfo[bb].id ~= target.id then
            for i = 1, #ppos do
                local difx, dify = ppos[i].x - cinfo[bb].x, ppos[i].y - cinfo[bb].y
                if math.abs(difx) <= r and math.abs(dify) <= r then
                    ignore = true
                    if cinfo[bb].ignored == false then
                        ignorecreature(cinfo[bb].id,true)
                        stopattack()
                    end
                    break
                end
            end
        end
        if ignore == false and cinfo[bb].ignored == true then
            ignorecreature(cinfo[bb].id, true)
            stopattack()
        end
    end
    if target.id ~= 0 then
        if target.ignored then
            stopattack()
        end
    end
    Credits to Raphael i think

  3. #3
    iBot User Vigilante Alert's Avatar
    Join Date
    Jun 2012
    Posts
    218
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    12
    Rep Power
    5
    Quote Originally Posted by Ropiderz View Post
    Please use the search next time, this forum have about 10+ threads only for this hotkey.
    to be honest, I was wanting to modify and wanted to help someone to change this action.
    Last edited by Vigilante Alert; 09-04-2012 at 08:39 PM.
    The action work, I helped you, so thank doing:
    Rep +
    A action funcionou, eu ajudei vc, então agradeça fazendo:
    Rep +
    Its to increase my reputation as helper.

  4. #4
    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:
    if (paround(15) > 0) and (getsettings("Settings\\Targeting\\Monsters\\Lizard High Guard\\MustAttackMe") == "no") then 
    setsettings("Settings\\Targeting\\Monsters\\Lizard High Guard\\MustAttackMe", "yes") 
    wait(100) 
    setsettings("Settings\\Targeting\\Monsters\\Lizard Legionnaire\\MustAttackMe", "yes") 
    wait(100) 
    setsettings("Settings\\Targeting\\Monsters\\Lizard Zaogun\\MustAttackMe", "yes") 
    wait(100) 
    setsettings("Settings\\Targeting\\Monsters\\Lizard Dragon Priest\\MustAttackMe", "yes") 
    wait(100) 
    setsettings("Settings\\Targeting\\Monsters\\Killer Caiman\\MustAttackMe", "yes") 
    stopattack() 
    else 
    setsettings("Settings\\Targeting\\Monsters\\Lizard High Guard\\MustAttackMe", "no") 
    wait(100) 
    setsettings("Settings\\Targeting\\Monsters\\Lizard Legionnaire\\MustAttackMe", "no") 
    wait(100) 
    setsettings("Settings\\Targeting\\Monsters\\Lizard Zaogun\\MustAttackMe", "no") 
    wait(100) 
    setsettings("Settings\\Targeting\\Monsters\\Lizard Dragon Priest\\MustAttackMe", "no") 
    wait(100) 
    setsettings("Settings\\Targeting\\Monsters\\Killer Caiman\\MustAttackMe", "no") 
    end

  5. #5
    Normal User
    Join Date
    Apr 2012
    Posts
    45
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    very good sodel, i like u idea, i'll test now

  6. #6
    iBot User
    Join Date
    Mar 2012
    Location
    Brasil
    Posts
    392
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    4 Post(s)
    Reputation
    38
    Rep Power
    5
    Quote Originally Posted by soder View Post
    Code:
    if (paround(15) > 0) and (getsettings("Settings\\Targeting\\Monsters\\Lizard High Guard\\MustAttackMe") == "no") then 
    setsettings("Settings\\Targeting\\Monsters\\Lizard High Guard\\MustAttackMe", "yes") 
    wait(100) 
    setsettings("Settings\\Targeting\\Monsters\\Lizard Legionnaire\\MustAttackMe", "yes") 
    wait(100) 
    setsettings("Settings\\Targeting\\Monsters\\Lizard Zaogun\\MustAttackMe", "yes") 
    wait(100) 
    setsettings("Settings\\Targeting\\Monsters\\Lizard Dragon Priest\\MustAttackMe", "yes") 
    wait(100) 
    setsettings("Settings\\Targeting\\Monsters\\Killer Caiman\\MustAttackMe", "yes") 
    stopattack() 
    else 
    setsettings("Settings\\Targeting\\Monsters\\Lizard High Guard\\MustAttackMe", "no") 
    wait(100) 
    setsettings("Settings\\Targeting\\Monsters\\Lizard Legionnaire\\MustAttackMe", "no") 
    wait(100) 
    setsettings("Settings\\Targeting\\Monsters\\Lizard Zaogun\\MustAttackMe", "no") 
    wait(100) 
    setsettings("Settings\\Targeting\\Monsters\\Lizard Dragon Priest\\MustAttackMe", "no") 
    wait(100) 
    setsettings("Settings\\Targeting\\Monsters\\Killer Caiman\\MustAttackMe", "no") 
    end
    Its working?
    Someone test?
    i will test at night ty

Posting Permissions

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