isso é um sistema de sentar? já criei isso uma vez
http://www.xtibia.com/forum/topic/187379-sistema-de-sentar-com-recuperacao-automatica/
Por HeelNox, 14 de ago. de 2013 em Scripts
info
Grupo: Herói
Registrado: 20/05/10
Posts: 3.4k
Reputação: +1.5k
Gênero: Masculino

isso é um sistema de sentar? já criei isso uma vez
http://www.xtibia.com/forum/topic/187379-sistema-de-sentar-com-recuperacao-automatica/
info
Grupo: Herói
Registrado: 14/12/10
Posts: 3.6k
Reputação: +846
Gênero: Masculino

#Obrigado Slicer, não prestei atenção, no caso irá retornar e não irá healar porque não tem o valor da storage ainda, rsrs.
#Maelnise
O correto é o "hp" porque é o parâmetro da função criada.
Tente!
function onSay(cid, words, param)
local hpGain = 5
local vocs = {
[1] = 538,
[2] = 585,
[3] = 536,
}
if not vocs[getPlayerVocation(cid)] then
return true
end
if getPlayerStorageValue(cid, 9329) < 1 then
doCreatureSetNoMove(cid, true)
setPlayerStorageValue(cid, 9329, 1)
heal(cid, hpGain)
doSetCreatureOutfit(cid, {lookType = vocs[getPlayerVocation(cid)]}, -1)
elseif getPlayerStorageValue(cid, 9329) >= 1 then
doCreatureSetNoMove(cid, false)
setPlayerStorageValue(cid, 9329, -1)
doRemoveCondition(cid, CONDITION_OUTFIT)
end
return true
end
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 * 1500, uid, hp)
end
Editado Agosto 17 por Roksas
info
Grupo: Visconde
Registrado: 08/10/11
Posts: 444
Reputação: +71
Gênero: Feminino
Char no Tibia: No Have.

isso é um sistema de sentar? já criei isso uma vez
http://www.xtibia.com/forum/topic/187379-sistema-de-sentar-com-recuperacao-automatica/
Sim e um sistema de sentar
#Obrigado Slicer, não prestei atenção, no caso irá retornar e não irá healar porque não tem o valor da storage ainda, rsrs.
#Maelnise
O correto é o "hp" porque é o parâmetro da função criada.
Tente!
function onSay(cid, words, param) local hpGain = 5 local vocs = { [1] = 538, [2] = 585, [3] = 536, } if not vocs[getPlayerVocation(cid)] then return true end if getPlayerStorageValue(cid, 9329) < 1 then doCreatureSetNoMove(cid, true) setPlayerStorageValue(cid, 9329, 1) heal(cid, hpGain) doSetCreatureOutfit(cid, {lookType = vocs[getPlayerVocation(cid)]}, -1) elseif getPlayerStorageValue(cid, 9329) >= 1 then doCreatureSetNoMove(cid, false) setPlayerStorageValue(cid, 9329, -1) doRemoveCondition(cid, CONDITION_OUTFIT) end return true end 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 * 1500, uid, hp) end
Funcionou vlw
info
Grupo: Visconde
Registrado: 08/10/11
Posts: 444
Reputação: +71
Gênero: Feminino
Char no Tibia: No Have.
Não funfou , estou com meu char player e não ta healando
Editado Agosto 17 por DarkHeel