// Map deprotected by X-deprotect (version 2006-10-02) by zibada
// http://dimon.xgm.ru/xdep/
// Visit our modmaking community at http://xgm.ru/
Name | Type | is_array | initial_value |
booleans01 | boolean | Yes | |
forces01 | force | Yes | |
integer01 | integer | No | |
integer02 | integer | No | |
integer03 | integer | No | |
integer04 | integer | No | |
integers01 | integer | Yes | |
integers02 | integer | Yes | |
integers03 | integer | Yes | |
integers04 | integer | Yes | |
LastTarget | unit | No | |
maxTimerStored | integer | No | -1 |
player01 | player | No | |
rect01 | rect | No | |
rect02 | rect | No | |
rect03 | rect | No | |
rect04 | rect | No | |
rect05 | rect | No | |
rect06 | rect | No | |
rect07 | rect | No | |
rect08 | rect | No | |
rect09 | rect | No | |
rect10 | rect | No | |
rect11 | rect | No | |
sound01 | sound | No | |
sound02 | sound | No | |
sound03 | sound | No | |
StoredTimer | timer | Yes | |
StoredTimerData | integer | Yes | |
trigger01 | trigger | No | |
trigger02 | trigger | No | |
trigger03 | trigger | No | |
trigger04 | trigger | No | |
trigger05 | trigger | No | |
trigger06 | trigger | No | |
trigger07 | trigger | No | |
trigger08 | trigger | No | |
trigger09 | trigger | No | |
trigger10 | trigger | No | |
trigger11 | trigger | No | |
trigger12 | trigger | No | |
trigger13 | trigger | No | |
trigger14 | trigger | No | |
trigger15 | trigger | No | |
trigger16 | trigger | No | |
trigger17 | trigger | No | |
trigger18 | trigger | No | |
trigger19 | trigger | No | |
trigger20 | trigger | No | |
trigger21 | trigger | No | |
trigger22 | trigger | No | |
trigger23 | trigger | No | |
trigger24 | trigger | No | |
trigger25 | trigger | No | |
trigger26 | trigger | No | |
trigger27 | trigger | No | |
trigger28 | trigger | No | |
trigger29 | trigger | No | |
trigger30 | trigger | No | |
trigger31 | trigger | No | |
trigger32 | trigger | No | |
trigger33 | trigger | No | |
trigger34 | trigger | No | |
trigger35 | trigger | No | |
trigger36 | trigger | No | |
trigger37 | trigger | No | |
trigger38 | trigger | No | |
trigger39 | trigger | No | |
trigger40 | trigger | No | |
trigger41 | trigger | No | |
trigger42 | trigger | No | |
trigger43 | trigger | No | |
trigger44 | trigger | No | |
trigger45 | trigger | No | |
unit01 | unit | No | |
unit02 | unit | No | |
unit03 | unit | No | |
unit04 | unit | No | |
unit05 | unit | No | |
unit06 | unit | No | |
unit07 | unit | No | |
unit08 | unit | No | |
unit09 | unit | No | |
unit10 | unit | No | |
unit11 | unit | No | |
unit12 | unit | No | |
unit13 | unit | No |
// Map deprotected by X-deprotect (version 2006-10-02) by zibada
// http://dimon.xgm.ru/xdep/
// Visit our modmaking community at http://xgm.ru/
function InitGlobals2 takes nothing returns nothing
local integer i=0
set i=0
loop
exitwhen(i>1)
set udg_integers01[i]='0'
set i=i+1
endloop
set udg_integer01=0
set udg_integer02=0
set i=0
loop
exitwhen(i>1)
set udg_integers02[i]='0'
set i=i+1
endloop
set udg_integer03=0
set i=0
loop
exitwhen(i>1)
set udg_booleans01[i]=false
set i=i+1
endloop
set i=0
loop
exitwhen(i>1)
set udg_integers03[i]=0
set i=i+1
endloop
set udg_integer04=0
set i=0
loop
exitwhen(i>1)
set udg_integers04[i]=0
set i=i+1
endloop
set i=0
loop
exitwhen(i>1)
set udg_forces01[i]=CreateForce()
set i=i+1
endloop
endfunction
//***************************************************************************
//*
//*Unit Item Tables
//*
//***************************************************************************
function Unit000016_DropItems takes nothing returns nothing
local widget trigWidget=null
local unit trigUnit=null
local integer itemID=0
local boolean canDrop=true
set trigWidget=bj_lastDyingWidget
if(trigWidget==null)then
set trigUnit=GetTriggerUnit()
endif
if(trigUnit!=null)then
set canDrop=not IsUnitHidden(trigUnit)
if(canDrop and GetChangingUnit()!=null)then
set canDrop=(GetChangingUnitPrevOwner()==Player(PLAYER_NEUTRAL_AGGRESSIVE))
endif
endif
if(canDrop)then
//Item set 0
call RandomDistReset()
call RandomDistAddItem('ratf',100)
set itemID=RandomDistChoose()
if(trigUnit!=null)then
call UnitDropItem(trigUnit,itemID)
else
call WidgetDropItem(trigWidget,itemID)
endif
endif
set bj_lastDyingWidget=null
call DestroyTrigger(GetTriggeringTrigger())
endfunction
function Unit000033_DropItems takes nothing returns nothing
local widget trigWidget=null
local unit trigUnit=null
local integer itemID=0
local boolean canDrop=true
set trigWidget=bj_lastDyingWidget
if(trigWidget==null)then
set trigUnit=GetTriggerUnit()
endif
if(trigUnit!=null)then
set canDrop=not IsUnitHidden(trigUnit)
if(canDrop and GetChangingUnit()!=null)then
set canDrop=(GetChangingUnitPrevOwner()==Player(PLAYER_NEUTRAL_AGGRESSIVE))
endif
endif
if(canDrop)then
//Item set 0
call RandomDistReset()
call RandomDistAddItem('ratf',100)
set itemID=RandomDistChoose()
if(trigUnit!=null)then
call UnitDropItem(trigUnit,itemID)
else
call WidgetDropItem(trigWidget,itemID)
endif
endif
set bj_lastDyingWidget=null
call DestroyTrigger(GetTriggeringTrigger())
endfunction
function Unit000034_DropItems takes nothing returns nothing
local widget trigWidget=null
local unit trigUnit=null
local integer itemID=0
local boolean canDrop=true
set trigWidget=bj_lastDyingWidget
if(trigWidget==null)then
set trigUnit=GetTriggerUnit()
endif
if(trigUnit!=null)then
set canDrop=not IsUnitHidden(trigUnit)
if(canDrop and GetChangingUnit()!=null)then
set canDrop=(GetChangingUnitPrevOwner()==Player(PLAYER_NEUTRAL_AGGRESSIVE))
endif
endif
if(canDrop)then
//Item set 0
call RandomDistReset()
call RandomDistAddItem('ratf',100)
set itemID=RandomDistChoose()
if(trigUnit!=null)then
call UnitDropItem(trigUnit,itemID)
else
call WidgetDropItem(trigWidget,itemID)
endif
endif
set bj_lastDyingWidget=null
call DestroyTrigger(GetTriggeringTrigger())
endfunction
function Unit000035_DropItems takes nothing returns nothing
local widget trigWidget=null
local unit trigUnit=null
local integer itemID=0
local boolean canDrop=true
set trigWidget=bj_lastDyingWidget
if(trigWidget==null)then
set trigUnit=GetTriggerUnit()
endif
if(trigUnit!=null)then
set canDrop=not IsUnitHidden(trigUnit)
if(canDrop and GetChangingUnit()!=null)then
set canDrop=(GetChangingUnitPrevOwner()==Player(PLAYER_NEUTRAL_AGGRESSIVE))
endif
endif
if(canDrop)then
//Item set 0
call RandomDistReset()
call RandomDistAddItem('ratf',100)
set itemID=RandomDistChoose()
if(trigUnit!=null)then
call UnitDropItem(trigUnit,itemID)
else
call WidgetDropItem(trigWidget,itemID)
endif
endif
set bj_lastDyingWidget=null
call DestroyTrigger(GetTriggeringTrigger())
endfunction
function Unit000036_DropItems takes nothing returns nothing
local widget trigWidget=null
local unit trigUnit=null
local integer itemID=0
local boolean canDrop=true
set trigWidget=bj_lastDyingWidget
if(trigWidget==null)then
set trigUnit=GetTriggerUnit()
endif
if(trigUnit!=null)then
set canDrop=not IsUnitHidden(trigUnit)
if(canDrop and GetChangingUnit()!=null)then
set canDrop=(GetChangingUnitPrevOwner()==Player(PLAYER_NEUTRAL_AGGRESSIVE))
endif
endif
if(canDrop)then
//Item set 0
call RandomDistReset()
call RandomDistAddItem('ratf',100)
set itemID=RandomDistChoose()
if(trigUnit!=null)then
call UnitDropItem(trigUnit,itemID)
else
call WidgetDropItem(trigWidget,itemID)
endif
endif
set bj_lastDyingWidget=null
call DestroyTrigger(GetTriggeringTrigger())
endfunction
function Unit000037_DropItems takes nothing returns nothing
local widget trigWidget=null
local unit trigUnit=null
local integer itemID=0
local boolean canDrop=true
set trigWidget=bj_lastDyingWidget
if(trigWidget==null)then
set trigUnit=GetTriggerUnit()
endif
if(trigUnit!=null)then
set canDrop=not IsUnitHidden(trigUnit)
if(canDrop and GetChangingUnit()!=null)then
set canDrop=(GetChangingUnitPrevOwner()==Player(PLAYER_NEUTRAL_AGGRESSIVE))
endif
endif
if(canDrop)then
//Item set 0
call RandomDistReset()
call RandomDistAddItem('ratf',100)
set itemID=RandomDistChoose()
if(trigUnit!=null)then
call UnitDropItem(trigUnit,itemID)
else
call WidgetDropItem(trigWidget,itemID)
endif
endif
set bj_lastDyingWidget=null
call DestroyTrigger(GetTriggeringTrigger())
endfunction
function Unit000038_DropItems takes nothing returns nothing
local widget trigWidget=null
local unit trigUnit=null
local integer itemID=0
local boolean canDrop=true
set trigWidget=bj_lastDyingWidget
if(trigWidget==null)then
set trigUnit=GetTriggerUnit()
endif
if(trigUnit!=null)then
set canDrop=not IsUnitHidden(trigUnit)
if(canDrop and GetChangingUnit()!=null)then
set canDrop=(GetChangingUnitPrevOwner()==Player(PLAYER_NEUTRAL_AGGRESSIVE))
endif
endif
if(canDrop)then
//Item set 0
call RandomDistReset()
call RandomDistAddItem('ratf',100)
set itemID=RandomDistChoose()
if(trigUnit!=null)then
call UnitDropItem(trigUnit,itemID)
else
call WidgetDropItem(trigWidget,itemID)
endif
endif
set bj_lastDyingWidget=null
call DestroyTrigger(GetTriggeringTrigger())
endfunction
function Unit000039_DropItems takes nothing returns nothing
local widget trigWidget=null
local unit trigUnit=null
local integer itemID=0
local boolean canDrop=true
set trigWidget=bj_lastDyingWidget
if(trigWidget==null)then
set trigUnit=GetTriggerUnit()
endif
if(trigUnit!=null)then
set canDrop=not IsUnitHidden(trigUnit)
if(canDrop and GetChangingUnit()!=null)then
set canDrop=(GetChangingUnitPrevOwner()==Player(PLAYER_NEUTRAL_AGGRESSIVE))
endif
endif
if(canDrop)then
//Item set 0
call RandomDistReset()
call RandomDistAddItem('ratf',100)
set itemID=RandomDistChoose()
if(trigUnit!=null)then
call UnitDropItem(trigUnit,itemID)
else
call WidgetDropItem(trigWidget,itemID)
endif
endif
set bj_lastDyingWidget=null
call DestroyTrigger(GetTriggeringTrigger())
endfunction
function Unit000040_DropItems takes nothing returns nothing
local widget trigWidget=null
local unit trigUnit=null
local integer itemID=0
local boolean canDrop=true
set trigWidget=bj_lastDyingWidget
if(trigWidget==null)then
set trigUnit=GetTriggerUnit()
endif
if(trigUnit!=null)then
set canDrop=not IsUnitHidden(trigUnit)
if(canDrop and GetChangingUnit()!=null)then
set canDrop=(GetChangingUnitPrevOwner()==Player(PLAYER_NEUTRAL_AGGRESSIVE))
endif
endif
if(canDrop)then
//Item set 0
call RandomDistReset()
call RandomDistAddItem('ratf',100)
set itemID=RandomDistChoose()
if(trigUnit!=null)then
call UnitDropItem(trigUnit,itemID)
else
call WidgetDropItem(trigWidget,itemID)
endif
endif
set bj_lastDyingWidget=null
call DestroyTrigger(GetTriggeringTrigger())
endfunction
function Unit000041_DropItems takes nothing returns nothing
local widget trigWidget=null
local unit trigUnit=null
local integer itemID=0
local boolean canDrop=true
set trigWidget=bj_lastDyingWidget
if(trigWidget==null)then
set trigUnit=GetTriggerUnit()
endif
if(trigUnit!=null)then
set canDrop=not IsUnitHidden(trigUnit)
if(canDrop and GetChangingUnit()!=null)then
set canDrop=(GetChangingUnitPrevOwner()==Player(PLAYER_NEUTRAL_AGGRESSIVE))
endif
endif
if(canDrop)then
//Item set 0
call RandomDistReset()
call RandomDistAddItem('ratf',100)
set itemID=RandomDistChoose()
if(trigUnit!=null)then
call UnitDropItem(trigUnit,itemID)
else
call WidgetDropItem(trigWidget,itemID)
endif
endif
set bj_lastDyingWidget=null
call DestroyTrigger(GetTriggeringTrigger())
endfunction
function Unit000042_DropItems takes nothing returns nothing
local widget trigWidget=null
local unit trigUnit=null
local integer itemID=0
local boolean canDrop=true
set trigWidget=bj_lastDyingWidget
if(trigWidget==null)then
set trigUnit=GetTriggerUnit()
endif
if(trigUnit!=null)then
set canDrop=not IsUnitHidden(trigUnit)
if(canDrop and GetChangingUnit()!=null)then
set canDrop=(GetChangingUnitPrevOwner()==Player(PLAYER_NEUTRAL_AGGRESSIVE))
endif
endif
if(canDrop)then
//Item set 0
call RandomDistReset()
call RandomDistAddItem('ratf',100)
set itemID=RandomDistChoose()
if(trigUnit!=null)then
call UnitDropItem(trigUnit,itemID)
else
call WidgetDropItem(trigWidget,itemID)
endif
endif
set bj_lastDyingWidget=null
call DestroyTrigger(GetTriggeringTrigger())
endfunction
function Unit000043_DropItems takes nothing returns nothing
local widget trigWidget=null
local unit trigUnit=null
local integer itemID=0
local boolean canDrop=true
set trigWidget=bj_lastDyingWidget
if(trigWidget==null)then
set trigUnit=GetTriggerUnit()
endif
if(trigUnit!=null)then
set canDrop=not IsUnitHidden(trigUnit)
if(canDrop and GetChangingUnit()!=null)then
set canDrop=(GetChangingUnitPrevOwner()==Player(PLAYER_NEUTRAL_AGGRESSIVE))
endif
endif
if(canDrop)then
//Item set 0
call RandomDistReset()
call RandomDistAddItem('ratf',100)
set itemID=RandomDistChoose()
if(trigUnit!=null)then
call UnitDropItem(trigUnit,itemID)
else
call WidgetDropItem(trigWidget,itemID)
endif
endif
set bj_lastDyingWidget=null
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//***************************************************************************
//*
//*Sounds
//*
//***************************************************************************
//***************************************************************************
//*
//*Items
//*
//***************************************************************************
function CreateAllItems takes nothing returns nothing
local integer itemID
call CreateItem('pinv',-1054.6,-163.9)
call CreateItem('pinv',-3525.6,-302.7)
call CreateItem('pinv',3520.2,-232.4)
call CreateItem('pinv',848.8,-285.8)
endfunction
//***************************************************************************
//*
//*Unit Creation
//*
//***************************************************************************
//===========================================================================
function CreateBuildingsForPlayer0 takes nothing returns nothing
local player p=Player(0)
local unit u
local integer unitID
local trigger t
local real life
set u=CreateUnit(p,'hwtw',-3136.0,1600.0,270.000)
set u=CreateUnit(p,'hbar',-2624.0,1600.0,270.000)
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_CHANGE_OWNER)
call TriggerAddAction(t,function Unit000039_DropItems)
endfunction
//===========================================================================
function CreateUnitsForPlayer0 takes nothing returns nothing
local player p=Player(0)
local unit u
local integer unitID
local trigger t
local real life
set u=CreateUnit(p,'ewsp',-3524.3,2930.7,40.717)
set u=CreateUnit(p,'e00M',-2957.4,1599.5,157.285)
endfunction
//===========================================================================
function CreateBuildingsForPlayer1 takes nothing returns nothing
local player p=Player(1)
local unit u
local integer unitID
local trigger t
local real life
set u=CreateUnit(p,'hwtw',-3136.0,768.0,270.000)
set u=CreateUnit(p,'hbar',-2624.0,704.0,270.000)
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_CHANGE_OWNER)
call TriggerAddAction(t,function Unit000038_DropItems)
endfunction
//===========================================================================
function CreateUnitsForPlayer1 takes nothing returns nothing
local player p=Player(1)
local unit u
local integer unitID
local trigger t
local real life
set u=CreateUnit(p,'ewsp',-3406.3,2827.4,168.206)
set u=CreateUnit(p,'e00M',-2968.1,807.7,157.290)
endfunction
//===========================================================================
function CreateBuildingsForPlayer2 takes nothing returns nothing
local player p=Player(2)
local unit u
local integer unitID
local trigger t
local real life
set u=CreateUnit(p,'hwtw',-512.0,2880.0,270.000)
set u=CreateUnit(p,'hbar',-512.0,2368.0,270.000)
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_CHANGE_OWNER)
call TriggerAddAction(t,function Unit000042_DropItems)
endfunction
//===========================================================================
function CreateUnitsForPlayer2 takes nothing returns nothing
local player p=Player(2)
local unit u
local integer unitID
local trigger t
local real life
set u=CreateUnit(p,'ewsp',-3242.5,2856.9,93.343)
set u=CreateUnit(p,'e00M',-663.2,2762.3,157.290)
endfunction
//===========================================================================
function CreateBuildingsForPlayer3 takes nothing returns nothing
local player p=Player(3)
local unit u
local integer unitID
local trigger t
local real life
set u=CreateUnit(p,'hwtw',256.0,2816.0,270.000)
set u=CreateUnit(p,'hbar',256.0,2368.0,270.000)
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_CHANGE_OWNER)
call TriggerAddAction(t,function Unit000036_DropItems)
endfunction
//===========================================================================
function CreateUnitsForPlayer3 takes nothing returns nothing
local player p=Player(3)
local unit u
local integer unitID
local trigger t
local real life
set u=CreateUnit(p,'ewsp',-3117.5,2889.5,350.167)
set u=CreateUnit(p,'e00M',167.3,2662.4,157.290)
endfunction
//===========================================================================
function CreateBuildingsForPlayer4 takes nothing returns nothing
local player p=Player(4)
local unit u
local integer unitID
local trigger t
local real life
set u=CreateUnit(p,'hwtw',3008.0,1536.0,270.000)
set u=CreateUnit(p,'hbar',2624.0,1536.0,270.000)
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_CHANGE_OWNER)
call TriggerAddAction(t,function Unit000035_DropItems)
endfunction
//===========================================================================
function CreateUnitsForPlayer4 takes nothing returns nothing
local player p=Player(4)
local unit u
local integer unitID
local trigger t
local real life
set u=CreateUnit(p,'ewsp',-3019.0,2842.3,329.622)
set u=CreateUnit(p,'e00M',2786.8,1379.6,157.290)
endfunction
//===========================================================================
function CreateBuildingsForPlayer5 takes nothing returns nothing
local player p=Player(5)
local unit u
local integer unitID
local trigger t
local real life
set u=CreateUnit(p,'hwtw',3008.0,768.0,270.000)
set u=CreateUnit(p,'hbar',2624.0,768.0,270.000)
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_CHANGE_OWNER)
call TriggerAddAction(t,function Unit000040_DropItems)
endfunction
//===========================================================================
function CreateUnitsForPlayer5 takes nothing returns nothing
local player p=Player(5)
local unit u
local integer unitID
local trigger t
local real life
set u=CreateUnit(p,'ewsp',-2886.1,2859.4,201.825)
set u=CreateUnit(p,'e00M',2801.9,966.5,157.290)
endfunction
//===========================================================================
function CreateBuildingsForPlayer6 takes nothing returns nothing
local player p=Player(6)
local unit u
local integer unitID
local trigger t
local real life
set u=CreateUnit(p,'hbar',2496.0,-1280.0,270.000)
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_CHANGE_OWNER)
call TriggerAddAction(t,function Unit000034_DropItems)
set u=CreateUnit(p,'hwtw',3008.0,-1280.0,270.000)
endfunction
//===========================================================================
function CreateUnitsForPlayer6 takes nothing returns nothing
local player p=Player(6)
local unit u
local integer unitID
local trigger t
local real life
set u=CreateUnit(p,'ewsp',-2766.6,2864.5,276.249)
set u=CreateUnit(p,'e00M',2767.0,-1302.4,157.290)
endfunction
//===========================================================================
function CreateBuildingsForPlayer7 takes nothing returns nothing
local player p=Player(7)
local unit u
local integer unitID
local trigger t
local real life
set u=CreateUnit(p,'hbar',2496.0,-2048.0,270.000)
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_CHANGE_OWNER)
call TriggerAddAction(t,function Unit000041_DropItems)
set u=CreateUnit(p,'hwtw',3008.0,-1984.0,270.000)
endfunction
//===========================================================================
function CreateUnitsForPlayer7 takes nothing returns nothing
local player p=Player(7)
local unit u
local integer unitID
local trigger t
local real life
set u=CreateUnit(p,'ewsp',-2638.9,2869.6,263.680)
set u=CreateUnit(p,'e00M',2792.6,-1949.1,157.290)
endfunction
//===========================================================================
function CreateBuildingsForPlayer8 takes nothing returns nothing
local player p=Player(8)
local unit u
local integer unitID
local trigger t
local real life
set u=CreateUnit(p,'hbar',256.0,-2880.0,270.000)
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_CHANGE_OWNER)
call TriggerAddAction(t,function Unit000043_DropItems)
set u=CreateUnit(p,'hwtw',256.0,-3264.0,270.000)
endfunction
//===========================================================================
function CreateUnitsForPlayer8 takes nothing returns nothing
local player p=Player(8)
local unit u
local integer unitID
local trigger t
local real life
set u=CreateUnit(p,'ewsp',-2561.1,2910.9,151.396)
set u=CreateUnit(p,'e00M',408.5,-3110.2,157.290)
endfunction
//===========================================================================
function CreateBuildingsForPlayer9 takes nothing returns nothing
local player p=Player(9)
local unit u
local integer unitID
local trigger t
local real life
set u=CreateUnit(p,'hbar',-512.0,-2880.0,270.000)
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_CHANGE_OWNER)
call TriggerAddAction(t,function Unit000037_DropItems)
set u=CreateUnit(p,'hwtw',-512.0,-3264.0,270.000)
endfunction
//===========================================================================
function CreateUnitsForPlayer9 takes nothing returns nothing
local player p=Player(9)
local unit u
local integer unitID
local trigger t
local real life
set u=CreateUnit(p,'ewsp',-2418.1,2848.8,258.209)
set u=CreateUnit(p,'e00M',-364.8,-3114.9,157.290)
endfunction
//===========================================================================
function CreateBuildingsForPlayer10 takes nothing returns nothing
local player p=Player(10)
local unit u
local integer unitID
local trigger t
local real life
set u=CreateUnit(p,'hbar',-2624.0,-2048.0,270.000)
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_CHANGE_OWNER)
call TriggerAddAction(t,function Unit000033_DropItems)
set u=CreateUnit(p,'hwtw',-3072.0,-2048.0,270.000)
endfunction
//===========================================================================
function CreateUnitsForPlayer10 takes nothing returns nothing
local player p=Player(10)
local unit u
local integer unitID
local trigger t
local real life
set u=CreateUnit(p,'ewsp',-2414.1,2954.2,309.308)
set u=CreateUnit(p,'e00M',-2903.5,-2011.2,157.290)
endfunction
//===========================================================================
function CreateBuildingsForPlayer11 takes nothing returns nothing
local player p=Player(11)
local unit u
local integer unitID
local trigger t
local real life
set u=CreateUnit(p,'hbar',-2624.0,-1216.0,270.000)
set t=CreateTrigger()
call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_CHANGE_OWNER)
call TriggerAddAction(t,function Unit000016_DropItems)
set u=CreateUnit(p,'hwtw',-3072.0,-1216.0,270.000)
endfunction
//===========================================================================
function CreateUnitsForPlayer11 takes nothing returns nothing
local player p=Player(11)
local unit u
local integer unitID
local trigger t
local real life
set u=CreateUnit(p,'ewsp',-2401.1,3028.1,20.457)
set u=CreateUnit(p,'e00M',-2880.4,-1224.6,157.290)
endfunction
//===========================================================================
function CreateNeutralPassiveBuildings2 takes nothing returns nothing
local player p=Player(PLAYER_NEUTRAL_PASSIVE)
local unit u
local integer unitID
local trigger t
local real life
set u=CreateUnit(p,'n007',-3232.0,-1568.0,270.000)
set u=CreateUnit(p,'n012',-3168.0,-800.0,270.000)
set u=CreateUnit(p,'n00R',-3168.0,-2528.0,270.000)
call SetUnitColor(u,ConvertPlayerColor(10))
set u=CreateUnit(p,'n007',-3168.0,352.0,270.000)
set u=CreateUnit(p,'n012',-3168.0,1120.0,270.000)
set u=CreateUnit(p,'n00R',-3168.0,2016.0,270.000)
call SetUnitColor(u,ConvertPlayerColor(10))
set u=CreateUnit(p,'n000',-128.0,-256.0,270.000)
set u=CreateUnit(p,'ntav',-2560.0,3072.0,270.000)
call SetUnitColor(u,ConvertPlayerColor(0))
set udg_unit02=CreateUnit(p,'n002',-2944.0,3072.0,270.000)
call SetUnitColor(udg_unit02,ConvertPlayerColor(0))
set u=CreateUnit(p,'ngme',-960.0,-320.0,270.000)
set u=CreateUnit(p,'ngme',704.0,-256.0,270.000)
set u=CreateUnit(p,'n003',-3328.0,3072.0,270.000)
call SetUnitColor(u,ConvertPlayerColor(0))
set udg_unit13=CreateUnit(p,'n007',3232.0,-1760.0,270.000)
set udg_unit01=CreateUnit(p,'n007',-96.0,2912.0,270.000)
set udg_unit03=CreateUnit(p,'n007',-96.0,-3424.0,270.000)
set udg_unit05=CreateUnit(p,'n007',3232.0,1120.0,270.000)
set udg_unit12=CreateUnit(p,'n00R',736.0,-3424.0,270.000)
call SetUnitColor(udg_unit12,ConvertPlayerColor(10))
set udg_unit11=CreateUnit(p,'n00R',3168.0,2016.0,270.000)
call SetUnitColor(udg_unit11,ConvertPlayerColor(10))
set udg_unit10=CreateUnit(p,'n00R',-992.0,2912.0,270.000)
call SetUnitColor(udg_unit10,ConvertPlayerColor(10))
set udg_unit09=CreateUnit(p,'n00R',3168.0,-800.0,270.000)
call SetUnitColor(udg_unit09,ConvertPlayerColor(10))
set u=CreateUnit(p,'nmrk',-960.0,-768.0,270.000)
call SetUnitColor(u,ConvertPlayerColor(0))
set u=CreateUnit(p,'nmrk',704.0,192.0,270.000)
call SetUnitColor(u,ConvertPlayerColor(0))
set u=CreateUnit(p,'n004',704.0,-640.0,270.000)
call SetUnitColor(u,ConvertPlayerColor(0))
set u=CreateUnit(p,'n004',-960.0,192.0,270.000)
call SetUnitColor(u,ConvertPlayerColor(0))
set udg_unit04=CreateUnit(p,'n012',-992.0,-3360.0,270.000)
set udg_unit06=CreateUnit(p,'n012',736.0,2912.0,270.000)
set udg_unit07=CreateUnit(p,'n012',3168.0,-2528.0,270.000)
set udg_unit08=CreateUnit(p,'n012',3168.0,288.0,270.000)
endfunction
//===========================================================================
//===========================================================================
//===========================================================================
//***************************************************************************
//*
//*Regions
//*
//***************************************************************************
function CreateRegions2 takes nothing returns nothing
local weathereffect we
set udg_rect01=Rect(-3456.0,-640.0,-2048.0,128.0)
set udg_rect02=Rect(-1472.0,-1824.0,1472.0,1312.0)
set udg_rect03=Rect(-288.0,-3616.0,288.0,-3040.0)
set udg_rect04=Rect(2880.0,2496.0,3392.0,3104.0)
set udg_rect05=Rect(-3392.0,2496.0,-2880.0,3104.0)
set udg_rect06=Rect(-3424.0,-3648.0,-2880.0,-3008.0)
set udg_rect07=Rect(2880.0,-3648.0,3424.0,-3008.0)
set udg_rect08=Rect(-1152.0,-224.0,-992.0,-96.0)
set udg_rect09=Rect(800.0,-384.0,896.0,-192.0)
set udg_rect10=Rect(3424.0,-320.0,3584.0,-128.0)
set udg_rect11=Rect(-3616.0,-384.0,-3488.0,-192.0)
endfunction
//***************************************************************************
//*
//*Triggers
//*
//***************************************************************************
//===========================================================================
//Trigger:Setup Random Heros
//===========================================================================
function Trig_Setup_Random_Heros_Actions takes nothing returns nothing
//Set up Random Hero Array
set udg_integers01[1]='H005'
set udg_integers01[2]='H008'
set udg_integers01[3]='H00A'
set udg_integers01[4]='H009'
set udg_integers01[5]='O003'
set udg_integers01[6]='O005'
set udg_integers01[7]='O006'
set udg_integers01[8]='O004'
set udg_integers01[9]='U002'
set udg_integers01[10]='U003'
set udg_integers01[11]='U004'
set udg_integers01[12]='U005'
set udg_integers01[13]='E002'
set udg_integers01[14]='E003'
set udg_integers01[15]='E004'
set udg_integers01[16]='E005'
set udg_integers01[17]='N00C'
set udg_integers01[18]='N00D'
set udg_integers01[19]='N00H'
set udg_integers01[20]='N00I'
set udg_integers01[21]='N00Z'
set udg_integers01[22]='N00P'
set udg_integers01[23]='H00U'
set udg_integer01=23
//Set up Custom Random Hero Array
set udg_integers02[1]='N015'
set udg_integers02[2]='E00E'
set udg_integers02[3]='O008'
set udg_integers02[4]='O00D'
set udg_integers02[5]='O000'
set udg_integers02[6]='E00C'
set udg_integers02[7]='E00A'
set udg_integers02[8]='E007'
set udg_integers02[9]='N00N'
set udg_integers02[10]='N00O'
set udg_integers02[11]='H00F'
set udg_integers02[12]='E00I'
set udg_integer02=12
endfunction
//===========================================================================
//===========================================================================
//Trigger:Setup Players
//===========================================================================
function Trig_Setup_Players_Func016Func001Func006A takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function Trig_Setup_Players_Func016Func001C takes nothing returns boolean
if(not(GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA()))!=PLAYER_SLOT_STATE_PLAYING))then
return false
endif
return true
endfunction
function Trig_Setup_Players_Actions takes nothing returns nothing
call ForceAddPlayerSimple(Player(0),udg_forces01[1])
call ForceAddPlayerSimple(Player(1),udg_forces01[1])
call ForceAddPlayerSimple(Player(2),udg_forces01[1])
call ForceAddPlayerSimple(Player(3),udg_forces01[2])
call ForceAddPlayerSimple(Player(4),udg_forces01[2])
call ForceAddPlayerSimple(Player(5),udg_forces01[2])
call ForceAddPlayerSimple(Player(6),udg_forces01[3])
call ForceAddPlayerSimple(Player(7),udg_forces01[3])
call ForceAddPlayerSimple(Player(8),udg_forces01[3])
call ForceAddPlayerSimple(Player(9),udg_forces01[4])
call ForceAddPlayerSimple(Player(10),udg_forces01[4])
call ForceAddPlayerSimple(Player(11),udg_forces01[4])
//Melee Init
call MeleeStartingVisibility()
//Remove anyone not playing.This must be done first.
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(Trig_Setup_Players_Func016Func001C())then
call ForceRemovePlayerSimple(ConvertedPlayer(GetForLoopIndexA()),GetPlayersAll())
call ForGroupBJ(GetUnitsOfPlayerAll(ConvertedPlayer(GetForLoopIndexA())),function Trig_Setup_Players_Func016Func001Func006A)
else
//Give players gold,turn bounty on,and vision the middle
call SetPlayerStateBJ(ConvertedPlayer(GetForLoopIndexA()),PLAYER_STATE_RESOURCE_GOLD,2000)
call SetPlayerFlagBJ(PLAYER_STATE_GIVES_BOUNTY,true,ConvertedPlayer(GetForLoopIndexA()))
call CreateFogModifierRectBJ(true,ConvertedPlayer(GetForLoopIndexA()),FOG_OF_WAR_VISIBLE,udg_rect02)
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call ConditionalTriggerExecute(udg_trigger40)
call ConditionalTriggerExecute(udg_trigger39)
endfunction
//===========================================================================
//===========================================================================
//Trigger:Begin Game
//===========================================================================
function Trig_Begin_Game_Func002002 takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function Trig_Begin_Game_Func005002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer(GetEnumPlayer(),GetUnitLoc(udg_unit02),0.25)
endfunction
function Trig_Begin_Game_Actions takes nothing returns nothing
//Kill laggy heroes and start music then center on hero taverns.
call ForGroupBJ(GetUnitsInRectAll(udg_rect03),function Trig_Begin_Game_Func002002)
call PlayThematicMusicBJ("Sound\\Music\\mp3Music\\Orc3.mp3")
call TriggerSleepAction(1.00)
call ForForce(GetPlayersAll(),function Trig_Begin_Game_Func005002)
endfunction
//===========================================================================
//===========================================================================
//Trigger:Hero Is Sold
//===========================================================================
function Trig_Hero_Is_Sold_Conditions takes nothing returns boolean
if(not(IsUnitType(GetSoldUnit(),UNIT_TYPE_HERO)==true))then
return false
endif
return true
endfunction
function Trig_Hero_Is_Sold_Actions takes nothing returns nothing
call UnitAddItemByIdSwapped('I000',GetSoldUnit())
call SetUnitPositionLoc(GetSoldUnit(),GetPlayerStartLocationLoc(GetOwningPlayer(GetSoldUnit())))
endfunction
//===========================================================================
//===========================================================================
//Trigger:Random Normal Hero
//===========================================================================
function Trig_Random_Normal_Hero_Conditions takes nothing returns boolean
if(not(GetUnitTypeId(GetSoldUnit())=='h004'))then
return false
endif
return true
endfunction
function Trig_Random_Normal_Hero_Actions takes nothing returns nothing
set udg_integer03=GetRandomInt(1,udg_integer01)
call CreateNUnitsAtLoc(1,udg_integers01[udg_integer03],GetOwningPlayer(GetSoldUnit()),GetPlayerStartLocationLoc(GetOwningPlayer(GetSoldUnit())),bj_UNIT_FACING)
call UnitAddItemByIdSwapped('I000',GetLastCreatedUnit())
call UnitAddItemByIdSwapped('I00A',GetLastCreatedUnit())
call UnitAddItemByIdSwapped('I00L',GetLastCreatedUnit())
call RemoveUnit(GetSoldUnit())
endfunction
//===========================================================================
//===========================================================================
//Trigger:Random Custom Hero
//===========================================================================
function Trig_Random_Custom_Hero_Conditions takes nothing returns boolean
if(not(GetUnitTypeId(GetSoldUnit())=='h00S'))then
return false
endif
return true
endfunction
function Trig_Random_Custom_Hero_Func002001 takes nothing returns boolean
return(udg_integer03==udg_integer02)
endfunction
function Trig_Random_Custom_Hero_Actions takes nothing returns nothing
set udg_integer03=GetRandomInt(1,udg_integer02)
if(Trig_Random_Custom_Hero_Func002001())then
set udg_integer03=GetRandomInt(1,udg_integer02)
else
call DoNothing()
endif
call CreateNUnitsAtLoc(1,udg_integers02[udg_integer03],GetOwningPlayer(GetSoldUnit()),GetPlayerStartLocationLoc(GetOwningPlayer(GetSoldUnit())),bj_UNIT_FACING)
call UnitAddItemByIdSwapped('I000',GetLastCreatedUnit())
call UnitAddItemByIdSwapped('I00A',GetLastCreatedUnit())
call UnitAddItemByIdSwapped('I00L',GetLastCreatedUnit())
call RemoveUnit(GetSoldUnit())
endfunction
//===========================================================================
//===========================================================================
//Trigger:Custom Hero Message
//===========================================================================
function Trig_Custom_Hero_Message_Actions takes nothing returns nothing
call DisplayTimedTextToForce(GetPlayersAll(),15.00,"TRIGSTR_902")
call PlaySoundBJ(udg_sound02)
endfunction
//===========================================================================
//===========================================================================
//Trigger:Force 1 Shops
//===========================================================================
function Trig_Force_1_Shops_Func005C takes nothing returns boolean
if(not(GetOwningPlayer(GetEnteringUnit())!=Player(0)))then
return false
endif
if(not(GetOwningPlayer(GetEnteringUnit())!=Player(1)))then
return false
endif
if(not(GetOwningPlayer(GetEnteringUnit())!=Player(2)))then
return false
endif
return true
endfunction
function Trig_Force_1_Shops_Conditions takes nothing returns boolean
if(not Trig_Force_1_Shops_Func005C())then
return false
endif
return true
endfunction
function Trig_Force_1_Shops_Actions takes nothing returns nothing
call PlaySoundOnUnitBJ(udg_sound03,100,GetEnteringUnit())
call AddSpecialEffectLocBJ(GetUnitLoc(GetEnteringUnit()),"Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl")
call SetUnitPositionLoc(GetEnteringUnit(),OffsetLocation(GetUnitLoc(GetEnteringUnit()),200.00,0))
call DestroyEffectBJ(GetLastCreatedEffectBJ())
endfunction
//===========================================================================
//===========================================================================
//Trigger:Starfall of Gods
//===========================================================================
function Trig_Starfall_of_Gods_Conditions takes nothing returns boolean
if(not(GetSpellAbilityId()=='A00S'))then
return false
endif
return true
endfunction
function Trig_Starfall_of_Gods_Actions takes nothing returns nothing
call RemoveUnit(GetSpellAbilityUnit())
endfunction
//===========================================================================
//===========================================================================
//Trigger:Force 2 Shops
//===========================================================================
function Trig_Force_2_Shops_Func005C takes nothing returns boolean
if(not(GetOwningPlayer(GetEnteringUnit())!=Player(3)))then
return false
endif
if(not(GetOwningPlayer(GetEnteringUnit())!=Player(4)))then
return false
endif
if(not(GetOwningPlayer(GetEnteringUnit())!=Player(5)))then
return false
endif
return true
endfunction
function Trig_Force_2_Shops_Conditions takes nothing returns boolean
if(not Trig_Force_2_Shops_Func005C())then
return false
endif
return true
endfunction
function Trig_Force_2_Shops_Actions takes nothing returns nothing
call PlaySoundOnUnitBJ(udg_sound03,100,GetEnteringUnit())
call AddSpecialEffectLocBJ(GetUnitLoc(GetEnteringUnit()),"Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl")
call SetUnitPositionLoc(GetEnteringUnit(),OffsetLocation(GetUnitLoc(GetEnteringUnit()),-200.00,0))
call DestroyEffectBJ(GetLastCreatedEffectBJ())
endfunction
//===========================================================================
//===========================================================================
//Trigger:Force 3 Shops
//===========================================================================
function Trig_Force_3_Shops_Func005C takes nothing returns boolean
if(not(GetOwningPlayer(GetEnteringUnit())!=Player(6)))then
return false
endif
if(not(GetOwningPlayer(GetEnteringUnit())!=Player(7)))then
return false
endif
if(not(GetOwningPlayer(GetEnteringUnit())!=Player(8)))then
return false
endif
return true
endfunction
function Trig_Force_3_Shops_Conditions takes nothing returns boolean
if(not Trig_Force_3_Shops_Func005C())then
return false
endif
return true
endfunction
function Trig_Force_3_Shops_Actions takes nothing returns nothing
call PlaySoundOnUnitBJ(udg_sound03,100,GetEnteringUnit())
call AddSpecialEffectLocBJ(GetUnitLoc(GetEnteringUnit()),"Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl")
call SetUnitPositionLoc(GetEnteringUnit(),OffsetLocation(GetUnitLoc(GetEnteringUnit()),-200.00,0))
call DestroyEffectBJ(GetLastCreatedEffectBJ())
endfunction
//===========================================================================
//===========================================================================
//Trigger:Force 4 Shops
//===========================================================================
function Trig_Force_4_Shops_Func005C takes nothing returns boolean
if(not(GetOwningPlayer(GetEnteringUnit())!=Player(9)))then
return false
endif
if(not(GetOwningPlayer(GetEnteringUnit())!=Player(10)))then
return false
endif
if(not(GetOwningPlayer(GetEnteringUnit())!=Player(11)))then
return false
endif
return true
endfunction
function Trig_Force_4_Shops_Conditions takes nothing returns boolean
if(not Trig_Force_4_Shops_Func005C())then
return false
endif
return true
endfunction
function Trig_Force_4_Shops_Actions takes nothing returns nothing
call PlaySoundOnUnitBJ(udg_sound03,100,GetEnteringUnit())
call AddSpecialEffectLocBJ(GetUnitLoc(GetEnteringUnit()),"Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl")
call SetUnitPositionLoc(GetEnteringUnit(),OffsetLocation(GetUnitLoc(GetEnteringUnit()),200.00,0))
call DestroyEffectBJ(GetLastCreatedEffectBJ())
endfunction
//===========================================================================
//===========================================================================
//Trigger:Rod of Envy
//===========================================================================
function Trig_Rod_of_Envy_Conditions takes nothing returns boolean
if(not(GetItemTypeId(GetManipulatedItem())=='I00E'))then
return false
endif
return true
endfunction
function Trig_Rod_of_Envy_Func002001002 takes nothing returns boolean
return(UnitHasBuffBJ(GetFilterUnit(),'B000')==true)
endfunction
function Trig_Rod_of_Envy_Func002A takes nothing returns nothing
call SetUnitLifeBJ(GetEnumUnit(),1.00)
endfunction
function Trig_Rod_of_Envy_Actions takes nothing returns nothing
call TriggerSleepAction(5.00)
call ForGroupBJ(GetUnitsInRectMatching(GetPlayableMapRect(),Condition(function Trig_Rod_of_Envy_Func002001002)),function Trig_Rod_of_Envy_Func002A)
endfunction
//===========================================================================
//===========================================================================
//Trigger:AM Mass TP
//===========================================================================
function Trig_AM_Mass_TP_Conditions takes nothing returns boolean
if(not(GetSpellAbilityId()=='AHmt'))then
return false
endif
if(not(RectContainsUnit(udg_rect01,GetSpellTargetUnit())==true))then
return false
endif
return true
endfunction
function Trig_AM_Mass_TP_Actions takes nothing returns nothing
call DisplayTextToForce(GetPlayersAll(),(GetPlayerName(GetOwningPlayer(GetSpellAbilityUnit()))+" tried to cheat and mass teleport to his wisp. Your Archmage is removed from the game!! How about them apples?"))
call RemoveUnit(GetSpellAbilityUnit())
call PlaySoundBJ(udg_sound02)
endfunction
//===========================================================================
//===========================================================================
//Trigger:Passive Invuln Potions
//===========================================================================
function Trig_Passive_Invuln_Potions_Conditions takes nothing returns boolean
if(not(UnitHasBuffBJ(GetSpellAbilityUnit(),'Bvul')==true))then
return false
endif
return true
endfunction
function Trig_Passive_Invuln_Potions_Func001001 takes nothing returns boolean
return(GetSpellAbilityId()=='A00S')
endfunction
function Trig_Passive_Invuln_Potions_Actions takes nothing returns nothing
if(Trig_Passive_Invuln_Potions_Func001001())then
call DoNothing()
else
call UnitRemoveBuffBJ('Bvul',GetSpellAbilityUnit())
endif
endfunction
//===========================================================================
//===========================================================================
//Trigger:Ring was purchased
//===========================================================================
function Trig_Ring_was_purchased_Conditions takes nothing returns boolean
if(not(GetItemTypeId(GetManipulatedItem())=='I00H'))then
return false
endif
return true
endfunction
function Trig_Ring_was_purchased_Actions takes nothing returns nothing
call DisplayTimedTextToForce(GetPlayersAll(),15.00,(GetPlayerName(GetItemPlayer(GetManipulatedItem()))+"Has actually purchased the Ring of J33bus.... I don't know how he hasn't won yet, but just quit now because he's going to destroy you."))
call PlaySoundBJ(udg_sound02)
endfunction
//===========================================================================
//===========================================================================
//Trigger:Edge Message
//===========================================================================
function Trig_Edge_Message_Conditions takes nothing returns boolean
if(not(GetUnitTypeId(GetSoldUnit())=='E007'))then
return false
endif
return true
endfunction
function Trig_Edge_Message_Actions takes nothing returns nothing
call DisplayTimedTextToForce(GetPlayersAll(),15.00,"TRIGSTR_823")
call PlaySoundBJ(udg_sound02)
endfunction
//===========================================================================
//===========================================================================
//Trigger:Avalanche Message
//===========================================================================
function Trig_Avalanche_Message_Conditions takes nothing returns boolean
if(not(GetUnitTypeId(GetSoldUnit())=='N00O'))then
return false
endif
return true
endfunction
function Trig_Avalanche_Message_Actions takes nothing returns nothing
call DisplayTimedTextToForce(GetPlayersAll(),15.00,"TRIGSTR_1100")
call PlaySoundBJ(udg_sound02)
endfunction
//===========================================================================
//===========================================================================
//Trigger:Timed Exp Cap Check
//===========================================================================
function Trig_Timed_Exp_Cap_Check_Actions takes nothing returns nothing
call ConditionalTriggerExecute(udg_trigger21)
set udg_integer04=1
call ConditionalTriggerExecute(udg_trigger20)
set udg_integer04=2
call ConditionalTriggerExecute(udg_trigger20)
set udg_integer04=3
call ConditionalTriggerExecute(udg_trigger20)
set udg_integer04=4
call ConditionalTriggerExecute(udg_trigger20)
endfunction
//===========================================================================
//===========================================================================
//Trigger:Recalculate One Team
//===========================================================================
function Trig_Recalculate_One_Team_Func001Func001Func001001 takes nothing returns boolean
return(udg_integers03[udg_integer04]==1)
endfunction
function Trig_Recalculate_One_Team_Func001Func001Func001002 takes nothing returns boolean
return(udg_integers04[udg_integer04]>=1)
endfunction
function Trig_Recalculate_One_Team_Func001Func001Func002001 takes nothing returns boolean
return(udg_integers03[udg_integer04]==2)
endfunction
function Trig_Recalculate_One_Team_Func001Func001Func002002 takes nothing returns boolean
return(udg_integers04[udg_integer04]>=2)
endfunction
function Trig_Recalculate_One_Team_Func001Func001Func003001 takes nothing returns boolean
return(udg_integers03[udg_integer04]==3)
endfunction
function Trig_Recalculate_One_Team_Func001Func001Func003002 takes nothing returns boolean
return(udg_integers04[udg_integer04]>=3)
endfunction
function Trig_Recalculate_One_Team_Func001Func001C takes nothing returns boolean
if(GetBooleanAnd(Trig_Recalculate_One_Team_Func001Func001Func001001(),Trig_Recalculate_One_Team_Func001Func001Func001002()))then
return true
endif
if(GetBooleanAnd(Trig_Recalculate_One_Team_Func001Func001Func002001(),Trig_Recalculate_One_Team_Func001Func001Func002002()))then
return true
endif
if(GetBooleanAnd(Trig_Recalculate_One_Team_Func001Func001Func003001(),Trig_Recalculate_One_Team_Func001Func001Func003002()))then
return true
endif
return false
endfunction
function Trig_Recalculate_One_Team_Func001Func002A takes nothing returns nothing
call SetPlayerHandicapXPBJ(GetEnumPlayer(),100.00)
endfunction
function Trig_Recalculate_One_Team_Func001C takes nothing returns boolean
if(not Trig_Recalculate_One_Team_Func001Func001C())then
return false
endif
return true
endfunction
function Trig_Recalculate_One_Team_Func002Func001001 takes nothing returns boolean
return(udg_integers03[udg_integer04]==2)
endfunction
function Trig_Recalculate_One_Team_Func002Func001002 takes nothing returns boolean
return(udg_integers04[udg_integer04]==1)
endfunction
function Trig_Recalculate_One_Team_Func002Func002A takes nothing returns nothing
call SetPlayerHandicapXPBJ(GetEnumPlayer(),70.00)
endfunction
function Trig_Recalculate_One_Team_Func002C takes nothing returns boolean
if(not GetBooleanAnd(Trig_Recalculate_One_Team_Func002Func001001(),Trig_Recalculate_One_Team_Func002Func001002()))then
return false
endif
return true
endfunction
function Trig_Recalculate_One_Team_Func003Func001001 takes nothing returns boolean
return(udg_integers03[udg_integer04]==3)
endfunction
function Trig_Recalculate_One_Team_Func003Func001002 takes nothing returns boolean
return(udg_integers04[udg_integer04]==1)
endfunction
function Trig_Recalculate_One_Team_Func003Func002A takes nothing returns nothing
call SetPlayerHandicapXPBJ(GetEnumPlayer(),47.00)
endfunction
function Trig_Recalculate_One_Team_Func003C takes nothing returns boolean
if(not GetBooleanAnd(Trig_Recalculate_One_Team_Func003Func001001(),Trig_Recalculate_One_Team_Func003Func001002()))then
return false
endif
return true
endfunction
function Trig_Recalculate_One_Team_Func004Func001001 takes nothing returns boolean
return(udg_integers03[udg_integer04]==3)
endfunction
function Trig_Recalculate_One_Team_Func004Func001002 takes nothing returns boolean
return(udg_integers04[udg_integer04]==2)
endfunction
function Trig_Recalculate_One_Team_Func004Func002A takes nothing returns nothing
call SetPlayerHandicapXPBJ(GetEnumPlayer(),80.00)
endfunction
function Trig_Recalculate_One_Team_Func004C takes nothing returns boolean
if(not GetBooleanAnd(Trig_Recalculate_One_Team_Func004Func001001(),Trig_Recalculate_One_Team_Func004Func001002()))then
return false
endif
return true
endfunction
function Trig_Recalculate_One_Team_Actions takes nothing returns nothing
if(Trig_Recalculate_One_Team_Func001C())then
call ForForce(udg_forces01[udg_integer04],function Trig_Recalculate_One_Team_Func001Func002A)
else
endif
if(Trig_Recalculate_One_Team_Func002C())then
call ForForce(udg_forces01[udg_integer04],function Trig_Recalculate_One_Team_Func002Func002A)
else
endif
if(Trig_Recalculate_One_Team_Func003C())then
call ForForce(udg_forces01[udg_integer04],function Trig_Recalculate_One_Team_Func003Func002A)
else
endif
if(Trig_Recalculate_One_Team_Func004C())then
call ForForce(udg_forces01[udg_integer04],function Trig_Recalculate_One_Team_Func004Func002A)
else
endif
endfunction
//===========================================================================
//===========================================================================
//Trigger:Recalculate Counts
//===========================================================================
function Trig_Recalculate_Counts_Func006Func001001 takes nothing returns boolean
return(IsPlayerInForce(GetEnumPlayer(),GetPlayersAll())==true)
endfunction
function Trig_Recalculate_Counts_Func006A takes nothing returns nothing
if(Trig_Recalculate_Counts_Func006Func001001())then
set udg_integers03[1]=(udg_integers03[1]+1)
else
call DoNothing()
endif
endfunction
function Trig_Recalculate_Counts_Func007Func001001 takes nothing returns boolean
return(IsPlayerInForce(GetEnumPlayer(),GetPlayersAll())==true)
endfunction
function Trig_Recalculate_Counts_Func007A takes nothing returns nothing
if(Trig_Recalculate_Counts_Func007Func001001())then
set udg_integers03[2]=(udg_integers03[2]+1)
else
call DoNothing()
endif
endfunction
function Trig_Recalculate_Counts_Func008Func001001 takes nothing returns boolean
return(IsPlayerInForce(GetEnumPlayer(),GetPlayersAll())==true)
endfunction
function Trig_Recalculate_Counts_Func008A takes nothing returns nothing
if(Trig_Recalculate_Counts_Func008Func001001())then
set udg_integers03[3]=(udg_integers03[3]+1)
else
call DoNothing()
endif
endfunction
function Trig_Recalculate_Counts_Func009Func001001 takes nothing returns boolean
return(IsPlayerInForce(GetEnumPlayer(),GetPlayersAll())==true)
endfunction
function Trig_Recalculate_Counts_Func009A takes nothing returns nothing
if(Trig_Recalculate_Counts_Func009Func001001())then
set udg_integers03[4]=(udg_integers03[4]+1)
else
call DoNothing()
endif
endfunction
function Trig_Recalculate_Counts_Func015001002 takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true)
endfunction
function Trig_Recalculate_Counts_Func015Func001001 takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetEnumUnit()),udg_forces01[1])==true)
endfunction
function Trig_Recalculate_Counts_Func015Func002001 takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetEnumUnit()),udg_forces01[2])==true)
endfunction
function Trig_Recalculate_Counts_Func015Func003001 takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetEnumUnit()),udg_forces01[3])==true)
endfunction
function Trig_Recalculate_Counts_Func015Func004001 takes nothing returns boolean
return(IsPlayerInForce(GetOwningPlayer(GetEnumUnit()),udg_forces01[4])==true)
endfunction
function Trig_Recalculate_Counts_Func015A takes nothing returns nothing
if(Trig_Recalculate_Counts_Func015Func001001())then
set udg_integers04[1]=(udg_integers04[1]+1)
else
call DoNothing()
endif
if(Trig_Recalculate_Counts_Func015Func002001())then
set udg_integers04[2]=(udg_integers04[2]+1)
else
call DoNothing()
endif
if(Trig_Recalculate_Counts_Func015Func003001())then
set udg_integers04[3]=(udg_integers04[3]+1)
else
call DoNothing()
endif
if(Trig_Recalculate_Counts_Func015Func004001())then
set udg_integers04[4]=(udg_integers04[4]+1)
else
call DoNothing()
endif
endfunction
function Trig_Recalculate_Counts_Actions takes nothing returns nothing
//Recalculate Players on each Team
set udg_integers03[1]=0
set udg_integers03[2]=0
set udg_integers03[3]=0
set udg_integers03[4]=0
call ForForce(udg_forces01[1],function Trig_Recalculate_Counts_Func006A)
call ForForce(udg_forces01[2],function Trig_Recalculate_Counts_Func007A)
call ForForce(udg_forces01[3],function Trig_Recalculate_Counts_Func008A)
call ForForce(udg_forces01[4],function Trig_Recalculate_Counts_Func009A)
//Recalculate Heroes on each Team
set udg_integers04[1]=0
set udg_integers04[2]=0
set udg_integers04[3]=0
set udg_integers04[4]=0
call ForGroupBJ(GetUnitsInRectMatching(GetPlayableMapRect(),Condition(function Trig_Recalculate_Counts_Func015001002)),function Trig_Recalculate_Counts_Func015A)
endfunction
//===========================================================================
//===========================================================================
//Trigger:Spawn Footmen
//===========================================================================
function Trig_Spawn_Footmen_Func001Func001001 takes nothing returns boolean
return(RectContainsUnit(RectFromCenterSizeBJ(GetPlayerStartLocationLoc(GetEnumPlayer()),384.00,384.00),GroupPickRandomUnit(GetUnitsOfPlayerAndTypeId(GetEnumPlayer(),'hbar')))==true)
endfunction
function Trig_Spawn_Footmen_Func001A takes nothing returns nothing
if(Trig_Spawn_Footmen_Func001Func001001())then
call CreateNUnitsAtLoc(1,'hfoo',GetEnumPlayer(),GetPlayerStartLocationLoc(GetEnumPlayer()),bj_UNIT_FACING)
else
call DoNothing()
endif
endfunction
function Trig_Spawn_Footmen_Actions takes nothing returns nothing
call ForForce(GetPlayersAll(),function Trig_Spawn_Footmen_Func001A)
endfunction
//===========================================================================
//===========================================================================
//Trigger:Spawn Riflemen
//===========================================================================
function Trig_Spawn_Riflemen_Func001Func001001 takes nothing returns boolean
return(RectContainsUnit(RectFromCenterSizeBJ(GetPlayerStartLocationLoc(GetEnumPlayer()),384.00,384.00),GroupPickRandomUnit(GetUnitsOfPlayerAndTypeId(GetEnumPlayer(),'h00W')))==true)
endfunction
function Trig_Spawn_Riflemen_Func001A takes nothing returns nothing
if(Trig_Spawn_Riflemen_Func001Func001001())then
call CreateNUnitsAtLoc(1,'hrif',GetEnumPlayer(),GetPlayerStartLocationLoc(GetEnumPlayer()),bj_UNIT_FACING)
else
call DoNothing()
endif
endfunction
function Trig_Spawn_Riflemen_Actions takes nothing returns nothing
call ForForce(GetPlayersAll(),function Trig_Spawn_Riflemen_Func001A)
endfunction
//===========================================================================
//===========================================================================
//Trigger:Spawn Militia
//===========================================================================
function Trig_Spawn_Militia_Func001Func001001 takes nothing returns boolean
return(RectContainsUnit(RectFromCenterSizeBJ(GetPlayerStartLocationLoc(GetEnumPlayer()),384.00,384.00),GroupPickRandomUnit(GetUnitsOfPlayerAndTypeId(GetEnumPlayer(),'h00G')))==true)
endfunction
function Trig_Spawn_Militia_Func001A takes nothing returns nothing
if(Trig_Spawn_Militia_Func001Func001001())then
call CreateNUnitsAtLoc(2,'hmil',GetEnumPlayer(),GetPlayerStartLocationLoc(GetEnumPlayer()),bj_UNIT_FACING)
else
call DoNothing()
endif
endfunction
function Trig_Spawn_Militia_Actions takes nothing returns nothing
call ForForce(GetPlayersAll(),function Trig_Spawn_Militia_Func001A)
endfunction
//===========================================================================
//===========================================================================
//Trigger:Spawn Spellbreakers
//===========================================================================
function Trig_Spawn_Spellbreakers_Func001Func001001 takes nothing returns boolean
return(RectContainsUnit(RectFromCenterSizeBJ(GetPlayerStartLocationLoc(GetEnumPlayer()),384.00,384.00),GroupPickRandomUnit(GetUnitsOfPlayerAndTypeId(GetEnumPlayer(),'h00V')))==true)
endfunction
function Trig_Spawn_Spellbreakers_Func001A takes nothing returns nothing
if(Trig_Spawn_Spellbreakers_Func001Func001001())then
call CreateNUnitsAtLoc(1,'hspt',GetEnumPlayer(),GetPlayerStartLocationLoc(GetEnumPlayer()),bj_UNIT_FACING)
else
call DoNothing()
endif
endfunction
function Trig_Spawn_Spellbreakers_Actions takes nothing returns nothing
call ForForce(GetPlayersAll(),function Trig_Spawn_Spellbreakers_Func001A)
endfunction
//===========================================================================
//===========================================================================
//Trigger:Spawn Knights
//===========================================================================
function Trig_Spawn_Knights_Func001Func001001 takes nothing returns boolean
return(RectContainsUnit(RectFromCenterSizeBJ(GetPlayerStartLocationLoc(GetEnumPlayer()),384.00,384.00),GroupPickRandomUnit(GetUnitsOfPlayerAndTypeId(GetEnumPlayer(),'h00O')))==true)
endfunction
function Trig_Spawn_Knights_Func001A takes nothing returns nothing
if(Trig_Spawn_Knights_Func001Func001001())then
call CreateNUnitsAtLoc(1,'hkni',GetEnumPlayer(),GetPlayerStartLocationLoc(GetEnumPlayer()),bj_UNIT_FACING)
else
call DoNothing()
endif
endfunction
function Trig_Spawn_Knights_Actions takes nothing returns nothing
call ForForce(GetPlayersAll(),function Trig_Spawn_Knights_Func001A)
endfunction
//===========================================================================
//===========================================================================
//Trigger:Spawn Ghouls
//===========================================================================
function Trig_Spawn_Ghouls_Func001Func001001 takes nothing returns boolean
return(RectContainsUnit(RectFromCenterSizeBJ(GetPlayerStartLocationLoc(GetEnumPlayer()),384.00,384.00),GroupPickRandomUnit(GetUnitsOfPlayerAndTypeId(GetEnumPlayer(),'h00Z')))==true)
endfunction
function Trig_Spawn_Ghouls_Func001A takes nothing returns nothing
if(Trig_Spawn_Ghouls_Func001Func001001())then
call CreateNUnitsAtLoc(1,'ugho',GetEnumPlayer(),GetPlayerStartLocationLoc(GetEnumPlayer()),bj_UNIT_FACING)
else
call DoNothing()
endif
endfunction
function Trig_Spawn_Ghouls_Actions takes nothing returns nothing
call ForForce(GetPlayersAll(),function Trig_Spawn_Ghouls_Func001A)
endfunction
//===========================================================================
//===========================================================================
//Trigger:Spawn Crypt Fiends
//===========================================================================
function Trig_Spawn_Crypt_Fiends_Func001Func001001 takes nothing returns boolean
return(RectContainsUnit(RectFromCenterSizeBJ(GetPlayerStartLocationLoc(GetEnumPlayer()),384.00,384.00),GroupPickRandomUnit(GetUnitsOfPlayerAndTypeId(GetEnumPlayer(),'h00B')))==true)
endfunction
function Trig_Spawn_Crypt_Fiends_Func001A takes nothing returns nothing
if(Trig_Spawn_Crypt_Fiends_Func001Func001001())then
call CreateNUnitsAtLoc(1,'ucry',GetEnumPlayer(),GetPlayerStartLocationLoc(GetEnumPlayer()),bj_UNIT_FACING)
else
call DoNothing()
endif
endfunction
function Trig_Spawn_Crypt_Fiends_Actions takes nothing returns nothing
call ForForce(GetPlayersAll(),function Trig_Spawn_Crypt_Fiends_Func001A)
endfunction
//===========================================================================
//===========================================================================
//Trigger:Spawn Skeletons
//===========================================================================
function Trig_Spawn_Skeletons_Func001Func001001 takes nothing returns boolean
return(RectContainsUnit(RectFromCenterSizeBJ(GetPlayerStartLocationLoc(GetEnumPlayer()),384.00,384.00),GroupPickRandomUnit(GetUnitsOfPlayerAndTypeId(GetEnumPlayer(),'h00I')))==true)
endfunction
function Trig_Spawn_Skeletons_Func001A takes nothing returns nothing
if(Trig_Spawn_Skeletons_Func001Func001001())then
call CreateNUnitsAtLoc(2,'uskm',GetEnumPlayer(),GetPlayerStartLocationLoc(GetEnumPlayer()),bj_UNIT_FACING)
else
call DoNothing()
endif
endfunction
function Trig_Spawn_Skeletons_Actions takes nothing returns nothing
call ForForce(GetPlayersAll(),function Trig_Spawn_Skeletons_Func001A)
endfunction
//===========================================================================
//===========================================================================
//Trigger:Spawn Abominations
//===========================================================================
function Trig_Spawn_Abominations_Func001Func001001 takes nothing returns boolean
return(RectContainsUnit(RectFromCenterSizeBJ(GetPlayerStartLocationLoc(GetEnumPlayer()),384.00,384.00),GroupPickRandomUnit(GetUnitsOfPlayerAndTypeId(GetEnumPlayer(),'h00N')))==true)
endfunction
function Trig_Spawn_Abominations_Func001A takes nothing returns nothing
if(Trig_Spawn_Abominations_Func001Func001001())then
call CreateNUnitsAtLoc(1,'uabo',GetEnumPlayer(),GetPlayerStartLocationLoc(GetEnumPlayer()),bj_UNIT_FACING)
else
call DoNothing()
endif
endfunction
function Trig_Spawn_Abominations_Actions takes nothing returns nothing
call ForForce(GetPlayersAll(),function Trig_Spawn_Abominations_Func001A)
endfunction
//===========================================================================
//===========================================================================
//Trigger:Spawn Grunts
//===========================================================================
function Trig_Spawn_Grunts_Func001Func001001 takes nothing returns boolean
return(RectContainsUnit(RectFromCenterSizeBJ(GetPlayerStartLocationLoc(GetEnumPlayer()),384.00,384.00),GroupPickRandomUnit(GetUnitsOfPlayerAndTypeId(GetEnumPlayer(),'h00H')))==true)
endfunction
function Trig_Spawn_Grunts_Func001A takes nothing returns nothing
if(Trig_Spawn_Grunts_Func001Func001001())then
call CreateNUnitsAtLoc(1,'ogru',GetEnumPlayer(),GetPlayerStartLocationLoc(GetEnumPlayer()),bj_UNIT_FACING)
else
call DoNothing()
endif
endfunction
function Trig_Spawn_Grunts_Actions takes nothing returns nothing
call ForForce(GetPlayersAll(),function Trig_Spawn_Grunts_Func001A)
endfunction
//===========================================================================
//===========================================================================
//Trigger:Spawn Headhunters
//===========================================================================
function Trig_Spawn_Headhunters_Func001Func001001 takes nothing returns boolean
return(RectContainsUnit(RectFromCenterSizeBJ(GetPlayerStartLocationLoc(GetEnumPlayer()),384.00,384.00),GroupPickRandomUnit(GetUnitsOfPlayerAndTypeId(GetEnumPlayer(),'h00C')))==true)
endfunction
function Trig_Spawn_Headhunters_Func001A takes nothing returns nothing
if(Trig_Spawn_Headhunters_Func001Func001001())then
call CreateNUnitsAtLoc(1,'otbk',GetEnumPlayer(),GetPlayerStartLocationLoc(GetEnumPlayer()),bj_UNIT_FACING)
else
call DoNothing()
endif
endfunction
function Trig_Spawn_Headhunters_Actions takes nothing returns nothing
call ForForce(GetPlayersAll(),function Trig_Spawn_Headhunters_Func001A)
endfunction
//===========================================================================
//===========================================================================
//Trigger:Spawn Raiders
//===========================================================================
function Trig_Spawn_Raiders_Func001Func001001 takes nothing returns boolean
return(RectContainsUnit(RectFromCenterSizeBJ(GetPlayerStartLocationLoc(GetEnumPlayer()),384.00,384.00),GroupPickRandomUnit(GetUnitsOfPlayerAndTypeId(GetEnumPlayer(),'h003')))==true)
endfunction
function Trig_Spawn_Raiders_Func001A takes nothing returns nothing
if(Trig_Spawn_Raiders_Func001Func001001())then
call CreateNUnitsAtLoc(1,'orai',GetEnumPlayer(),GetPlayerStartLocationLoc(GetEnumPlayer()),bj_UNIT_FACING)
else
call DoNothing()
endif
endfunction
function Trig_Spawn_Raiders_Actions takes nothing returns nothing
call ForForce(GetPlayersAll(),function Trig_Spawn_Raiders_Func001A)
endfunction
//===========================================================================
//===========================================================================
//Trigger:Spawn Taurens
//===========================================================================
function Trig_Spawn_Taurens_Func001Func001001 takes nothing returns boolean
return(RectContainsUnit(RectFromCenterSizeBJ(GetPlayerStartLocationLoc(GetEnumPlayer()),384.00,384.00),GroupPickRandomUnit(GetUnitsOfPlayerAndTypeId(GetEnumPlayer(),'h00M')))==true)
endfunction
function Trig_Spawn_Taurens_Func001A takes nothing returns nothing
if(Trig_Spawn_Taurens_Func001Func001001())then
call CreateNUnitsAtLoc(1,'otau',GetEnumPlayer(),GetPlayerStartLocationLoc(GetEnumPlayer()),bj_UNIT_FACING)
else
call DoNothing()
endif
endfunction
function Trig_Spawn_Taurens_Actions takes nothing returns nothing
call ForForce(GetPlayersAll(),function Trig_Spawn_Taurens_Func001A)
endfunction
//===========================================================================
//===========================================================================
//Trigger:Spawn Archers
//===========================================================================
function Trig_Spawn_Archers_Func001Func001001 takes nothing returns boolean
return(RectContainsUnit(RectFromCenterSizeBJ(GetPlayerStartLocationLoc(GetEnumPlayer()),384.00,384.00),GroupPickRandomUnit(GetUnitsOfPlayerAndTypeId(GetEnumPlayer(),'h002')))==true)
endfunction
function Trig_Spawn_Archers_Func001A takes nothing returns nothing
if(Trig_Spawn_Archers_Func001Func001001())then
call CreateNUnitsAtLoc(1,'earc',GetEnumPlayer(),GetPlayerStartLocationLoc(GetEnumPlayer()),bj_UNIT_FACING)
else
call DoNothing()
endif
endfunction
function Trig_Spawn_Archers_Actions takes nothing returns nothing
call ForForce(GetPlayersAll(),function Trig_Spawn_Archers_Func001A)
endfunction
//===========================================================================
//===========================================================================
//Trigger:Spawn Huntress
//===========================================================================
function Trig_Spawn_Huntress_Func001Func001001 takes nothing returns boolean
return(RectContainsUnit(RectFromCenterSizeBJ(GetPlayerStartLocationLoc(GetEnumPlayer()),384.00,384.00),GroupPickRandomUnit(GetUnitsOfPlayerAndTypeId(GetEnumPlayer(),'h00D')))==true)
endfunction
function Trig_Spawn_Huntress_Func001A takes nothing returns nothing
if(Trig_Spawn_Huntress_Func001Func001001())then
call CreateNUnitsAtLoc(1,'esen',GetEnumPlayer(),GetPlayerStartLocationLoc(GetEnumPlayer()),bj_UNIT_FACING)
else
call DoNothing()
endif
endfunction
function Trig_Spawn_Huntress_Actions takes nothing returns nothing
call ForForce(GetPlayersAll(),function Trig_Spawn_Huntress_Func001A)
endfunction
//===========================================================================
//===========================================================================
//Trigger:Spawn Dryads
//===========================================================================
function Trig_Spawn_Dryads_Func001Func001001 takes nothing returns boolean
return(RectContainsUnit(RectFromCenterSizeBJ(GetPlayerStartLocationLoc(GetEnumPlayer()),384.00,384.00),GroupPickRandomUnit(GetUnitsOfPlayerAndTypeId(GetEnumPlayer(),'h00J')))==true)
endfunction
function Trig_Spawn_Dryads_Func001A takes nothing returns nothing
if(Trig_Spawn_Dryads_Func001Func001001())then
call CreateNUnitsAtLoc(1,'edry',GetEnumPlayer(),GetPlayerStartLocationLoc(GetEnumPlayer()),bj_UNIT_FACING)
else
call DoNothing()
endif
endfunction
function Trig_Spawn_Dryads_Actions takes nothing returns nothing
call ForForce(GetPlayersAll(),function Trig_Spawn_Dryads_Func001A)
endfunction
//===========================================================================
//===========================================================================
//Trigger:Spawn Glaive Throwers
//===========================================================================
function Trig_Spawn_Glaive_Throwers_Func001Func001001 takes nothing returns boolean
return(RectContainsUnit(RectFromCenterSizeBJ(GetPlayerStartLocationLoc(GetEnumPlayer()),384.00,384.00),GroupPickRandomUnit(GetUnitsOfPlayerAndTypeId(GetEnumPlayer(),'h00L')))==true)
endfunction
function Trig_Spawn_Glaive_Throwers_Func001A takes nothing returns nothing
if(Trig_Spawn_Glaive_Throwers_Func001Func001001())then
call CreateNUnitsAtLoc(1,'e00D',GetEnumPlayer(),GetPlayerStartLocationLoc(GetEnumPlayer()),bj_UNIT_FACING)
else
call DoNothing()
endif
endfunction
function Trig_Spawn_Glaive_Throwers_Actions takes nothing returns nothing
call ForForce(GetPlayersAll(),function Trig_Spawn_Glaive_Throwers_Func001A)
endfunction
//===========================================================================
//===========================================================================
//Trigger:Remove Shops
//===========================================================================
function Trig_Remove_Shops_Func002Func001A takes nothing returns nothing
call CreateFogModifierRectBJ(true,GetEnumPlayer(),FOG_OF_WAR_VISIBLE,GetPlayableMapRect())
endfunction
function Trig_Remove_Shops_Func002C takes nothing returns boolean
if(not(udg_booleans01[1]==false))then
return false
endif
return true
endfunction
function Trig_Remove_Shops_Func003Func001A takes nothing returns nothing
call CreateFogModifierRectBJ(true,GetEnumPlayer(),FOG_OF_WAR_VISIBLE,GetPlayableMapRect())
endfunction
function Trig_Remove_Shops_Func003C takes nothing returns boolean
if(not(udg_booleans01[2]==false))then
return false
endif
return true
endfunction
function Trig_Remove_Shops_Func004Func001A takes nothing returns nothing
call CreateFogModifierRectBJ(true,GetEnumPlayer(),FOG_OF_WAR_VISIBLE,GetPlayableMapRect())
endfunction
function Trig_Remove_Shops_Func004C takes nothing returns boolean
if(not(udg_booleans01[3]==false))then
return false
endif
return true
endfunction
function Trig_Remove_Shops_Func005Func001A takes nothing returns nothing
call CreateFogModifierRectBJ(true,GetEnumPlayer(),FOG_OF_WAR_VISIBLE,GetPlayableMapRect())
endfunction
function Trig_Remove_Shops_Func005C takes nothing returns boolean
if(not(udg_booleans01[4]==false))then
return false
endif
return true
endfunction
function Trig_Remove_Shops_Actions takes nothing returns nothing
//Make sure you call See Whos Still In before you call this.
if(Trig_Remove_Shops_Func002C())then
call ForForce(udg_forces01[1],function Trig_Remove_Shops_Func002Func001A)
call RemoveUnit(udg_unit12)
call RemoveUnit(udg_unit13)
call RemoveUnit(udg_unit04)
else
call DoNothing()
endif
if(Trig_Remove_Shops_Func003C())then
call ForForce(udg_forces01[2],function Trig_Remove_Shops_Func003Func001A)
call RemoveUnit(udg_unit11)
call RemoveUnit(udg_unit01)
call RemoveUnit(udg_unit06)
else
call DoNothing()
endif
if(Trig_Remove_Shops_Func004C())then
call ForForce(udg_forces01[3],function Trig_Remove_Shops_Func004Func001A)
call RemoveUnit(udg_unit10)
call RemoveUnit(udg_unit03)
call RemoveUnit(udg_unit07)
else
call DoNothing()
endif
if(Trig_Remove_Shops_Func005C())then
call ForForce(udg_forces01[4],function Trig_Remove_Shops_Func005Func001A)
call RemoveUnit(udg_unit09)
call RemoveUnit(udg_unit05)
call RemoveUnit(udg_unit08)
else
call DoNothing()
endif
endfunction
//===========================================================================
//===========================================================================
//Trigger:See Whos Still In
//===========================================================================
function Trig_See_Whos_Still_In_Func002C takes nothing returns boolean
if(not(IsPlayerInForce(Player(0),GetPlayersAll())==false))then
return false
endif
if(not(IsPlayerInForce(Player(1),GetPlayersAll())==false))then
return false
endif
if(not(IsPlayerInForce(Player(2),GetPlayersAll())==false))then
return false
endif
return true
endfunction
function Trig_See_Whos_Still_In_Func003C takes nothing returns boolean
if(not(IsPlayerInForce(Player(3),GetPlayersAll())==false))then
return false
endif
if(not(IsPlayerInForce(Player(4),GetPlayersAll())==false))then
return false
endif
if(not(IsPlayerInForce(Player(5),GetPlayersAll())==false))then
return false
endif
return true
endfunction
function Trig_See_Whos_Still_In_Func004C takes nothing returns boolean
if(not(IsPlayerInForce(Player(6),GetPlayersAll())==false))then
return false
endif
if(not(IsPlayerInForce(Player(7),GetPlayersAll())==false))then
return false
endif
if(not(IsPlayerInForce(Player(8),GetPlayersAll())==false))then
return false
endif
return true
endfunction
function Trig_See_Whos_Still_In_Func005C takes nothing returns boolean
if(not(IsPlayerInForce(Player(9),GetPlayersAll())==false))then
return false
endif
if(not(IsPlayerInForce(Player(10),GetPlayersAll())==false))then
return false
endif
if(not(IsPlayerInForce(Player(11),GetPlayersAll())==false))then
return false
endif
return true
endfunction
function Trig_See_Whos_Still_In_Actions takes nothing returns nothing
//Check which teams are still in game
if(Trig_See_Whos_Still_In_Func002C())then
set udg_booleans01[1]=false
else
set udg_booleans01[1]=true
endif
if(Trig_See_Whos_Still_In_Func003C())then
set udg_booleans01[2]=false
else
set udg_booleans01[2]=true
endif
if(Trig_See_Whos_Still_In_Func004C())then
set udg_booleans01[3]=false
else
set udg_booleans01[3]=true
endif
if(Trig_See_Whos_Still_In_Func005C())then
set udg_booleans01[4]=false
else
set udg_booleans01[4]=true
endif
endfunction
//===========================================================================
//===========================================================================
//Trigger:Players Leave
//===========================================================================
function Trig_Players_Leave_Func014002 takes nothing returns nothing
call KillUnit(GetEnumUnit())
endfunction
function Trig_Players_Leave_Actions takes nothing returns nothing
call DisplayTextToForce(GetPlayersAll(),(GetPlayerName(GetTriggerPlayer())+" has left the game."))
call ForGroupBJ(GetUnitsOfPlayerAll(GetTriggerPlayer()),function Trig_Players_Leave_Func014002)
endfunction
//===========================================================================
//===========================================================================
//Trigger:Base Destroyed
//===========================================================================
function Trig_Base_Destroyed_Func016C takes nothing returns boolean
if((GetUnitTypeId(GetDyingUnit())=='hbar'))then
return true
endif
if((GetUnitTypeId(GetDyingUnit())=='h00W'))then
return true
endif
if((GetUnitTypeId(GetDyingUnit())=='h00G'))then
return true
endif
if((GetUnitTypeId(GetDyingUnit())=='h00V'))then
return true
endif
if((GetUnitTypeId(GetDyingUnit())=='h00O'))then
return true
endif
if((GetUnitTypeId(GetDyingUnit())=='h002'))then
return true
endif
if((GetUnitTypeId(GetDyingUnit())=='h00D'))then
return true
endif
if((GetUnitTypeId(GetDyingUnit())=='h00J'))then
return true
endif
if((GetUnitTypeId(GetDyingUnit())=='h00L'))then
return true
endif
if((GetUnitTypeId(GetDyingUnit())=='h00H'))then
return true
endif
if((GetUnitTypeId(GetDyingUnit())=='h00C'))then
return true
endif
if((GetUnitTypeId(GetDyingUnit())=='h003'))then
return true
endif
if((GetUnitTypeId(GetDyingUnit())=='h00M'))then
return true
endif
if((GetUnitTypeId(GetDyingUnit())=='h00Z'))then
return true
endif
if((GetUnitTypeId(GetDyingUnit())=='h00B'))then
return true
endif
if((GetUnitTypeId(GetDyingUnit())=='h00I'))then
return true
endif
if((GetUnitTypeId(GetDyingUnit())=='h00N'))then
return true
endif
return false
endfunction
function Trig_Base_Destroyed_Conditions takes nothing returns boolean
if(not Trig_Base_Destroyed_Func016C())then
return false
endif
return true
endfunction
function Trig_Base_Destroyed_Func005002 takes nothing returns nothing
call KillUnit(GetEnumUnit())
endfunction
function Trig_Base_Destroyed_Func006002 takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function Trig_Base_Destroyed_Func012Func001Func001C takes nothing returns boolean
if(not(IsPlayerInForce(ConvertedPlayer(GetForLoopIndexA()),udg_forces01[1])==true))then
return false
endif
return true
endfunction
function Trig_Base_Destroyed_Func012C takes nothing returns boolean
if(not(udg_booleans01[2]==false))then
return false
endif
if(not(udg_booleans01[3]==false))then
return false
endif
if(not(udg_booleans01[4]==false))then
return false
endif
return true
endfunction
function Trig_Base_Destroyed_Func013Func004Func001C takes nothing returns boolean
if(not(IsPlayerInForce(ConvertedPlayer(GetForLoopIndexA()),udg_forces01[2])==true))then
return false
endif
return true
endfunction
function Trig_Base_Destroyed_Func013C takes nothing returns boolean
if(not(udg_booleans01[1]==false))then
return false
endif
if(not(udg_booleans01[3]==false))then
return false
endif
if(not(udg_booleans01[4]==false))then
return false
endif
return true
endfunction
function Trig_Base_Destroyed_Func014Func004Func001C takes nothing returns boolean
if(not(IsPlayerInForce(ConvertedPlayer(GetForLoopIndexA()),udg_forces01[3])==true))then
return false
endif
return true
endfunction
function Trig_Base_Destroyed_Func014C takes nothing returns boolean
if(not(udg_booleans01[1]==false))then
return false
endif
if(not(udg_booleans01[2]==false))then
return false
endif
if(not(udg_booleans01[4]==false))then
return false
endif
return true
endfunction
function Trig_Base_Destroyed_Func015Func004Func001C takes nothing returns boolean
if(not(IsPlayerInForce(ConvertedPlayer(GetForLoopIndexA()),udg_forces01[4])==true))then
return false
endif
return true
endfunction
function Trig_Base_Destroyed_Func015C takes nothing returns boolean
if(not(udg_booleans01[1]==false))then
return false
endif
if(not(udg_booleans01[2]==false))then
return false
endif
if(not(udg_booleans01[3]==false))then
return false
endif
return true
endfunction
function Trig_Base_Destroyed_Actions takes nothing returns nothing
local player udg_player01
set udg_player01=GetOwningPlayer(GetDyingUnit())
call DisplayTextToForce(GetPlayersAll(),(GetPlayerName(udg_player01)+" |cffff0000has been defeated!!|r"))
call ForceRemovePlayerSimple(udg_player01,GetPlayersAll())
call ForGroupBJ(GetUnitsOfPlayerAll(udg_player01),function Trig_Base_Destroyed_Func005002)
call ForGroupBJ(GetUnitsOfPlayerAndTypeId(udg_player01,'ewsp'),function Trig_Base_Destroyed_Func006002)
call ConditionalTriggerExecute(udg_trigger40)
call ConditionalTriggerExecute(udg_trigger39)
//If only one force is still in,show the victory/defeat screens.
//Wait a few seconds to let people talk.
call TriggerSleepAction(5.00)
if(Trig_Base_Destroyed_Func012C())then
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(Trig_Base_Destroyed_Func012Func001Func001C())then
call CustomVictoryBJ(ConvertedPlayer(GetForLoopIndexA()),true,true)
else
call CustomDefeatBJ(ConvertedPlayer(GetForLoopIndexA()),"TRIGSTR_5425")
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
else
call DoNothing()
endif
if(Trig_Base_Destroyed_Func013C())then
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(Trig_Base_Destroyed_Func013Func004Func001C())then
call CustomVictoryBJ(ConvertedPlayer(GetForLoopIndexA()),true,true)
else
call CustomDefeatBJ(ConvertedPlayer(GetForLoopIndexA()),"TRIGSTR_5426")
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
else
call DoNothing()
endif
if(Trig_Base_Destroyed_Func014C())then
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(Trig_Base_Destroyed_Func014Func004Func001C())then
call CustomVictoryBJ(ConvertedPlayer(GetForLoopIndexA()),true,true)
else
call CustomDefeatBJ(ConvertedPlayer(GetForLoopIndexA()),"TRIGSTR_5427")
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
else
call DoNothing()
endif
if(Trig_Base_Destroyed_Func015C())then
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(Trig_Base_Destroyed_Func015Func004Func001C())then
call CustomVictoryBJ(ConvertedPlayer(GetForLoopIndexA()),true,true)
else
call CustomDefeatBJ(ConvertedPlayer(GetForLoopIndexA()),"TRIGSTR_5428")
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
else
call DoNothing()
endif
endfunction
//===========================================================================
//===========================================================================
//Trigger:Debugger
//===========================================================================
function Trig_Debugger_Actions takes nothing returns nothing
call AdjustPlayerStateBJ(500,Player(0),PLAYER_STATE_RESOURCE_GOLD)
endfunction
//===========================================================================
//===========================================================================
//Trigger:SpikeImpact Copy
//===========================================================================
//Trigger:SpikeImpact Copy
//===========================================================================
//Trigger:SpikeImpact Copy
//===========================================================================
//Trigger:SpikeImpact Copy
//===========================================================================
//Trigger:SpikeImpact Copy
//===========================================================================
//Trigger:SpikeImpact Copy
//===========================================================================
//Trigger:SpikeImpact Copy
//===========================================================================
//Trigger:SpikeImpact Copy
//===========================================================================
//Trigger:SpikeImpact Copy
//===========================================================================
//Trigger:SpikeImpact Copy
//===========================================================================
/////////////////////////////
//***Hello Everybody***
//credit me if you use this
//Greetz,xxdingo93xx
/////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
//***CREDITS***//
//
//To:Interflo
//For:
//-teaching me the basics of JASS
//-helping me a lot with this spell
//-helping me to get out of a wc3-crash
//
//To:Flame_Phoenix
//For:
//-Helping me out with leaky and evil functions
//-overwriting my spell into JESP
//
//////////////////////////////////////////////////////////////////////////////////////////////
//========================================================================================
//===================================SETUP START==========================================
//========================================================================================
constant function SpikeImpact_abilityID takes nothing returns integer
return'A02B'//the rawcode of the ability
endfunction
constant function SpikeImpact_spikeIdOne takes nothing returns integer
return'n00V'//the rawcode of the unit spike 1
endfunction
constant function SpikeImpact_spikeIdTwo takes nothing returns integer
return'n00M'//the rawcode of the unit spike 2
endfunction
constant function SpikeImpact_spikeIdThree takes nothing returns integer
return'n010'//the rawcode of the unit spike 3
endfunction
constant function SpikeImpact_spikeIdFour takes nothing returns integer
return'n019'//the rawcode of the unit spike 4
endfunction
constant function SpikeImpact_startAnimation takes nothing returns string
return"Morph"//the animation the caster will play when he casts the spell
endfunction
constant function SpikeImpact_endAnimation takes nothing returns string
return"Morph Defend"//the animation the caster will play when the spell ends
endfunction
constant function SpikeImpact_radius takes nothing returns real
return 1000.//the AOE of the spell
endfunction
constant function SpikeImpact_damage takes integer level returns real
return level*300.//the amount of damage the enemy will take per level
endfunction
constant function SpikeImpact_red takes nothing returns real
return 100.//The red RGB color of the affected units from 0 to 100
endfunction
constant function SpikeImpact_green takes nothing returns real
return 15.//The green RGB color of the affected units from 0 to 100
endfunction
constant function SpikeImpact_blue takes nothing returns real
return 15.//The blue RGB color of the affected units from 0 to 100
endfunction
constant function SpikeImpact_enemyEffect takes nothing returns string
//the that will be created at the enemy when it is affected,in this case is blood.
return"Objects\\Spawnmodels\\Orc\\Orcblood\\BattrollBlood.mdl"
endfunction
constant function SpikeImpact_enemyEffectRegion takes nothing returns string
//the place on the enemy's body where the enemyEffect will be created
return"chest"
endfunction
constant function SpikeImpact_enemyDamage takes nothing returns string
//the that will be created at the enemy when damaged by the spell
return"Objects\\Spawnmodels\\Human\\HumanLargeDeathExplode\\HumanLargeDeathExplode.mdl"
endfunction
constant function SpikeImpact_enemyDamageRegion takes nothing returns string
//the place on the enemy's body where the enemyDamage will be created
return"chest"
endfunction
//========================================================================================
//====================================SETUP END===========================================
//========================================================================================
//=======================================================================================
function SpikeImpact_Condition takes nothing returns boolean
return GetSpellAbilityId()==SpikeImpact_abilityID()
endfunction
//=======================================================================================
function SpikeImpact_RecolorEnemies takes nothing returns nothing
local unit Enemy=GetEnumUnit()
if(IsUnitEnemy(Enemy,GetOwningPlayer(GetSpellAbilityUnit())))then
call SetUnitTimeScale(Enemy,0.00)
call SetUnitVertexColor(Enemy,PercentToInt(SpikeImpact_red(),255),PercentToInt(SpikeImpact_green(),255),PercentToInt(SpikeImpact_blue(),255),PercentToInt(100,255))
call DestroyEffect(AddSpecialEffectTarget(SpikeImpact_enemyEffect(),Enemy,SpikeImpact_enemyEffectRegion()))
endif
set Enemy=null
endfunction
//========================================================================================
function SpikeImpact_KillEnemies takes nothing returns nothing
local unit Enemy=GetEnumUnit()
local unit Caster=GetSpellAbilityUnit()
local real DamageToDeal=SpikeImpact_damage(GetUnitAbilityLevel(Caster,SpikeImpact_abilityID()))
if(IsUnitEnemy(Enemy,GetOwningPlayer(Caster)))then
call SetUnitTimeScale(Enemy,100.*0.01)
if(GetWidgetLife(Enemy)<=DamageToDeal)then
call SetUnitExploded(Enemy,true)
call KillUnit(Enemy)
else
call UnitDamageTarget(Caster,Enemy,DamageToDeal,true,true,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_UNKNOWN,WEAPON_TYPE_WHOKNOWS)
call SetUnitVertexColor(Enemy,255,255,255,255)
call DestroyEffect(AddSpecialEffectTarget(SpikeImpact_enemyDamage(),Enemy,SpikeImpact_enemyDamageRegion()))
endif
endif
set Enemy=null
set Caster=null
endfunction
//========================================================================================
function SpikeImpact_Actions takes nothing returns nothing
//Creates the local variables and gives them a value
local unit Caster=GetSpellAbilityUnit()
local group EnemiesInRange=CreateGroup()
local player CastingPlayer=GetOwningPlayer(Caster)
local real CasterX=GetUnitX(Caster)
local real CasterY=GetUnitY(Caster)
local real Degrees=0.00
local real x=GetUnitX(Caster)+10.0*Cos(Degrees*bj_DEGTORAD)
local real y=GetUnitY(Caster)+10.0*Sin(Degrees*bj_DEGTORAD)
local unit array Spikes
local integer i=0
local integer Counter=0
call PauseUnit(Caster,true)
call SetUnitAnimation(Caster,SpikeImpact_startAnimation())
//this will create the spikes
loop
exitwhen(i==8)
set Degrees=(45.00*I2R(i))
set x=GetUnitX(Caster)+10.0*Cos(Degrees*bj_DEGTORAD)
set y=GetUnitY(Caster)+10.0*Sin(Degrees*bj_DEGTORAD)
set Spikes[Counter]=CreateUnit(CastingPlayer,SpikeImpact_spikeIdOne(),x,y,Degrees)
set Spikes[Counter+1]=CreateUnit(CastingPlayer,SpikeImpact_spikeIdTwo(),x,y,Degrees)
set Spikes[Counter+2]=CreateUnit(CastingPlayer,SpikeImpact_spikeIdThree(),x,y,Degrees)
set Spikes[Counter+3]=CreateUnit(CastingPlayer,SpikeImpact_spikeIdFour(),x,y,Degrees)
set Counter=Counter+4
set i=i+1
endloop
call TriggerSleepAction(0.20)
//--Pause spikes to show them a few seconds--
set i=0
loop
exitwhen(i==36)
call PauseUnit(Spikes[i],true)
call SetUnitTimeScale(Spikes[i],0.00*0.01)
set i=i+1
endloop
call GroupEnumUnitsInRange(EnemiesInRange,CasterX,CasterY,SpikeImpact_radius(),null)//this adds all units to EnemiesInRange
//--Recolor enemies and pause them--
call ForGroup(EnemiesInRange,function SpikeImpact_RecolorEnemies)
call TriggerSleepAction(1.50)
call PauseUnit(Caster,false)
call SetUnitAnimation(Caster,SpikeImpact_endAnimation())
//--Remove Spikes--
set i=0
loop
exitwhen(i==36)
call PauseUnit(Spikes[i],false)
call UnitApplyTimedLife(Spikes[i],'BTLF',1.00)
call SetUnitTimeScale(Spikes[i],100.00*0.01)
set Spikes[i]=null
set i=i+1
endloop
//--Damage/Kill enemies--
call ForGroup(EnemiesInRange,function SpikeImpact_KillEnemies)
call TriggerSleepAction(1.20)
call SetUnitAnimation(Caster,"stand")
call DestroyGroup(EnemiesInRange)
set Caster=null
set CastingPlayer=null
set EnemiesInRange=null
endfunction
//===========================Creating the trigger=====================================
function InitTrig_SpikeImpact_Copy takes nothing returns nothing
local trigger SpikeImpactTrigger=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(SpikeImpactTrigger,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddAction(SpikeImpactTrigger,function SpikeImpact_Actions)
call TriggerAddCondition(SpikeImpactTrigger,Condition(function SpikeImpact_Condition))
endfunction
//===========================================================================
//Trigger:Omnislash
//===========================================================================
function Trig_Omnislash_Conditions takes nothing returns boolean
return GetSpellAbilityId()=='A02C'
endfunction
function Unit_Group takes nothing returns boolean
return GetBooleanAnd(IsUnitAliveBJ(GetFilterUnit())==true,IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))==true)
endfunction
function Trig_Omnislash_Actions takes nothing returns nothing
local unit Caster=GetTriggerUnit()
local integer i=0
local group UnitGroup
local unit TargetRandom
local unit Target=GetSpellTargetUnit()
local effect Phoenix
local location R
local real Damage=100
local integer Amount=1+(GetUnitAbilityLevelSwapped('A02C',Caster)*2)
call TriggerSleepAction(0.20)
call SelectUnitRemove(Caster)
call SetUnitVertexColor(Caster,150,150,150,150)
call SetUnitInvulnerable(Caster,true)
set Phoenix=AddSpecialEffectTarget("Abilities\\Weapons\\PhoenixMissile\\Phoenix_Missile.mdl",Caster,"weapon")
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl",Caster,"chest"))
call SetUnitPositionLocFacingBJ(Caster,PolarProjectionBJ(GetUnitLoc(Target),50.00,GetRandomDirectionDeg()),AngleBetweenPoints(GetUnitLoc(Caster),GetUnitLoc(Target)))
call UnitDamageTarget(Caster,Target,Damage,false,true,ATTACK_TYPE_HERO,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_AXE_MEDIUM_CHOP)
call SetUnitAnimation(Caster,"attack")
call TriggerSleepAction(0.25)
call SelectUnitRemove(Caster)
loop
set i=i+1
exitwhen i>Amount
set UnitGroup=GetUnitsInRangeOfLocMatching(600.00,GetUnitLoc(Caster),Condition(function Unit_Group))
if(IsUnitGroupEmptyBJ(UnitGroup)==false)then
set TargetRandom=GroupPickRandomUnit(UnitGroup)
set R=GetUnitLoc(TargetRandom)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl",Caster,"chest"))
call SetUnitPositionLocFacingBJ(Caster,PolarProjectionBJ(R,50.00,GetRandomDirectionDeg()),AngleBetweenPoints(GetUnitLoc(Caster),GetUnitLoc(TargetRandom)))
call UnitDamageTarget(Caster,TargetRandom,Damage,false,true,ATTACK_TYPE_HERO,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_AXE_MEDIUM_CHOP)
call SetUnitAnimation(Caster,"attack")
call RemoveLocation(R)
call TriggerSleepAction(0.25)
call SelectUnitRemove(Caster)
else
endif
call DestroyGroup(UnitGroup)
endloop
call SelectUnitForPlayerSingle(Caster,GetTriggerPlayer())
call SetUnitInvulnerable(Caster,false)
call SetUnitVertexColor(Caster,255,255,255,255)
call DestroyEffect(Phoenix)
set Phoenix=null
set Caster=null
set UnitGroup=null
set TargetRandom=null
set Target=null
set Amount=0
set R=null
set Damage=0
endfunction
//===========================================================================
//===========================================================================
//===========================================================================
//***************************************************************************
//*
//*Upgrades
//*
//***************************************************************************
//***************************************************************************
//*
//*Players
//*
//***************************************************************************
//***************************************************************************
//*
//*Main Initialization
//*
//***************************************************************************
//===========================================================================
function main2 takes nothing returns nothing
call SetCameraBounds(-3584.0+GetCameraMargin(CAMERA_MARGIN_LEFT),-3840.0+GetCameraMargin(CAMERA_MARGIN_BOTTOM),3584.0-GetCameraMargin(CAMERA_MARGIN_RIGHT),3328.0-GetCameraMargin(CAMERA_MARGIN_TOP),-3584.0+GetCameraMargin(CAMERA_MARGIN_LEFT),3328.0-GetCameraMargin(CAMERA_MARGIN_TOP),3584.0-GetCameraMargin(CAMERA_MARGIN_RIGHT),-3840.0+GetCameraMargin(CAMERA_MARGIN_BOTTOM))
call SetDayNightModels("Environment\\DNC\\DNCLordaeron\\DNCLordaeronTerrain\\DNCLordaeronTerrain.mdl","Environment\\DNC\\DNCLordaeron\\DNCLordaeronUnit\\DNCLordaeronUnit.mdl")
call NewSoundEnvironment("Default")
call SetAmbientDaySound("CityScapeDay")
call SetAmbientNightSound("CityScapeNight")
call SetMapMusic("Music",true,0)
set udg_sound01=CreateSound("Buildings\\Orc\\AltarOfStorms\\AltarOfStormsWhat1.wav",false,true,true,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(udg_sound01,"AltarOfStormsWhat")
call SetSoundDuration(udg_sound01,3024)
call SetSoundVolume(udg_sound01,127)
call SetSoundDistances(udg_sound01,100000.0,100000.0)
set udg_sound02=CreateSound("Sound\\Interface\\ArrangedTeamInvitation.wav",false,false,false,10,10,"")
call SetSoundParamsFromLabel(udg_sound02,"ArrangedTeamInvitation")
call SetSoundDuration(udg_sound02,2914)
set udg_sound03=CreateSound("Abilities\\Spells\\NightElf\\Blink\\BlinkArrival1.wav",false,true,true,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(udg_sound03,"BlinkTarget")
call SetSoundDuration(udg_sound03,1466)
call CreateRegions2()
call SetPlayerTechResearched(Player(0),'Rhse',1)
call SetPlayerTechResearched(Player(0),'Rows',1)
call SetPlayerTechResearched(Player(0),'Recb',1)
call SetPlayerTechResearched(Player(0),'Rune',2)
call SetPlayerTechResearched(Player(0),'Rehs',1)
call SetPlayerTechResearched(Player(0),'Rers',1)
call SetPlayerTechResearched(Player(0),'Robf',1)
call SetPlayerTechResearched(Player(0),'Rowt',2)
call SetPlayerTechResearched(Player(1),'Rhse',1)
call SetPlayerTechResearched(Player(1),'Rows',1)
call SetPlayerTechResearched(Player(1),'Recb',1)
call SetPlayerTechResearched(Player(1),'Rune',2)
call SetPlayerTechResearched(Player(1),'Rehs',1)
call SetPlayerTechResearched(Player(1),'Rers',1)
call SetPlayerTechResearched(Player(1),'Robf',1)
call SetPlayerTechResearched(Player(1),'Rowt',2)
call SetPlayerTechResearched(Player(2),'Rhse',1)
call SetPlayerTechResearched(Player(2),'Rows',1)
call SetPlayerTechResearched(Player(2),'Recb',1)
call SetPlayerTechResearched(Player(2),'Rune',2)
call SetPlayerTechResearched(Player(2),'Rehs',1)
call SetPlayerTechResearched(Player(2),'Rers',1)
call SetPlayerTechResearched(Player(2),'Robf',1)
call SetPlayerTechResearched(Player(2),'Rowt',2)
call SetPlayerTechResearched(Player(3),'Rhse',1)
call SetPlayerTechResearched(Player(3),'Rows',1)
call SetPlayerTechResearched(Player(3),'Recb',1)
call SetPlayerTechResearched(Player(3),'Rune',2)
call SetPlayerTechResearched(Player(3),'Rehs',1)
call SetPlayerTechResearched(Player(3),'Rers',1)
call SetPlayerTechResearched(Player(3),'Robf',1)
call SetPlayerTechResearched(Player(3),'Rowt',2)
call SetPlayerTechResearched(Player(4),'Rhse',1)
call SetPlayerTechResearched(Player(4),'Rows',1)
call SetPlayerTechResearched(Player(4),'Recb',1)
call SetPlayerTechResearched(Player(4),'Rune',2)
call SetPlayerTechResearched(Player(4),'Rehs',1)
call SetPlayerTechResearched(Player(4),'Rers',1)
call SetPlayerTechResearched(Player(4),'Robf',1)
call SetPlayerTechResearched(Player(4),'Rowt',2)
call SetPlayerTechResearched(Player(5),'Rhse',1)
call SetPlayerTechResearched(Player(5),'Rows',1)
call SetPlayerTechResearched(Player(5),'Recb',1)
call SetPlayerTechResearched(Player(5),'Rune',2)
call SetPlayerTechResearched(Player(5),'Rehs',1)
call SetPlayerTechResearched(Player(5),'Rers',1)
call SetPlayerTechResearched(Player(5),'Robf',1)
call SetPlayerTechResearched(Player(5),'Rowt',2)
call SetPlayerTechResearched(Player(6),'Rhse',1)
call SetPlayerTechResearched(Player(6),'Rows',1)
call SetPlayerTechResearched(Player(6),'Recb',1)
call SetPlayerTechResearched(Player(6),'Rune',2)
call SetPlayerTechResearched(Player(6),'Rehs',1)
call SetPlayerTechResearched(Player(6),'Rers',1)
call SetPlayerTechResearched(Player(6),'Robf',1)
call SetPlayerTechResearched(Player(6),'Rowt',2)
call SetPlayerTechResearched(Player(7),'Rhse',1)
call SetPlayerTechResearched(Player(7),'Rows',1)
call SetPlayerTechResearched(Player(7),'Recb',1)
call SetPlayerTechResearched(Player(7),'Rune',2)
call SetPlayerTechResearched(Player(7),'Rehs',1)
call SetPlayerTechResearched(Player(7),'Rers',1)
call SetPlayerTechResearched(Player(7),'Robf',1)
call SetPlayerTechResearched(Player(7),'Rowt',2)
call SetPlayerTechResearched(Player(8),'Rhse',1)
call SetPlayerTechResearched(Player(8),'Rows',1)
call SetPlayerTechResearched(Player(8),'Recb',1)
call SetPlayerTechResearched(Player(8),'Rune',2)
call SetPlayerTechResearched(Player(8),'Rehs',1)
call SetPlayerTechResearched(Player(8),'Rers',1)
call SetPlayerTechResearched(Player(8),'Robf',1)
call SetPlayerTechResearched(Player(8),'Rowt',2)
call SetPlayerTechResearched(Player(9),'Rhse',1)
call SetPlayerTechResearched(Player(9),'Rows',1)
call SetPlayerTechResearched(Player(9),'Recb',1)
call SetPlayerTechResearched(Player(9),'Rune',2)
call SetPlayerTechResearched(Player(9),'Rehs',1)
call SetPlayerTechResearched(Player(9),'Rers',1)
call SetPlayerTechResearched(Player(9),'Robf',1)
call SetPlayerTechResearched(Player(9),'Rowt',2)
call SetPlayerTechResearched(Player(10),'Rhse',1)
call SetPlayerTechResearched(Player(10),'Rows',1)
call SetPlayerTechResearched(Player(10),'Recb',1)
call SetPlayerTechResearched(Player(10),'Rune',2)
call SetPlayerTechResearched(Player(10),'Rehs',1)
call SetPlayerTechResearched(Player(10),'Rers',1)
call SetPlayerTechResearched(Player(10),'Robf',1)
call SetPlayerTechResearched(Player(10),'Rowt',2)
call SetPlayerTechResearched(Player(11),'Rhse',1)
call SetPlayerTechResearched(Player(11),'Rows',1)
call SetPlayerTechResearched(Player(11),'Recb',1)
call SetPlayerTechResearched(Player(11),'Rune',2)
call SetPlayerTechResearched(Player(11),'Rehs',1)
call SetPlayerTechResearched(Player(11),'Rers',1)
call SetPlayerTechResearched(Player(11),'Robf',1)
call SetPlayerTechResearched(Player(11),'Rowt',2)
call CreateAllItems()
call CreateNeutralPassiveBuildings2()
call CreateBuildingsForPlayer0()
call CreateBuildingsForPlayer1()
call CreateBuildingsForPlayer2()
call CreateBuildingsForPlayer3()
call CreateBuildingsForPlayer4()
call CreateBuildingsForPlayer5()
call CreateBuildingsForPlayer6()
call CreateBuildingsForPlayer7()
call CreateBuildingsForPlayer8()
call CreateBuildingsForPlayer9()
call CreateBuildingsForPlayer10()
call CreateBuildingsForPlayer11()
call CreateUnitsForPlayer0()
call CreateUnitsForPlayer1()
call CreateUnitsForPlayer2()
call CreateUnitsForPlayer3()
call CreateUnitsForPlayer4()
call CreateUnitsForPlayer5()
call CreateUnitsForPlayer6()
call CreateUnitsForPlayer7()
call CreateUnitsForPlayer8()
call CreateUnitsForPlayer9()
call CreateUnitsForPlayer10()
call CreateUnitsForPlayer11()
call InitGlobals2()
set udg_trigger01=CreateTrigger()
call TriggerAddAction(udg_trigger01,function Trig_Setup_Random_Heros_Actions)
set udg_trigger02=CreateTrigger()
call TriggerAddAction(udg_trigger02,function Trig_Setup_Players_Actions)
set udg_trigger03=CreateTrigger()
call TriggerRegisterTimerEventSingle(udg_trigger03,0.00)
call TriggerAddAction(udg_trigger03,function Trig_Begin_Game_Actions)
set udg_trigger04=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger04,EVENT_PLAYER_UNIT_SELL)
call TriggerAddCondition(udg_trigger04,Condition(function Trig_Hero_Is_Sold_Conditions))
call TriggerAddAction(udg_trigger04,function Trig_Hero_Is_Sold_Actions)
set udg_trigger05=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger05,EVENT_PLAYER_UNIT_SELL)
call TriggerAddCondition(udg_trigger05,Condition(function Trig_Random_Normal_Hero_Conditions))
call TriggerAddAction(udg_trigger05,function Trig_Random_Normal_Hero_Actions)
set udg_trigger06=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger06,EVENT_PLAYER_UNIT_SELL)
call TriggerAddCondition(udg_trigger06,Condition(function Trig_Random_Custom_Hero_Conditions))
call TriggerAddAction(udg_trigger06,function Trig_Random_Custom_Hero_Actions)
set udg_trigger07=CreateTrigger()
call TriggerRegisterTimerEventSingle(udg_trigger07,121.00)
call TriggerAddAction(udg_trigger07,function Trig_Custom_Hero_Message_Actions)
set udg_trigger08=CreateTrigger()
call TriggerRegisterEnterRectSimple(udg_trigger08,udg_rect05)
call TriggerAddCondition(udg_trigger08,Condition(function Trig_Force_1_Shops_Conditions))
call TriggerAddAction(udg_trigger08,function Trig_Force_1_Shops_Actions)
set udg_trigger09=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger09,EVENT_PLAYER_UNIT_SPELL_ENDCAST)
call TriggerRegisterAnyUnitEventBJ(udg_trigger09,EVENT_PLAYER_UNIT_SPELL_FINISH)
call TriggerAddCondition(udg_trigger09,Condition(function Trig_Starfall_of_Gods_Conditions))
call TriggerAddAction(udg_trigger09,function Trig_Starfall_of_Gods_Actions)
set udg_trigger10=CreateTrigger()
call TriggerRegisterEnterRectSimple(udg_trigger10,udg_rect04)
call TriggerAddCondition(udg_trigger10,Condition(function Trig_Force_2_Shops_Conditions))
call TriggerAddAction(udg_trigger10,function Trig_Force_2_Shops_Actions)
set udg_trigger11=CreateTrigger()
call TriggerRegisterEnterRectSimple(udg_trigger11,udg_rect07)
call TriggerAddCondition(udg_trigger11,Condition(function Trig_Force_3_Shops_Conditions))
call TriggerAddAction(udg_trigger11,function Trig_Force_3_Shops_Actions)
set udg_trigger12=CreateTrigger()
call TriggerRegisterEnterRectSimple(udg_trigger12,udg_rect06)
call TriggerAddCondition(udg_trigger12,Condition(function Trig_Force_4_Shops_Conditions))
call TriggerAddAction(udg_trigger12,function Trig_Force_4_Shops_Actions)
set udg_trigger13=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger13,EVENT_PLAYER_UNIT_USE_ITEM)
call TriggerAddCondition(udg_trigger13,Condition(function Trig_Rod_of_Envy_Conditions))
call TriggerAddAction(udg_trigger13,function Trig_Rod_of_Envy_Actions)
set udg_trigger14=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger14,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(udg_trigger14,Condition(function Trig_AM_Mass_TP_Conditions))
call TriggerAddAction(udg_trigger14,function Trig_AM_Mass_TP_Actions)
set udg_trigger15=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger15,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(udg_trigger15,Condition(function Trig_Passive_Invuln_Potions_Conditions))
call TriggerAddAction(udg_trigger15,function Trig_Passive_Invuln_Potions_Actions)
set udg_trigger16=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger16,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerAddCondition(udg_trigger16,Condition(function Trig_Ring_was_purchased_Conditions))
call TriggerAddAction(udg_trigger16,function Trig_Ring_was_purchased_Actions)
set udg_trigger17=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger17,EVENT_PLAYER_UNIT_SELL)
call TriggerAddCondition(udg_trigger17,Condition(function Trig_Edge_Message_Conditions))
call TriggerAddAction(udg_trigger17,function Trig_Edge_Message_Actions)
set udg_trigger18=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger18,EVENT_PLAYER_UNIT_SELL)
call TriggerAddCondition(udg_trigger18,Condition(function Trig_Avalanche_Message_Conditions))
call TriggerAddAction(udg_trigger18,function Trig_Avalanche_Message_Actions)
set udg_trigger19=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger19,30.00)
call TriggerAddAction(udg_trigger19,function Trig_Timed_Exp_Cap_Check_Actions)
set udg_trigger20=CreateTrigger()
call TriggerAddAction(udg_trigger20,function Trig_Recalculate_One_Team_Actions)
set udg_trigger21=CreateTrigger()
call TriggerAddAction(udg_trigger21,function Trig_Recalculate_Counts_Actions)
set udg_trigger22=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger22,8.00)
call TriggerAddAction(udg_trigger22,function Trig_Spawn_Footmen_Actions)
set udg_trigger23=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger23,12.00)
call TriggerAddAction(udg_trigger23,function Trig_Spawn_Riflemen_Actions)
set udg_trigger24=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger24,12.00)
call TriggerAddAction(udg_trigger24,function Trig_Spawn_Militia_Actions)
set udg_trigger25=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger25,8.50)
call TriggerAddAction(udg_trigger25,function Trig_Spawn_Spellbreakers_Actions)
set udg_trigger26=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger26,9.00)
call TriggerAddAction(udg_trigger26,function Trig_Spawn_Knights_Actions)
set udg_trigger27=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger27,5.50)
call TriggerAddAction(udg_trigger27,function Trig_Spawn_Ghouls_Actions)
set udg_trigger28=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger28,7.00)
call TriggerAddAction(udg_trigger28,function Trig_Spawn_Crypt_Fiends_Actions)
set udg_trigger29=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger29,7.00)
call TriggerAddAction(udg_trigger29,function Trig_Spawn_Skeletons_Actions)
set udg_trigger30=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger30,10.00)
call TriggerAddAction(udg_trigger30,function Trig_Spawn_Abominations_Actions)
set udg_trigger31=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger31,11.50)
call TriggerAddAction(udg_trigger31,function Trig_Spawn_Grunts_Actions)
set udg_trigger32=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger32,7.00)
call TriggerAddAction(udg_trigger32,function Trig_Spawn_Headhunters_Actions)
set udg_trigger33=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger33,7.50)
call TriggerAddAction(udg_trigger33,function Trig_Spawn_Raiders_Actions)
set udg_trigger34=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger34,10.50)
call TriggerAddAction(udg_trigger34,function Trig_Spawn_Taurens_Actions)
set udg_trigger35=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger35,8.00)
call TriggerAddAction(udg_trigger35,function Trig_Spawn_Archers_Actions)
set udg_trigger36=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger36,10.00)
call TriggerAddAction(udg_trigger36,function Trig_Spawn_Huntress_Actions)
set udg_trigger37=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger37,8.00)
call TriggerAddAction(udg_trigger37,function Trig_Spawn_Dryads_Actions)
set udg_trigger38=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(udg_trigger38,7.50)
call TriggerAddAction(udg_trigger38,function Trig_Spawn_Glaive_Throwers_Actions)
set udg_trigger39=CreateTrigger()
call TriggerAddAction(udg_trigger39,function Trig_Remove_Shops_Actions)
set udg_trigger40=CreateTrigger()
call TriggerAddAction(udg_trigger40,function Trig_See_Whos_Still_In_Actions)
set udg_trigger41=CreateTrigger()
call TriggerRegisterPlayerEventLeave(udg_trigger41,Player(0))
call TriggerRegisterPlayerEventLeave(udg_trigger41,Player(1))
call TriggerRegisterPlayerEventLeave(udg_trigger41,Player(2))
call TriggerRegisterPlayerEventLeave(udg_trigger41,Player(3))
call TriggerRegisterPlayerEventLeave(udg_trigger41,Player(4))
call TriggerRegisterPlayerEventLeave(udg_trigger41,Player(5))
call TriggerRegisterPlayerEventLeave(udg_trigger41,Player(6))
call TriggerRegisterPlayerEventLeave(udg_trigger41,Player(7))
call TriggerRegisterPlayerEventLeave(udg_trigger41,Player(8))
call TriggerRegisterPlayerEventLeave(udg_trigger41,Player(9))
call TriggerRegisterPlayerEventLeave(udg_trigger41,Player(10))
call TriggerRegisterPlayerEventLeave(udg_trigger41,Player(11))
call TriggerAddAction(udg_trigger41,function Trig_Players_Leave_Actions)
set udg_trigger42=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger42,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(udg_trigger42,Condition(function Trig_Base_Destroyed_Conditions))
call TriggerAddAction(udg_trigger42,function Trig_Base_Destroyed_Actions)
set udg_trigger43=CreateTrigger()
call TriggerRegisterPlayerChatEvent(udg_trigger43,Player(0),"satan is god",true)
call TriggerAddAction(udg_trigger43,function Trig_Debugger_Actions)
call InitTrig_SpikeImpact_Copy()
set udg_trigger45=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger45,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(udg_trigger45,Condition(function Trig_Omnislash_Conditions))
call TriggerAddAction(udg_trigger45,function Trig_Omnislash_Actions)
call ConditionalTriggerExecute(udg_trigger01)
call ConditionalTriggerExecute(udg_trigger02)
endfunction
//***************************************************************************
//*
//*Map Configuration
//*
//***************************************************************************
function InitTrig_init takes nothing returns nothing
call ExecuteFunc("main2")
endfunction
//===========
//Readme: ==
//==============================================
//DotA based spell Chain Frost: maded by IceFrog
//This version of Chain Frost is maded by Dark Dragon
//----------------------------------------------
//Jumps many times dealing heavy damage and
//slowing enemys
//**********************************************
//As Chain Lightning just much better can
//jump more then once on same target
//**********************************************
//You have right to use this spell in your map
//and edit it ( do anything )
//----------------------------------------------
//However my system UserTimerData will not
//pass as taking it and using it your map
//whitout credits
//==============================================
//Need additional help mail me at:
//<[email protected]>
//**********************************************
//Have Fun!!!
//**********************************************
//Used Globals - that need to be in every map
//globals
// trigger gg_trg_Chain_Frost_jass = null
// unit udg_LastTarget = null
// timer array udg_StoredTimer
// integer array udg_StoredTimerData
// integer udg_maxTimerStored = -1
//endglobals
//========================
//User own stile settings:
//========================
//Boolean type function which returns shuld chain frost use custom sounds
constant function UseSounds takes nothing returns boolean
//Set TRUE to use custom sounds or FALSE to disable custom sounds
//Note: You can use this even if you have slow computer
//Default: TRUE
return TRUE
endfunction
//Boolean type function which returns shuld chain frost use custom graphics
constant function UsingGraphics takes nothing returns boolean
//Set TRUE to use custom graphics or FALSE to disable custom graphics
//Note: You can use this even if you have slow computer
//Default: TRUE
return TRUE
endfunction
//====---==== End user setup ====---====\\
//==== ** ==== ** === ** ===
//Note: You need to edit this raw codes to match your map
//If you dont knowe your raw code in map, follow this steps:
//1. Go to object editor. Hotkey(F6)
//2. Find the spell or unit you copyed.
//3. Press Ctrl + D
//4. Now you will see raw data.
//For any needed object here find raw code in object editor
//One more thing on custom unit you will see 2x raw code
//The raw code of custom unit and the raw code of unit he was created
//Use always first raw code (left one)
//==== ** ==== ** === ** ===
//--- Raw Codes ---
//--- Chain Frost Raw Code --- Needed raw code ---
constant function CF_RawCode takes nothing returns integer
return 'A02K'
endfunction
//--- Chain Frost Upg Raw Code --- Needed raw code ---
constant function CFU_RawCode takes nothing returns integer
return 'A02L'
endfunction
//--- Dummy Raw Code --- Needed raw code ---
constant function Dum_RawCode takes nothing returns integer
return 'u006'
endfunction
//--- Missile Raw Code --- Needed raw code ---
constant function Mis_RawCode takes nothing returns integer
return 'u001'
endfunction
//--- Missile Graphics Raw Code --- Needed raw code ---
constant function Grp_RawCode takes nothing returns integer
return 'u007'
endfunction
//--- Damage lvl 1 Raw Code --- Needed raw code ---
constant function DL1_RawCode takes nothing returns integer
return 'A02f'
endfunction
//--- Damage lvl 2 Raw Code --- Needed raw code ---
constant function DL2_RawCode takes nothing returns integer
return 'A02G'
endfunction
//--- Damage lvl 3 Raw Code --- Needed raw code ---
constant function DL3_RawCode takes nothing returns integer
return 'A02H'
endfunction
//--- Damage lvl 4 Raw Code --- Needed raw code ---
constant function DL4_RawCode takes nothing returns integer
return 'A02I'
endfunction
//--- Locus Raw Code --- This is constant raw code ---
constant function Loc_RawCode takes nothing returns integer
return 'Aloc'
endfunction
//--- Generic Timer Raw Code --- This is constant raw code ---
constant function GT_RawCode takes nothing returns integer
return 'BTLF'
endfunction
//============================================
//--- Conversion Functions --- Integer Main
//============================================
//*** Unit to Integer
constant function U2I takes unit u returns integer
return u
return 0
endfunction
//*** Integer to Unit
constant function I2U takes integer i returns unit
return i
return null
endfunction
//*** Group to Integer
constant function G2I takes group g returns integer
return g
return 0
endfunction
//*** Integer to Group
constant function I2G takes integer i returns group
return i
return null
endfunction
//===================================================================================
//Functions
//--- Returns angle bettwen coordinates ( points )
function AngleBetweenCoord takes real x1, real y1, real x2, real y2 returns real
return bj_RADTODEG * Atan2( y2 - y1, x2 - x1 )
endfunction
//Polar Projection X
function PolarProjectionX takes real x, real dist, real angle returns real
return x + dist * Cos( angle * bj_DEGTORAD )
endfunction
//Polar Projection Y
function PolarProjectionY takes real y, real dist, real angle returns real
return y + dist * Sin( angle * bj_DEGTORAD )
endfunction
//Returns Disatance between coordiantes ( points )
function DistanceBetweenCoord takes real x1, real y1, real x2, real y2 returns real
local real x = x2-x1
local real y = y2-y1
return SquareRoot( x*x + y*y )
endfunction
//--- Checks is unit invulnerable
function GetDamageFactorEx takes unit whichUnit returns real
local unit dummy
local real life = GetUnitState(whichUnit, UNIT_STATE_LIFE)
local real x = GetCameraBoundMinX() + 100
local real y = GetCameraBoundMinY() + 100
set dummy = CreateUnit( Player(PLAYER_NEUTRAL_PASSIVE), Dum_RawCode(), x, y, 0 )
call UnitAddAbility( dummy, Loc_RawCode() )
call UnitApplyTimedLife( dummy, GT_RawCode(), 0.25 )
call UnitDamageTarget( dummy, whichUnit, 0.01, true, false, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_UNIVERSAL, WEAPON_TYPE_WHOKNOWS )
set dummy = null
set x = 0.00
set y = 0.00
return life - GetUnitState(whichUnit, UNIT_STATE_LIFE)
endfunction
//Used for storing timer data
function SetUserTimerData takes timer whichTimer, integer data returns nothing
//local integer i = 0
//loop
//exitwhen i > udg_maxTimerStored
// if ( whichTimer == udg_StoredTimer[i] ) then
// set udg_StoredTimerData[i] = data
// return
// endif
// set i = i + 1
//endloop
set udg_maxTimerStored = udg_maxTimerStored + 1
if ( udg_maxTimerStored > JASS_MAX_ARRAY_SIZE ) then
set udg_maxTimerStored = udg_maxTimerStored - 1
return
endif
set udg_StoredTimer[udg_maxTimerStored] = whichTimer
set udg_StoredTimerData[udg_maxTimerStored] = data
endfunction
//Returns timer data
constant function GetUserTimerData takes timer whichTimer returns integer
local integer i = 0
loop
exitwhen i > udg_maxTimerStored
if ( udg_StoredTimer[i] == whichTimer ) then
return udg_StoredTimerData[i]
endif
set i = i + 1
endloop
return 0
endfunction
//Clears timer data
function ClearUserTimerData takes timer whichTimer, boolean destroyTimer returns nothing
local integer i = 0
local boolean changeData = false
loop
exitwhen i > udg_maxTimerStored
if ( udg_StoredTimer[i] == whichTimer and changeData == false ) then
set changeData = true
if ( destroyTimer ) then
call PauseTimer(whichTimer)
call DestroyTimer(whichTimer)
endif
set udg_StoredTimer[i] = null
set udg_StoredTimerData[i] = 0
endif
if ( changeData and udg_StoredTimer[i+1] != null ) then
set udg_StoredTimer[i] = udg_StoredTimer[i+1]
set udg_StoredTimerData[i] = udg_StoredTimerData[i+1]
elseif ( changeData and udg_StoredTimer[i+1] == null ) then
set udg_StoredTimer[i] = null
set udg_StoredTimerData[i] = 0
set udg_maxTimerStored = i - 1
endif
set i = i + 1
endloop
endfunction
//PlaySoundEx plays sound using coordintes ( 3D sounds must get positioned )
function PlaySoundEx takes sound soundHandle, real x, real y, real z, boolean kill returns nothing
call StopSound( soundHandle, false, false )
call SetSoundPosition( soundHandle, x, y, z )
call StartSound( soundHandle )
if ( kill ) then
call KillSoundWhenDone( soundHandle )
endif
endfunction
// ===== End Functions ======
//Main Condition
function IsChainFrostCasted takes nothing returns boolean
//Check if ability is cast "chain frost" or "chain frost upgraded(scepter)"
return GetSpellAbilityId() == CF_RawCode() or GetSpellAbilityId() == CFU_RawCode()
endfunction
//--- Chain Frost Group ---
function Chain_Frost_group takes nothing returns boolean
return ((IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false) and (IsUnitType(GetFilterUnit(), UNIT_TYPE_MECHANICAL) == false) and (IsUnitType(GetFilterUnit(), UNIT_TYPE_MAGIC_IMMUNE) == false) and ( IsUnitVisible(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) ) and ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) ) and (GetUnitState( GetFilterUnit(), UNIT_STATE_LIFE ) > 0) and (GetDamageFactorEx( GetFilterUnit() ) != 0) and (udg_LastTarget != GetFilterUnit()) )
endfunction
//Returns random unit
function GroupGiveRandomUnit takes nothing returns nothing
local unit u = GetEnumUnit()
set bj_groupRandomConsidered = bj_groupRandomConsidered + 1
if ( GetRandomInt( 1, bj_groupRandomConsidered ) == 1 ) then
set bj_groupRandomCurrentPick = u
endif
set u = null
endfunction
//**** ****
//Graphics Main Function
//**** ****
function GraphicsMove takes nothing returns nothing
local unit u = GetEnumUnit()
local real rad = GetUnitFacing(u) * bj_DEGTORAD
//Moves picked graphics using speed of 200
call SetUnitPosition( u, GetUnitX(u)+ 2*Cos(rad), GetUnitY(u)+ 2*Sin(rad) )
set u = null
endfunction
function GraphicsKill takes nothing returns nothing
//Kill units insted of remove because of effects
call KillUnit( GetEnumUnit() )
endfunction
function GraphicsMain takes nothing returns nothing
local timer t = GetExpiredTimer()
local group g = I2G(GetUserTimerData(t))
local unit u = FirstOfGroup(g)
local integer exec = GetUnitUserData(u)+1
call SetUnitUserData( u, exec )
if exec == 100 then
call ForGroup( g, function GraphicsKill )
call ClearUserTimerData( t, true )
call DestroyGroup(g)
set t = null
set g = null
set u = null
return
endif
call ForGroup( g, function GraphicsMove )
set t = null
set g = null
set u = null
endfunction
//Missile Move Timer
function SetMissileXY takes nothing returns nothing
local timer t = GetExpiredTimer()
local unit dummy = I2U(GetUserTimerData(t))
local unit missile = I2U(GetUnitUserData(dummy))
local unit target = I2U(GetUnitUserData(missile))
local real speed = 8. //Speed * timer speed (8) Default
local real x = GetUnitX(missile)
local real y = GetUnitY(missile)
local real x2 = GetUnitX(target)
local real y2 = GetUnitY(target)
local real angle = AngleBetweenCoord( x, y, x2, y2 )
local real distance = 0.
set x = PolarProjectionX( x, speed, angle )
set y = PolarProjectionY( y, speed, angle )
call SetUnitPosition( missile, x, y )
call SetUnitFacing( missile, angle )
set distance = DistanceBetweenCoord( x, y, x2, y2 )
if ( distance <= 30 ) then
call ClearUserTimerData( t, true )
call RemoveUnit(missile)
//Quick blow ( precious timer ) if it did not
//there is debug after polledwait
call IssueTargetOrder( dummy, "frostnova", target )
//Nuls
set dummy = null
set missile = null
set target = null
endif
set t = null
set speed = 0.00
set angle = 0.00
set x = 0.00
set y = 0.00
set x2 = 0.00
set y2 = 0.00
set distance = 0.00
endfunction
//Main Trigger Actions
function Trig_Chain_Frost_jass_Actions takes nothing returns nothing
//Local variables declaire
local unit caster //Spell caster
local real x //Coordinate X
local real y //Coordinate Y
local real z //Z (height) is used only by sounds
local unit target //Spell target / chain target
local integer jumps //Current jumps in game
local integer max_jumps //Max spell jumps
local integer i //Loop index i
local integer frost_damage //Spell damage
local unit missile //Chain missile
local group frost_group //Random units in radius ( taken from this group )
local unit dummy //Dummy unit hurter
local real distance //Distance between target and last target
local real height //Needed hight for missile
local real raise //Raise time for missile to get hight using distance
local player p //Player owner of caster (u)
local real angle //Angle used to make dummy facing
local boolexpr bx //BooleanExpresion for Filter function used by frost_group
local timer t //Timer which moves missile
local real sleep //Used in PolledWait for max precius sleep
local real missileFlyHeight //Constant missile fly height //Default: 30
local real missileSpeed //Constant missile speed //Default: 800
local real timerSpeed //Constant missile timer move speed //Default: 0.01
local sound frost_blow //Frost blow sound
local sound field_snd //Frost field sound
local sound missile_fly //Missile fly sound
local sound spell_start //Spell start sound
local group grp_group //Graphics group
local unit grpU //Graphics unit
local terraindeformation td //Used in custom graphics ( this var is not needed ) you can call funct directly
//Init sounds
if ( UseSounds() ) then
set frost_blow = CreateSound( "Abilities\\Spells\\Undead\\FrostNova\\FrostNovaTarget1.wav", false, true, true, 10, 10, "DefaultEAXON" )
call SetSoundDuration( frost_blow, 2904 )
call SetSoundVolume( frost_blow, 110 )
call SetSoundPitch( frost_blow, 0.8 )
call SetSoundChannel( frost_blow, 0 )
set field_snd = CreateSound( "Abilities\\Spells\\NightElf\\Barkskin\\BarkSkinTarget1.wav", false, true, true, 10, 10, "DefaultEAXON" )
call SetSoundDuration( field_snd, 2669 )
call SetSoundVolume( field_snd, 110 )
call SetSoundPitch( field_snd, 0.7 )
call SetSoundChannel( field_snd, 0 )
set missile_fly = CreateSound( "Abilities\\Spells\\NightElf\\FaerieDragonInvis\\PhaseShift1.wav", false, true, true, 10, 10, "DefaultEAXON" )
call SetSoundDuration( missile_fly, 1251 )
call SetSoundVolume( missile_fly, 80 )
call SetSoundPitch( missile_fly, 0.7 )
call SetSoundChannel( missile_fly, 0 )
set spell_start = CreateSound( "Abilities\\Spells\\Other\\BreathOfFrost\\BreathOfFrost1.wav", false, true, true, 10, 10, "DefaultEAXON" )
call SetSoundDuration( spell_start, 2235 )
call SetSoundVolume( spell_start, 90 )
call SetSoundPitch( spell_start, 0.9 )
call SetSoundChannel( spell_start, 0 )
endif
//Init start vars value
set caster = GetTriggerUnit()
set x = GetUnitX(caster)
set y = GetUnitY(caster)
set target = GetSpellTargetUnit()
set p = GetOwningPlayer(caster)
set z = 0
set missileFlyHeight = 30
set missileSpeed = 800
set timerSpeed = 0.01
//Play chain frost start sound
if ( UseSounds() ) then
call PlaySoundEx( spell_start, x, y, z, true )
endif
//Get jumps and max_jumps
if ( GetSpellAbilityId() == CF_RawCode() ) then
set jumps = 6
else
set jumps = 7
endif
set max_jumps = jumps
//Get level damage
if ( GetUnitAbilityLevel( caster, CF_RawCode() ) == 1 ) then
set frost_damage = DL1_RawCode()
elseif ( ( GetUnitAbilityLevel( caster, CF_RawCode() ) == 2 ) or ( GetUnitAbilityLevel( caster, CFU_RawCode() ) == 1 ) ) then
set frost_damage = DL2_RawCode()
elseif ( ( GetUnitAbilityLevel( caster, CF_RawCode() ) == 3 ) or ( GetUnitAbilityLevel( caster, CFU_RawCode() ) == 2 ) ) then
set frost_damage = DL3_RawCode()
else
set frost_damage = DL4_RawCode()
endif
//Jumps loop main
loop
exitwhen (jumps < 1)
set jumps = jumps - 1
set frost_group = CreateGroup()
//Load missile / pick random nerby unit
if ( jumps + 1 == max_jumps ) then
set missile = CreateUnit( p, Mis_RawCode(), x, y, AngleBetweenCoord( x, y, GetUnitX(target), GetUnitY(target) ) )
else
set x = GetUnitX(target)
set y = GetUnitY(target)
set bx = Filter( function Chain_Frost_group )
set udg_LastTarget = target
call GroupEnumUnitsInRange( frost_group, x, y, 550, bx )
set udg_LastTarget = null
call DestroyBoolExpr( bx )
set bj_groupRandomConsidered = 0
call ForGroup( frost_group, function GroupGiveRandomUnit )
set target = bj_groupRandomCurrentPick
call DestroyGroup(frost_group)
//End trigger if there is no target
if ( target == null or GetUnitState( target, UNIT_STATE_LIFE ) <= 0 ) then
set jumps = 0
set max_jumps = 0
set distance = 0.00
set x = 0.00
set y = 0.00
set p = null
set caster = null
set target = null
set frost_damage = 0
set missileFlyHeight = 0.00
set missileSpeed = 0.00
set timerSpeed = 0.00
set i = 0
call KillSoundWhenDone( frost_blow )
call KillSoundWhenDone( field_snd )
call KillSoundWhenDone( missile_fly )
return
endif
set missile = CreateUnit( p, Mis_RawCode(), x, y, AngleBetweenCoord( x, y, GetUnitX(target), GetUnitY(target) ) )
if ( height > 30. ) then
call SetUnitFlyHeight( missile, height, 0. )
endif
set missileFlyHeight = GetUnitFlyHeight(missile)
endif
//Play missile sound
if ( UseSounds() ) then
set height = GetUnitFlyHeight(target)
if ( height > missileFlyHeight ) then
set z = ( height / 2 ) + ( missileFlyHeight / 2 )
else
set z = missileFlyHeight
endif
call PlaySoundEx( missile_fly, x, y, z, false )
set height = 0.00
set z = 0.00
endif
//Play field sound
if ( UseSounds() ) then
set distance = DistanceBetweenCoord( x, y, GetUnitX(target), GetUnitY(target) ) / 2
set x = PolarProjectionX( x, distance, AngleBetweenCoord( x, y, GetUnitX(target), GetUnitY(target) ) )
set y = PolarProjectionY( y, distance, AngleBetweenCoord( GetUnitX(missile), y, GetUnitX(target), GetUnitY(target) ) )
call PlaySoundEx( field_snd, x, y, z, false )
endif
//Prepare to move missile and dummy load + other stuff
call UnitAddAbility( missile, Loc_RawCode() )
set x = GetUnitX(target)
set y = GetUnitY(target)
set distance = DistanceBetweenCoord( x, y, GetUnitX(missile), GetUnitY(missile) )
call UnitApplyTimedLife( missile, GT_RawCode(), distance / 800 ) // To reduce bugs
//Terrain Deformation ( graphics setup )
if ( UsingGraphics() ) then
set td = TerrainDeformWave( GetUnitX(missile), GetUnitY(missile), x, y, distance, missileSpeed, 100, 70, 750, 1 )
set td = null
endif
//Missile fly height setup
set height = GetUnitFlyHeight( target )
if ( height > missileFlyHeight ) then
set height = GetUnitFlyHeight(target)
set raise = height / ( distance / 800 )
call SetUnitFlyHeight( missile, height, raise )
set raise = 0.00
elseif ( height < missileFlyHeight ) then
set raise = ( missileFlyHeight - height ) / ( distance / 800 )
call SetUnitFlyHeight( missile, height, raise )
endif
set angle = GetUnitFacing(target) - 180
set x = PolarProjectionX( x, 150, angle )
set y = PolarProjectionY( y, 150, angle )
set angle = 0.00
set dummy = CreateUnit( p, Dum_RawCode(), x, y, AngleBetweenCoord( x, y, GetUnitX(target), GetUnitY(target) ) )
call UnitAddAbility( dummy, Loc_RawCode() )
call UnitAddAbility( dummy, frost_damage )
//Make AI target not to run
if ( ( jumps + 1 == max_jumps ) and ( GetPlayerController(GetOwningPlayer(target)) != MAP_CONTROL_USER ) ) then
call TriggerSleepAction(-1)
call IssuePointOrder( target, "attack", GetUnitX(caster), GetUnitY(caster) )
endif
//===== Timer Setup =======
//=== Move missile ===
//===== *********** =======
call SetUnitUserData(missile, U2I(target))
call SetUnitUserData(dummy, U2I(missile))
set t = CreateTimer()
call SetUserTimerData( t, U2I(dummy) )
call TimerStart( t, timerSpeed, true, function SetMissileXY )
//Sleep while missile dont get target
if ( jumps + 1 == max_jumps ) then
set sleep = ( distance / missileSpeed ) - 0.30
else
set sleep = ( distance / missileSpeed ) - 0.15
endif
if ( sleep < bj_WAIT_FOR_COND_MIN_INTERVAL ) then
set sleep = bj_WAIT_FOR_COND_MIN_INTERVAL
endif
call PolledWait( sleep )
set sleep = 0.00
//Frost blow sound
if ( UseSounds() ) then
set x = GetUnitX(target)
set y = GetUnitY(target)
call PlaySoundEx( frost_blow, x, y, z, false )
endif
//Conitinue code if we have more jumps
call IssueTargetOrder( dummy, "frostnova", target ) //Reduce bugs
call UnitApplyTimedLife( dummy, GT_RawCode(), 1.00 )
//Graphics main code
if ( UsingGraphics() ) then
set i = 0
set grp_group = CreateGroup()
loop
exitwhen i >= 10
set grpU = CreateUnit( p, Grp_RawCode(), x, y, i*36 )
call UnitAddAbility( grpU, Loc_RawCode() )
call GroupAddUnit( grp_group, grpU )
set i = i + 1
endloop
set t = CreateTimer()
call SetUserTimerData( t, G2I(grp_group) )
call TimerStart( t, timerSpeed, true, function GraphicsMain )
endif
set missile = null
set dummy = null
endloop
//Clear some vars
call KillSoundWhenDone( frost_blow )
call KillSoundWhenDone( field_snd )
call KillSoundWhenDone( missile_fly )
set caster = null
set target = null
set p = null
set x = 0.00
set y = 0.00
set max_jumps = 0
set distance = 0.00
set frost_damage = 0
set missileFlyHeight = 0.00
set missileSpeed = 0.00
set timerSpeed = 0.00
set i = 0
endfunction
//===========================================================================
function InitTrig_Chain_Frost_jass takes nothing returns nothing
local boolexpr bx = Filter(null)
//Create chain frost trigger
set gg_trg_Chain_Frost_jass = CreateTrigger( )
//Triggers events / condition
call TriggerRegisterPlayerUnitEvent( gg_trg_Chain_Frost_jass, Player( 0), EVENT_PLAYER_UNIT_SPELL_EFFECT, bx )
call TriggerRegisterPlayerUnitEvent( gg_trg_Chain_Frost_jass, Player( 1), EVENT_PLAYER_UNIT_SPELL_EFFECT, bx )
call TriggerRegisterPlayerUnitEvent( gg_trg_Chain_Frost_jass, Player( 2), EVENT_PLAYER_UNIT_SPELL_EFFECT, bx )
call TriggerRegisterPlayerUnitEvent( gg_trg_Chain_Frost_jass, Player( 3), EVENT_PLAYER_UNIT_SPELL_EFFECT, bx )
call TriggerRegisterPlayerUnitEvent( gg_trg_Chain_Frost_jass, Player( 4), EVENT_PLAYER_UNIT_SPELL_EFFECT, bx )
call TriggerRegisterPlayerUnitEvent( gg_trg_Chain_Frost_jass, Player( 5), EVENT_PLAYER_UNIT_SPELL_EFFECT, bx )
call TriggerRegisterPlayerUnitEvent( gg_trg_Chain_Frost_jass, Player( 6), EVENT_PLAYER_UNIT_SPELL_EFFECT, bx )
call TriggerRegisterPlayerUnitEvent( gg_trg_Chain_Frost_jass, Player( 7), EVENT_PLAYER_UNIT_SPELL_EFFECT, bx )
call TriggerRegisterPlayerUnitEvent( gg_trg_Chain_Frost_jass, Player( 8), EVENT_PLAYER_UNIT_SPELL_EFFECT, bx )
call TriggerRegisterPlayerUnitEvent( gg_trg_Chain_Frost_jass, Player( 9), EVENT_PLAYER_UNIT_SPELL_EFFECT, bx )
call TriggerRegisterPlayerUnitEvent( gg_trg_Chain_Frost_jass, Player(10), EVENT_PLAYER_UNIT_SPELL_EFFECT, bx )
call TriggerRegisterPlayerUnitEvent( gg_trg_Chain_Frost_jass, Player(11), EVENT_PLAYER_UNIT_SPELL_EFFECT, bx )
call TriggerRegisterPlayerUnitEvent( gg_trg_Chain_Frost_jass, Player(12), EVENT_PLAYER_UNIT_SPELL_EFFECT, bx )
call TriggerRegisterPlayerUnitEvent( gg_trg_Chain_Frost_jass, Player(13), EVENT_PLAYER_UNIT_SPELL_EFFECT, bx )
call TriggerRegisterPlayerUnitEvent( gg_trg_Chain_Frost_jass, Player(14), EVENT_PLAYER_UNIT_SPELL_EFFECT, bx )
call TriggerRegisterPlayerUnitEvent( gg_trg_Chain_Frost_jass, Player(15), EVENT_PLAYER_UNIT_SPELL_EFFECT, bx )
call DestroyBoolExpr(bx)
call TriggerAddCondition( gg_trg_Chain_Frost_jass, Condition( function IsChainFrostCasted ) )
// Main Trigger Actions
call TriggerAddAction( gg_trg_Chain_Frost_jass, function Trig_Chain_Frost_jass_Actions )
//-----------------------------------------------------------------------
//Preloader
call Preload("Abilities\\Weapons\\FrostWyrmMissile\\FrostWyrmMissile.mdl")
call Preload("Abilities\\Weapons\\ZigguratFrostMissile\\ZigguratFrostMissile.mdl")
call Preload("Abilities\\Spells\\Undead\\FrostNova\\FrostNovaTarget.mdl")
call Preload("Abilities\\Spells\\Other\\FrostDamage\\FrostDamage.mdl")
call PreloadEnd(2.)
endfunction