Results 1 to 5 of 5

Thread: Exori Gran when 3 monsters

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

    Exori Gran when 3 monsters

    Hello everyone,

    im trying to edit one scrip so i want to my char makes exori gran when attacked him 3 or more monsters, how to make it?
    I made it basicly, but he makes exori when he SEE monsters, so i mean when attack him 1 monsters, and 2 are running, he makes exori gran to this one, not waiting when the other one comes to 1 sqm. How to make it work right, so when 3 monsters are attacking me, he uses exori gran, not only when 3 are on the screen.

    Thanks for answer,
    Greetings
    Last edited by Eli; 02-15-2015 at 10:17 PM.

  2. #2
    iScripter Eli's Avatar
    Join Date
    Mar 2012
    Posts
    3,764
    Mentioned
    492 Post(s)
    Tagged
    2 Thread(s)
    Quoted
    955 Post(s)
    Reputation
    586
    Rep Power
    10
    Use this action it's easy to configure, spam rate should be 300-500~ and Lifetime: 0



    -- Config
    local MonstersToConsider = {"Monster1", "Monster2", "Monste3", "Monster4"} -- you can add more
    local Exori_gran = true
    local Exori = true
    local Exori_min = true
    local Exori_gran_count = 2
    local Exori_count = 2
    local Exori_ico_count = 1
    local Exori_hur_count = 1
    local Exori_min_count = 2

    local function Min()
    local HIGHEST_AMOUNT, BEST_DIRECTION = 0, Self.LookDirection()

    for DIRECTION, CREATURES_AMOUNT in pairs({[DIRECTION_NORTH] = 0, [DIRECTION_EAST] = 0, [DIRECTION_SOUTH] = 0, [DIRECTION_WEST] = 0}) do
    CREATURES_AMOUNT = Self.MonstersAroundSpell("FRONT", DIRECTION, unpack(MonstersToConsider))

    if (CREATURES_AMOUNT > HIGHEST_AMOUNT or (CREATURES_AMOUNT >= HIGHEST_AMOUNT and DIRECTION == Self.LookDirection())) then
    HIGHEST_AMOUNT, BEST_DIRECTION = CREATURES_AMOUNT, DIRECTION
    end
    end
    if (HIGHEST_AMOUNT >= 3) and cancast("exori min") and maround(1, unpack(MonstersToConsider)) >= Exori_min_count then
    while (Self.LookDirection() ~= BEST_DIRECTION) do
    Self.Turn(BEST_DIRECTION)
    updateworld()
    end
    cast("exori min")
    elseif (HIGHEST_AMOUNT == 2) and cancast("exori min") and maround(1, unpack(MonstersToConsider)) >= Exori_min_count then
    while (Self.LookDirection() ~= BEST_DIRECTION) do
    Self.Turn(BEST_DIRECTION)
    updateworld()
    end
    cast('exori min')
    end
    end

    function TILESHOOTABLE()
    for POSX, POSY, POSZ in Tile.ScreenArea() do
    if Tile.GetByPosition(target.POSX, target.POSY, target.POSZ):isShootable() then
    return true
    end
    end
    return false
    end

    if Self.CoolDown(SPELL_GROUP_ATTACK) <= 1 then
    if standtime >= 2000 or getsettings("Settings\\Targeting\\Enabled") == "yes" then
    if maround(1, unpack(MonstersToConsider)) >= Exori_gran_count and cancast('exori gran') and ((paround(10, true) == 0) or not PvP_Server) and Exori_gran and Self.CoolDown(SPELL_GROUP_ATTACK) == 0 then
    cast('exori gran')
    elseif maround(1, unpack(MonstersToConsider)) >= Exori_count and cancast('exori') and ((paround(10, true) == 0) or not PvP_Server) and Exori and Self.CoolDown(SPELL_GROUP_ATTACK) == 0 then
    cast('exori')
    elseif maround(1, unpack(MonstersToConsider)) >= Exori_min_count and cancast('exori min') and ((paround(10, true) == 0 ) or not PvP_Server) and Exori_min and Self.CoolDown(SPELL_GROUP_ATTACK) == 0 then
    Min()
    elseif (maround(1, unpack(MonstersToConsider)) >= Exori_ico_count) and cancast('exori ico') and target.id ~= 0 and Self.CoolDown(SPELL_GROUP_ATTACK) == 0 then
    cast('exori ico')
    elseif ((maround(5, unpack(MonstersToConsider)) >= Exori_hur_count)) and cancast('exori hur') and target.id ~= 0 and TILESHOOTABLE() and Self.CoolDown(SPELL_GROUP_ATTACK) == 0 then
    cast('exori hur')
    end
    else
    if (maround(1, unpack(MonstersToConsider)) >= Exori_ico_count) and cancast('exori ico') and target.id ~= 0 and Self.CoolDown(SPELL_GROUP_ATTACK) == 0 then
    cast('exori ico')
    elseif ((maround(5, unpack(MonstersToConsider)) >= Exori_hur_count)) and cancast('exori hur') and target.id ~= 0 and TILESHOOTABLE() and Self.CoolDown(SPELL_GROUP_ATTACK) == 0 then
    cast('exori hur')
    end
    end
    end

  3. #3
    iBot User
    Join Date
    Jun 2012
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    15 Post(s)
    Reputation
    10
    Rep Power
    5
    OMG, is that so hard? I though it's enough to "click" in some places for it work well ...

    So all i need to change is:
    local Exori_gran_count = 2 - is number how many monsters should be around me;
    local MonstersToConsider = {"Monster1", - monster which i wanna kill;

    And that's all?

    Thank you Bro for help,
    Greetings

    ------EDIT--------

    Should I coppy it into "Actions -> list" ?

    And "normal attack" which i made in "Targeting" which use exori should i delete, right?
    Last edited by chaosruler; 02-15-2015 at 06:48 PM.

  4. #4
    iScripter Eli's Avatar
    Join Date
    Mar 2012
    Posts
    3,764
    Mentioned
    492 Post(s)
    Tagged
    2 Thread(s)
    Quoted
    955 Post(s)
    Reputation
    586
    Rep Power
    10
    Quote Originally Posted by chaosruler View Post
    OMG, is that so hard? I though it's enough to "click" in some places for it work well ...

    So all i need to change is:
    local Exori_gran_count = 2 - is number how many monsters should be around me;
    local MonstersToConsider = {"Monster1", - monster which i wanna kill;

    And that's all?

    Thank you Bro for help,
    Greetings

    ------EDIT--------

    Should I coppy it into "Actions -> list" ?

    And "normal attack" which i made in "Targeting" which use exori should i delete, right?
    No that's easy I just pasted you the action which I use on my scripts

    Yes go to actions > list > create new action > copy all code to script > change spamrate, lifetime and enable

  5. #5
    iBot User
    Join Date
    Jun 2012
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    15 Post(s)
    Reputation
    10
    Rep Power
    5
    It works perfect,
    Thank you

Posting Permissions

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