potinho
Intermediate OT User
Guys, good morning! I believe my question is simple, but I'm having difficulty putting it into practice:
I want to access a city where players need to do a quest first. In this quest they would get something that would "teach" them how to enter a place. And in this place, I would put a movement where only those who did this quest could step/enter. I don't know if I managed to be clear, but could you help me organize this? I have a script who when use item set a storage in player, but storage goes to player only when relog, there's a way to put storage without relog?
I want to access a city where players need to do a quest first. In this quest they would get something that would "teach" them how to enter a place. And in this place, I would put a movement where only those who did this quest could step/enter. I don't know if I managed to be clear, but could you help me organize this? I have a script who when use item set a storage in player, but storage goes to player only when relog, there's a way to put storage without relog?
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.")
setPlayerStorageValue(cid, storage, 1)
doRemoveItem(item.uid, 1)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "This item has already been used.")
end
return true
end
Last edited: