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

[Lua] Add delay in script

xapokis

Member
Joined
Nov 4, 2012
Messages
112
Reaction score
6
How do i add delay in a lua code?

Simple thing. Like delay in an NPC or a Exhaust delay.

Thanks
 
Lua:
if exhaustion.check(cid, 1000) then
	doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
	doPlayerSendCancel(cid, "You need to wait "..exhaustion.get(cid, 1000).." seconds before you can use it again.")
	return true
end
 
exhaustion.set(cid, 1000, 60)

1000 is here the storage and 60 the time in seconds.
 
Back
Top