yasminismyworld
Member
For example sword that deals +40 dmg to orcs
Is it possible?
Is it possible?
For example sword that deals +40 dmg to orcs
Is it possible?
Can you post a small example? i dont want you to make a script for me like you did last time, i bet you have better things to do
Just want to see how it looks like so i can work from there
local extraDamage = 0
if getCreatureName(cid) == "orc" then
end
Can you post a small example? i dont want you to make a script for me like you did last time, i bet you have better things to do
Just want to see how it looks like so i can work from there
Welcome to Otland! Glad to see another new user who actually wants some examples to build and learn from, instead of just asking for someone to just make a script for them! I'll love watching you progress in skill. Do me a favor, add an Avatar for yourself, it will help... Also, if ever you have some problems with some scripts and can't find the help you need, private message me and when I get the chance I will try to help you
TFS?
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, true)
local monsters = {"Orc", "Orc Warrior", "Rat"}
function onGetFormulaValues(cid, level, skill, attack, element, factor)
local target, extraDamage = getCreatureTarget(cid), 0
if target and isInArray(monsters, getCreatureName(target)) then
extraDamage = 40
end
local levelTotal, formula = level / 5, 0.0408
local normal, elemental = -(skill * attack * formula + levelTotal + extraDamage), math.ceil((skill * element * formula + levelTotal))
return normal/2, normal, -math.random(elemental/2, elemental)
end
setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
function onUseWeapon(cid, var)
return doCombat(cid, combat, var)
end
Ya know I don't even copy the code anymore I just save the whole dam page