Leeroyjenkinz
New Member
- Joined
- Jun 24, 2013
- Messages
- 28
- Reaction score
- 2
Hey, I have a question.
I have a luafunction which is doPlayerSetExtraAttackSpeed(cid, speed) and I was wondering how can I use that function in a spell and make it last for 3 seconds, and when 3 seconds is over with it will doPlayerSetExtraAttackSpeed(cid, 0)?
Any help pls ;3
I have a luafunction which is doPlayerSetExtraAttackSpeed(cid, speed) and I was wondering how can I use that function in a spell and make it last for 3 seconds, and when 3 seconds is over with it will doPlayerSetExtraAttackSpeed(cid, 0)?
Any help pls ;3
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)
local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, 10000)
setConditionParam(condition, CONDITION_PARAM_BUFF, true)
setCombatCondition(combat, condition)
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
doPlayerSetExtraAttackSpeed(cid, 2000)
end