Hello everyone!
Someone can explain me how to make a elemental bows (3 different?)
(1 hit - giving condition) from 10 to 0 each like Medivia (9, 8, 7, 6, 5, 4, 3, 2, 1, 0) - you can hit again (no stacks from zero if you hit again, damage need go from 10 to 0 and you can again give condition.
I need:
Poison, fire, energy
i found one script, but its for 0.3.6 i think
Someone can explain me how to make a elemental bows (3 different?)
(1 hit - giving condition) from 10 to 0 each like Medivia (9, 8, 7, 6, 5, 4, 3, 2, 1, 0) - you can hit again (no stacks from zero if you hit again, damage need go from 10 to 0 and you can again give condition.
I need:
Poison, fire, energy
i found one script, but its for 0.3.6 i think
Lua:
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)
local bow_c = {
[8855] = createConditionObject(CONDITION_FREEZING),
[8856] = createConditionObject(CONDITION_POISON)
}
setConditionParam(bow_c[8855], CONDITION_PARAM_DELAYED, 1)
addDamageCondition(bow_c[8855], 15, 2000, -8)
setConditionParam(bow_c[8856], CONDITION_PARAM_DELAYED, 1)
addDamageCondition(bow_c[8856], 15, 2000, -6)
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
Last edited: