Results 1 to 6 of 6

Thread: Action suddently stops.

  1. #1
    iBot User
    Join Date
    May 2012
    Location
    Albufeira/Portugal
    Posts
    82
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    10 Post(s)
    Reputation
    11
    Rep Power
    5

    Action suddently stops.

    Hey there, I'm having a really annoying problem with my Vengoth castle script, whenever I bot there after a while(30min - 2 hours) my Exori action stops(not just exori included, also exori gran and hurs & icos). I've tried to change action's Lifetime to 999999 but it keeps stopping sometimes and I keep dying if I go afk cuz character simply heals himself and only shoots exori ico and exori hur.

    Also in my Debug I have the next message: "Action: exori :sleeptime: MinValue is higher than MaxValue"

    Although I've checked the script itself, looking for the values, and unfortunately couldn't sort that out.

    I'll post the script here, please if anyone can help me do it, I'll rep+

    Lua Code:
    -- [[ INIT START ]] --
        local CONFIG = {
            CREATURES = {"Vampire Bride", "Werewolf", "Hellspawn", "Vampire", "Mutated Bat", "Vampire Bride", "Priestess", "Banshee", "Nightmare", "Fury", "Dark Torturer", "Nightstalker", "Bonebeast", "Nightmare Scion", "Spectre", "Gargoyle", "Crypt Shambler", "Demon Skeleton", "Haunted Treeling", "Slime", "War wolf"},
     
            PLAYERS = {
                ENABLED = Player_Safe,
                DISTANCE = 7,
                FLOOR_DIFFERENCE = 1,
                SAFE_LIST = {"Bubble", "Eternal Oblivion"},
            },
     
            SPELLS = {
                --{NAME = "groundshaker", AMOUNT = 6},
                {NAME = "fierce berserk", AMOUNT = AmountToEGran},
                {NAME = "berserk", AMOUNT = AmountToExori},
                {NAME = "front sweep", AMOUNT = AmountToEMin},
                --{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
    Last edited by Eli; 11-06-2014 at 10:12 AM. Reason: highlighter
    Soon, my own store!
    Vocation
    Level
    Script
    Status

  2. #2
    iBot User pink_panther's Avatar
    Join Date
    May 2012
    Location
    Australia
    Posts
    4,075
    Mentioned
    49 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    178 Post(s)
    Reputation
    309
    Rep Power
    10
    Who wrote it? have them check it.

    There are a bunch of loops in it, it's probably getting stuck in one of the, and not ending.

    that or put a print() message inside each loop, run it until it gets stuck and find which loop its stuck in

  3. #3
    iBot User
    Join Date
    Aug 2013
    Posts
    70
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    27 Post(s)
    Reputation
    29
    Rep Power
    4
    isnt this from eli┤s script and are u using ibot+?

  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 mi2bru View Post
    isnt this from eli┤s script and are u using ibot+?
    No it's not, it's old sirmate exori action.

  5. #5
    iBot User
    Join Date
    May 2012
    Location
    Albufeira/Portugal
    Posts
    82
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    10 Post(s)
    Reputation
    11
    Rep Power
    5
    @pink_panther Dont even know what "loops" are Haha so u can imagine how ill fix it.. @mi2bru yeah I'm using Ibot+
    Soon, my own store!
    Vocation
    Level
    Script
    Status

  6. #6
    iBot User pink_panther's Avatar
    Join Date
    May 2012
    Location
    Australia
    Posts
    4,075
    Mentioned
    49 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    178 Post(s)
    Reputation
    309
    Rep Power
    10
    I don't like sirmates stuff, his lib basically re-writes functions that already exist for no reasons...

    Anyway, use this and when it gets stuck go to Help > Debug and take a screenshot for me.

    Lua Code:
    -- [[ INIT START ]] --
        local CONFIG = {
            CREATURES = {"Vampire Bride", "Werewolf", "Hellspawn", "Vampire", "Mutated Bat", "Vampire Bride", "Priestess", "Banshee", "Nightmare", "Fury", "Dark Torturer", "Nightstalker", "Bonebeast", "Nightmare Scion", "Spectre", "Gargoyle", "Crypt Shambler", "Demon Skeleton", "Haunted Treeling", "Slime", "War wolf"},
     
            PLAYERS = {
                ENABLED = Player_Safe,
                DISTANCE = 7,
                FLOOR_DIFFERENCE = 1,
                SAFE_LIST = {"Bubble", "Eternal Oblivion"},
            },
     
            SPELLS = {
                --{NAME = "groundshaker", AMOUNT = 6},
                {NAME = "fierce berserk", AMOUNT = AmountToEGran},
                {NAME = "berserk", AMOUNT = AmountToExori},
                {NAME = "front sweep", AMOUNT = AmountToEMin},
                --{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
    			print("loop 1")
                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
    			print("loop 4")
                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
    		print("loop 2")
            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
    						print("loop 3")
                            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
    						print("loop 5")
                            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

Posting Permissions

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