potinho
Advanced OT User
I'm working on a new system, and I'd like to ask for some help. I have an item that sets a storage for the player. But I will need something different: I need another item that I create to remove this storage and add a new one. can you help me?
actual script:
actual script:
Lua:
local storage = 9870
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorageValue(cid, storage) == -1 then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have learned the password to access the old world city. The password is Rookgaard!")
setPlayerStorageValue(cid, storage, 1)
doRemoveItem(item.uid, 1)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You've read the stories about the world of Tibia and already know how to access your abandoned city.")
end
return true
end