Werewolf
Forbidden Ascension
- Joined
- Jul 15, 2012
- Messages
- 886
- Reaction score
- 123
Alright This spell works perfectly however, its Stunning feture, which is located at the bottom of the script has a flaw, The spell in Spells.xml says that the spell works in direction, which it does, however when you have a target selected, it still paralises them at a distance that is not even set...
Does anyone know how to make that stun Only work on the targets that are hit by the spell physicaly, instead of a target selected anywere on the screen?
Sadly i could not Fit the Whole spell for it was more then 10,000 characters long.
Does anyone know how to make that stun Only work on the targets that are hit by the spell physicaly, instead of a target selected anywere on the screen?
Code:
-- Areas/Combat for 800ms
local combat8_Brush = createCombatObject()
setCombatParam(combat8_Brush, COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER)
setCombatParam(combat8_Brush, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat8_Brush,createCombatArea({{1},
{2}}))
function onGetFormulaValues(cid, level, skill, attack, factor)
local skillTotal, levelTotal = skill + attack, level / 5
return -(skillTotal * 1.5 + levelTotal), -(skillTotal * 1.5 + levelTotal)
end
setCombatCallback(combat8_Brush, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
local paralyze = createConditionObject(CONDITION_PARALYZE)
setConditionParam(paralyze, CONDITION_PARAM_TICKS, 4000)
local muted = createConditionObject(CONDITION_MUTED)
setConditionParam(muted, CONDITION_PARAM_TICKS, 4000)
local pacified = createConditionObject(CONDITION_PACIFIED)
setConditionParam(pacified, CONDITION_PARAM_TICKS, 4000)
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, 4000)
-- =============== CORE FUNCTIONS ===============
local function RunPart(c,cid,var,dirList,dirEmitPos) -- Part
if (isCreature(cid)) then
doCombat(cid, c, var)
if (dirList ~= nil) then -- Emit distance effects
local i = 2;
while (i < #dirList) do
doSendDistanceShoot(dirEmitPos,{x=dirEmitPos.x-dirList,y=dirEmitPos.y-dirList[i+1],z=dirEmitPos.z},dirList[1])
i = i + 2
end
end
end
end
function onCastSpell(cid, var)
local startPos = getCreaturePosition(cid)
RunPart(combat0_Brush,cid,var)
addEvent(RunPart,100,combat1_Brush,cid,var)
addEvent(RunPart,200,combat2_Brush,cid,var)
addEvent(RunPart,300,combat3_Brush,cid,var)
addEvent(RunPart,400,combat4_Brush,cid,var)
addEvent(RunPart,500,combat5_Brush,cid,var)
addEvent(RunPart,600,combat6_Brush,cid,var)
addEvent(RunPart,700,combat7_Brush,cid,var)
addEvent(RunPart,800,combat8_Brush,cid,var)
local target = getCreatureTarget(cid)
local speed = getCreatureSpeed(target)
doChangeSpeed(target, -speed)
addEvent(doChangeSpeed, 4000, target, speed)
doAddCondition(target, paralyze)
doAddCondition(target, muted)
doAddCondition(target, pacified)
doAddCondition(target, exhaust)
doSetItemOutfit(target,(2317), 3500)
return true
end