• 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!

Solved Sound effect on item and not on player

Exoltes

Novia OTserv Developer
Joined
Jul 2, 2009
Messages
563
Reaction score
47
Location
Belgium
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:
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.
 
Code:
doCreatureSay(cid, "Crrrr!", TALKTYPE_ORANGE_1, false, cid, toPosition)
 
Back
Top