@Mustafa1337
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FLAMMINGARROW)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0, 0, 1, 0)
local bow_c = {
[13480] = createConditionObject(CONDITION_FIRE)
}
setConditionParam(bow_c[13480], CONDITION_PARAM_DELAYED, 1)
addDamageCondition(bow_c[13480], 15, 2000, -30)
function onUseWeapon(cid, var)
local wid = getPlayerWeapon(cid, true).itemid -- If getPlayerWeapon doesn't work on your server, locate ID of the weapon via another means, e.g. getPlayerSlotItem and store it in this var
if getCreatureTarget(cid) ~= 0 then
if bow_c[wid] then
doTargetCombatCondition(cid, getCreatureTarget(cid), bow_c[wid], CONST_ME_FIRE)
end
end
return doCombat(cid, combat, var)
end
<!-- magma bow -->
<distance id="2544" event="script" value="magmabow.lua"/>