Results 1 to 6 of 6

Thread: Cast Spells

  1. #1
    Normal User
    Join Date
    Aug 2012
    Posts
    28
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    8 Post(s)
    Reputation
    10
    Rep Power
    5

    Cast Spells

    My char don´t cast exori spells, exori hur and etc when monster are close, it´s killing with melee. Please help me, i´m new o ibot.

    PS: I´m using sirmate´s lybrary

  2. #2
    Normal User
    Join Date
    Aug 2012
    Posts
    28
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    8 Post(s)
    Reputation
    10
    Rep Power
    5
    And for sure attacking actions are ok

  3. #3
    Moderator Drakke's Avatar
    Join Date
    Jun 2012
    Location
    Sweden
    Posts
    1,898
    Mentioned
    216 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    390 Post(s)
    Reputation
    366
    Rep Power
    10
    Post the action please

  4. #4
    Normal User
    Join Date
    Aug 2012
    Posts
    28
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    8 Post(s)
    Reputation
    10
    Rep Power
    5
    How i put actions here?

    Just paste?
    Last edited by thehawk; 03-15-2014 at 09:39 AM.

  5. #5
    Normal User
    Join Date
    Aug 2012
    Posts
    28
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    8 Post(s)
    Reputation
    10
    Rep Power
    5
    Lua Code:
    local Monsters = {"Crawler", "Insectoid Worker", "Swarmer", "Waspoid", "Spitter", "Kollos", "Spidris", "Spidris Elite"}
     
    local function nearStack()
        if (posx >= 33584 and posx <= 33587 and posy >= 31283 and posy <= 31286 and posz == 7) then 
            return true
        end
     
        return false
    end
     
    if targeting then
        if maround(1, unpack(Monsters)) >= 3 then
        if ((paround(4, true) == 0 and nearStack() == false) or not PvP) then
                if cancast("exori") then
                    cast("exori")
                elseif cancast("exori gran") then
                    cast("exori gran")
                elseif cancast("exori min") and (Self.MonstersAroundSpell("FRONT", "n", unpack(Monsters)) == 3 or Self.MonstersAroundSpell("FRONT", "e", unpack(Monsters)) == 3 or Self.MonstersAroundSpell("FRONT", "w", unpack(Monsters)) == 3 or Self.MonstersAroundSpell("FRONT", "s", unpack(Monsters)) == 3) then
                    if Self.MonstersAroundSpell("FRONT", "n", unpack(Monsters)) == 3 then
                        while Self.LookDirection() ~= "n" do
                            turn("n")
                            wait(10, 20)
                        end
                        cast("exori min")
                    elseif Self.MonstersAroundSpell("FRONT", "e", unpack(Monsters)) == 3 then
                        while Self.LookDirection() ~= "e" do
                            turn("e")
                            wait(10, 20)
                        end
                        cast("exori min")
                    elseif Self.MonstersAroundSpell("FRONT", "s", unpack(Monsters)) == 3 then
                        while Self.LookDirection() ~= "s" do
                            turn("s")
                            wait(10, 20)
                        end
                        cast("exori min")
                    elseif Self.MonstersAroundSpell("FRONT", "w", unpack(Monsters)) == 3 then
                        while Self.LookDirection() ~= "w" do
                            turn("w")
                            wait(10, 20)
                        end
                        cast("exori min")
                    end
                end
            elseif ((paround(4, true) >= 0 or nearStack()) and PvP) and target.id ~= 0 then
                if cancast("exori ico") then
                    cast("exori ico")
                    wait(1025, 1050)
                elseif cancast("exori hur") then
                    cast("exori hur")
                    wait(1025, 1050)
                end
            end
            elseif maround(1, unpack(Monsters)) == 2 then
            if ((paround(4, true) == 0 and nearStack() == false) or not PvP) then
                if cancast("exori min") and (Self.MonstersAroundSpell("FRONT", "n", unpack(Monsters)) == 3 or Self.MonstersAroundSpell("FRONT", "e", unpack(Monsters)) == 3 or Self.MonstersAroundSpell("FRONT", "w", unpack(Monsters)) == 3 or Self.MonstersAroundSpell("FRONT", "s", unpack(Monsters)) == 3) then
                    if Self.MonstersAroundSpell("FRONT", "n", unpack(Monsters)) == 3 then
                        while Self.LookDirection() ~= "n" do
                            turn("n")
                            wait(10, 20)
                        end
                        cast("exori min")
                    elseif Self.MonstersAroundSpell("FRONT", "e", unpack(Monsters)) == 3 then
                        while Self.LookDirection() ~= "e" do
                            turn("e")
                            wait(10, 20)
                        end
                        cast("exori min")
                    elseif Self.MonstersAroundSpell("FRONT", "s", unpack(Monsters)) == 3 then
                        while Self.LookDirection() ~= "s" do
                            turn("s")
                            wait(10, 20)
                        end
                        cast("exori min")
                    elseif Self.MonstersAroundSpell("FRONT", "w", unpack(Monsters)) == 3 then
                        while Self.LookDirection() ~= "w" do
                            turn("w")
                            wait(10, 20)
                        end
                        cast("exori min")
                    end
                elseif cancast("exori") then
                    cast("exori")
                elseif cancast("exori ico") then
                    cast("exori ico")
                    wait(1025, 1050)
                elseif cancast("exori hur") then
                    cast("exori hur")
                    wait(1025, 1050)
                end
            elseif ((paround(4, true) >= 0 or nearStack()) and PvP) and target.id ~= 0 then
                if cancast("exori ico") then
                    cast("exori ico")
                    wait(1025, 1050)
                elseif cancast("exori hur") then
                    cast("exori hur")
                    wait(1025, 1050)
                end
            end
            elseif (maround(1, unpack(Monsters)) + maround(1, "Lesser Swarmer") >= 4 and maround(1, "Lesser Swarmer") >= 3) then
            if ((paround(4, true) == 0 and nearStack() == false) or PvP == false) then
                if cancast("exori") then
                    cast("exori")
                    wait(200, 400)
                end
            elseif ((paround(4, true) >= 0 or nearStack() == false) and PvP == true) and target.id ~= 0 then
                if cancast("exori ico") then
                    cast("exori ico")
                    wait(1025, 1050)
                elseif cancast("exori hur") then
                    cast("exori hur")
                    wait(1025, 1050)
                end
            end
        elseif (maround(1, unpack(Monsters)) == 2) then
            if ((paround(4, true) == 0 and nearStack() == false) or PvP == false) then
                if cancast("exori min") and (Self.MonstersAroundSpell("FRONT", "n", unpack(Monsters)) >= 2 or Self.MonstersAroundSpell("FRONT", "e", unpack(Monsters)) >= 2 or Self.MonstersAroundSpell("FRONT", "w", unpack(Monsters)) >= 2 or Self.MonstersAroundSpell("FRONT", "s", unpack(Monsters)) >= 2) then
                    if Self.MonstersAroundSpell("FRONT", "n", unpack(Monsters)) >= 2 then
                        while Self.LookDirection() ~= "n" do
                            turn("n")
                            wait(10, 20)
                        end
                        cast("exori min")
                    elseif Self.MonstersAroundSpell("FRONT", "e", unpack(Monsters)) >= 2 then
                        while Self.LookDirection() ~= "e" do
                            turn("e")
                            wait(10, 20)
                        end
                        cast("exori min")
                    elseif Self.MonstersAroundSpell("FRONT", "s", unpack(Monsters)) >= 2 then
                        while Self.LookDirection() ~= "s" do
                            turn("s")
                            wait(10, 20)
                        end
                        cast("exori min")
                    elseif Self.MonstersAroundSpell("FRONT", "w", unpack(Monsters)) >= 2 then
                        while Self.LookDirection() ~= "w" do
                            turn("w")
                            wait(10, 20)
                        end
                        cast("exori min")
                    end
                elseif cancast("exori ico") then
                    cast("exori ico")
                    wait(1025, 1050)
                elseif cancast("exori hur") then
                    cast("exori hur")
                    wait(1025, 1050)
                end
            elseif ((paround(4, true) >= 0 or nearStack() == false) and PvP == true) and target.id ~= 0 then
                if cancast("exori ico") then
                    cast("exori ico")
                    wait(1025, 1050)
                elseif cancast("exori hur") then
                    cast("exori hur")
                    wait(1025, 1050)
                end
            end
        elseif maround(1, unpack(Monsters)) == 1 and target.id ~= 0 then
            if cancast("exori ico") then
                cast("exori ico")
                wait(1025, 1050)
            elseif cancast("exori hur") then
                cast("exori hur")
                wait(1025, 1050)
            end
        elseif maround(5, unpack(Monsters)) >= 1 and target.id ~= 0 and target.hppc < 80 then
            if cancast("exori hur") then
                cast("exori hur")
                wait(1025, 1050)
            end
        end
    end
    Last edited by shanp; 03-15-2014 at 01:02 PM. Reason: added [luas] tags

  6. #6
    Normal User RafiXWPT's Avatar
    Join Date
    Jun 2012
    Location
    (Poland) http://rafixwptscripts.com
    Posts
    1,602
    Mentioned
    31 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    128 Post(s)
    Reputation
    128
    Rep Power
    9
    omg, better use that:
    Lua Code:
    -- [[ INIT START ]] --
        local CONFIG = {
            CREATURES = {"Sea Serpent", "Young Sea Serpent"},
     
            PLAYERS = {
                ENABLED = true,
                DISTANCE = 14,
                FLOOR_DIFFERENCE = 1,
                SAFE_LIST = {"Bubble", "Eternal Oblivion"},
            },
     
            SPELLS = {
                --{NAME = "groundshaker", AMOUNT = 6},
                {NAME = "fierce berserk", AMOUNT = 4},
                {NAME = "berserk", AMOUNT = 3},
                {NAME = "front sweep", AMOUNT = 2},
                --{NAME = "annihilation", HP_PC = 45},
                {NAME = "brutal strike", HP_PC = 10},
                {NAME = "whirlwind throw", HP_PC = 10},
            },
        }
     
        -- [[ DO NOT CHANGE ANYTHING BELOW THIS LINE. ]] --
     
        SPELLS_CONFIG = SPELLS_CONFIG or {}
        LAST_FLOOR = LAST_FLOOR or Self.PositionZ()
        ATTACK_EXHAUST = ATTACK_EXHAUST or 0
     
        table.lower(CONFIG.CREATURES)
     
        local RESET_SPELLS_CONFIG = #CONFIG.SPELLS ~= #SPELLS_CONFIG
     
        if (not RESET_SPELLS_CONFIG) then
            for INDEX, SPELL_ENTRY in ipairs(CONFIG.SPELLS) do
                if (SPELL_ENTRY.NAME ~= SPELLS_CONFIG[INDEX].NAME or ((SPELL_ENTRY.AMOUNT and SPELL_ENTRY.AMOUNT ~= SPELLS_CONFIG[INDEX].AMOUNT) or (SPELL_ENTRY.HP_PC and SPELL_ENTRY.HP_PC ~= SPELLS_CONFIG[INDEX].HP_PC))) then
                    RESET_SPELLS_CONFIG = true
                    break
                end
            end
        end
     
        if (RESET_SPELLS_CONFIG) then
            SPELLS_CONFIG = {}
     
            local CURRENT_INDEX = 1
     
            while (#CONFIG.SPELLS >= CURRENT_INDEX) do
                CONFIG.SPELLS[CURRENT_INDEX].INFO = Spell.GetByWordsOrName(CONFIG.SPELLS[CURRENT_INDEX].NAME)
     
                if (not CONFIG.SPELLS[CURRENT_INDEX].INFO:isValid()) then
                    table.remove(CONFIG.SPELLS, CURRENT_INDEX)
                else
                    if (#CONFIG.SPELLS[CURRENT_INDEX].INFO:Condition() > 0 and table.find({"BIG_BEAM", "BIG_WAVE", "FRONT", "SMALL_BEAM", "SMALL_WAVE", "STRIKE"}, CONFIG.SPELLS[CURRENT_INDEX].INFO:Condition())) then
                        CONFIG.SPELLS[CURRENT_INDEX].NEED_DIRECTION = true
                    else
                        CONFIG.SPELLS[CURRENT_INDEX].NEED_DIRECTION = false
                    end
     
                    CURRENT_INDEX = CURRENT_INDEX + 1
                end
            end
        end
    -- [[ INIT END ]] --
     
    if (Self.PositionZ() ~= LAST_FLOOR) then
        LAST_FLOOR, ATTACK_EXHAUST = Self.PositionZ(), System.TimeMilliseconds() + 2000
        return
    end
     
    if (System.TimeMilliseconds() > ATTACK_EXHAUST) then
        for _, SPELL_ENTRY in ipairs(CONFIG.SPELLS) do
            if (SPELL_ENTRY.INFO:isAbleToCast(nil, false)) then
                local ATTACKED = Creature.GetAttacked()
     
                if (SPELL_ENTRY.AMOUNT and (not CONFIG.PLAYERS.ENABLED or Self.PlayersAroundFloorIgnore(CONFIG.PLAYERS.DISTA  NCE, CONFIG.PLAYERS.FLOOR_DIFFERENCE, unpack(CONFIG.PLAYERS.SAFE_LIST)) == 0)) then
                    local HIGHEST_AMOUNT, BEST_DIRECTION = 0, Self.LookDirection()
     
                    if (SPELL_ENTRY.NEED_DIRECTION) then
                        for DIRECTION, CREATURES_AMOUNT in pairs({[DIRECTION_NORTH] = 0, [DIRECTION_EAST] = 0, [DIRECTION_SOUTH] = 0, [DIRECTION_WEST] = 0}) do
                            CREATURES_AMOUNT = Self.MonstersAroundSpell(SPELL_ENTRY.INFO:Conditio  n(), DIRECTION, unpack(CONFIG.CREATURES))
     
                            if (CREATURES_AMOUNT > HIGHEST_AMOUNT or (CREATURES_AMOUNT >= HIGHEST_AMOUNT and DIRECTION == Self.LookDirection())) then
                                HIGHEST_AMOUNT, BEST_DIRECTION = CREATURES_AMOUNT, DIRECTION
                            end
                        end
                    else
                        HIGHEST_AMOUNT, BEST_DIRECTION = Self.MonstersAroundSpell(SPELL_ENTRY.INFO:Conditio  n(), Self.LookDirection(), unpack(CONFIG.CREATURES)), Self.LookDirection()
                    end
     
                    if (HIGHEST_AMOUNT >= SPELL_ENTRY.AMOUNT) then
                        while (Self.LookDirection() ~= BEST_DIRECTION) do
                            Self.Turn(BEST_DIRECTION)
                            System.Wait(25, 75)
                        end
     
                        if (SPELL_ENTRY.INFO:CastSpell()) then
                            System.Wait(Self.CoolDown(SPELL_GROUP_ATTACK))
                        end
                    end
                elseif (SPELL_ENTRY.HP_PC and SPELL_ENTRY.INFO:isAbleToCast(ATTACKED, false) and table.find(CONFIG.CREATURES, ATTACKED:Name():lower()) and SPELL_ENTRY.HP_PC >= ATTACKED:HealthPercent()) then
                    if (SPELL_ENTRY.INFO:CastSpell(ATTACKED)) then
                        System.Wait(Self.CoolDown(SPELL_GROUP_ATTACK))
                    end
                end
            end
        end
    end


    just config creatures, and number of monsters for each spell

Posting Permissions

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