• 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!

TFS 0.X Path to Quest

potinho

Intermediate OT User
Joined
Oct 11, 2009
Messages
1,397
Solutions
17
Reaction score
148
Location
Brazil
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?

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:
Back
Top