Hi i'm trying to make the bullseye potion add distance but instead of taking away shielding, it paralyzes you for the 1 minute the potion lasts. I worked on it for a while and I could get it to either add the distance with no paralyze, or paralyze without adding the distance.
This is the original script:
I tried copying the sharpshooter script and switching it from function on cast to function on use and for some reason it only does 1 or the other, not both at the same time.
Here is that script:
Any help will be greatly appreciated and I will rep you.
Thx in advance
~Theal
This is the original script:
Code:
local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, 1 * 60 * 1000) -- 1 minute
setConditionParam(condition, CONDITION_PARAM_SKILL_DISTANCE, 5)
setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, -10)
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(doAddCondition(cid, condition)) then
doSendMagicEffect(fromPosition, CONST_ME_MAGIC_RED)
doRemoveItem(item.uid)
end
return true
end
I tried copying the sharpshooter script and switching it from function on cast to function on use and for some reason it only does 1 or the other, not both at the same time.
Here is that script:
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)
local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, 1 * 60 * 1000) -- 1 minute
setConditionParam(condition, CONDITION_PARAM_SKILL_DISTANCE, 10)
setConditionParam(condition, CONDITION_PARAM_BUFF, true)
setCombatCondition(combat, condition)
local speed = createConditionObject(CONDITION_PARALYZE)
setConditionParam(speed, CONDITION_PARAM_TICKS, 10000)
setConditionFormula(speed, -0.7, 56, -0.7, 56)
setCombatCondition(combat, speed)
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(doAddCondition(cid, condition)) then
doSendMagicEffect(fromPosition, CONST_ME_MAGIC_RED)
doRemoveItem(item.uid)
doCombat(cid, combat, var)
end
return true
end
Any help will be greatly appreciated and I will rep you.
Thx in advance
~Theal