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

Lua Delay spell

Leandro__

New Member
Joined
Dec 2, 2014
Messages
24
Reaction score
0
How i can add a delay in a spell?
Example: I cast 'Exori' then 5 seconds after happens X effect. ;)
 
Something like this?
PHP:
function onCastSpell(cid, var) local delay = 100 
 local seconds = 0 
 local parameters = { cid = cid, var = var, combat = combat } repeat 
 addEvent(fire, seconds, parameters) seconds = seconds + delay 
 until seconds == 5000 
end
 
Back
Top