This script is too useful!
if you server crash and your players are insed of POI or anihhilator all them will die and lost exp and loot. BUT... NOT now!
Add this tag on creaturescripts.xml
And on crash.lua:
And enjoy :thumbup:
if you open your server and die in less of 3 mins you dont loose nothing! not loot and exp
if you server crash and your players are insed of POI or anihhilator all them will die and lost exp and loot. BUT... NOT now!
Add this tag on creaturescripts.xml
Code:
<event type="preparedeath" name="crash" event="script" value="crash.lua"/>
And on crash.lua:
Lua:
local nonDieDelay = 60*3 --- 3 minuts
function onPrepareDeath(cid,aa) -- Script by mock the bear
if getWorldUpTime() <= nonDieDelay then
doCreatureAddHealth(cid,getCreatureMaxHealth(cid))
doCreatureAddMana(cid,getCreatureMaxMana(cid))
doTeleportThing(cid,getTownTemplePosition(getPlayerTown(cid)))
doRemoveCreature(cid)
return false
end
return true
end
And enjoy :thumbup:
if you open your server and die in less of 3 mins you dont loose nothing! not loot and exp