• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

RevScripts help stuck on autoheal spell on %

miguelshta

Member
Joined
Mar 21, 2009
Messages
351
Solutions
1
Reaction score
13
Location
Toronto, Canada
im stuck tthere i wanted to make an auto exura vita on % of hp player cast !autoheal 80,exura vita this will heal player at 80% of life with exura vita trying to make it revscript tfs 1.3
Lua:
local players = {}

local function autoHeal(cid, startTime)
    if not isPlayer(cid) then
        players[cid] = nil
        return
    end
    if not players[cid] or players[cid][3] ~= startTime then
        return
    end
    if getCreatureMana(cid) >= players[cid][2] then
        doCreatureSay(cid, players[cid][1])
    end
    addEvent(autoHeal, 1000, cid, startTime)
end

local function showSpellList(cid)
    local t = {}
    for i = 0, getPlayerInstantSpellCount(cid) - 1 do
        local spell = getPlayerInstantSpellInfo(cid, i)
        if(spell.level ~= 0) then
            if(spell.healthpercent> 0) then
                spell.heal = spell.healthpercent .. "%"
            end

            table.insert(t, spell)
        end
    end
 
im stuck tthere i wanted to make an auto exura vita on % of hp player cast !autoheal 80,exura vita this will heal player at 80% of life with exura vita trying to make it revscript tfs 1.3
Lua:
local players = {}

local function autoHeal(cid, startTime)
    if not isPlayer(cid) then
        players[cid] = nil
        return
    end
    if not players[cid] or players[cid][3] ~= startTime then
        return
    end
    if getCreatureMana(cid) >= players[cid][2] then
        doCreatureSay(cid, players[cid][1])
    end
    addEvent(autoHeal, 1000, cid, startTime)
end

local function showSpellList(cid)
    local t = {}
    for i = 0, getPlayerInstantSpellCount(cid) - 1 do
        local spell = getPlayerInstantSpellInfo(cid, i)
        if(spell.level ~= 0) then
            if(spell.healthpercent> 0) then
                spell.heal = spell.healthpercent .. "%"
            end

            table.insert(t, spell)
        end
    end
Read this [TFS 1.0] Critical Hit % - Permanent (https://otland.net/threads/tfs-1-0-critical-hit-permanent.212908/)
There is your answer, make it onHealthChange
 
Back
Top