darknelson
Member
- Joined
- Jun 19, 2011
- Messages
- 190
- Solutions
- 1
- Reaction score
- 15
on my server paladins are hitting very hard but mages dont
here are two weapons
teach me please how i can make a right calcule to nivelate it
this is sd wand
and this is the slingshot for paladin
and this is knight weapon
how i can make a calcule to nivelate it ?
here are two weapons
teach me please how i can make a right calcule to nivelate it
this is sd wand
LUA:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH)
function onGetFormulaValues(player, level, maglevel)
local min = (level / 2) + (maglevel * 1.3) + 12
local max = (level / 5) + (maglevel * 4.4) + 18
return -min, -max
end
combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
function onUseWeapon(player, variant)
return combat:execute(player, variant)
end
XML:
<item id="25422" article="a" name="Ferumbras' staff">
<attribute key="weight" value="2900" />
<attribute key="description" value="It is made of platinum and emeralds and topped by a large F made of gold." />
<attribute key="weaponType" value="wand" />
<attribute key="shootType" value="death" />
<attribute key="magiclevelpoints" value="4" />
<attribute key="range" value="10" />
</item>
and this is the slingshot for paladin
LUA:
local area = createCombatArea({
{0, 1, 1, 1, 0},
{1, 1, 1, 1, 1},
{1, 1, 3, 1, 1},
{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0},
})
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT)
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_CRYSTALLINEARROW)
combat:setParameter(COMBAT_PARAM_BLOCKARMOR, true)
combat:setFormula(COMBAT_FORMULA_SKILL, 0, 0, 1, 0)
combat:setArea(area)
function onUseWeapon(player, variant)
return combat:execute(player, variant)
end
XML:
<item id="5907" article="a" name="slingshot">
<attribute key="description" value="A hermit near Carlin might be able to tell you more about it." />
<attribute key="weight" value="220" />
<attribute key="attack" value="120" />
<attribute key="elementDeath" value="2" />
<attribute key="maxHitChance" value="100" />
<attribute key="weaponType" value="distance" />
<attribute key="shootType" value="redstar" />
<attribute key="range" value="5" />
<attribute key="imbuingSlots" value="3" />
</item>
and this is knight weapon
XML:
<item id="24827" article="an" name="ogre klubba">
<attribute key="weight" value="7900" />
<attribute key="defense" value="25" />
<attribute key="weaponType" value="club" />
<attribute key="attack" value="120" />
<attribute key="elementDeath" value="2" />
<attribute key="imbuingSlots" value="3" />
</item>
how i can make a calcule to nivelate it ?