Olá, estou tentando fazer uma quest anihi um pouco mais trabalhada e encontrei esse tutorial do @zipter98
http://www.xtibia.com/forum/topic/233085-quest-simples/
Funciona quase tudo corretamente, menos a parte em que os players são teleportados caso alguém morra. tentei colocar o script abaixo no "playerdeath.lua" porém não funcionou
if getPlayerStorageValue(cid, 8605) > -1 then for _, pid in pairs(getPlayersOnline()) do if getPlayerStorageValue(pid, 8605) > -1 then doTeleportThing(pid, getTownTemplePosition(getPlayerTown(pid))) doPlayerSendTextMessage(pid, 27, "Someone died and you lost the quest. Better luck on the next time!") setPlayerStorageValue(pid, 8605, -1) end end doCreatureAddHealth(cid, getCreatureMaxHealth(cid)) return false end