Comando do health:
local hpGain = 2
local vocs = {
[1] = 538,
[2] = 585,
[3] = 536,
}
local function heal(uid, hp)
if not isPlayer(uid) then
return true
end
if getPlayerStorageValue(uid, 9329) < 1 then
return true
end
doCreatureAddHealth(uid, hp)
return addEvent(heal, 1 * 1000, uid, hp)
end
function onSay(cid, words, param)
if not vocs[getPlayerVocation(cid)] then
return true
end
if getPlayerStorageValue(cid, 9330) > os.time() then
return doPlayerSendCancel(cid, "You are exhausted, wait "..getPlayerStorageValue(cid, 9330) - os.time()..".") and true
end
if getPlayerStorageValue(cid, 9329) < 1 then
local out = getCreatureOutfit(cid)
out.lookType = vocs[getPlayerVocation(cid)]
doCreatureSetNoMove(cid, true)
setPlayerStorageValue(cid, 9329, 1)
setPlayerStorageValue(cid, 9330, os.time() + 10)
heal(cid, hpGain)
doSetCreatureOutfit(cid, out, -1)
elseif getPlayerStorageValue(cid, 9329) >= 1 then
doCreatureSetNoMove(cid, false)
setPlayerStorageValue(cid, 9329, -1)
doRemoveCondition(cid, CONDITION_OUTFIT)
end
return true
end
Comando da mana:
local mpGain = 1
local vocs = {
[1] = 385,
[2] = 376,
[3] = 602,
}
local function heal(uid, mp)
if not isPlayer(uid) then
return true
end
if getPlayerStorageValue(uid, 9328) < 1 then
return true
end
doPlayerAddMana(uid, mp)
return addEvent(heal, 1 * 1000, uid, mp)
end
function onSay(cid, words, param)
if not vocs[getPlayerVocation(cid)] then
return true
end
if getPlayerStorageValue(cid, 9331) > os.time() then
return doPlayerSendCancel(cid, "You are exhausted, wait "..getPlayerStorageValue(cid, 9331) - os.time()..".") and true
end
if getPlayerStorageValue(cid, 9328) < 1 then
local out = getCreatureOutfit(cid)
out.lookType = vocs[getPlayerVocation(cid)]
doCreatureSetNoMove(cid, true)
setPlayerStorageValue(cid, 9328, 1)
setPlayerStorageValue(cid, 9331, os.time() + 10)
heal(cid, mpGain)
doSetCreatureOutfit(cid, out, -1)
elseif getPlayerStorageValue(cid, 9328) >= 1 then
doCreatureSetNoMove(cid, false)
setPlayerStorageValue(cid, 9328, -1)
doRemoveCondition(cid, CONDITION_OUTFIT)
end
return true
end




info
Grupo: Visconde
Registrado: 08/10/11
Posts: 444
Reputação: +71
Gênero: Feminino
Char no Tibia: No Have.
Gostaria que quando alguem usa-se esse comando so podia usar depois de 10 segundo
-----------------------