• 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 Key Attribute 0.4

FearWar

Active Member
Joined
Sep 17, 2017
Messages
221
Reaction score
26
Location
Brasil
Hi otlanders,

TheForgottenServer 0.4

I have a script of a key, but when I do the quest on the server, an error happens.

Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if(item.uid == 3034) then
        if(getPlayerStorageValue(cid, 443) < 1) then
            setPlayerStorageValue(cid, 443, 1)
            key = doPlayerAddItem(cid, 2089, 1)
            doItemSetAttribute(key.uid, "aid", 4601)
            doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You've found a key.")
        else
            doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The chest is empty.")
        end
    end
    return true
end

Below console error image

otland.png
 
Back
Top