Animera
* * * * *
No, i come from morocco but my arabic is very bad. I recommend you to speak english.
function onCast
call exori vis
Really nice topic, but How to do that:
If the Player are Premium Account he'll hit or heal 20% more, with the same spells.
Exemple: Premium player do an "exori" he hit 120 on a monster. The normal player do an "exori" he hit 100 on the same monster.
On the local condition why did you put :
addDamageCondition(condition, 1, 5000, -20)
like 3 times isnt enough to put it once ?
Another thing How can I put the time of the condition effect ? like If I want it to last for 2 minutes or 3 ? Thanks
Great tut btw
addDamageCondition(condition, 1, 5000, -20)
addDamageCondition(condition, 10, 5000, -20)
addDamageCondition(condition, 1, 5000, -20)
Well , I want to make something like when I atk a Distance spell it damages as your lvl then make condition to keep damages the same amout of ur lvl hit for like 1 min like if im lvl 500 when I atk this spell as if I'm poisoned you with the same damage as my lvl number for lvl 483 it should hit you 483 every 2 seconds till the minute or the 2 minutes of the spell ends with the style of the drown shape so as I learned from you I made this code but as I'm beginner it doesn't work idk why Here is my code :
Code:local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, 256) setCombatParam(combat, COMBAT_PARAM_EFFECT, 1) setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 35) function onGetFormulaValues(cid, level, maglevel) min = -(level * 1 + maglevel * 0) * 1 max = -(level * 1 + maglevel * 0) * 1 return min, max end setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") local condition = createConditionObject(32768) setConditionParam(condition, CONDITION_PARAM_DELAYED, 1) addDamageCondition(condition, 1, 2000, "onGetFormulaValues") addDamageCondition(condition, 1, 2000, "onGetFormulaValues") addDamageCondition(condition, 1, 2000, "onGetFormulaValues") setCombatCondition(combat, condition) function onCastSpell(cid, var) return doCombat(cid, combat, var) end
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DROWNDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_LOSEENERGY)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGYBALL)
function onGetFormulaValues(cid, level, maglevel)
min = - level * 1
max = - level * 1
return min, max
end
setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
local shortcut = { -- Do not change anything here this is just shortcut i only recommend reading it to try to find out what it means i only recommend editing the minute so you can easy edit the duration of spell.
target = getCreatureTarget(cid), -- This means get the CreatureID of your target.
targetlevel = getPlayerLevel(shortcut.target), -- This means find the level of your target, I only wonders what happens if used on monster..
minute = 1
}
function formula(cid, var, targetpos, target, targetlevel) -- Neither edit this, this is just the formula
doCreatureAddHealth(shortcut.target, -shortcut.targetlevel)
end
local condition = createConditionObject(CONDITION_DROWN)
setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition, 30 * shortcut.minute, 2000, formula) -- You only need one unless you want it does different kind of damages..
setCombatCondition(combat, condition)
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DROWNDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_LOSEENERGY)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGYBALL)
local s.c = s.e
s.d(s.c, 1, 256)
s.d(s.c, 2, 1)
s.d(s.c, 3, 35)
local s = {
c = combat,
d = setCombatParam
e = createCombatObject()
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DROWNDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_LOSEENERGY)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGYBALL)
setCombatParam(combat, COMBAT_PARAM_HITEFFECT, CONST_ME_LOSEENERGY)
function onGetFormulaValues(cid, level, maglevel)
min = - level * 1
max = - level * 1
return min, max
end
setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
local shortcut = { -- Do not change anything here this is just shortcut i only recommend reading it to try to find out what it means i only recommend editing the minute so you can easy edit the duration of spell.
target = getCreatureTarget(cid), -- This means get the CreatureID of your target.
targetlevel = getPlayerLevel(getCreatureTarget(cid)), -- This means find the level of your target, I only wonders what happens if used on monster..
minute = 1
}
function formula(cid, var, targetpos, target, targetlevel) -- Neither edit this, this is just the formula
doCreatureAddHealth(shortcut.target, -shortcut.targetlevel)
end
local condition = createConditionObject(CONDITION_DROWN)
setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition, 30 * shortcut.minute, 2000, formula) -- You only need one unless you want it does different kind of damages..
setCombatCondition(combat, condition)
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end