bpm91
Advanced OT User
- Joined
- May 23, 2019
- Messages
- 1,046
- Solutions
- 7
- Reaction score
- 180
- Location
- Brazil
- YouTube
- caruniawikibr
Hi guys, I had a post just about a script, but I had problems with it, what happens is: a bow using the common arrow leaves the monster burned, but I can not change his missile, changing the missile all the other bows have the same missile. "in the case of fire missile"
if anyone knows how to fix this error, i use tfs 0.4
Here I have a bow script, but as I said, it does not recognize the flamming arrow missile.
And if you acknowledge it, all the other bows also miss this bow. (srry for eng.)
weapons xml
<distance id="2544" event="script" value="magmabow.lua"/>
script
local bowid = 7874
local condition = createConditionObject(CONDITION_FIRE)
setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition, 8, 2000, -30)
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ARROW)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0, 0, 1, 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
If i change CONST_ANI_ARROW) for CONST_ANI_FLAMMINGARROW) all bows change too.
if anyone knows how to fix this error, i use tfs 0.4
Here I have a bow script, but as I said, it does not recognize the flamming arrow missile.
And if you acknowledge it, all the other bows also miss this bow. (srry for eng.)
weapons xml
<distance id="2544" event="script" value="magmabow.lua"/>
script
local bowid = 7874
local condition = createConditionObject(CONDITION_FIRE)
setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition, 8, 2000, -30)
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ARROW)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0, 0, 1, 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
If i change CONST_ANI_ARROW) for CONST_ANI_FLAMMINGARROW) all bows change too.