Signup Now
Page 1 of 18 12311 ... LastLast
Results 1 to 10 of 180

Thread: Spells Attacker

  1. #1
    Moderator Leonardo's Avatar
    Join Date
    Dec 2013
    Location
    Brazil
    Posts
    758
    Reputation
    77
    Rep Power
    22
    Spells Attacker


    Description

    Attacks monsters with areas, waves, beams or support spells.


    Configuration

    Add monsters names on the Monsters variable to consider those monsters on the spells areas, an empty list will use on any monster.

    Set Players.Consider to true if you are playing on PvP worlds, this option will avoid using spells when there are players near, set false to ignore this option.
    If you have set Players.Consider to true, edit the minimum distance to consider them by changing the Distance parameter. To consider floors up and down use the FloorDifference parameter. Optionally you can add friends on the SafeList so the attacker will ignore them.

    For each spell entry you can input the Name. Set Amount if you want to cast on a specific amount of creatures around the spell or Hppc, if you want to shoot on a specific target until it have less than the health percent previously set.

    For the SpecialAreas you can input areas where you don't want to cast spell, such as near stairs, holes. The default entry is x-axis¹, x-axis², y-axis¹, y-axis² and z-axis.

    If you want to use this script only when Targeting engine is enabled then set UseTargetState to true, if you want to use it all the time set it to false.


    Code

    init start

    local Monsters = {"Swampling", "Snake", "Marsh Stalker", "Water Buffalo", "Salamander", "Emerald Damselfly"}

    local Players = {
    Consider = true,
    Distance = 10,
    FloorDifference = 1,
    SafeList = {"Bubble", "Eternal Oblivion"},
    }

    local Spells = {
    {Name = "exori gran", Amount = 4},
    {Name = "exori", Amount = 3},
    {Name = "exori min", Amount = 2},
    {Name = "exori ico", Hppc = 10},
    {Name = "exori hur", Hppc = 10},
    {Name = "utito tempo", Amount = 5},
    }

    local SpecialAreas = {
    -- {min x, max x, min y, max y, z}
    }

    local UseTargetState = false

    -- DO NOT CHANGE ANYTHING BELOW THIS LINE

    local i, LastFloor, Exhaust = 1, $posz, $timems

    while Spells[i] ~= nil do
    Spells[i].Info = spellinfo(Spells[i].Name)

    if Spells[i].Info.words == 0 then
    table.remove(Spells, i)
    else
    Spells[i].Monsters = Spells[i].Monsters or Monsters
    Spells[i].NeedDirection = table.find({"WaveSmall", "WaveMedium", "WaveVerySmall", "WaveBig", "BeamSmall", "BeamBig", "Front", "Strike"}, Spells[i].Info.castarea) ~= nil
    Spells[i].AttackSupport = Spells[i].Info.group:match("Support") ~= nil

    table.lower(Spells[i].Monsters)
    i = i + 1
    end
    end

    init end

    auto(200, 400)

    if $posz ~= LastFloor then
    LastFloor, Exhaust = $posz, $timems + 2000
    return
    end

    if $timems >= Exhaust and ($targeting or not UseTargetState) then
    for _, Spell in ipairs(Spells) do
    if cancast(Spell.Info) and not isinsidearea(SpecialAreas) then
    if Spell.Amount and (not Players.Consider or paroundfloorignore(Players.Distance, Players.FloorDifference, unpack(Players.SafeList)) == 0) then
    local BestAmount, BestDir = 0, $self.dir

    if Spell.NeedDirection then
    for Dir, Amount in pairs({n = 0, e = 0, s = 0, w = 0}) do
    Amount = maroundspell(Spell.Name, Dir, unpack(Spell.Monsters))

    if Amount > BestAmount or (Amount >= BestAmount and Dir == $self.dir) then
    BestAmount, BestDir = Amount, Dir
    end
    end
    else
    BestAmount = not Spell.AttackSupport and maroundspell(Spell.Name, BestDir, unpack(Spell.Monsters)) or maround(1, false, unpack(Spell.Monsters))
    end

    if BestAmount >= math.max(Spell.Amount, 1) then
    while $self.dir ~= BestDir do
    turn(BestDir) waitping()
    end
    cast(Spell.Name) waitping()
    end
    elseif Spell.Hppc and $attacked.hppc >= math.max(Spell.Hppc, 1) and table.find(Spell.Monsters, $attacked.name:lower()) and cancast(Spell.Info, $attacked) then
    cast(Spell.Name) waitping()
    end
    end
    end
    end

    Download
    Last edited by Leonardo; 03-16-2015 at 06:00 PM.

  2. #2
    Moderator mistgun's Avatar
    Join Date
    Dec 2013
    Location
    Lodz, Poland
    Posts
    1,821
    Reputation
    220
    Rep Power
    26
    Nice, gonna test :P

  3. #3
    Free User thenick's Avatar
    Join Date
    Dec 2013
    Posts
    72
    Reputation
    10
    Rep Power
    21
    That's for sure something i'm gonna use ALOT in my scripts. I love doing hardcore mage scripts with Several attacks.

  4. #4
    Wind Powered
    Join Date
    Dec 2013
    Location
    dvscripts.com
    Posts
    7,105
    Reputation
    433
    Rep Power
    39
    Its works Great, but would be good if you can setup Exori Ico/Hur when how many monsters cuz i setup HPPC to 100% and its not attacking with this spell idk why ;>, and if i will make in Targeting to shoot exori ico and hur then it spam it instead exori etc

    Also he is not shooting Utito Tempo i setup it for One and it don't shoot it
    Last edited by Dworak; 12-13-2013 at 08:19 AM.

  5. #5
    Moderator Leonardo's Avatar
    Join Date
    Dec 2013
    Location
    Brazil
    Posts
    758
    Reputation
    77
    Rep Power
    22
    Quote Originally Posted by Dworak View Post
    Its works Great, but would be good if you can setup Exori Ico/Hur when how many monsters cuz i setup HPPC to 100% and its not attacking with this spell idk why ;>, and if i will make in Targeting to shoot exori ico and hur then it spam it instead exori etc

    Also he is not shooting Utito Tempo i setup it for One and it don't shoot it
    Hmm, I'll check this thanks. You are using wrong, it'll cast spells on Hppc mode if monsters have more than X health, no monster have 101% of health. The default 10 will attack monster from 100 to 10 percent with exori ico for example.

  6. #6
    Wind Powered
    Join Date
    Dec 2013
    Location
    dvscripts.com
    Posts
    7,105
    Reputation
    433
    Rep Power
    39
    it wasn't working anyway and if i want shoot exori ico/hur i can' because it will spell even if there is 1 monster
    Regards and thanks

  7. #7
    Free User rtr0x's Avatar
    Join Date
    Dec 2013
    Location
    Brazil
    Posts
    13
    Reputation
    18
    Rep Power
    0
    thank you!

  8. #8
    Moderator Leonardo's Avatar
    Join Date
    Dec 2013
    Location
    Brazil
    Posts
    758
    Reputation
    77
    Rep Power
    22
    Fixed bugs with Hppc settings and utito tempo, now you can add a third parameter Monsters inside each spell entry, for example:

    {Name = "exori gran", Amount = 5, Monsters = {"Nightmare", "Nighmare Scion"}}


    Will set this spell to attack this list of monsters instead of the primary list. Very usefull if you want to attack different monsters with different spells.

  9. #9
    Wind Powered
    Join Date
    Dec 2013
    Location
    dvscripts.com
    Posts
    7,105
    Reputation
    433
    Rep Power
    39
    okey Thanks a lot !
    Last edited by Dworak; 12-13-2013 at 08:38 PM.

  10. #10
    Free User joraanpe's Avatar
    Join Date
    Dec 2013
    Posts
    212
    Reputation
    36
    Rep Power
    21
    Hey mate, how can we set this up to work withh spells on certain amount of monsters but in a higher amount use area rune?

 

 

Posting Permissions

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