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

how to make the action id a certain fixed item?

It was helpful. The error stopped appearing. Strangely, I wasn't being able to use your script alongside the function, the action ID simple wouldn't be added. But I did through this script:

Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if item.uid == 1003 then
        queststatus = getPlayerStorageValue(cid,1003)
        if queststatus == -1 then
            local item = doCreateItemEx(1994, 1)
                  doAddContainerItem(item, 2187, 1)
                  doAddContainerItem(item, 2662, 1)
            local bmw = doAddContainerItem(item, 2091, 1)
                  doSetItemActionId(bmw, 2091)
            if item then
                local ret = doPlayerAddItemEx(cid, item, false)
                if ret == RETURNVALUE_NOERROR then
                    setPlayerStorageValue(cid,1003,1)
                    doPlayerSendTextMessage(cid,22,"Você encontrou uma sacola.")
                elseif ret == RETURNVALUE_NOTENOUGHCAPACITY then
                    doPlayerSendTextMessage(cid,22,"Você encontrou uma recompensa pesando " .. getItemWeight(item) / 100 .. " oz. É muito pesado.")
                elseif ret == RETURNVALUE_NOTENOUGHROOM or ret == RETURNVALUE_CONTAINERNOTENOUGHROOM then
                    doPlayerSendTextMessage(cid,22,"Você não tem espaço suficiente.")
                else
                    doPlayerSendDefaultCancel(cid, ret)
                end
            end
        else
            doPlayerSendTextMessage(cid,22,"O baú está vazio.")
        end
    end
    return true
end

I'll leave it here, it can be helpful someday for somebody. But, thank you very much, Xikini, you're always appearing in my topics and helping this poor guy out. TY!
 
Back
Top