I'm working on a 8.54 Open Tibia Server using The Forgotten Server - Version 0.2.7 (Mystic Spirit).
I've made the following script:
But I'm running into a problem with the following part:
doCreatureSay(cid, "Crrrr!", TALKTYPE_ORANGE_1)
I need this msg to be above the coffin instead the player. (I can't just give in coordinates of the exact location since there are multiple coffins in my server)
Any help is welcome.
Thanks in advance.
I've made the following script:
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local function doTransformBack(pos, itemid, transformid)
return doTransformItem(getTileItemById(pos, transformid).uid, itemid)
end
if itemEx.itemid == 1742 then
local rand = math.random(1, 10)
if rand < 7 then
doTransformItem(itemEx.uid, 7520)
doSendMagicEffect(toPosition, CONST_ME_POFF)
doCreatureSay(cid, "Crrrr!", TALKTYPE_ORANGE_1)
else
doTransformItem(itemEx.uid, 7520)
doSendMagicEffect(toPosition, CONST_ME_POFF)
doCreatureSay(cid, "Crrrr!", TALKTYPE_ORANGE_1)
doSummonCreature("rat",toPosition)
doCreatureSay(cid, "Aaah a mummy!", TALKTYPE_SAY)
end
end
But I'm running into a problem with the following part:
doCreatureSay(cid, "Crrrr!", TALKTYPE_ORANGE_1)
I need this msg to be above the coffin instead the player. (I can't just give in coordinates of the exact location since there are multiple coffins in my server)
Any help is welcome.
Thanks in advance.