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

Lua LUA Function getItemDescriptions(itemid) returns nothing o_O

Posco Malatesta

New Member
Joined
Jul 18, 2010
Messages
12
Reaction score
2
Hello World!

I've been working on a simple script (that doesn't seem so simple now ¬¬) its supposed to work like this:

player use an item on another and this creates a new item on cid position, this item should have the itemEx description, only that it doesn't and I don't know what am I doing wrong.

Here's my code:

Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if itemEx.itemid == 389  then
        sec = doCreateItem(5943, getCreaturePosition(cid))
      [B]  desc = getItemDescriptions(itemEx.uid)[/B]
        doSetItemSpecialDescription(sec, desc)
         return TRUE
    elseif itemEx.itemid == 2782 then
        doTransformItem(itemEx.uid, 2781)
        doDecayItem(itemEx.uid)
        return TRUE
    end
    return destroyItem(cid, itemEx, toPosition)
end
 
:(
Thanks Limos! i tried with: itemEx.id, itemEx.itemid and nothing, if I use getItemName(itemEx.itemid) it does set the item name as description, but that's not what I'm trying to do. I want the itemEx to take the description You recognize ..., he was killed by ...

Any idea of what can I do?
 
Last edited:
Back
Top