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

NPC that dont talk to you for a certain time

Tarielle

New Member
Joined
Nov 4, 2007
Messages
214
Reaction score
0
Location
Sweden
Hi, how can I make a NPC waiting for talking to you I mean like if you do something for the NPC and get a storagevalue, then you can't (for example) talk to him for an hour. And then you will get your reward, like the addon quests of Tibia.
 
yeeh something like that...

right when you give him that storage, also give him this storage:
PHP:
setPlayerStorageValue(storage, os.time())

and then to check if time has passed:
PHP:
local time = (2*60*60)+(30*60)+30 -- 2 hours, 30 minutes and 30 seconds
locl last = getPlayerStorageValue(cid, storage)
if os.time()-last >= time then
    -- now 2 hours and 30 minutes has passed ;o
end
 
Back
Top