Hello.
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 gain. If your mana's value increases more than "1" since last run, it will play a sound, flash client and pause bot.
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 gained X mana/health in last seconds (1000ms), that means if you set a high Persistent Interval then it may not work properly. TEST IT BEFORE LEAVING AFK!
Mana
Health
Mana and Health
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 gain. If your mana's value increases more than "1" since last run, it will play a sound, flash client and pause bot.
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 gained X mana/health in last seconds (1000ms), that means if you set a high Persistent Interval then it may not work properly. TEST IT BEFORE LEAVING AFK!
Mana
local MANA_GAIN = 1 -- If mana gain is higher than this value then pause.
if connected() then
LAST_MANA = LAST_MANA or mp()
local current_mana = mp()
if (current_mana - LAST_MANA) > MANA_GAIN then
playsound('default')
flashclient()
pausebot(true)
end
LAST_MANA = current_mana
else
LAST_MANA = nil
end
Health
local HP_GAIN = 1 -- If health gain is higher than this value then pause.
if connected() then
LAST_HEALTH = LAST_HEALTH or hp()
local current_health = hp()
if (current_health - LAST_HEALTH) > HP_GAIN then
playsound('default')
flashclient()
pausebot(true)
end
LAST_HEALTH = current_health
else
LAST_HEALTH = nil
end
Mana and Health
local MANA_GAIN = 1 -- If mana gain is higher than this value then pause.
local HP_GAIN = 1 -- If health gain is higher than this value then pause.
if connected() then
LAST_MANA = LAST_MANA or mp()
LAST_HEALTH = LAST_HEALTH or hp()
local current_mana = mp()
local current_health = hp()
if (current_mana - LAST_MANA) > MANA_GAIN or (current_health - LAST_HEALTH) > HP_GAIN then
playsound('default')
flashclient()
pausebot(true)
end
LAST_MANA = current_mana
LAST_HEALTH = current_health
else
LAST_MANA = nil
LAST_HEALTH = nil
end