Hey.
I wanted to use Paco el Maverick's script that would give a weapon additional on-hit effect - in this case energy damage and cloud effect, but I think this script is very old and I don't know how to declare it in weapons.xml.
This is thunder_hammer.lua located in data/weapons/scripts
And this is what he proposed to write in weapons.xml
What should I write in weapons.xml to make this melee weapon (ID 2421) use thunder_hammer.lua?
(using tfs 0.3.6)
I know that error is in declaration in weapons.xml, cause thunder_hammer.lua effect worked well when I swapped it with posion arrow effect.
Please, help, giving reputation for help attempts.
I wanted to use Paco el Maverick's script that would give a weapon additional on-hit effect - in this case energy damage and cloud effect, but I think this script is very old and I don't know how to declare it in weapons.xml.
This is thunder_hammer.lua located in data/weapons/scripts
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_BIGCLOUDS)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0, 0, 0, -105)
local arr = {
{0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0},
{0, 0, 1, 1, 1, 0, 0},
{0, 0, 1, 3, 1, 0, 0},
{0, 0, 1, 1, 1, 0, 0},
{0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0}
}
local area = createCombatArea(arr)
setCombatArea(combat, area)
function onUseWeapon(cid, var)
return doCombat(cid, combat, var)
end
And this is what he proposed to write in weapons.xml
Code:
<melee id="2421" enabled="1" exhaustion="0" hitchance="80" script="thunder_hammer.lua"></melee>
What should I write in weapons.xml to make this melee weapon (ID 2421) use thunder_hammer.lua?
(using tfs 0.3.6)
I know that error is in declaration in weapons.xml, cause thunder_hammer.lua effect worked well when I swapped it with posion arrow effect.
Please, help, giving reputation for help attempts.
Last edited: