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
Heal Over Time Script
#1
Found a couple of scripts on the search feature but unfortunately needed changes done to it I cannot do myself or have the knowledge of so here is what I need.

local FRIENDS = { 'friend one', 'friend twol', 'friend three' } -- Players to sio.
local FRIENDS_HEALTH = 50 -- If hp% is lower than this then cast sio on friend.
local SAFE_HEALTH = 80 -- It will only cast sio if YOUR HP% is higher or equal than this. If you wanna ignore your hp, just setup as 0.
if connected() and cancast() and hppc() >= SAFE_HEALTH then
    table.lower(FRIENDS)
    local creatures = getcreatures('pfs')
    for _, creature in ipairs(creatures) do
        if creature.hppc <= FRIENDS_HEALTH and table.find(FRIENDS, creature.name:lower()) ~= nil then
            cast('exura gran tempus "' .. creature.name)
            wait(200, 400)
            break
        end
    end
end

What I need you if possible to do is this is a heal over time spell, so for 7 seconds it heals 175 HP I want it to if script heals "friend one" do not attempt to cast for another 7 seconds, it gets confusing because the script hopefully can tell if casted on x person don't cast on x person again if for 7 seconds

As for the other healing instants like exura sio, the tool is fine for that one.
Reply

#2
Hello.

I think this code is gonna work.
local FRIENDS = { 'friend one', 'friend twol', 'friend three' } -- Players to sio.
local FRIENDS_HEALTH = 50 -- If hp% is lower than this then cast sio on friend.
local SAFE_HEALTH = 80 -- It will only cast sio if YOUR HP% is higher or equal than this. If you wanna ignore your hp, just setup as 0.
local SPELL_PLAYER_CD = 7000 -- In milliseconds. Should only cast spell on player again if been at least this long.

if TIMERS_SPELL == nil then
    TIMERS_SPELL = { }
end

if connected() and cancast() and hppc() >= SAFE_HEALTH then
    table.lower(FRIENDS)
    local creatures = getcreatures('pfs')
    for _, creature in ipairs(creatures) do
        if creature.hppc <= FRIENDS_HEALTH and table.find(FRIENDS, creature.name:lower()) ~= nil then
            local flag = false
            local time = runningtimems()
            for __, timer in ipairs(TIMERS_SPELL) do
                if timer[1] == creature.id then
                    flag = (time - timer[2]) >= SPELL_PLAYER_CD
                    break
                end
            end

            if flag then
                cast('exura gran tempus "' .. creature.name)
                table.insert(TIMERS_SPELL, { creature.id, runningtimems() })
                break
            end
        end
    end
end
Reply

#3
Probably doing something wrong on my side, but that script is not working & the other normal sio is not working in script form - so tried the tool heal friend set names & no healing came through, tried inviting them to party and healing them still nothing.

Every other function on bot is working on my side but the tool heal friend or the scripts heal friend and heal over time script what could I be doing wrong?

"LUA Script -> HoT Friend: 28: 'end' expected (to close 'if' at line 14) near <eof>"

Do I have to have battle list open with player names showing? what could be causing it to not fetch the player on my screen and heal them?

I've tried adding the hotkeys on F1-F12 with the sio of the respective names, I've tried keeping battle list open with players enabled to show on list so if it fetches there I've tried restarting the bot and retrying it no luck it's strange.
Reply

#4
Might of copied the original code wrong apologies! but...... its giving this in console now after making sure to copy it all.

19:46:07 - LUA Script -> HoT: 17: bad argument #1 to 'ipairs' (value expected)
Reply

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

I changed the code to fix that. Please, copy the new code and try again.
Reply



Forum Jump:



Forum software by © MyBB Theme © iAndrew 2016