darknelson
Member
- Joined
- Jun 19, 2011
- Messages
- 190
- Solutions
- 1
- Reaction score
- 15
i make a spell for my ot server, it uses skill function, im trying to make again exori, but work with distance skill and melee skills, (have 1 vocation server) and i tested it with 100 dstance hit around 100-400 (other skills 10) and with 100 sword hit 3000, so why it not counting distance as skill? can you help me? my server is one vocation and players can up melee as fast as distance or ml but, this is pretty unfair for people who want use distance things, cause is not counting distance as same skill on melee, please help me to solve it
everythings works fine, but the player distance skill not working, but if i change it for first place, for example, distance 1 axe 3 axe stop works, but 4 club always working. why just third not work?
Lua:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
combat:setParameter(COMBAT_PARAM_BLOCKARMOR, 1)
combat:setParameter(COMBAT_PARAM_USECHARGES, 1)
combat:setArea(createCombatArea(AREA_SQUARE1X1))
function onGetFormulaValues(player, skill, attack, factor)
local skillTotal = 2 * player:getEffectiveSkillLevel(SKILL_AXE) and 2 * player:getEffectiveSkillLevel(SKILL_SWORD) and 2 * player:getEffectiveSkillLevel(SKILL_DISTANCE) and 2 * player:getEffectiveSkillLevel(SKILL_CLUB)
local levelTotal = player:getLevel() / 5
return -(((skillTotal + attack / 3500) * 1.35) + (levelTotal) + 5), -(((skillTotal + attack / 3125) * 1.5) + (levelTotal) + 10)
end
combat:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
function onCastSpell(creature, var)
return combat:execute(creature, var)
end
everythings works fine, but the player distance skill not working, but if i change it for first place, for example, distance 1 axe 3 axe stop works, but 4 club always working. why just third not work?
Last edited: