Me again asking for help for any of you kk, well as the name of the topic already says, rod and wand does not do damage, but it is not doing damage because I added a code "Wand / Rod Elemental" but the Wand it is not doing damage, and not changing element. My server is TFS 1.4x 10.98, in the topic it says it was 1.x+ but with me it didn't work if someone can help me I'm grateful.
The first code is for the elemental wand effect, and the ones below are the settings. can anyone help
local damage = { --Ataque mínino e ataque máximo
min = 200,
max = 600
}
local effects = {
[1] = {effect = 36, shootEffect = 3, damageEffect = COMBAT_FIREDAMAGE},
[2] = {effect = 52, shootEffect = 28, damageEffect = COMBAT_ICEDAMAGE},
[3] = {effect = 46, shootEffect = 29, damageEffect = COMBAT_POISONDAMAGE},
[4] = {effect = 17, shootEffect = 31, damageEffect = COMBAT_DEATHDAMAGE},
[5] = {effect = 47, shootEffect = 35, damageEffect = COMBAT_ENERGYDAMAGE},
[6] = {effect = 31, shootEffect = 40, damageEffect = COMBAT_PHYSICALDAMAGE},
[7] = {effect = 49, shootEffect = 37, damageEffect = COMBAT_HOLYDAMAGE}
}
function onUseWeapon(player, variant)
local effect, target = player:getStorageValue(4561), player:getTarget()
if target then
local random = effects[effect] or effects[math.random(#effects)]
player:getPosition():sendDistanceEffect(target:getPosition(), random.shootEffect)
addEvent(doAreaCombatHealth, 100, player, random.damageEffect, target:getPosition(), 0, -damage.min, -damage.max, random.effect)
end
return true
end
min = 200,
max = 600
}
local effects = {
[1] = {effect = 36, shootEffect = 3, damageEffect = COMBAT_FIREDAMAGE},
[2] = {effect = 52, shootEffect = 28, damageEffect = COMBAT_ICEDAMAGE},
[3] = {effect = 46, shootEffect = 29, damageEffect = COMBAT_POISONDAMAGE},
[4] = {effect = 17, shootEffect = 31, damageEffect = COMBAT_DEATHDAMAGE},
[5] = {effect = 47, shootEffect = 35, damageEffect = COMBAT_ENERGYDAMAGE},
[6] = {effect = 31, shootEffect = 40, damageEffect = COMBAT_PHYSICALDAMAGE},
[7] = {effect = 49, shootEffect = 37, damageEffect = COMBAT_HOLYDAMAGE}
}
function onUseWeapon(player, variant)
local effect, target = player:getStorageValue(4561), player:getTarget()
if target then
local random = effects[effect] or effects[math.random(#effects)]
player:getPosition():sendDistanceEffect(target:getPosition(), random.shootEffect)
addEvent(doAreaCombatHealth, 100, player, random.damageEffect, target:getPosition(), 0, -damage.min, -damage.max, random.effect)
end
return true
end
<wand id="26483" level="100" mana="35" event="script" value="rod donate.lua">
<vocation name="Druid" />
<vocation name="Sorcerer" />
<vocation name="Elder Druid" />
<vocation name="Master Sorcerer" />
</wand>
<vocation name="Druid" />
<vocation name="Sorcerer" />
<vocation name="Elder Druid" />
<vocation name="Master Sorcerer" />
</wand>
<item id="26483" article="a" name="Arcanum Celeste Rod">
<attribute key="weight" value="3700" />
<attribute key="weaponType" value="wand" />
<attribute key="shootType" value="smallholy" />
<attribute key="range" value="5" />
<attribute key="magiclevelpoints" value="15" />
</item>
<attribute key="weight" value="3700" />
<attribute key="weaponType" value="wand" />
<attribute key="shootType" value="smallholy" />
<attribute key="range" value="5" />
<attribute key="magiclevelpoints" value="15" />
</item>
The first code is for the elemental wand effect, and the ones below are the settings. can anyone help