found this script that works pretty well, but since it's not letting me set 2 lots of different conditions im wondering if anyone has a method to make this work please
When using custom fire bow it should choose the fire condition, and same with poison, if no custom bow in hand just shoot standard arrows.
Thanks!
Lua:
local poisonbow = 5108
local firebow = 5109
local condition = createConditionObject(CONDITION_POISON)
addDamageCondition(condition, 10, 2000, -15)
setConditionParam(condition, CONDITION_PARAM_DELAYED, true)
local condition = createConditionObject(CONDITION_FIRE)
addDamageCondition(condition, 10, 2000, -15)
setConditionParam(condition, CONDITION_PARAM_DELAYED, true)
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 == poisonbow or slotright.itemid == poisonbow and getCreatureTarget(cid) then
doTargetCombatCondition(cid, getCreatureTarget(cid), condition, CONST_ME_POISON)
elseif slotleft.itemid == firebow or slotright.itemid == firebow and getCreatureTarget(cid) then
doTargetCombatCondition(cid, getCreatureTarget(cid), condition, CONST_ME_FIRE)
end
return doCombat(cid, combat, var)
end
When using custom fire bow it should choose the fire condition, and same with poison, if no custom bow in hand just shoot standard arrows.
Thanks!