• 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 to add wait time

lalovega

New Member
Joined
Nov 4, 2008
Messages
85
Reaction score
1
can u help me guys to make this work, example

i want to add wait time on this spell like after use utani hur i need to wait 3 seconds + immobilized to get condition_haste
+ animated effect :

0,1,1,1,0,
0,1,2,1,0,
0,1,1,1,0




Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

local condition = createConditionObject(CONDITION_HASTE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 300000)
setConditionFormula(condition, 1.2, -56, 1.7, -56)
setCombatCondition(combat, condition)

function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end

heres a video watch 0:08 seconds
the guy is buffin up + immobilized and after 3 seconds obtain the benefit
[video=youtube;LRhxZ88ErrY]http://www.youtube.com/watch?v=LRhxZ88ErrY[/video]
plszz help me guys!!! rep+++
 
Last edited:
u want exhausted 3 sec? then go in spells.xml - find utani hur- exhaustion="3000" try that if im right what u want dno XD

exhaustion="3000", exhaust all spells, if he want only spell exahust need to replace

PHP:
function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end
for
PHP:
function onCastSpell(cid, var)
        if exhaustion.check(cid, 23000) == false then
                exhaustion.set(cid, 23000, 3)
                return doCombat(cid, combat, var)
        else
                doPlayerSendCancel(cid, "You have exhausted in haste for: [" ..exhaustion.get(cid, 23000).."] seconds")
        end
end

:)
 
exhaustion="3000", exhaust all spells, if he want only spell exahust need to replace

PHP:
function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end
for
PHP:
function onCastSpell(cid, var)
        if exhaustion.check(cid, 23000) == false then
                exhaustion.set(cid, 23000, 3)
                return doCombat(cid, combat, var)
        else
                doPlayerSendCancel(cid, "You have exhausted in haste for: [" ..exhaustion.get(cid, 23000).."] seconds")
        end
end

:)
nonono, i need something like this

me : utani hur and after 3 seconds bang hasted ! its like inverse im using 9.44 server so i dont need cooldown by storage
 
I believe he wants a script that needs 3 seconds to load the spell utani hur,
and meanwhile he can't move until those 3 seconds are over and the caster is hasted.

People really need to explain themselves better if they need a script.
In some threads hieroglyphics would've been easier to read.
 
If that is true, here you go:

Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)

local condition = createConditionObject(CONDITION_HASTE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 33000)
setConditionFormula(condition, 0.3, -24, 0.3, -24)
setCombatCondition(combat, condition)

function onCastSpell(cid, var)
	addEvent(doCombat, 3000, cid, combat, var)
end
 
If that is true, here you go:

Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)

local condition = createConditionObject(CONDITION_HASTE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 33000)
setConditionFormula(condition, 0.3, -24, 0.3, -24)
setCombatCondition(combat, condition)

function onCastSpell(cid, var)
	addEvent(doCombat, 3000, cid, combat, var)
end
yes it works but to late xDD someone else made it via pm thz evan
 
maybe level higher of this script?
0 sec - spell checking pos
1 sec - spell checking is the actual pos the same as pos in sec 0, otherwise spell casting will be canceled.
2 sec 3 sec like up
?
 
Last edited:
Back
Top