Captain Orhotek
New Member
- Joined
- May 20, 2009
- Messages
- 118
- Reaction score
- 1
I was wondering if people could tell me how to get certain conditions to work in the follow code...maybe I am doing it wrong.
The code above makes the person using it drunk (spell is set to be used on self) and I am wanting it to make the person cursed. Maybe I have the exact words wrong for this but I have tried CURSED and CURSE and neither are working. I am using DRUNK as an example because it is working. Also if anyone could help me on how I can turn this spell into an attack spell where it does a 2x2 range from you that would help me. I tried it before and ended up crashing my server so I figured I did something wrong...
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
local condition = createConditionObject(CONDITION_DRUNK)
setConditionParam(condition, CONDITION_PARAM_TICKS, 200000)
setCombatCondition(combat, condition)
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
The code above makes the person using it drunk (spell is set to be used on self) and I am wanting it to make the person cursed. Maybe I have the exact words wrong for this but I have tried CURSED and CURSE and neither are working. I am using DRUNK as an example because it is working. Also if anyone could help me on how I can turn this spell into an attack spell where it does a 2x2 range from you that would help me. I tried it before and ended up crashing my server so I figured I did something wrong...