Hello I've a bug with kill monster and appears teleport.
It bugs my server making players dont have corpse when die, and dont lose equip.
it was:
Creaturescripts.
Pythius the rotten_teleport.
inquisitionPortals.
And if i remove both scripts the player die normally (drop equip and create 'dead human'.
¹- If i use one of the JDB's Script the server crash. and the other, the tp dont appears.
# Thanks.
It bugs my server making players dont have corpse when die, and dont lose equip.
it was:
Creaturescripts.
Code:
<event type="death" name="Pythius the rottenTeleport" script="Pythius the rotten_teleport.lua"/>
<event type="death" name="inquisitionPortals" script="inquisitionPortals.lua"/>
Pythius the rotten_teleport.
Code:
--- Created by Darkhaos
function onDeath(cid, corpse, killer)
registerCreatureEvent(cid, "pytthius the rottenTeleport")
local creaturename = getCreatureName(cid)
local in_pos = {x=265, y=231, z=8, stackpos=2}
local checkIID = getThingfromPos(in_pos)
local to_pos = {x=298, y=232, z=8, stackpos=1}
local time_to_pass = 30 -- in seconds
local tpID = 1387
if creaturename == 'Pythius the rotten' then
teleport = doCreateTeleport(tpID, to_pos, in_pos)
doSendMagicEffect(in_pos, CONST_ME_TELEPORT)
doCreatureSay(cid, "You have 30 seconds to enter the teleport before it is closed.", TALKTYPE_ORANGE_1)
addEvent(removeTeleport, (1000*time_to_pass))
end
end
function removeTeleport()
if getThingfromPos({x=265, y=231, z=8, stackpos=1}).itemid == 1387 then
doRemoveItem(getThingfromPos({x=265, y=231, z=8, stackpos=1}).uid,1)
doSendMagicEffect({x=265, y=231, z=8, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end
inquisitionPortals.
Code:
function onDeath(cid, corpse, killer)
registerCreatureEvent(cid, "inquisitionPortals")
local creaturename = getCreatureName(cid)
--- positions where the teleports will be created:
local Demodras_in_pos = {x=59, y=124, z=7, stackpos=2}
--- positions where the teleports will be teleported you:
local Demodras_to_pos = {x=22, y=112, z=8, stackpos=1}
local time_to_pass = 30 -- in seconds
local tpID = 1387
local doEffect = CONST_ME_TELEPORT
local message = "You now have 30 seconds to exit this room through the teleport."
if creaturename == 'Demodras' then
teleport = doCreateTeleport(tpID, Demodras_to_pos,
Demodras_in_pos)
doSendMagicEffect(Demodras_in_pos, doEffect)
doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
addEvent(removeTeleportInDemodrasWard, (1000*time_to_pass))
end
end
function removeTeleportInDemodrasWard()
if getThingfromPos({x=59, y=124, z=7, stackpos=1}).itemid == 1387 then
doRemoveItem(getThingfromPos({x=59, y=124, z=7, stackpos=1}).uid,1)
doSendMagicEffect({x=59, y=124, z=7, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end
And if i remove both scripts the player die normally (drop equip and create 'dead human'.
¹- If i use one of the JDB's Script the server crash. and the other, the tp dont appears.
# Thanks.