local from, to = {x=1, y =1, z=1}, {x=1, y =1, z=1}local newpos = {x=1, y =1, z=1}function onStatsChange(cid, attacker, type, combat, value) if isInRange(getPlayerPosition(cid), from, to) and type == STATSCHANGE_HEALTHLOSS and value >= getCreatureHealth(cid) then doCreatureAddHealth(cid, getCreatureMaxHealth(cid) - getCreatureHealth(cid)) doTeleportThing(cid, newpos) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT) return false end return trueend
<event type="statschange" name="MorteTp" event="script" value="NOMEDOARQUIVO.lua"/>
No login.lua: registerCreatureEvent(cid, "MorteTp")



info
Grupo: Visconde
Registrado: 26/04/08
Posts: 251
Reputação: +36
Gênero: Masculino
Char no Tibia: Senhor Mithril
Se o jogador morrer em uma posição x até uma posição y ser teleportado para uma area
É um script no qual o jogador está em um quadrado e se ele morrer nesse quadrado ele não morrerá, tomará só um TP para uma área.
Tentei fazer mas dava alguns errors.
Segue abaixo:
Error:
[13:59:02.672] [Error - CreatureScript Interface]
[13:59:02.673] data/creaturescripts/scripts/morrer.lua:onStatsChange
[13:59:02.674] Description:
[13:59:02.675] (luaGetThingFromPos) Tile not found