Could someone make me a code so that after writing yes you could write the axe after two hours?
Code:
if msgcontains(msg, "lizard leather") and getPlayerStorageValue(cid, 700) == 36 then
if getPlayerItemCount(cid,5876) >= 50 then
npcHandler:say("You bring 50 lizard leather?", cid)
setPlayerStorageValue(cid, 700, 37)
else
npcHandler:say("Sorry, but You don\'t have lizard leathers !", cid)
setPlayerStorageValue(cid, 700, 36)
end
end
talkState[talkUser] = 18
if msgcontains(msg, "yes") and getPlayerStorageValue(cid, 302) == 37 and talkState[talkUser] == 18 then
if doPlayerRemoveItem(cid,5876,50) then
npcHandler:say("Ah! All stuff there. I will start making axes now. Come later and ask me for axe.", cid)
setPlayerStorageValue(cid, 700, 38)
end
end
talkState[talkUser] = 19
if msgcontains(msg, "axe") and getPlayerStorageValue(cid, 302) == 38 and talkState[talkUser] == 19 then
npcHandler:say("Axe is done! For you. Take. Wear like me.", cid)
doSendMagicEffect(getCreaturePosition(cid), 13)
setPlayerStorageValue(cid, 302, 39)
doPlayerAddOutfit(cid, 143, 1)
doPlayerAddOutfit(cid, 147, 1)
talkState[talkUser] = 20
end
Code:
if (os.time() - getPlayerStorageValue(cid, storage)) >= duration then
Code:
setPlayerStorageValue(cid, storage, os.time())
Code:
local storage, duration = 3, 3