Landera
Veteran OT User
- Joined
- Nov 24, 2011
- Messages
- 905
- Solutions
- 1
- Reaction score
- 318
Hello I'd like too make a elemental bow similiar too the flaming bow from medivia.
Medivia - Flaming Bow
EDIT: TFS 0.3.6
I've found a script that is what im searching for however is has some flaws when I want too make a poison bow that makes the target poisoned but after ive edited weapons.xml I'm getting an error because its duplicated.
is it possible too merge these 2 script or even more in the future
Bump
Medivia - Flaming Bow
EDIT: TFS 0.3.6
I've found a script that is what im searching for however is has some flaws when I want too make a poison bow that makes the target poisoned but after ive edited weapons.xml I'm getting an error because its duplicated.
Lua:
<distance id="2544" action="removecount" script="ice_bow.lua"/>
<distance id="2544" action="removecount" script="poison_bow.lua"/>
is it possible too merge these 2 script or even more in the future
Lua:
local bowid = 8855
local condition = createConditionObject(CONDITION_FREEZING)
setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition, 15, 2000, -8)
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
Lua:
local bowid = 8856
local condition = createConditionObject(CONDITION_POISON)
setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition, 15, 2000, -6)
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
Bump
Last edited by a moderator: