http://www.mediafire.com/?52eizndmzqe
http://www.mediafire.com/?myymwzn32gl This one's the map I'm trying to get the spell into
What do I need to copy/change to put into the other war3map.j?
It's for a ball that deals damage based on Int
//Line 8739 to 8832
Code: Select all
function Trig_Destruction_Sphere_Conditions takes nothing returns boolean
return((GetSpellAbilityId()=='A016'))
endfunction
function Trig_Destruction_Sphere_Func004002003 takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))
endfunction
function Trig_Destruction_Sphere_Func005A takes nothing returns nothing
call CameraSetEQNoiseForPlayer(GetOwningPlayer(GetEnumUnit()),(I2R(GetUnitAbilityLevelSwapped(GetSpellAbilityId(),GetTriggerUnit()))*2.00))
call CameraSetTargetNoiseForPlayer(GetOwningPlayer(GetEnumUnit()),(I2R(GetUnitAbilityLevelSwapped(GetSpellAbilityId(),GetTriggerUnit()))*3.00),200.00)
endfunction
function Trig_Destruction_Sphere_Func024A takes nothing returns nothing
call CameraClearNoiseForPlayer(GetEnumPlayer())
endfunction
function Trig_Destruction_Sphere_Actions takes nothing returns nothing
set udg_Caster[10]=GetTriggerUnit()
set udg_location07=GetUnitLoc(GetTriggerUnit())
set udg_location08=GetSpellTargetLoc()
set udg_location09=PolarProjectionBJ(udg_location07,150.00,AngleBetweenPoints(udg_location07,udg_location08))
set udg_group05=GetUnitsInRangeOfLocMatching(512.00,udg_location07,Condition(function Trig_Destruction_Sphere_Func004002003))
call ForGroupBJ(udg_group05,function Trig_Destruction_Sphere_Func005A)
call DestroyGroup(udg_group05)
call CreateNUnitsAtLoc(1,'h02R',GetTriggerPlayer(),udg_location09,bj_UNIT_FACING)
call SetUnitVertexColorBJ(bj_lastCreatedUnit,50.00,75.00,50.00,0)
call CreateNUnitsAtLoc(1,'h02T',GetTriggerPlayer(),udg_location09,AngleBetweenPoints(udg_location07,udg_location08))
call SetUnitScalePercent(bj_lastCreatedUnit,(400.00+(I2R(GetUnitAbilityLevelSwapped(GetSpellAbilityId(),GetTriggerUnit()))*10.00)),(400.00+(I2R(GetUnitAbilityLevelSwapped(GetSpellAbilityId(),GetTriggerUnit()))*10.00)),(400.00+(I2R(GetUnitAbilityLevelSwapped(GetSpellAbilityId(),GetTriggerUnit()))*10.00)))
call SetUnitFlyHeight(bj_lastCreatedUnit,0.00,50.00)
call AddSpecialEffectTargetUnitBJ("chest",bj_lastCreatedUnit,"Abilities\\Weapons\\GreenDragonMissile\\GreenDragonMissile.mdl")
call TriggerExecute(udg_trigger621)
call AddSpecialEffectTargetUnitBJ("chest",bj_lastCreatedUnit,"Abilities\\Spells\\NightElf\\Starfall\\StarfallCaster.mdl")
call TriggerExecute(udg_trigger621)
call AddSpecialEffectTargetUnitBJ("chest",bj_lastCreatedUnit,"Abilities\\Spells\\Undead\\DarkSummoning\\DarkSummonMissile.mdl")
call TriggerExecute(udg_trigger621)
call IssuePointOrderLoc(bj_lastCreatedUnit,"attack",udg_location08)
call SetUnitUserData(bj_lastCreatedUnit,GetUnitAbilityLevelSwapped(GetSpellAbilityId(),GetTriggerUnit()))
call RemoveLocation(udg_location09)
call RemoveLocation(udg_location08)
call RemoveLocation(udg_location07)
call TriggerSleepAction(2.00)
call ForForce(bj_FORCE_ALL_PLAYERS,function Trig_Destruction_Sphere_Func024A)
endfunction
function Trig_Destruction_Sphere_Attack_Conditions takes nothing returns boolean
return((GetUnitTypeId(GetDyingUnit())=='h02T'))
endfunction
function Trig_Destruction_Sphere_Attack_Func002002003 takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))
endfunction
function Trig_Destruction_Sphere_Attack_Func003A takes nothing returns nothing
call CameraSetEQNoiseForPlayer(GetOwningPlayer(GetEnumUnit()),(I2R(GetUnitUserData(GetTriggerUnit()))*2.00))
call CameraSetTargetNoiseForPlayer(GetOwningPlayer(GetEnumUnit()),(I2R(GetUnitUserData(GetTriggerUnit()))*3.00),200.00)
endfunction
function Trig_Destruction_Sphere_Attack_Func019002003 takes nothing returns boolean
return(IsPlayerAlly(GetOwningPlayer(GetFilterUnit()),GetOwningPlayer(GetTriggerUnit()))==false)
endfunction
function Trig_Destruction_Sphere_Attack_Func020A takes nothing returns nothing
call UnitDamageTargetBJ(udg_Caster[10],GetEnumUnit(),udg_real02,ATTACK_TYPE_MELEE,DAMAGE_TYPE_NORMAL)
endfunction
function Trig_Destruction_Sphere_Attack_Func022Func001C takes nothing returns boolean
return((IsDestructableAliveBJ(GetEnumDestructable())))
endfunction
function Trig_Destruction_Sphere_Attack_Func022A takes nothing returns nothing
if((IsDestructableAliveBJ(GetEnumDestructable())))then
call KillDestructable(GetEnumDestructable())
call TriggerExecute(udg_trigger623)
endif
endfunction
function Trig_Destruction_Sphere_Attack_Func026A takes nothing returns nothing
call CameraClearNoiseForPlayer(GetEnumPlayer())
endfunction
function Trig_Destruction_Sphere_Attack_Actions takes nothing returns nothing
set udg_location08=GetUnitLoc(GetTriggerUnit())
set udg_group05=GetUnitsInRangeOfLocMatching(512.00,udg_location08,Condition(function Trig_Destruction_Sphere_Attack_Func002002003))
call ForGroupBJ(udg_group05,function Trig_Destruction_Sphere_Attack_Func003A)
call DestroyGroup(udg_group05)
call SetTerrainTypeBJ(udg_location08,'Kdtr',-1,5,0)
call SetTerrainTypeBJ(udg_location08,'Jdtr',-1,4,0)
call TerrainDeformationRippleBJ(3.00,false,udg_location08,512.00,512.00,128.00,1,256.00)
call CreateNUnitsAtLoc(1,'h02S',GetTriggerPlayer(),udg_location08,bj_UNIT_FACING)
call SetUnitScalePercent(bj_lastCreatedUnit,(350.00+(I2R(GetUnitUserData(GetTriggerUnit()))*10.00)),(350.00+(I2R(GetUnitUserData(GetTriggerUnit()))*10.00)),(350.00+(I2R(GetUnitUserData(GetTriggerUnit()))*10.00)))
call SetUnitVertexColorBJ(bj_lastCreatedUnit,50.00,100.00,50.00,0)
call CreateNUnitsAtLoc(1,'h017',GetTriggerPlayer(),udg_location08,bj_UNIT_FACING)
call SetUnitScalePercent(bj_lastCreatedUnit,(350.00+(I2R(GetUnitUserData(GetTriggerUnit()))*10.00)),(350.00+(I2R(GetUnitUserData(GetTriggerUnit()))*10.00)),(350.00+(I2R(GetUnitUserData(GetTriggerUnit()))*10.00)))
call SetUnitVertexColorBJ(bj_lastCreatedUnit,50.00,100.00,50.00,0)
call SetUnitTimeScalePercent(bj_lastCreatedUnit,15.00)
call KillUnit(bj_lastCreatedUnit)
set udg_real02=((I2R(GetHeroStatBJ(2,udg_unit67,false))*(I2R(GetUnitUserData(GetTriggerUnit()))*4.00))+100.00)
call CreateNUnitsAtLoc(1,'h028',GetTriggerPlayer(),udg_location08,bj_UNIT_FACING)
set udg_group05=GetUnitsInRangeOfLocMatching(512.00,udg_location08,Condition(function Trig_Destruction_Sphere_Attack_Func019002003))
call ForGroupBJ(udg_group05,function Trig_Destruction_Sphere_Attack_Func020A)
call DestroyGroup(udg_group05)
call EnumDestructablesInCircleBJ(512.00,udg_location08,function Trig_Destruction_Sphere_Attack_Func022A)
call RemoveLocation(udg_location08)
call TriggerSleepAction(2.00)
call ForForce(bj_FORCE_ALL_PLAYERS,function Trig_Destruction_Sphere_Attack_Func026A)
endfunction
//Line 19271-19278
Code: Select all
set udg_trigger197=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger197,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(udg_trigger197,Condition(function Trig_Destruction_Sphere_Conditions))
call TriggerAddAction(udg_trigger197,function Trig_Destruction_Sphere_Actions)
set udg_trigger198=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger198,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(udg_trigger198,Condition(function Trig_Destruction_Sphere_Attack_Conditions))
call TriggerAddAction(udg_trigger198,function Trig_Destruction_Sphere_Attack_Actions)