Everyone who has never used our Bots before, can test each one for 2 days without any limitation.
The trial is given automatically when you login on the Bot, but in some cases it wouldn't work (security reasons).
If this happens, send me a private message and i will be checking the failed trials manually and adding it for those who didn't get it.
We are looking for resellers who may accept payment methods different from ours, including classictibia's cash, realesta's cash, mastercores' cash, etc. Interested? Click here at anytime.



Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
FREE Cast spell every X seconds and Pause Bot if you lost mana NOT DUE SPELL
#1
Cast spell every X seconds and Pause Bot if you lost mana NOT DUE SPELL.

This script will check if you have enough mana every X seconds, which is based on "DELAY" range that will be a sorted value between that range you setup.
The default settings below will check if you have enough mana ("MANA_TO_CAST") every 10-25 seconds (this is random) to cast "exura".
If takes like 15 seconds to heal enough mana to cast the spell you want then setup those values like Min 15, max 18.

It also checks if you lost mana NOT DUE SPELL to pause bot.

local SPELL = 'exura'
local SPELL_MANA = 25 -- Required mp to cast spell.
local MANA_TO_CAST = 34 -- Cast spell only if mp is higher or equal than this value.
local DELAY = { Min = 10, Max = 25 } -- In seconds. How often check for mana and cast spell? If takes 10 seconds to heal enough mana then you can setup values like Min = 10, Max = 12.
local MANA_LOSS = 1 -- If mana LOSS is higher than this value then pause. This is ignored when casting spell above.

LAST_MANA = LAST_MANA or mp()
NEXT_SPELL = NEXT_SPELL or runningtime()

if connected() then
    if runningtime() >= NEXT_SPELL and cancast() then
        if mp() >= MANA_TO_CAST then
            cast(SPELL)
            wait(300, 500)
        end

        LAST_MANA = mp()
        NEXT_SPELL = runningtime() + random(DELAY.Min, DELAY.Max)
        return
    end

    if (LAST_MANA - mp()) > MANA_LOSS then
        playsound('default')
        flashclient()
        pausebot(true)
    end
    LAST_MANA = mp()
else
    LAST_MANA = nil
end

This will cast spell only after X time, but if you don't have enough mana after X time, it will cast as soon you reach it.
local SPELL = 'exura'
local SPELL_MANA = 25 -- Required mp to cast spell.
local MANA_TO_CAST = 34 -- Cast spell only if mp is higher or equal than this value.
local DELAY = { Min = 10, Max = 25 } -- In seconds. How often check for mana and cast spell? If takes 10 seconds to heal enough mana then you can setup values like Min = 10, Max = 12.
local MANA_LOSS = 1 -- If mana LOSS is higher than this value then pause. This is ignored when casting spell above.

LAST_MANA = LAST_MANA or mp()
NEXT_SPELL = NEXT_SPELL or runningtime()

if connected() then
    if runningtime() >= NEXT_SPELL and cancast() and mp() >= MANA_TO_CAST then
        cast(SPELL)
        wait(300, 500)

        LAST_MANA = mp()
        NEXT_SPELL = runningtime() + random(DELAY.Min, DELAY.Max)
        return
    end

    if (LAST_MANA - mp()) > MANA_LOSS then
        playsound('default')
        flashclient()
        pausebot(true)
    end
    LAST_MANA = mp()
else
    LAST_MANA = nil
end
Reply

#2
NOT DUE SPEL

What do you mean by that I don't understand
Reply

#3
I don't know how I can make this any clearer. The script casts spells, but also checks to see if your mana has decreased without it being in the same turn the script casts a spell, that means you lost mana due to any other reason but NOT DUE SPELL.
Reply

#4
now i understand thanks

as soon as he gets the desired mana he releases the magic, I changed the time from 15 to 25 to 50 to 90 even so he releases at the time there is no way he takes longer?
Reply

#5
The script casts spell after X time.
Reply



Forum Jump:



Forum software by © MyBB Theme © iAndrew 2016