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 Pause Bot if mana LOSS is different than X
Pause Bot if mana LOSS is different than X.

I didn't tested the codes that i will post, but people can use it as "start" to adapt for its own needs.

Check for mana LOSS. If your mana's DECREASED value was different than listed values since last run, it will play a sound, flash client and pause bot.
MANA_LOSS_VALUES = { 20, 25 } means it will check if your lost mana value is equal to 20 or 25. If it's not then it will pause bot.
ACCEPTABLE_MISSING_VALUE set script to doesn't triggers if the missing value is equal to the table value minus this value.

Pay attention: The verification is based on last time the script run, so watch your Persistent Interval.
Example: If persistent interval is 1000ms then it will work like this: (SCRIPT RUNS) -> waits 1000ms -> (SCRIPT RUNS). So the script will check if you lost X mana in last seconds (1000ms), that means if you set a high Persistent Interval then it may not work properly. TEST IT BEFORE LEAVING AFK!

If you are casting exura only then setup MANA_LOSS_VALUES = { 25 }. Because you would lose 25 mana after casting exura.
If you are casting exura and utevo lux then setup MANA_LOSS_VALUES = { 20, 25 }. Because you would lose 20 or 25 mana after casting those spells.

ACCEPTABLE_MISSING_VALUE: This serves as a safety parameter because of the persistent delay.
Example: Without this parameter, if your spell requires 20 mana and after you cast it, you suddenly heals 1 mana, you would lose 19 mana, not 20, so it would trigger pause. But if you setup ACCEPTABLE_MISSING_VALUE = 2, the script would not trigger pause if you lost 20, 19 or 18 mana.
Think that it's like a mistake margin!

local MANA_LOSS_VALUES = { 20, 25 } -- If mana LOSS different than this values then pause. You should insert the amount of required mana to cast your spells.
local ACCEPTABLE_MISSING_VALUE = 2 -- Doesnt triggers if the missing value is equal to the table value minus this value. This serves as a safety parameter because of the persistent delay. If your spell requires 20 mana, but you lose 19 or 18 (20 - 1 and 20 - 2), this is acceptable.

if connected() then
    LAST_MANA = LAST_MANA or mp()
    local current_mana = mp()
    local lostMana = LAST_MANA - current_mana

    if lostMana > 0 then
        local flag = false
        for _, possibleManaLoss in ipairs(MANA_LOSS_VALUES) do
            if type(possibleManaLoss) == 'string' then
                possibleManaLoss = tonumber(possibleManaLoss)
            if type(possibleManaLoss) == 'number' and (lostMana == possibleManaLoss or (lostMana >= (possibleManaLoss - ACCEPTABLE_MISSING_VALUE) and lostMana <= possibleManaLoss)) then
                flag = true
        if not flag then

    LAST_MANA = current_mana
    LAST_MANA = nil

where do i put the magic i want?

This script doesn't casts spells

Whats the purpose of this script?

Forum Jump:

Forum software by © MyBB Theme © iAndrew 2016