• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

MoveEvent Increase damage onEquip no source edit version

MadMOOK

Hoo
Joined
Apr 20, 2011
Messages
802
Reaction score
43
I seen someone release a way to increase damage by equipting a ring, but you need a source edit..
Not everyone knows how to do that. Ill show you how I do it! :p

IMO Not all weapons should be able to increase damage with such an item so I think my way is better, more variables to control aswell..

Here we go..

Pick a weapon you want to add damage to by equipting some item make a choiceOfWeapon.lua..
I chose silkweaver bow

Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_BLOCKSHIELD, 1)


function onGetFormulaValues(cid, level, skillDist, attack, element)
    local min = level + skillDist + attack * 1 + element
    local max = level + skillDist + attack * 3 + element
    return -min, -max
end
setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
local area = createCombatArea( { {0, 3, 0} } )
setCombatArea(combat, area)



function onUseWeapon(cid, var)
return doCombat(cid, combat, var)
end

Dont forger to register it in weapons.xml like this
Code:
    <!-- silkweaver bow-->
    <melee id="8857" script="magic weapons/silkweaver bow.lua"/>

This adds damage when you level up, skill up, and if there is an element it adds slightly more..
Now if you go into items.xml and add this to a ring
Code:
<attribute key="increasemagicpercent" value="110"/>

That there adds 10% to your damage output. You have to Begin with 100 for that, I dont know why..
101 would be 1% and so on...
 
Well theres a time and place for that. But thats nothing im interested in. Thx!
 
Back
Top