• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Exhausted npc

Nerkoerko

Banned User
Joined
Feb 28, 2009
Messages
402
Reaction score
5
Location
Polska
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
 
Back
Top