Member
Joined: September 9th, 2008, 8:27 amPosts: 62
These are the codes for the spell
Spoiler :
Code:
function Trig_Maledict_Conditions takes nothing returns boolean if(not(GetSpellAbilityId()=='A04D'))then return false endif return true endfunction function Trig_Maledict_Actions takes nothing returns nothing set udg_MjnCaster2[16]=GetSpellAbilityUnit() set udg_MjnUnit[42]=GetSpellTargetUnit() call PauseUnitBJ(true,udg_MjnCaster2[16]) call SetUnitInvulnerable(udg_MjnCaster2[16],true) call PauseUnitBJ(true,udg_MjnUnit[42]) call SetUnitInvulnerable(udg_MjnUnit[42],true) call SetUnitTimeScalePercent(udg_MjnCaster2[16],400.00) call EnableTrigger(gg_trg_Maledict_Eff) call EnableTrigger(gg_trg_Maledict_Eff2) call CreateNUnitsAtLocFacingLocBJ(1,'e02I',GetOwningPlayer(udg_MjnCaster2[16]),PolarProjectionBJ(GetUnitLoc(udg_MjnUnit[42]),500.00,GetRandomDirectionDeg()),GetUnitLoc(udg_MjnUnit[42])) call UnitApplyTimedLifeBJ(0.50,'BTLF',GetLastCreatedUnit()) call TriggerSleepAction(0.40) call AddSpecialEffectLocBJ(GetUnitLoc(udg_MjnUnit[42]),"Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl") call DestroyEffectBJ(GetLastCreatedEffectBJ()) call CreateNUnitsAtLocFacingLocBJ(1,'e02I',GetOwningPlayer(udg_MjnCaster2[16]),PolarProjectionBJ(GetUnitLoc(udg_MjnUnit[42]),500.00,GetRandomDirectionDeg()),GetUnitLoc(udg_MjnUnit[42])) call UnitApplyTimedLifeBJ(0.40,'BTLF',GetLastCreatedUnit()) call TriggerSleepAction(0.40) call CreateNUnitsAtLocFacingLocBJ(1,'e02I',GetOwningPlayer(udg_MjnCaster2[16]),PolarProjectionBJ(GetUnitLoc(udg_MjnUnit[42]),500.00,GetRandomDirectionDeg()),GetUnitLoc(udg_MjnUnit[42])) call UnitApplyTimedLifeBJ(0.40,'BTLF',GetLastCreatedUnit()) call TriggerSleepAction(0.40) call AddSpecialEffectLocBJ(GetUnitLoc(udg_MjnUnit[42]),"Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl") call DestroyEffectBJ(GetLastCreatedEffectBJ()) call CreateNUnitsAtLocFacingLocBJ(1,'e02I',GetOwningPlayer(udg_MjnCaster2[16]),PolarProjectionBJ(GetUnitLoc(udg_MjnUnit[42]),500.00,GetRandomDirectionDeg()),GetUnitLoc(udg_MjnUnit[42])) call UnitApplyTimedLifeBJ(0.40,'BTLF',GetLastCreatedUnit()) call TriggerSleepAction(0.40) call CreateNUnitsAtLocFacingLocBJ(1,'e02I',GetOwningPlayer(udg_MjnCaster2[16]),PolarProjectionBJ(GetUnitLoc(udg_MjnUnit[42]),400.00,GetRandomDirectionDeg()),GetUnitLoc(udg_MjnUnit[42])) call UnitApplyTimedLifeBJ(0.40,'BTLF',GetLastCreatedUnit()) call TriggerSleepAction(0.30) call SetUnitInvulnerable(udg_MjnUnit[42],false) call TriggerSleepAction(0.10) call CreateNUnitsAtLoc(1,'e002',GetOwningPlayer(udg_MjnCaster2[16]),GetUnitLoc(udg_MjnUnit[42]),GetRandomDirectionDeg()) call UnitApplyTimedLifeBJ(2.50,'BTLF',GetLastCreatedUnit()) call UnitDamageTargetBJ(udg_MjnCaster2[16],udg_MjnUnit[42],(((4000.00*I2R(GetUnitAbilityLevelSwapped('A04D',udg_MjnCaster2[16])))+(I2R(GetHeroStatBJ(bj_HEROSTAT_STR,udg_MjnCaster2[16],true))*12.00))+(7.00*I2R(GetHeroStatBJ(bj_HEROSTAT_AGI,udg_MjnCaster2[16],true)))),ATTACK_TYPE_CHAOS,DAMAGE_TYPE_FORCE) call CreateTextTagLocBJ(("|cffB000B0"+(I2S(((4000*GetUnitAbilityLevelSwapped('A04D',udg_MjnCaster2[16]))+((GetHeroStatBJ(bj_HEROSTAT_STR,udg_MjnCaster2[16],true)*12)+(GetHeroStatBJ(bj_HEROSTAT_AGI,udg_MjnCaster2[16],true)*7))))+"|r damage !")),GetUnitLoc(udg_MjnUnit[42]),90.00,11.00,100.00,100.00,100,100.00) call SetTextTagPermanentBJ(GetLastCreatedTextTag(),false) call SetTextTagLifespanBJ(GetLastCreatedTextTag(),5.00) call SetTextTagFadepointBJ(GetLastCreatedTextTag(),0.00) call SetTextTagVelocityBJ(GetLastCreatedTextTag(),64,90.00) call PauseUnitBJ(false,udg_MjnUnit[42]) call DisableTrigger(gg_trg_Maledict_Eff) call DisableTrigger(gg_trg_Maledict_Eff2) call SetUnitTimeScalePercent(udg_MjnCaster2[16],100.00) call SetUnitPositionLoc(udg_MjnCaster2[16],GetUnitLoc(udg_MjnUnit[42])) call SetUnitAnimation(udg_MjnCaster2[16],"spell") call PauseUnitBJ(false,udg_MjnCaster2[16]) call SetUnitInvulnerable(udg_MjnCaster2[16],false) endfunction function InitTrig_Maledict takes nothing returns nothing set gg_trg_Maledict=CreateTrigger() call TriggerRegisterAnyUnitEventBJ(gg_trg_Maledict,EVENT_PLAYER_UNIT_SPELL_EFFECT) call TriggerAddCondition(gg_trg_Maledict,Condition(function Trig_Maledict_Conditions)) call TriggerAddAction(gg_trg_Renzokuken,function Trig_Renzokuken_Actions) endfunction function Trig_Maledict_Eff_Func001A takes nothing returns nothing call SetUnitPositionLoc(GetEnumUnit(),PolarProjectionBJ(GetUnitLoc(GetEnumUnit()),100.00,GetUnitFacing(GetEnumUnit()))) call CreateNUnitsAtLoc(1,'e008',GetOwningPlayer(udg_MjnCaster2[16]),GetUnitLoc(GetEnumUnit()),GetUnitFacing(GetEnumUnit())) call UnitApplyTimedLifeBJ(0.40,'BTLF',GetLastCreatedUnit()) call SetUnitVertexColorBJ(GetLastCreatedUnit(),100,100,100,70.00) call SetUnitAnimation(GetLastCreatedUnit(),"spell") endfunction function Trig_Maledict_Eff_Actions takes nothing returns nothing call ForGroupBJ(GetUnitsOfPlayerAndTypeId(GetOwningPlayer(udg_MjnCaster2[16]),'e02I'),function Trig_Maledict_Eff_Func001A) endfunction function InitTrig_Maledict_Eff takes nothing returns nothing set gg_trg_Maledict_Eff=CreateTrigger() call DisableTrigger(gg_trg_Maledict_Eff) call TriggerRegisterTimerEventPeriodic(gg_trg_Maledict_Eff,0.05) call TriggerAddAction(gg_trg_Maledict_Eff,function Trig_Maledict_Eff_Actions) endfunction function Trig_Maledict_Eff2_Actions takes nothing returns nothing call AddSpecialEffectLocBJ(GetUnitLoc(udg_MjnCaster2[16]),"Abilities\\Spells\\Other\\Levelup\\LevelupCaster.mdl") call DestroyEffectBJ(GetLastCreatedEffectBJ()) call SetUnitPositionLocFacingLocBJ(udg_MjnCaster2[16],PolarProjectionBJ(GetUnitLoc(udg_MjnUnit[42]),120.00,GetRandomDirectionDeg()),GetUnitLoc(udg_MjnUnit[42])) call SetUnitAnimation(udg_MjnCaster2[16],"attack") call AddSpecialEffectLocBJ(GetUnitLoc(udg_MjnUnit[42]),"LargeExplosion.mdx") call DestroyEffectBJ(GetLastCreatedEffectBJ()) call CreateNUnitsAtLocFacingLocBJ(1,'e008',GetOwningPlayer(udg_MjnCaster2[16]),PolarProjectionBJ(GetUnitLoc(udg_MjnUnit[42]),120.00,GetRandomDirectionDeg()),GetUnitLoc(udg_MjnUnit[42])) call UnitApplyTimedLifeBJ(1.00,'BTLF',GetLastCreatedUnit()) call SetUnitVertexColorBJ(GetLastCreatedUnit(),100,100,100,70.00) call SetUnitAnimation(GetLastCreatedUnit(),"attack") endfunction function InitTrig_Maledict_Eff2 takes nothing returns nothing set gg_trg_Maledict_Eff2=CreateTrigger() call DisableTrigger(gg_trg_Maledict_Eff2) call TriggerRegisterTimerEventPeriodic(gg_trg_Maledict_Eff2,0.10) call TriggerAddAction(gg_trg_Maledict_Eff2,function Trig_Maledict_Eff2_Actions) endfunction
What part of these codes I have to tweak to make this an area spell?
Last edited by Apple on June 9th, 2013, 6:21 am, edited 1 time in total.
Added a [Spoiler] and [Code]