• 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!

Lua Weapon script problem.

Moj mistrz

Monster Creator
Joined
Feb 1, 2008
Messages
932
Solutions
10
Reaction score
295
Location
Poland
Hello, I want to make a weapon script for example stonecutter axe(in lua), but the problem is that damage factor dont work(or i'm using it wrong XD).

That's the script.
NOTE: it works very well without using FACTOR, but it dont matter if i'm using full def or full atk, it's still same dmg.

Code:
    <melee id="2431" level="90" unproperly="1" script="sca.lua"/>

Code:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

function onGetFormulaValues(cid, skill, attack, level, factor)
    return -(level / 10), -((2 * (attack * (skill + 5.8) / 25 + (level - 1) / 10.)) / factor) + (level / 10)
end

combat:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")

function onUseWeapon(cid, var)
    return combat:execute(cid, var)
end

I've already used setOrigin(ORIGIN_MELEE) and it didn't worked(I thought it will fix the formulas by itself without adding any formula to script).
 
Back
Top