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:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
FREE Pause Bot if mana gain is higher than 1 (one)
#1
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.

Mana
if connected() then
    LAST_MANA = LAST_MANA or mp()
    local current_mana = mp()
    if (current_mana - LAST_MANA) > 1 then
        playsound('default')
        flashclient()
        pausebot(true)
    end

    LAST_MANA = current_mana
else
    LAST_MANA = nil
end

Health
if connected() then
    LAST_HEALTH = LAST_HEALTH or hp()
    local current_health = hp()
    if (current_health - LAST_HEALTH) > 1 then
        playsound('default')
        flashclient()
        pausebot(true)
    end

    LAST_HEALTH = current_health
else
    LAST_HEALTH = nil
end

Mana and Health
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) > 1 or (current_health - LAST_HEALTH) > 1 then
        playsound('default')
        flashclient()
        pausebot(true)
    end

    LAST_MANA = current_mana
    LAST_HEALTH = current_health
else
    LAST_MANA = nil
    LAST_HEALTH = nil
end

#2
|Only Registered members can see download links. | Click here to buy subscription or here to register.
not working correctly . always blink and stop bot

#3
Hello.

It works just fine. It play sound, flash client and pause bot if you get more than 1 mana point since last run. If you make this script runs every 1s, it may work, but maybe you should use lower interval... Notice if you heal mana using MANA POTION, it will trigger it.

It blinks and stop because you got more than 1 mana point since last run then it pauses bot.

#4
If i set it at 1 it not working correctly with promo characters

#5
|Only Registered members can see download links. | Click here to buy subscription or here to register.

That depends on how many mana points you get based on the persistent interval.
Example: If you setup persistent interval = 1000 and regenerates like 3 mana points in 1s (because you setup 1000 ms on interval) then you should change " > 1" to " > 3".

#6
can u show how script with mana regen should look like with this mana regen ?
Master Sorcerer: 2 HP / 6 seconds, 1 MP / 1 seconds

#7
|Only Registered members can see download links. | Click here to buy subscription or here to register.

Hello.

That also depends on persistent interval that you setup.

Change 1 of this line to 2 or 3. I think 3 will be better to avoid "false-positives", but try with 2 first.
if (current_mana - LAST_MANA) > 1 then
to
if (current_mana - LAST_MANA) > 2 then

#8
|Only Registered members can see download links. | Click here to buy subscription or here to register.
Can i do this script playsound forever until i disable persistent if happen mana gain > 1 true?

#9
local KEEP_PLAYING = false -- Keep playing alert? If false then it will play once.

if connected() then
    LAST_MANA = LAST_MANA or mp()
    local current_mana = mp()
    if (current_mana - LAST_MANA) > 1 then
        TRIGGERED = true
    end

    if TRIGGERED then
        playsound('default')
        flashclient()
        pausebot(true)
        if not KEEP_PLAYING then
            TRIGGERED = false
        end
    end

    LAST_MANA = current_mana
else
    LAST_MANA = nil
end

#10
|Only Registered members can see download links. | Click here to buy subscription or here to register.
Nice, thank so much... But, what is this Triggered? cause i tray do this and no success, thanks!!



Forum Jump:



Forum software by © MyBB Theme © iAndrew 2016