Estou com problema no meu sistema de Flaming Bow, na qual os arrows com bow normal estão saindo o mesmo missile effect, e também ele dá target de fire condition mesmo que erre a flecha.. alguém pode me ajudar? uso OThire..
Em: weapons/scripts/flaming_bow
local bowid = 5137
local condition = createConditionObject(CONDITION_FIRE)
setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition, 9, 2000, -10)
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIREARROW)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0, 0, 1.0, 0)
function onUseWeapon(cid, var)
local slotleft = getPlayerSlotItem(cid,CONST_SLOT_LEFT)
local slotright = getPlayerSlotItem(cid,CONST_SLOT_RIGHT)
if slotleft.itemid == bowid or slotright.itemid == bowid and getCreatureTarget(cid) then
doTargetCombatCondition(cid, getCreatureTarget(cid), condition, CONST_ME_FIRE)
end
return doCombat(cid, combat, var)
end
Em weapons:
<!-- Distance -->
<distance id="2455" function="default"/> <!-- Crossbow -->
<distance id="2456" function="default"/> <!-- Bow -->
<distance id="5137" function="default"/> <!-- Flaming Bow -->
<distance id="5138" function="default"/> <!-- Headhunter Spear -->
<!-- Ammunition -->
<distance id="2544" function="script" script="flaming_bow.lua"/>
<distance id="2545" function="script" script="poison_arrow.lua"/>
<distance id="2546" function="script" script="explosive_arrow.lua"/>
<distance id="2547" function="default"/> <!-- Power Bolt -->
<distance id="2543" function="default"/> <!-- Bolt -->
<distance id="2544" function="default"/> <!-- Arrow -->