BBFalcon89
Member
- Joined
- Jul 1, 2010
- Messages
- 51
- Reaction score
- 10
Just wanna check in 1.0, is it possible to use actionid's in spells, for example when i cast a spell i increase an actionid by 1?
creature:setStorageValue(60901, creature:getStorageValue(60901) +1)
local storage = 123456 -- change this number to anything you like
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
function onGetFormulaValues(cid, level, maglevel)
min = ((level / 5) + (maglevel * 6.8) + 42)
max = ((level / 5) + (maglevel * 12.9) + 90)
return min, max
end
setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
function onCastSpell(creature, var)
creature:setStorageValue(storage, creature:getStorageValue(storage) +1)
return doCombat(creature, combat, var)
end
function onCastSpell(creature, var)
creature:setStorageValue(storage, creature:getStorageValue(storage) +1)
Ah thank you, i have edited it.The first parameter of function onCastSpell is creature userdata, so you can just do
Code:function onCastSpell(creature, var) creature:setStorageValue(storage, creature:getStorageValue(storage) +1)