Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function onUse(cid, item, fromPosition, itemEx, toPosition)
- local access = 3 -- Acesso mÃnimo para usar a rune
- local storage,stor2,stor3 = 5829,4982,4983
- local stor = getPlayerStorageValue(cid, storage) == -1 and 0 or getPlayerStorageValue(cid, storage)
- if getPlayerAccess(cid) < access then
- doPlayerSendCancel(cid, "Not enough access.") return true
- elseif itemEx.uid == cid then
- setPlayerStorageValue(cid, storage, stor == 3 and 0 or stor+1)
- doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Function "..(stor == 0 and "Copy" or stor == 1 and "Cut" or stor == 2 and "Delete" or stor == 3 and "Paste").." actived.") return true
- elseif isCreature(itemEx.uid) then
- doPlayerSendCancel(cid, "You may only use this rune on items.") return true
- elseif stor == 0 then
- doPlayerSendCancel(cid, "Item copied.")
- elseif stor == 1 then
- doRemoveItem(itemEx.uid, itemEx.count)
- doPlayerSendCancel(cid, "Item cutted.")
- elseif stor == 2 then
- doRemoveItem(itemEx.uid, itemEx.count)
- doPlayerSendCancel(cid, "Item deleted.")
- return true
- elseif stor == 3 then
- if getPlayerStorageValue(cid, stor2) < 1 then
- doPlayerSendCancel(cid, "You must copy or cut something before pasting.") return true
- end
- doCreateItem(colar,colar2,topos)
- doPlayerSendCancel(cid, "Item pasted.")
- return true
- end
- setPlayerStorageValue(cid, stor2, itemEx.itemid)
- setPlayerStorageValue(cid, stor3, itemEx.count)
- return true
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement