• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua Remove item on use.

aibit

New Member
Joined
Jul 22, 2012
Messages
7
Reaction score
0
Bug when i use X item with UNIQUEID 2111 do NOT remove 2344.

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)

    if item.uid == 2111 then
        if getPlayerStorageValue(cid, 100058) == 2 and doPlayerRemoveItem(cid, 10152, 1) and getPlayerStorageValue(cid, 100060) == -1  then
                setPlayerStorageValue(cid, 100060, 1)
                doPlayerRemoveItem(cid, 2344, 1)
                doSendMagicEffect(toPosition,29)
                doPlayerAddItem(cid,2356,1)
                setPlayerStorageValue(cid, 100062, 11)
                end
        end
    return TRUE
end
 
Back
Top