• 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 How do I create delay time between each 'try' to magic wall?

Ond||Apokalypse

Intermediate OT User
Joined
Nov 21, 2007
Messages
468
Reaction score
140
Location
Stockholm, Sweden
(8.0 exe evolution)

Code:
local storevalue = 9079 -- value where exhausted is saved
local exhausttime = 0.3 -- 0.3 seconds exhaustion

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
setCombatParam(combat, COMBAT_PARAM_CREATEITEM, 1497)

function onCastSpell(cid, var)

    if(exhaust(cid, storevalue, exhausttime) == 1) then
    return doCombat(cid, combat, var)
    else
    doPlayerSendCancel(cid, "You are exhausted.")   
    end
end

I'm not talking about exhaust - Delay time if you 'poffed' a magic wall on a player (didn't succeed to place it)
Delay time between those tries
 
Back
Top