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.
setPlayerStorageValue(storage, os.time())
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