Il Knight
Veteran OT User
Hello! how i can solve this?
script = function on use weapon =
i need to add this values =
local Max = item:getAttack()
local Min = item:getDefense()
local Crit = item:getHitChance()
local Maxcrit = ((Max/100) * Crit)
local Mincrit = ((Min/100) * Crit)
on the
function onGetFormulaValues(player, skill, attack, factor)
local min =
local max =
return -min, -max
end
thanks in advance
script = function on use weapon =
Lua:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WEAPONTYPE)
function onGetFormulaValues(player, skill, attack, factor)
local min =
local max =
return -min, -max
end
combat:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
local combat2 = Combat()
combat2:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat2:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONAREA)
combat2:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WEAPONTYPE)
function onGetFormulaValues(player, skill, attack, factor)
local min =
local max =
return -min, -max
end
combat2:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
function onUseWeapon(player, variant)
local percent = player:getEffectiveSkillLevel(SKILL_FIST)
local item = player:getSlotItem(CONST_SLOT_LEFT)
local roll = math.random(1,100)
local Max = item:getAttack()
local Min = item:getDefense()
local Crit = item:getHitChance()
local Maxcrit = ((Max/100) * Crit)
local Mincrit = ((Min/100) * Crit)
local Speed = getEffectiveSkillLevel(SKILL_FISHING)
if roll >= percent then
return combat:execute(player, variant)
elseif roll <= percent then
return combat2:execute(player, variant)
end
end
i need to add this values =
local Max = item:getAttack()
local Min = item:getDefense()
local Crit = item:getHitChance()
local Maxcrit = ((Max/100) * Crit)
local Mincrit = ((Min/100) * Crit)
on the
function onGetFormulaValues(player, skill, attack, factor)
local min =
local max =
return -min, -max
end
thanks in advance
Last edited by a moderator: