miguelshta
Member
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