• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

onPrepareDeath (tp corpse to cemetery)

Exiled Pain

Fervid Learner
Joined
Jan 8, 2008
Messages
552
Reaction score
4
Sup is it possible to make it so if you are on a specific tile, lets say tileid: 6353 (walkable swamp), if you die on it your corpse doesnt apear were you died but it gets tp right away to a cemetery placed on x,y,z .
Could someone help out with te script?
Thanks in advance rep++ will be given.
 
LUA:
local cementerypos = {x=1000,y=1000,z=7}  --pos
function onAddItem(moveItem, tileItem, position, cid)
 if moveItem.itemid  == 6080 then
    doTransformItem(moveItem.uid, 3058)
	doTeleportThing(moveItem.uid,cementerypos,FALSE)
 elseif moveItem.itemid  == 6081 then
    doTransformItem(moveItem.uid, 3065)
	doTeleportThing(moveItem.uid,cementerypos,FALSE)
 end
 return true
end

now go to movement.xml and add this line
Code:
<movevent type="AddItem" tileitem="1" itemid="xxxx" event="script" value="move.lua" />

so in the "xxxx" add the tile item id ( so if a body , male or femal died there it will be tped to the place)
 
Last edited:
Back
Top