Rexanilator
New Member
- Joined
- Oct 3, 2009
- Messages
- 297
- Reaction score
- 2
I am wondering if it is possible for example to make a spell that would be basically turned on with the spell command and would stay on until the spell command is said again or the player logs off the server or changes characters.
For example, the command for great light which is "fiat lux" on my server...we could adjust the code of CONDITION_PARAM_TICKS to on when player says "fiat lux" and then off when they say "fiat lux" (or log out or change characters as mentioned above).
This would be an awesome ability and I will be grateful for the assistance on this coding.
For example, the command for great light which is "fiat lux" on my server...we could adjust the code of CONDITION_PARAM_TICKS to on when player says "fiat lux" and then off when they say "fiat lux" (or log out or change characters as mentioned above).
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)
local condition = createConditionObject(CONDITION_LIGHT)
setConditionParam(condition, CONDITION_PARAM_LIGHT_LEVEL, 8)
setConditionParam(condition, CONDITION_PARAM_LIGHT_COLOR, 215)
[B][COLOR="red"]setConditionParam(condition, CONDITION_PARAM_TICKS, (11 * 60 + 35) * 1000)[/COLOR][/B]
setCombatCondition(combat, condition)
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
This would be an awesome ability and I will be grateful for the assistance on this coding.