Não se esqueça de registrar o evento em login.lua.
local config = {
vocations = {1, 2, 3, ...}, --IDs das vocações.
time = 1, --Exhaust, em minutos.
hpPercent = 20, --Porcentagem de vida.
toPos = {x = x, y = y, z = z}, --Para onde será teleportado.
}
function onStatsChange(cid, attacker, type, combat, value)
if type == STATSCHANGE_HEALTHLOSS and isPlayer(cid) and isInArray(config.vocations, getPlayerVocation(cid)) then
if getPlayerStorageValue(cid, 18182) < os.time() and getCreatureHealth(cid) <= getCreatureMaxHealth(cid) * config.hpPercent / 100 then
doTeleportThing(cid, config.toPos)
setPlayerStorageValue(cid, 18182, os.time() + config.time * 60)
end
end
return true
end





info
Grupo: Cavaleiro
Registrado: 01/04/13
Posts: 156
Reputação: +26
Gênero: Masculino
Char no Tibia: Yugami
pessoal não sei se existe algum tag que se o player tivér com X% de Life(Vida) o Script automaticamente é Ativado.
éssa é a descrição do Scripter que eu quero:
se dér para quem tivér criando o scripter para mim,fazer 1 Facil de configurar,+/- desse geito abaixo.
local vocation = "1,2,3,4,5,6,7,8,9..." -- ID Das Vocations,que o Scripter ira ativar quando chega em 20% de vida.
local exhausted = 1 -- em Minutos
local life = 30 -- % de life,que precisara para ativar o Scripter.