• 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 Sprite disappears

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
    elseif itemEx.itemid == 7560 then
        doTransformItem(itemEx.uid, 7564)

    elseif itemEx.itemid == 7561 then
        doTransformItem(itemEx.uid, 7565)
end
end

Now this works so far but when I go in to my server and use the actual item. The item does change but it becomes invisible.

Anyone knows how this happens and how to fix it?

Thanks in advance.
 
Nvm found the problem. I switched the item ids of what they ware to become and the sprites turned into the wall making them invisible.

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local function doTransformBack(pos, itemid, transformid)
return doTransformItem(getTileItemById(pos, transformid).uid, itemid)
end
elseif itemEx.itemid == 7560 then
doTransformItem(itemEx.uid, 7565)

elseif itemEx.itemid == 7561 then
doTransformItem(itemEx.uid, 7564)
end
end
 
Back
Top