Ghazer
Member
- Joined
- Mar 13, 2009
- Messages
- 350
- Reaction score
- 6
Hello!
My problem...
Normal haste:
and I need add this without delete other fuctions (because it serves to "paralyze like RL") how I can do it, combine two?
My problem...
Normal haste:
LUA:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
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)
if isPlayer(cid) == TRUE then
if exhaustion.check(cid, 30030) then
return FALSE
else
return doRemoveCondition(cid, CONDITION_HASTE), doCombat(cid, combat, var)
end
else
return doRemoveCondition(cid, CONDITION_HASTE), doCombat(cid, combat, var)
end
end
and I need add this without delete other fuctions (because it serves to "paralyze like RL") how I can do it, combine two?
Code:
function onCastSpell(cid, var)
if getPlayerStorageValue(cid, 11001) == 1 then
doPlayerSendCancel(cid, "You cannot use spells under participating in event.")
return false
end
return doCombat(cid, combat, var)
end