// 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 |
boolean01 | boolean | No | |
boolean02 | boolean | No | |
booleans01 | boolean | Yes | |
booleans02 | boolean | Yes | |
booleans03 | boolean | Yes | |
booleans04 | boolean | Yes | |
button01 | button | No | |
button02 | button | No | |
dialog01 | dialog | No | |
effect01 | effect | No | |
effect02 | effect | No | |
force01 | force | No | |
force02 | force | No | |
force03 | force | No | |
forces01 | force | Yes | |
group01 | group | No | |
group02 | group | No | |
group03 | group | No | |
group04 | group | No | |
group05 | group | No | |
handle01 | handle | No | |
integer01 | integer | No | 20 |
integer02 | integer | No | |
integer03 | integer | No | |
integer04 | integer | No | |
integer05 | integer | No | |
integer06 | integer | No | |
integer07 | integer | No | |
integer08 | integer | No | |
integer09 | integer | No | |
integers01 | integer | Yes | |
integers02 | integer | Yes | |
integers03 | integer | Yes | |
integers04 | integer | Yes | |
integers05 | integer | Yes | |
integers06 | integer | Yes | |
lightning01 | lightning | No | |
location01 | location | No | |
location02 | location | No | |
player01 | player | No | |
player02 | player | No | |
player03 | player | No | |
players01 | player | Yes | |
players02 | player | Yes | |
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 | |
rect12 | rect | No | |
rect13 | rect | No | |
rect14 | rect | No | |
rect15 | rect | No | |
rect16 | rect | No | |
rect17 | rect | No | |
rect18 | rect | No | |
rect19 | rect | No | |
sound01 | sound | No | |
sound02 | sound | No | |
sound03 | sound | No | |
sound04 | sound | No | |
sound05 | sound | No | |
string01 | string | No | |
string02 | string | No | |
strings01 | string | Yes | |
strings02 | string | Yes | |
strings03 | string | Yes | |
strings04 | string | Yes | |
strings05 | string | Yes | |
strings06 | string | Yes | |
strings07 | string | Yes | |
strings08 | string | Yes | |
timer01 | timer | No | |
timer02 | timer | No | |
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 | |
unit01 | unit | No | |
unit02 | unit | No | |
unit03 | unit | No | |
unit04 | unit | No | |
unit05 | unit | No | |
unit06 | unit | No | |
unit07 | unit | No | |
unit08 | unit | No | |
units01 | unit | Yes | |
units02 | unit | Yes | |
weathereffect01 | weathereffect | 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 AP takes real Aq returns nothing
local real AQ
local real st=TimerGetElapsed(udg_timer02)
if st<=0 then
set udg_timer02=CreateTimer()
call TimerStart(udg_timer02,0xF4240,false,null)
endif
if(Aq>0)then
loop
set AQ=Aq-TimerGetElapsed(udg_timer02)+st
exitwhen AQ<=0
if(AQ>bj_POLLED_WAIT_SKIP_THRESHOLD)then
call TriggerSleepAction(.1*AQ)
else
call TriggerSleepAction(bj_POLLED_WAIT_INTERVAL)
endif
endloop
endif
endfunction
function Ar takes trigger AR,rect r returns event
local region As=CreateRegion()
call RegionAddRect(As,r)
set udg_handle01=TriggerRegisterEnterRegion(AR,As,null)
set As=null
return udg_handle01
endfunction
function AS takes unit At,integer AT returns integer
local integer Au
local item AU
set Au=0
loop
set AU=UnitItemInSlot(At,Au)
if(AU!=null)and(GetItemTypeId(AU)==AT)then
set AU=null
return Au+1
endif
set Au=Au+1
exitwhen Au>=6
endloop
set AU=null
return 0
endfunction
function Av takes unit At,integer AT returns boolean
return AS(At,AT)>0
endfunction
function AV takes nothing returns nothing
local unit Aw=GetEnumUnit()
if(GetUnitState(Aw,UNIT_STATE_LIFE)<=0)then
call SetUnitTimeScale(Aw,.0001)
endif
set Aw=null
endfunction
function AW takes nothing returns nothing
local unit Aw=GetEnumUnit()
if(GetUnitState(Aw,UNIT_STATE_LIFE)<=0)then
call UnitSuspendDecay(Aw,true)
call SetUnitTimeScale(Aw,.0001)
endif
set Aw=null
endfunction
function Ax takes nothing returns nothing
local unit Aw=GetEnumUnit()
if(GetUnitState(Aw,UNIT_STATE_LIFE)<=0)then
call UnitSuspendDecay(Aw,true)
call SetUnitTimeScale(Aw,10.)
call SetUnitAnimation(Aw,"decay flesh")
endif
set Aw=null
endfunction
function AX takes nothing returns nothing
local group Ay
local group AY
set Ay=bj_suspendDecayBoneGroup
set AY=bj_suspendDecayFleshGroup
set bj_suspendDecayBoneGroup=CreateGroup()
set bj_suspendDecayFleshGroup=CreateGroup()
call ForGroup(AY,function AV)
call ForGroup(Ay,function AV)
call TriggerSleepAction(8.)
call ForGroup(AY,function Ax)
call ForGroup(Ay,function AW)
call TriggerSleepAction(.05)
call ForGroup(AY,function AV)
call DestroyGroup(Ay)
call DestroyGroup(AY)
set Ay=null
set AY=null
endfunction
function A1 takes nothing returns boolean
local location A2=GetDestructableLoc(GetFilterDestructable())
local boolean A3
set A3=(DistanceBetweenPoints(A2,bj_enumDestructableCenter)<=bj_enumDestructableRadius)
call RemoveLocation(A2)
set A2=null
return A3
endfunction
function bF takes real bg,location bG,boolexpr bf returns group
local group g=CreateGroup()
call GroupEnumUnitsInRangeOfLoc(g,bG,bg,bf)
call DestroyBoolExpr(bf)
set udg_handle01=g
set g=null
return udg_handle01
endfunction
function bh takes real bg,location bG returns group
return bF(bg,bG,null)
endfunction
function bH takes integer bi returns group
local group g=CreateGroup()
call GroupEnumUnitsOfType(g,UnitId2String(bi),null)
set udg_handle01=g
set g=null
return udg_handle01
endfunction
function bI takes player A0,boolexpr bf returns group
local group g=CreateGroup()
call GroupEnumUnitsOfPlayer(g,A0,bf)
call DestroyBoolExpr(bf)
set udg_handle01=g
set g=null
return udg_handle01
endfunction
function bj takes player A0 returns group
return bI(A0,null)
endfunction
function bJ takes player A0 returns force
local force f=CreateForce()
call ForceAddPlayer(f,A0)
set udg_handle01=f
set f=null
return udg_handle01
endfunction
function bk takes player A0 returns force
local force f=CreateForce()
call ForceEnumAllies(f,A0,null)
set udg_handle01=f
set f=null
return udg_handle01
endfunction
function bK takes boolexpr bf returns force
local force f=CreateForce()
call ForceEnumPlayers(f,bf)
call DestroyBoolExpr(bf)
set udg_handle01=f
set f=null
return udg_handle01
endfunction
function bl takes nothing returns boolean
local unit bL=GetFilterUnit()
local boolean b=((GetWidgetLife(bL)>0)and(GetUnitTypeId(bL)==bj_livingPlayerUnitsTypeId))
if(b)then
set bj_groupCountUnits=bj_groupCountUnits+1
endif
set bL=null
return b
endfunction
function bm takes unit At,location bM,real Aq returns nothing
local location bn=GetUnitLoc(At)
call SetUnitFacingTimed(At,AngleBetweenPoints(bn,bM),Aq)
call RemoveLocation(bn)
set bn=null
endfunction
function bN takes unit At,unit bM,real Aq returns nothing
local location bn=GetUnitLoc(bM)
call bm(At,bn,Aq)
call RemoveLocation(bn)
set bn=null
endfunction
function bQ takes nothing returns nothing
local unit br=GetTriggerUnit()
if IsUnitType(br,UNIT_TYPE_STRUCTURE)then
call RescueUnitBJ(br,GetOwningPlayer(GetRescuer()),bj_rescueChangeColorBldg)
else
call RescueUnitBJ(br,GetOwningPlayer(GetRescuer()),bj_rescueChangeColorUnit)
endif
set br=null
endfunction
function bR takes nothing returns nothing
local integer Au
if(bj_rescueUnitBehavior==null)then
set bj_rescueUnitBehavior=CreateTrigger()
set Au=0
loop
call TriggerRegisterPlayerUnitEvent(bj_rescueUnitBehavior,Player(Au),EVENT_PLAYER_UNIT_RESCUED,null)
set Au=Au+1
exitwhen Au==16
endloop
call TriggerAddAction(bj_rescueUnitBehavior,function bQ)
endif
endfunction
function bS takes nothing returns nothing
local integer Au
set Au=0
loop
if(GetPlayerController(Player(Au))==MAP_CONTROL_RESCUABLE)then
call bR()
return
endif
set Au=Au+1
exitwhen Au==12
endloop
endfunction
function bw takes itemtype bW,integer bx returns nothing
local group g
set bj_stockPickedItemType=bW
set bj_stockPickedItemLevel=bx
set g=CreateGroup()
call GroupEnumUnitsOfType(g,"marketplace",null)
call ForGroup(g,function UpdateEachStockBuildingEnum)
call DestroyGroup(g)
set g=null
endfunction
function bX takes nothing returns nothing
local integer pickedItemId
local itemtype by
local integer bY=0
local integer bz=0
local integer bx
set bx=1
loop
if(bj_stockAllowedPermanent[bx])then
set bz=bz+1
if(GetRandomInt(1,bz)==1)then
set by=ITEM_TYPE_PERMANENT
set bY=bx
endif
endif
if(bj_stockAllowedCharged[bx])then
set bz=bz+1
if(GetRandomInt(1,bz)==1)then
set by=ITEM_TYPE_CHARGED
set bY=bx
endif
endif
if(bj_stockAllowedArtifact[bx])then
set bz=bz+1
if(GetRandomInt(1,bz)==1)then
set by=ITEM_TYPE_ARTIFACT
set bY=bx
endif
endif
set bx=bx+1
exitwhen bx>10
endloop
if(bz==0)then
set by=null
return
endif
call bw(by,bY)
set by=null
endfunction
function bZ takes nothing returns nothing
call bX()
call TimerStart(bj_stockUpdateTimer,bj_STOCK_RESTOCK_INTERVAL,true,function bX)
endfunction
function b0 takes nothing returns boolean
return(RectContainsUnit(udg_rect05,GetFilterUnit()))
endfunction
function b1 takes nothing returns boolean
return(RectContainsUnit(udg_rect04,GetFilterUnit()))
endfunction
function b2 takes nothing returns boolean
return GetBooleanOr(b0(),b1())
endfunction
function b3 takes nothing returns boolean
return(GetPlayerName(udg_player01)=="ltachi_Uchiha")or(GetPlayerName(udg_player01)=="MrAppies")or(GetPlayerName(udg_player01)=="VG_Embiem")or(GetPlayerName(udg_player01)=="Dragoonxxx")
endfunction
function b4 takes nothing returns boolean
return(b3())
endfunction
function b5 takes nothing returns boolean
return(udg_boolean02==false)
endfunction
function b6 takes nothing returns boolean
return(GetPlayerColor(udg_player01)==PLAYER_COLOR_BROWN)
endfunction
function b7 takes nothing returns boolean
return(GetPlayerColor(udg_player01)==PLAYER_COLOR_AQUA)
endfunction
function b8 takes nothing returns boolean
return(GetPlayerColor(udg_player01)==PLAYER_COLOR_LIGHT_BLUE)
endfunction
function b9 takes nothing returns boolean
return(GetPlayerColor(udg_player01)==PLAYER_COLOR_LIGHT_GRAY)
endfunction
function Ba takes nothing returns boolean
return(GetPlayerColor(udg_player01)==PLAYER_COLOR_PINK)
endfunction
function BA takes nothing returns boolean
return(GetPlayerColor(udg_player01)==PLAYER_COLOR_GREEN)
endfunction
function Bb takes nothing returns boolean
return(GetPlayerColor(udg_player01)==PLAYER_COLOR_ORANGE)
endfunction
function BB takes nothing returns boolean
return(GetPlayerColor(udg_player01)==PLAYER_COLOR_YELLOW)
endfunction
function Bc takes nothing returns boolean
return(GetPlayerColor(udg_player01)==PLAYER_COLOR_PURPLE)
endfunction
function BC takes nothing returns boolean
return(GetPlayerColor(udg_player01)==PLAYER_COLOR_CYAN)
endfunction
function Bd takes nothing returns boolean
return(GetPlayerColor(udg_player01)==PLAYER_COLOR_BLUE)
endfunction
function BD takes nothing returns boolean
return(GetPlayerColor(udg_player01)==PLAYER_COLOR_RED)
endfunction
function Be takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function BE takes nothing returns boolean
return(GetPlayerSlotState(Player(-1+(bj_forLoopAIndex)))==PLAYER_SLOT_STATE_EMPTY)or(GetPlayerSlotState(Player(-1+(bj_forLoopAIndex)))!=PLAYER_SLOT_STATE_PLAYING)or(GetPlayerSlotState(Player(-1+(bj_forLoopAIndex)))==PLAYER_SLOT_STATE_LEFT)or(GetPlayerController(Player(-1+(bj_forLoopAIndex)))!=MAP_CONTROL_USER)
endfunction
function Bf takes nothing returns boolean
return(BE())
endfunction
function BF takes nothing returns nothing
set udg_units01[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=GetEnumUnit()
endfunction
function Bg takes nothing returns nothing
call ConditionalTriggerExecute(udg_trigger02)
call ConditionalTriggerExecute(udg_trigger03)
call ConditionalTriggerExecute(udg_trigger04)
set udg_rect01=udg_rect06
set udg_group03=bI(Player(15),Condition(function b2))
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(Bf())then
set udg_group01=bj(Player(-1+(bj_forLoopAIndex)))
call ForGroupBJ(udg_group01,function Be)
call DestroyGroup(udg_group01)
else
set udg_player01=Player(-1+(bj_forLoopAIndex))
if(b4())then
call SetPlayerName(udg_player01,"AnnoyingDouchebag")
set udg_booleans01[bj_forLoopAIndex]=true
endif
set udg_strings05[(1+GetPlayerId(udg_player01))]=GetPlayerName(udg_player01)
set udg_integer03=(udg_integer03+1)
set udg_players01[udg_integer03]=udg_player01
if(b5())then
set udg_player02=udg_player01
set udg_boolean02=true
endif
call SetPlayerStateBJ(udg_player01,PLAYER_STATE_RESOURCE_GOLD,2000)
call SetPlayerFlagBJ(PLAYER_STATE_GIVES_BOUNTY,true,udg_player01)
call CreateFogModifierRectBJ(true,udg_player01,FOG_OF_WAR_VISIBLE,udg_rect03)
call ForceAddPlayer(udg_force02,udg_player01)
call ForceAddPlayer(udg_forces01[1],udg_player01)
if(BD())then
set udg_strings06[(1+GetPlayerId(udg_player01))]=(("|c00FF0303"+GetPlayerName(udg_player01))+"|r")
else
if(Bd())then
set udg_strings06[(1+GetPlayerId(udg_player01))]=(("|c000042FF"+GetPlayerName(udg_player01))+"|r")
else
if(BC())then
set udg_strings06[(1+GetPlayerId(udg_player01))]=(("|c001CE6B9"+GetPlayerName(udg_player01))+"|r")
else
if(Bc())then
set udg_strings06[(1+GetPlayerId(udg_player01))]=(("|c00540081"+GetPlayerName(udg_player01))+"|r")
else
if(BB())then
set udg_strings06[(1+GetPlayerId(udg_player01))]=(("|c00FFFC01"+GetPlayerName(udg_player01))+"|r")
else
if(Bb())then
set udg_strings06[(1+GetPlayerId(udg_player01))]=(("|c00FEBA0E"+GetPlayerName(udg_player01))+"|r")
else
if(BA())then
set udg_strings06[(1+GetPlayerId(udg_player01))]=(("|c0020C000"+GetPlayerName(udg_player01))+"|r")
else
if(Ba())then
set udg_strings06[(1+GetPlayerId(udg_player01))]=(("|c00E55BB0"+GetPlayerName(udg_player01))+"|r")
else
if(b9())then
set udg_strings06[(1+GetPlayerId(udg_player01))]=(("|c00959697"+GetPlayerName(udg_player01))+"|r")
else
if(b8())then
set udg_strings06[(1+GetPlayerId(udg_player01))]=(("|c007EBFF1"+GetPlayerName(udg_player01))+"|r")
else
if(b7())then
set udg_strings06[(1+GetPlayerId(udg_player01))]=(("|c00106246"+GetPlayerName(udg_player01))+"|r")
else
if(b6())then
set udg_strings06[(1+GetPlayerId(udg_player01))]=(("|c004E2A04"+GetPlayerName(udg_player01))+"|r")
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set udg_group01=bH('hbar')
call ForGroupBJ(udg_group01,function BF)
call DestroyGroup(udg_group01)
set udg_boolean02=false
call CreateFogModifierRectBJ(true,Player(0),FOG_OF_WAR_VISIBLE,udg_rect07)
call CreateFogModifierRectBJ(true,Player(1),FOG_OF_WAR_VISIBLE,udg_rect07)
call CreateFogModifierRectBJ(true,Player(2),FOG_OF_WAR_VISIBLE,udg_rect07)
call CreateFogModifierRectBJ(true,Player(3),FOG_OF_WAR_VISIBLE,udg_rect08)
call CreateFogModifierRectBJ(true,Player(4),FOG_OF_WAR_VISIBLE,udg_rect08)
call CreateFogModifierRectBJ(true,Player(5),FOG_OF_WAR_VISIBLE,udg_rect08)
call CreateFogModifierRectBJ(true,Player(6),FOG_OF_WAR_VISIBLE,udg_rect09)
call CreateFogModifierRectBJ(true,Player(7),FOG_OF_WAR_VISIBLE,udg_rect09)
call CreateFogModifierRectBJ(true,Player(8),FOG_OF_WAR_VISIBLE,udg_rect09)
call CreateFogModifierRectBJ(true,Player(9),FOG_OF_WAR_VISIBLE,udg_rect10)
call CreateFogModifierRectBJ(true,Player(10),FOG_OF_WAR_VISIBLE,udg_rect10)
call CreateFogModifierRectBJ(true,Player(11),FOG_OF_WAR_VISIBLE,udg_rect10)
set udg_strings08[1]="By posting in our forums at UltimateLegends.com often, you can be the most awesome person ever."
set udg_strings08[2]="The Troll Priest available at your base's mercenary shop is a great buy."
set udg_strings08[3]="No one likes a spoofer, trying to spoof a creator could get you kicked by the map."
set udg_strings08[4]="Ultimate Footmen owns Footman Frenzy in every way. Don't Agree? Prove it to us on our forums at www.UltimateLegends.com."
set udg_strings08[5]="You can change your name by typing -name (NewNameHere). If you need to check someones original name use -namecheck (TheirCurrentName)"
set udg_strings08[6]="Want to play from a different angle? Change your camera view by typing -cam (Any number between 100 and 5000). If you want to get it back to normal, type -cam reset."
set udg_strings08[7]="Reading the game information is fun. Just press F9 or click on it in the top left corner."
set udg_strings08[8]="Found a bug? Have a great idea? Want to get your hero in the map? Let us know at www.UltimateLegend.com!"
set udg_strings08[9]="Like Ultimate Footmen a lot? You can join a clan for it! Clan UltF plays on Lordaeron (West), talk to VG_Emblem, to sign up or join the channel. You can also go to our forums at www.UltimateLegends.com to let us know!"
set udg_strings08[10]="There is a secret random-only hero, but shhh, it's a secret."
set udg_strings08[11]="More Tips available at www.UltimateLegends.com"
set udg_strings08[12]="Curious how many units you have? Type -count."
set udg_strings08[13]="MrApples has numerous STDs."
set udg_integer05=13
set udg_group01=null
call DestroyTrigger(GetTriggeringTrigger())
endfunction
function BG takes nothing returns nothing
call CreateQuestBJ(0,"|c000A8B0BGame Info|r","TRIGSTR_6741","ReplaceableTextures\\CommandButtons\\BTNAmbush.blp")
call CreateQuestBJ(0,"|c000A8B0BHow to Play|r","TRIGSTR_6749","ReplaceableTextures\\CommandButtons\\BTNAmbush.blp")
call CreateQuestBJ(0,"|c000A8B0BNew Features|r","TRIGSTR_6739","ReplaceableTextures\\CommandButtons\\BTNAmbush.blp")
call CreateQuestBJ(2,"|c000A8B0BForums|r","TRIGSTR_6743","ReplaceableTextures\\CommandButtons\\BTNAmbush.blp")
call CreateQuestBJ(2,"|c000A8B0BCredits|r","TRIGSTR_6745","ReplaceableTextures\\CommandButtons\\BTNAmbush.blp")
call CreateQuestBJ(2,"|c000A8B0BUltF Clans|r","TRIGSTR_6747","ReplaceableTextures\\CommandButtons\\BTNAmbush.blp")
call DestroyTrigger(GetTriggeringTrigger())
endfunction
function Bh takes nothing returns nothing
call SetGameSpeed(MAP_SPEED_FASTEST)
call SetMapFlag(MAP_SHARED_ADVANCED_CONTROL,true)
call MeleeGrantHeroItems()
call MeleeStartingVisibility()
call MeleeStartingHeroLimit()
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]='U00F'
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]='H017'
set udg_integers01[22]='N03H'
set udg_integers01[23]='H00Z'
set udg_integers01[24]='E00C'
set udg_integers01[25]='N036'
set udg_integers01[26]='O000'
set udg_integers01[27]='N00M'
set udg_integers01[28]='H01L'
set udg_integers01[29]='H019'
set udg_integers01[30]='O00D'
set udg_integers01[31]='O00Q'
set udg_integers01[32]='Nalc'
set udg_integers01[33]='Ntin'
set udg_integers01[34]='Nfir'
set udg_integers01[35]='O009'
set udg_integers01[36]='E00E'
set udg_integers01[37]='N025'
set udg_integers01[38]='U00B'
set udg_integers01[39]='N00P'
set udg_integers01[40]='N01L'
set udg_integers01[41]='U003'
set udg_integers01[42]='N01Q'
set udg_integers01[43]='U00H'
set udg_integers01[44]='N02D'
set udg_integers01[45]='N038'
set udg_integers01[46]='N02P'
set udg_integers01[47]='N02W'
set udg_integers01[48]='N035'
set udg_integers01[49]='N02X'
set udg_integers01[50]='U011'
set udg_integers01[51]='N04A'
set udg_integers01[52]='H01M'
set udg_integers01[53]='N049'
set udg_integers01[54]='O00H'
set udg_integers01[55]='U016'
set udg_integers01[56]='U017'
set udg_integers01[57]='U01B'
set udg_integer01=57
set udg_integers02[1]='hbar'
set udg_integers02[2]='h00B'
set udg_integers02[3]='hkee'
set udg_integers02[4]='hcas'
set udg_integers02[5]='htow'
set udg_integers02[6]='h00G'
set udg_integers02[7]='h00C'
set udg_integers02[8]='h00E'
set udg_integers02[9]='h00D'
set udg_integers02[10]='h00S'
set udg_integers02[11]='h00H'
set udg_integers02[12]='h00I'
set udg_integers02[13]='h00J'
set udg_integers02[14]='h00O'
set udg_integers02[15]='h00M'
set udg_integers02[16]='h00N'
set udg_integers02[17]='h011'
set udg_integers02[18]='h010'
set udg_integers02[19]='h012'
set udg_integers02[20]='h013'
set udg_integers02[21]='h00L'
set udg_integers02[22]='u00W'
set udg_integers02[23]='u00X'
set udg_integers02[24]='u00Y'
set udg_integers02[25]='u00Z'
set udg_integers02[26]='h01N'
set udg_integers02[27]='h01O'
set udg_integers02[28]='h01U'
set udg_integers02[29]='h01R'
set udg_integers02[30]='h01S'
set udg_integers02[31]='h01P'
set udg_integers02[32]='h01T'
set udg_integers02[33]='h01Q'
set udg_strings04[1]="MrApples"
set udg_strings04[2]="VG_Emblem"
call DestroyTrigger(GetTriggeringTrigger())
endfunction
function BH takes nothing returns nothing
call DialogAddButtonBJ(udg_dialog01,"None")
set udg_button02=bj_lastCreatedButton
call DialogAddButtonBJ(udg_dialog01,"All Random")
set udg_button01=bj_lastCreatedButton
endfunction
function Bi takes nothing returns nothing
call StartTimerBJ(udg_timer01,true,.1)
call StartSound(udg_sound02)
call DialogSetMessage(udg_dialog01,"Pick a Mode")
call DialogDisplayBJ(true,udg_dialog01,udg_player02)
call DisplayTimedTextToForce(udg_force02,60.,"Please note that this is THE official version, created by VG_Emblem, the original creator. This will be the last version, as a new game, Ultimate Legends, will be built from it. If you want details, go to our forums at UltimateLegends.com.")
call DisplayTimedTextToForce(udg_force02,60.,"TRIGSTR_6462")
call DisplayTimedTextToForce(udg_force02,60.,"TRIGSTR_6463")
call DisplayTimedTextToForce(udg_force02,60.,"Give us ideas and suggestions, report bugs, get updates and extras, strategy and a competitive edge as well as knowing in advance what the future brings, and register on our forums at UltimateLegends.com or UltF.tk!")
call AP(65.)
call DestroyTrigger(GetTriggeringTrigger())
endfunction
function BI takes nothing returns boolean
return(IsUnitGroupEmptyBJ(udg_group03))
endfunction
function Bj takes nothing returns nothing
if(BI())then
call DestroyGroup(udg_group03)
set udg_group03=null
call DestroyTrigger(GetTriggeringTrigger())
else
set udg_unit04=GroupPickRandomUnit(udg_group03)
call GroupRemoveUnit(udg_group03,udg_unit04)
call RemoveUnit(udg_unit04)
endif
endfunction
function BJ takes nothing returns boolean
return(udg_units02[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]==null)
endfunction
function Bk takes nothing returns nothing
set udg_player03=GetEnumPlayer()
call SetPlayerStateBJ(GetEnumPlayer(),PLAYER_STATE_RESOURCE_GOLD,(GetPlayerState(GetEnumPlayer(),PLAYER_STATE_RESOURCE_GOLD)-1700))
set udg_location01=GetUnitLoc(udg_units01[(1+GetPlayerId(udg_player03))])
call CreateNUnitsAtLoc(1,udg_integers01[GetRandomInt(1,udg_integer01)],udg_player03,udg_location01,bj_UNIT_FACING)
call RemoveLocation(udg_location01)
if(BJ())then
set udg_units02[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]=bj_lastCreatedUnit
endif
call RemoveUnit(GetSoldUnit())
call UnitAddItemByIdSwapped('I003',bj_lastCreatedUnit)
call UnitAddItemByIdSwapped('bspd',bj_lastCreatedUnit)
endfunction
function BK takes nothing returns nothing
call CreateNUnitsAtLoc(1,'ewsp',GetEnumPlayer(),udg_location01,bj_UNIT_FACING)
endfunction
function Bl takes nothing returns nothing
call CreateNUnitsAtLoc(1,'ewsp',GetEnumPlayer(),udg_location01,bj_UNIT_FACING)
endfunction
function BL takes nothing returns boolean
return(GetClickedButton()==udg_button01)
endfunction
function Bm takes nothing returns nothing
set udg_boolean02=true
if(BL())then
call ForForce(udg_force02,function Bk)
set udg_location01=GetUnitLoc(udg_unit08)
call ForForce(udg_force02,function BK)
call RemoveLocation(udg_location01)
call DisplayTextToForce(udg_force02,"ALL RANDOM MODE HAS BEEN PICKED!!")
else
set udg_location01=GetUnitLoc(udg_unit08)
call ForForce(udg_force02,function Bl)
call DestroyForce(udg_force01)
endif
set udg_location01=null
call DestroyTrigger(GetTriggeringTrigger())
endfunction
function BM takes nothing returns nothing
call CreateNUnitsAtLoc(1,'ewsp',GetEnumPlayer(),udg_location01,bj_UNIT_FACING)
endfunction
function Bn takes nothing returns boolean
return(udg_boolean02==false)
endfunction
function BN takes nothing returns nothing
if(Bn())then
call DialogDisplayBJ(false,udg_dialog01,udg_player02)
set udg_location01=GetUnitLoc(udg_unit08)
call ForForce(udg_force02,function BM)
call DestroyForce(udg_force01)
endif
call DestroyTrigger(GetTriggeringTrigger())
endfunction
function Bo takes nothing returns nothing
set udg_booleans02[(1+GetPlayerId(GetTriggerPlayer()))]=true
set udg_force01=bJ(GetTriggerPlayer())
call DisplayTextToForce(udg_force01,(" |c000CCE0BPassword Accepted, welcome "+(GetPlayerName(GetTriggerPlayer())+"|r")))
call DestroyForce(udg_force01)
set udg_force01=null
endfunction
function BO takes nothing returns boolean
return(StringCase(udg_strings05[bj_forLoopAIndex],false)==StringCase(udg_strings04[bj_forLoopBIndex],false))
endfunction
function Bp takes nothing returns boolean
return(BO())and(udg_booleans02[bj_forLoopAIndex]==false)
endfunction
function BP takes nothing returns nothing
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set bj_forLoopBIndex=1
set bj_forLoopBIndexEnd=12
loop
exitwhen bj_forLoopBIndex>bj_forLoopBIndexEnd
if(Bp())then
set udg_force01=bJ(Player(-1+(bj_forLoopAIndex)))
call DisplayTextToForce(udg_force01,"|c0056D0FFREMINDER: Enter your password now!!!!|r")
call DisplayTextToForce(udg_force01,"|c0056D0FFREMINDER: Enter your password now!!!!|r")
call DisplayTextToForce(udg_force01,"|c0056D0FFREMINDER: Enter your password now!!!!|r")
call DisplayTextToForce(udg_force01,"|c0056D0FFREMINDER: Enter your password now!!!!|r")
call DisplayTextToForce(udg_force01,"|c0056D0FFREMINDER: Enter your password now!!!!|r")
call DestroyForce(udg_force01)
endif
set bj_forLoopBIndex=bj_forLoopBIndex+1
endloop
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set udg_force01=null
endfunction
function Bq takes nothing returns nothing
call SetPlayerTechResearchedSwap('R007',1,GetEnumPlayer())
endfunction
function BQ takes nothing returns nothing
call KillUnit(GetEnumUnit())
endfunction
function Br takes nothing returns boolean
return(StringCase(udg_strings05[bj_forLoopAIndex],false)==StringCase(udg_strings04[bj_forLoopBIndex],false))
endfunction
function BR takes nothing returns boolean
return(Br())and(udg_booleans02[bj_forLoopAIndex]==false)
endfunction
function Bs takes nothing returns nothing
call ForForce(udg_force02,function Bq)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set bj_forLoopBIndex=1
set bj_forLoopBIndexEnd=12
loop
exitwhen bj_forLoopBIndex>bj_forLoopBIndexEnd
if(BR())then
set udg_booleans01[bj_forLoopAIndex]=true
set udg_strings05[bj_forLoopAIndex]="Annoying Spoofer"
set udg_strings06[bj_forLoopAIndex]=(SubStringBJ(udg_strings06[bj_forLoopAIndex],1,10)+("Annoying Spoofer"+"|r"))
call SetPlayerName(Player(-1+(bj_forLoopAIndex)),"Annoying Spoofer")
set udg_group01=bj(Player(-1+(bj_forLoopAIndex)))
call ForGroupBJ(udg_group01,function BQ)
call DestroyGroup(udg_group01)
endif
set bj_forLoopBIndex=bj_forLoopBIndex+1
endloop
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set udg_group01=null
call DestroyTrigger(GetTriggeringTrigger())
endfunction
function BS takes nothing returns boolean
return(udg_units02[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]==null)
endfunction
function Bt takes nothing returns boolean
return(IsUnitType(GetSoldUnit(),UNIT_TYPE_HERO)!=null)
endfunction
function BT takes nothing returns boolean
return(GetUnitTypeId(GetSoldUnit())==udg_integers01[bj_forLoopAIndex])
endfunction
function Bu takes nothing returns boolean
return(udg_booleans04[udg_integer04])
endfunction
function BU takes nothing returns boolean
return(udg_booleans04[udg_integer04])
endfunction
function Bv takes nothing returns boolean
return(udg_booleans04[udg_integer04])
endfunction
function BV takes nothing returns boolean
return(udg_booleans04[udg_integer04])
endfunction
function Bw takes nothing returns boolean
return(udg_booleans04[udg_integer04])
endfunction
function BW takes nothing returns boolean
return(udg_units02[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]==null)
endfunction
function Bx takes nothing returns boolean
return(IsUnitType(GetSoldUnit(),UNIT_TYPE_HERO)!=null)
endfunction
function BX takes nothing returns boolean
return(GetUnitTypeId(GetSoldUnit())!='h004')
endfunction
function By takes nothing returns nothing
set udg_player03=GetOwningPlayer(GetBuyingUnit())
if(BX())then
set udg_location01=GetUnitLoc(udg_units01[(1+GetPlayerId(udg_player03))])
call SetUnitPositionLoc(GetSoldUnit(),udg_location01)
if(Bt())then
call PanCameraToTimedLocForPlayer(GetOwningPlayer(GetBuyingUnit()),udg_location01,1.)
if(BS())then
set udg_units02[(1+GetPlayerId(GetOwningPlayer(GetSoldUnit())))]=GetSoldUnit()
endif
endif
call RemoveLocation(udg_location01)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=udg_integer01
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(BT())then
set udg_booleans04[bj_forLoopAIndex]=true
exitwhen true
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
else
set udg_integer04=GetRandomInt(1,udg_integer01)
if(Bw())then
set udg_integer04=GetRandomInt(1,udg_integer01)
if(BV())then
set udg_integer04=GetRandomInt(1,udg_integer01)
if(Bv())then
set udg_integer04=GetRandomInt(1,udg_integer01)
if(BU())then
set udg_integer04=GetRandomInt(1,udg_integer01)
if(Bu())then
set udg_integer04=GetRandomInt(1,udg_integer01)
else
set udg_booleans04[udg_integer04]=true
endif
else
set udg_booleans04[udg_integer04]=true
endif
else
set udg_booleans04[udg_integer04]=true
endif
else
set udg_booleans04[udg_integer04]=true
endif
else
set udg_booleans04[udg_integer04]=true
endif
set udg_location01=GetUnitLoc(udg_units01[(1+GetPlayerId(udg_player03))])
call CreateNUnitsAtLoc(1,udg_integers01[udg_integer04],udg_player03,udg_location01,bj_UNIT_FACING)
if(Bx())then
call PanCameraToTimedLocForPlayer(GetOwningPlayer(GetBuyingUnit()),udg_location01,1.)
if(BW())then
set udg_units02[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]=bj_lastCreatedUnit
endif
endif
call RemoveLocation(udg_location01)
call RemoveUnit(GetSoldUnit())
call UnitAddItemByIdSwapped('I003',bj_lastCreatedUnit)
call UnitAddItemByIdSwapped('bspd',bj_lastCreatedUnit)
endif
endfunction
function BY takes nothing returns boolean
return(SubStringBJ(GetEventPlayerChatString(),1,6)=="-name ")
endfunction
function Bz takes nothing returns boolean
return(StringLength(GetEventPlayerChatString())>27)
endfunction
function BZ takes nothing returns boolean
return(StringCase(udg_string02,false)==StringCase(udg_strings05[(1+GetPlayerId(GetTriggerPlayer()))],false))
endfunction
function B0 takes nothing returns boolean
return(StringCase(udg_string02,false)==StringCase(GetPlayerName(Player(-1+(bj_forLoopAIndex))),false))or(StringCase(udg_string02,false)==StringCase(udg_strings05[bj_forLoopAIndex],false))or(StringCase(udg_string02,false)==StringCase(udg_strings04[bj_forLoopAIndex],false))
endfunction
function B1 takes nothing returns boolean
return(B0())
endfunction
function B2 takes nothing returns boolean
return(udg_boolean01==false)
endfunction
function B3 takes nothing returns nothing
if(Bz())then
set udg_string02=SubStringBJ(GetEventPlayerChatString(),7,27)
else
set udg_string02=SubStringBJ(GetEventPlayerChatString(),7,StringLength(GetEventPlayerChatString()))
endif
if(BZ())then
call SetPlayerName(GetTriggerPlayer(),udg_string02)
set udg_strings06[(1+GetPlayerId(GetTriggerPlayer()))]=(SubStringBJ(udg_strings06[(1+GetPlayerId(GetTriggerPlayer()))],1,10)+(udg_string02+"|r"))
return
endif
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(B1())then
set udg_boolean01=true
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
if(B2())then
call SetPlayerName(GetTriggerPlayer(),udg_string02)
set udg_strings06[(1+GetPlayerId(GetTriggerPlayer()))]=(SubStringBJ(udg_strings06[(1+GetPlayerId(GetTriggerPlayer()))],1,10)+(udg_string02+"|r"))
else
set udg_string02="ITriedToFrameOthers"
call SetPlayerName(GetTriggerPlayer(),udg_string02)
set udg_strings06[(1+GetPlayerId(GetTriggerPlayer()))]=(SubStringBJ(udg_strings06[(1+GetPlayerId(GetTriggerPlayer()))],1,10)+(udg_string02+"|r"))
endif
set udg_boolean01=false
endfunction
function B4 takes nothing returns boolean
return(SubStringBJ(GetEventPlayerChatString(),1,11)=="-namecheck ")
endfunction
function B5 takes nothing returns boolean
return(StringCase(GetPlayerName(Player(-1+(bj_forLoopAIndex))),false)==StringCase(udg_string01,false))
endfunction
function B6 takes nothing returns nothing
set udg_string01=SubStringBJ(GetEventPlayerChatString(),12,StringLength(GetEventPlayerChatString()))
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(B5())then
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,30,(udg_strings06[bj_forLoopAIndex]+(" real Username is "+udg_strings05[bj_forLoopAIndex])))
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endfunction
function B7 takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false)
endfunction
function B8 takes nothing returns boolean
return(IsUnitAliveBJ(GetFilterUnit()))
endfunction
function B9 takes nothing returns boolean
return GetBooleanAnd(B7(),B8())
endfunction
function ca takes nothing returns nothing
set udg_force01=bJ(GetTriggerPlayer())
set udg_group01=bI(GetTriggerPlayer(),Condition(function B9))
call DisplayTimedTextToForce(udg_force01,30,("You have "+(I2S(CountUnitsInGroup(udg_group01))+" units under your control.")))
call DestroyForce(udg_force01)
call DestroyGroup(udg_group01)
set udg_force01=null
set udg_group01=null
endfunction
function cA takes nothing returns boolean
return(SubStringBJ(GetEventPlayerChatString(),1,5)=="-cam ")
endfunction
function cb takes nothing returns boolean
return(udg_integer02>99)and(udg_integer02<=5000)
endfunction
function cB takes nothing returns boolean
return(SubStringBJ(GetEventPlayerChatString(),7,11)=="reset")
endfunction
function cc takes nothing returns nothing
if(cB())then
call ResetToGameCameraForPlayer(GetTriggerPlayer(),3.)
else
set udg_integer02=S2I(SubStringBJ(GetEventPlayerChatString(),6,9))
if(cb())then
call SetCameraFieldForPlayer(GetTriggerPlayer(),CAMERA_FIELD_TARGET_DISTANCE,I2R(udg_integer02),3.)
endif
endif
endfunction
function cC takes nothing returns boolean
return(udg_integer04<=udg_integer05)
endfunction
function cd takes nothing returns nothing
set udg_integer04=GetRandomInt(1,(udg_integer05*2))
if(cC())then
call StartSound(udg_sound03)
call DisplayTextToForce(udg_force02,(("|c000FC610Tip ("+(I2S(udg_integer04)+(" of "+I2S(udg_integer05))))+(")|r: |c001FF5FF"+(udg_strings08[udg_integer04]+"|r"))))
endif
endfunction
function cD takes nothing returns boolean
return(IsPlayerEnemy(GetOwningPlayer(GetTriggerUnit()),Player(0)))
endfunction
function ce takes nothing returns nothing
set udg_location01=GetRectCenter(udg_rect07)
call SetUnitPositionLoc(GetTriggerUnit(),udg_location01)
call RemoveLocation(udg_location01)
set udg_location01=null
endfunction
function cE takes nothing returns boolean
return(IsPlayerEnemy(GetOwningPlayer(GetTriggerUnit()),Player(3)))
endfunction
function cf takes nothing returns nothing
set udg_location01=GetRectCenter(udg_rect08)
call SetUnitPositionLoc(GetTriggerUnit(),udg_location01)
call RemoveLocation(udg_location01)
set udg_location01=null
endfunction
function cF takes nothing returns boolean
return(IsPlayerEnemy(GetOwningPlayer(GetTriggerUnit()),Player(6)))
endfunction
function cg takes nothing returns nothing
set udg_location01=GetRectCenter(udg_rect09)
call SetUnitPositionLoc(GetTriggerUnit(),udg_location01)
call RemoveLocation(udg_location01)
set udg_location01=null
endfunction
function cG takes nothing returns boolean
return(IsPlayerEnemy(GetOwningPlayer(GetTriggerUnit()),Player(9)))
endfunction
function ch takes nothing returns nothing
set udg_location01=GetRectCenter(udg_rect10)
call SetUnitPositionLoc(GetTriggerUnit(),udg_location01)
call RemoveLocation(udg_location01)
set udg_location01=null
endfunction
function cH takes nothing returns boolean
return(ModuloInteger(udg_integer08,udg_integers05[udg_integer02])==0)
endfunction
function ci takes nothing returns boolean
return(RectContainsUnit(udg_rect19,udg_units02[bj_forLoopAIndex]))
endfunction
function cI takes nothing returns boolean
return(ModuloInteger(udg_integer08,10)==0)
endfunction
function cj takes nothing returns nothing
set udg_integer08=(udg_integer08+1)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=udg_integer09
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_integer02=(1+GetPlayerId(udg_players02[bj_forLoopAIndex]))
if(cH())then
set udg_location01=GetUnitLoc(udg_units01[udg_integer02])
call CreateNUnitsAtLoc(1,udg_integers04[udg_integers03[udg_integer02]],udg_players02[bj_forLoopAIndex],udg_location01,bj_UNIT_FACING)
call RemoveLocation(udg_location01)
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
if(cI())then
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(ci())then
call AdjustPlayerStateBJ(3,GetOwningPlayer(udg_units02[bj_forLoopAIndex]),PLAYER_STATE_RESOURCE_GOLD)
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endif
set udg_location01=null
endfunction
function cJ takes nothing returns boolean
return(RectContainsUnit(udg_rect19,udg_units02[bj_forLoopAIndex]))
endfunction
function ck takes nothing returns nothing
set udg_location01=GetUnitLoc(udg_units01[(1+GetPlayerId(GetEnumPlayer()))])
call CreateNUnitsAtLoc(1,'hfoo',GetEnumPlayer(),udg_location01,bj_UNIT_FACING)
call RemoveLocation(udg_location01)
endfunction
function cK takes nothing returns nothing
set udg_location01=GetUnitLoc(udg_units01[(1+GetPlayerId(GetEnumPlayer()))])
call CreateNUnitsAtLoc(2,'uskm',GetEnumPlayer(),udg_location01,bj_UNIT_FACING)
call RemoveLocation(udg_location01)
endfunction
function cl takes nothing returns nothing
set udg_location01=GetUnitLoc(udg_units01[(1+GetPlayerId(GetEnumPlayer()))])
call CreateNUnitsAtLoc(1,'n018',GetEnumPlayer(),udg_location01,bj_UNIT_FACING)
call RemoveLocation(udg_location01)
endfunction
function cL takes nothing returns nothing
set udg_location01=GetUnitLoc(udg_units01[(1+GetPlayerId(GetEnumPlayer()))])
call CreateNUnitsAtLoc(2,'n01G',GetEnumPlayer(),udg_location01,bj_UNIT_FACING)
call RemoveLocation(udg_location01)
endfunction
function cm takes nothing returns nothing
set udg_location01=GetUnitLoc(udg_units01[(1+GetPlayerId(GetEnumPlayer()))])
call CreateNUnitsAtLoc(2,'efdr',GetEnumPlayer(),udg_location01,bj_UNIT_FACING)
call RemoveLocation(udg_location01)
endfunction
function cM takes nothing returns nothing
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(cJ())then
call AdjustPlayerStateBJ(18,GetOwningPlayer(udg_units02[bj_forLoopAIndex]),PLAYER_STATE_RESOURCE_GOLD)
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call ForForce(udg_forces01[1],function ck)
call ForForce(udg_forces01[12],function cK)
call ForForce(udg_forces01[22],function cl)
call ForForce(udg_forces01[23],function cL)
call ForForce(udg_forces01[33],function cm)
endfunction
function cn takes nothing returns nothing
set udg_location01=GetUnitLoc(udg_units01[(1+GetPlayerId(GetEnumPlayer()))])
call CreateNUnitsAtLoc(2,'hmil',GetEnumPlayer(),udg_location01,bj_UNIT_FACING)
call RemoveLocation(udg_location01)
endfunction
function cN takes nothing returns nothing
set udg_location01=GetUnitLoc(udg_units01[(1+GetPlayerId(GetEnumPlayer()))])
call CreateNUnitsAtLoc(1,'hspt',GetEnumPlayer(),udg_location01,bj_UNIT_FACING)
call RemoveLocation(udg_location01)
endfunction
function co takes nothing returns nothing
set udg_location01=GetUnitLoc(udg_units01[(1+GetPlayerId(GetEnumPlayer()))])
call CreateNUnitsAtLoc(1,'hrif',GetEnumPlayer(),udg_location01,bj_UNIT_FACING)
call RemoveLocation(udg_location01)
endfunction
function cO takes nothing returns nothing
set udg_location01=GetUnitLoc(udg_units01[(1+GetPlayerId(GetEnumPlayer()))])
call CreateNUnitsAtLoc(1,'ugho',GetEnumPlayer(),udg_location01,bj_UNIT_FACING)
call RemoveLocation(udg_location01)
endfunction
function cp takes nothing returns nothing
set udg_location01=GetUnitLoc(udg_units01[(1+GetPlayerId(GetEnumPlayer()))])
call CreateNUnitsAtLoc(1,'e00N',GetEnumPlayer(),udg_location01,bj_UNIT_FACING)
call RemoveLocation(udg_location01)
endfunction
function cP takes nothing returns nothing
call ForForce(udg_forces01[6],function cn)
call ForForce(udg_forces01[10],function cN)
call ForForce(udg_forces01[2],function co)
call ForForce(udg_forces01[4],function cO)
call ForForce(udg_forces01[32],function cp)
endfunction
function cq takes nothing returns nothing
set udg_location01=GetUnitLoc(udg_units01[(1+GetPlayerId(GetEnumPlayer()))])
call CreateNUnitsAtLoc(1,'otbk',GetEnumPlayer(),udg_location01,bj_UNIT_FACING)
call RemoveLocation(udg_location01)
endfunction
function cQ takes nothing returns nothing
set udg_location01=GetUnitLoc(udg_units01[(1+GetPlayerId(GetEnumPlayer()))])
call CreateNUnitsAtLoc(1,'ucry',GetEnumPlayer(),udg_location01,bj_UNIT_FACING)
call RemoveLocation(udg_location01)
endfunction
function cr takes nothing returns nothing
set udg_location01=GetUnitLoc(udg_units01[(1+GetPlayerId(GetEnumPlayer()))])
call CreateNUnitsAtLoc(1,'orai',GetEnumPlayer(),udg_location01,bj_UNIT_FACING)
call RemoveLocation(udg_location01)
endfunction
function cR takes nothing returns nothing
set udg_location01=GetUnitLoc(udg_units01[(1+GetPlayerId(GetEnumPlayer()))])
call CreateNUnitsAtLoc(2,'earc',GetEnumPlayer(),udg_location01,bj_UNIT_FACING)
call RemoveLocation(udg_location01)
endfunction
function cs takes nothing returns nothing
set udg_location01=GetUnitLoc(udg_units01[(1+GetPlayerId(GetEnumPlayer()))])
call CreateNUnitsAtLoc(1,'echm',GetEnumPlayer(),udg_location01,bj_UNIT_FACING)
call RemoveLocation(udg_location01)
endfunction
function cS takes nothing returns nothing
set udg_location01=GetUnitLoc(udg_units01[(1+GetPlayerId(GetEnumPlayer()))])
call CreateNUnitsAtLoc(1,'esen',GetEnumPlayer(),udg_location01,bj_UNIT_FACING)
call RemoveLocation(udg_location01)
endfunction
function ct takes nothing returns nothing
set udg_location01=GetUnitLoc(udg_units01[(1+GetPlayerId(GetEnumPlayer()))])
call CreateNUnitsAtLoc(1,'e00D',GetEnumPlayer(),udg_location01,bj_UNIT_FACING)
call RemoveLocation(udg_location01)
endfunction
function cT takes nothing returns nothing
set udg_location01=GetUnitLoc(udg_units01[(1+GetPlayerId(GetEnumPlayer()))])
call CreateNUnitsAtLoc(1,'edry',GetEnumPlayer(),udg_location01,bj_UNIT_FACING)
call RemoveLocation(udg_location01)
endfunction
function cu takes nothing returns nothing
set udg_location01=GetUnitLoc(udg_units01[(1+GetPlayerId(GetEnumPlayer()))])
call CreateNUnitsAtLoc(1,'hkni',GetEnumPlayer(),udg_location01,bj_UNIT_FACING)
call RemoveLocation(udg_location01)
endfunction
function cU takes nothing returns nothing
set udg_location01=GetUnitLoc(udg_units01[(1+GetPlayerId(GetEnumPlayer()))])
call CreateNUnitsAtLoc(1,'hhes',GetEnumPlayer(),udg_location01,bj_UNIT_FACING)
call RemoveLocation(udg_location01)
endfunction
function cv takes nothing returns nothing
call ForForce(udg_forces01[7],function cq)
call ForForce(udg_forces01[8],function cQ)
call ForForce(udg_forces01[11],function cr)
call ForForce(udg_forces01[5],function cR)
call ForForce(udg_forces01[21],function cs)
call ForForce(udg_forces01[9],function cS)
call ForForce(udg_forces01[17],function ct)
call ForForce(udg_forces01[13],function cT)
call ForForce(udg_forces01[14],function cu)
call ForForce(udg_forces01[26],function cU)
endfunction
function cV takes nothing returns nothing
set udg_location01=GetUnitLoc(udg_units01[(1+GetPlayerId(GetEnumPlayer()))])
call CreateNUnitsAtLoc(1,'ogru',GetEnumPlayer(),udg_location01,bj_UNIT_FACING)
call RemoveLocation(udg_location01)
endfunction
function cw takes nothing returns nothing
set udg_location01=GetUnitLoc(udg_units01[(1+GetPlayerId(GetEnumPlayer()))])
call CreateNUnitsAtLoc(1,'n01I',GetEnumPlayer(),udg_location01,bj_UNIT_FACING)
call RemoveLocation(udg_location01)
endfunction
function cW takes nothing returns nothing
set udg_location01=GetUnitLoc(udg_units01[(1+GetPlayerId(GetEnumPlayer()))])
call CreateNUnitsAtLoc(1,'nw2w',GetEnumPlayer(),udg_location01,bj_UNIT_FACING)
call RemoveLocation(udg_location01)
endfunction
function cx takes nothing returns nothing
call ForForce(udg_forces01[3],function cV)
call ForForce(udg_forces01[24],function cw)
call ForForce(udg_forces01[28],function cW)
endfunction
function cX takes nothing returns nothing
set udg_location01=GetUnitLoc(udg_units01[(1+GetPlayerId(GetEnumPlayer()))])
call CreateNUnitsAtLoc(1,'uabo',GetEnumPlayer(),udg_location01,bj_UNIT_FACING)
call RemoveLocation(udg_location01)
endfunction
function cy takes nothing returns nothing
set udg_location01=GetUnitLoc(udg_units01[(1+GetPlayerId(GetEnumPlayer()))])
call CreateNUnitsAtLoc(1,'otau',GetEnumPlayer(),udg_location01,bj_UNIT_FACING)
call RemoveLocation(udg_location01)
endfunction
function cY takes nothing returns nothing
set udg_location01=GetUnitLoc(udg_units01[(1+GetPlayerId(GetEnumPlayer()))])
call CreateNUnitsAtLoc(1,'hgry',GetEnumPlayer(),udg_location01,bj_UNIT_FACING)
call RemoveLocation(udg_location01)
endfunction
function cz takes nothing returns nothing
set udg_location01=GetUnitLoc(udg_units01[(1+GetPlayerId(GetEnumPlayer()))])
call CreateNUnitsAtLoc(1,'ufro',GetEnumPlayer(),udg_location01,bj_UNIT_FACING)
call RemoveLocation(udg_location01)
endfunction
function cZ takes nothing returns nothing
set udg_location01=GetUnitLoc(udg_units01[(1+GetPlayerId(GetEnumPlayer()))])
call CreateNUnitsAtLoc(1,'owyv',GetEnumPlayer(),udg_location01,bj_UNIT_FACING)
call RemoveLocation(udg_location01)
endfunction
function c0 takes nothing returns nothing
set udg_location01=GetUnitLoc(udg_units01[(1+GetPlayerId(GetEnumPlayer()))])
call CreateNUnitsAtLoc(1,'uobs',GetEnumPlayer(),udg_location01,bj_UNIT_FACING)
call RemoveLocation(udg_location01)
endfunction
function c1 takes nothing returns nothing
set udg_location01=GetUnitLoc(udg_units01[(1+GetPlayerId(GetEnumPlayer()))])
call CreateNUnitsAtLoc(1,'ugar',GetEnumPlayer(),udg_location01,bj_UNIT_FACING)
call RemoveLocation(udg_location01)
endfunction
function c2 takes nothing returns nothing
call ForForce(udg_forces01[16],function cX)
call ForForce(udg_forces01[15],function cy)
call ForForce(udg_forces01[18],function cY)
call ForForce(udg_forces01[20],function cz)
call ForForce(udg_forces01[29],function cZ)
call ForForce(udg_forces01[30],function c0)
call ForForce(udg_forces01[31],function c1)
endfunction
function c3 takes nothing returns nothing
set udg_location01=GetUnitLoc(udg_units01[(1+GetPlayerId(GetEnumPlayer()))])
call CreateNUnitsAtLoc(1,'okod',GetEnumPlayer(),udg_location01,bj_UNIT_FACING)
call RemoveLocation(udg_location01)
endfunction
function c4 takes nothing returns nothing
set udg_location01=GetUnitLoc(udg_units01[(1+GetPlayerId(GetEnumPlayer()))])
call CreateNUnitsAtLoc(1,'hmtm',GetEnumPlayer(),udg_location01,bj_UNIT_FACING)
call RemoveLocation(udg_location01)
endfunction
function c5 takes nothing returns nothing
call ForForce(udg_forces01[19],function c3)
call ForForce(udg_forces01[27],function c4)
endfunction
function c6 takes nothing returns nothing
set udg_location01=GetUnitLoc(udg_units01[(1+GetPlayerId(GetEnumPlayer()))])
call CreateNUnitsAtLoc(1,'n03A',GetEnumPlayer(),udg_location01,bj_UNIT_FACING)
call RemoveLocation(udg_location01)
endfunction
function c7 takes nothing returns nothing
call ForForce(udg_forces01[25],function c6)
endfunction
function c8 takes nothing returns boolean
return(GetTriggerUnit()==udg_units01[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
endfunction
function c9 takes nothing returns boolean
return(GetUnitTypeId(udg_unit01)==udg_integers02[bj_forLoopAIndex])
endfunction
function Ca takes nothing returns nothing
set udg_unit01=GetTriggerUnit()
set udg_player01=GetOwningPlayer(udg_unit01)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=33
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(c9())then
call ForceAddPlayer(udg_forces01[bj_forLoopAIndex],udg_player01)
else
call ForceRemovePlayer(udg_forces01[bj_forLoopAIndex],udg_player01)
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endfunction
function CA takes nothing returns boolean
return(GetDyingUnit()==udg_units01[(1+GetPlayerId(GetOwningPlayer(GetDyingUnit())))])
endfunction
function Cb takes nothing returns nothing
call KillUnit(GetEnumUnit())
call RemoveUnit(GetEnumUnit())
endfunction
function CB takes nothing returns boolean
return(IsPlayerEnemy(GetFilterPlayer(),GetEnumPlayer()))
endfunction
function Cc takes nothing returns boolean
return(IsPlayerInForce(GetFilterPlayer(),udg_force02))
endfunction
function CC takes nothing returns boolean
return GetBooleanAnd(CB(),Cc())
endfunction
function Cd takes nothing returns nothing
call DisplayTimedTextToForce(udg_force02,30,"Game Victory in 60 Seconds!")
call TriggerSleepAction(60.)
call CustomVictoryBJ(GetEnumPlayer(),true,true)
endfunction
function CD takes nothing returns boolean
return(CountPlayersInForceBJ(udg_force01)==0)
endfunction
function Ce takes nothing returns nothing
set udg_force01=bK(Condition(function CC))
if(CD())then
call ForForce(udg_force02,function Cd)
endif
call DestroyForce(udg_force01)
endfunction
function CE takes nothing returns nothing
set udg_unit04=GetDyingUnit()
set udg_player01=GetOwningPlayer(udg_unit04)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=25
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call ForceRemovePlayer(udg_forces01[bj_forLoopAIndex],udg_player01)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call DisplayTextToForce(udg_force02,(udg_strings06[(1+GetPlayerId(GetTriggerPlayer()))]+"|cffff0000 has been defeated!!|r"))
set udg_group01=bj(udg_player01)
call ForGroupBJ(udg_group01,function Cb)
call DestroyGroup(udg_group01)
call ForceRemovePlayer(udg_force02,udg_player01)
call ForForce(udg_force02,function Ce)
endfunction
function Cf takes nothing returns boolean
return(IsPlayerInForce(udg_player01,udg_force02))
endfunction
function CF takes nothing returns boolean
return(GetFilterPlayer()!=udg_player01)
endfunction
function Cg takes nothing returns boolean
return GetBooleanAnd(Cf(),CF())
endfunction
function CG takes nothing returns boolean
return(IsPlayerAlly(GetFilterPlayer(),udg_player01))
endfunction
function Ch takes nothing returns boolean
return GetBooleanAnd(Cg(),CG())
endfunction
function CH takes nothing returns nothing
call AdjustPlayerStateBJ(udg_integer02,GetEnumPlayer(),PLAYER_STATE_RESOURCE_GOLD)
call DisplayTimedTextToForce(udg_force01,30,("You have recieved |cffffcc00"+(I2S(udg_integer02)+("|r in compensation for the leaving of your ally, "+(udg_strings06[(1+GetPlayerId(udg_player01))]+", please do not leave also, it ruins the game.")))))
endfunction
function Ci takes nothing returns boolean
return(CountPlayersInForceBJ(udg_force01)==0)
endfunction
function CI takes nothing returns nothing
call KillUnit(GetEnumUnit())
endfunction
function Cj takes nothing returns boolean
return(IsPlayerEnemy(GetFilterPlayer(),GetEnumPlayer()))
endfunction
function CJ takes nothing returns boolean
return(IsPlayerInForce(GetFilterPlayer(),udg_force02))
endfunction
function Ck takes nothing returns boolean
return GetBooleanAnd(Cj(),CJ())
endfunction
function CK takes nothing returns nothing
call CustomVictoryBJ(GetEnumPlayer(),true,true)
endfunction
function Cl takes nothing returns boolean
return(CountPlayersInForceBJ(udg_force01)==0)
endfunction
function CL takes nothing returns nothing
set udg_force01=bK(Condition(function Ck))
if(Cl())then
call DisplayTimedTextToForce(udg_force02,30,"Game Victory in 60 Seconds!")
call TriggerSleepAction(60.)
call ForForce(bk(GetEnumPlayer()),function CK)
endif
call DestroyForce(udg_force01)
endfunction
function Cm takes nothing returns nothing
set udg_player01=GetTriggerPlayer()
set udg_force01=bK(Condition(function Ch))
set udg_integer02=(((GetHeroLevel(udg_units02[(1+GetPlayerId(udg_player01))])*300)+((GetUnitFoodMade(udg_units01[(1+GetPlayerId(udg_player01))])*'d')+GetPlayerState(udg_player01,PLAYER_STATE_RESOURCE_GOLD)))/CountPlayersInForceBJ(udg_force01))
if(Ci())then
else
call ForForce(udg_force01,function CH)
endif
call DestroyForce(udg_force01)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=25
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call ForceRemovePlayer(udg_forces01[bj_forLoopAIndex],udg_player01)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call DisplayTextToForce(udg_force02,(udg_strings06[(1+GetPlayerId(GetTriggerPlayer()))]+"|cffff0000 has contracted herpes.|r"))
call DisableTrigger(udg_trigger31)
set udg_group01=bj(udg_player01)
call ForGroupBJ(udg_group01,function CI)
call DestroyGroup(udg_group01)
call EnableTrigger(udg_trigger31)
call ForceRemovePlayer(udg_force02,udg_player01)
call ForForce(udg_force02,function CL)
set udg_force01=null
set udg_force03=null
endfunction
function CM takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='N02P')and(Av(GetTriggerUnit(),'I00M'))
endfunction
function Cn takes nothing returns nothing
call UnitDropItemPointLoc(GetTriggerUnit(),GetFilterItem(),GetItemLoc(bj_lastCreatedItem))
call DisplayTextToForce(udg_force01,"King Kilvas may not carry that item.")
endfunction
function CN takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='N02P')and(Av(GetTriggerUnit(),'oli2'))
endfunction
function Co takes nothing returns nothing
call UnitDropItemPointLoc(GetTriggerUnit(),GetFilterItem(),GetItemLoc(bj_lastCreatedItem))
call DisplayTextToForce(udg_force01,"King Kilvas may not carry that item.")
endfunction
function CO takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='N02P')and(Av(GetTriggerUnit(),'ofir'))
endfunction
function Cp takes nothing returns nothing
call UnitDropItemPointLoc(GetTriggerUnit(),GetFilterItem(),GetItemLoc(bj_lastCreatedItem))
call DisplayTextToForce(udg_force01,"King Kilvas may not carry that item.")
endfunction
function CP takes nothing returns boolean
return(GetSpellAbilityId()=='A02Z')and(UnitHasBuffBJ(GetTriggerUnit(),'B00O'))and(UnitHasBuffBJ(GetTriggerUnit(),'Bams'))
endfunction
function Cq takes nothing returns nothing
call UnitRemoveAbility(GetTriggerUnit(),'Bams')
call UnitRemoveAbility(GetTriggerUnit(),'Bam2')
endfunction
function CQ takes nothing returns boolean
return GetSpellAbilityId()=='A08B'
endfunction
function Cr takes nothing returns nothing
local unit CR
local unit Cs
local unit CS
local location Ct
local location CT
local group Cu
set CR=GetSpellAbilityUnit()
call SetUnitInvulnerable(CR,true)
call ShowUnitHide(CR)
set CT=GetUnitLoc(CR)
call CreateNUnitsAtLoc(1,'e007',GetOwningPlayer(CR),CT,bj_UNIT_FACING)
set Cs=bj_lastCreatedUnit
call SetUnitInvulnerable(Cs,true)
set Cu=bh((300.+(200.*I2R(GetUnitAbilityLevelSwapped('A08B',CR)))),CT)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=4
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set CS=GroupPickRandomUnit(Cu)
set Ct=GetUnitLoc(CS)
call AddSpecialEffectLocBJ(Ct,"Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl")
call RemoveLocation(Ct)
call DestroyEffect(bj_lastCreatedEffect)
call TriggerSleepAction(.4)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call DestroyGroup(Cu)
set Cu=bh((300.+(200.*I2R(GetUnitAbilityLevelSwapped('A08B',CR)))),CT)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=5
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set CS=GroupPickRandomUnit(Cu)
set Ct=GetUnitLoc(CS)
call AddSpecialEffectLocBJ(Ct,"Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl")
call RemoveLocation(Ct)
call DestroyEffect(bj_lastCreatedEffect)
call TriggerSleepAction(.3)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call DestroyGroup(Cu)
set Cu=bh((300.+(200.*I2R(GetUnitAbilityLevelSwapped('A08B',CR)))),CT)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=6
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set CS=GroupPickRandomUnit(Cu)
set Ct=GetUnitLoc(CS)
call AddSpecialEffectLocBJ(Ct,"Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl")
call RemoveLocation(Ct)
call DestroyEffect(bj_lastCreatedEffect)
call TriggerSleepAction(.2)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call DestroyGroup(Cu)
set Cu=bh((300.+(200.*I2R(GetUnitAbilityLevelSwapped('A08B',CR)))),CT)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=7
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set CS=GroupPickRandomUnit(Cu)
set Ct=GetUnitLoc(CS)
call AddSpecialEffectLocBJ(Ct,"Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl")
call RemoveLocation(Ct)
call DestroyEffect(bj_lastCreatedEffect)
call TriggerSleepAction(.15)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call DestroyGroup(Cu)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call SetUnitInvulnerable(udg_units01[bj_forLoopAIndex],true)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call UnitDamagePointLoc(CR,0,(300.+(200.*I2R(GetUnitAbilityLevelSwapped('A08B',CR)))),CT,1000000.,ATTACK_TYPE_MELEE,DAMAGE_TYPE_NORMAL)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call SetUnitInvulnerable(udg_units01[bj_forLoopAIndex],false)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call SetUnitInvulnerable(CR,false)
call UnitApplyTimedLifeBJ(1.,'BTLF',CR)
call UnitApplyTimedLifeBJ(1.,'BTLF',Cs)
call RemoveLocation(CT)
set Ct=null
set CT=null
set Cu=null
endfunction
function CU takes nothing returns boolean
return(GetSpellAbilityId()=='A09L')
endfunction
function Cv takes nothing returns nothing
call CreateNUnitsAtLoc(1,'u013',GetOwningPlayer(GetTriggerUnit()),udg_location01,bj_UNIT_FACING)
call SetUnitAbilityLevelSwapped('A09K',bj_lastCreatedUnit,GetUnitAbilityLevelSwapped('A09L',GetTriggerUnit()))
call IssueTargetOrderById(bj_lastCreatedUnit,852583,GetEnumUnit())
call UnitApplyTimedLifeBJ(1.,'BTLF',bj_lastCreatedUnit)
endfunction
function CV takes nothing returns nothing
set udg_location01=GetSpellTargetLoc()
set udg_group01=bh(300.,udg_location01)
call ForGroupBJ(udg_group01,function Cv)
call DestroyGroup(udg_group01)
call RemoveLocation(udg_location01)
set udg_group01=null
set udg_location01=null
endfunction
function Cw takes nothing returns boolean
return(GetSpellAbilityId()=='A00O')
endfunction
function CW takes nothing returns nothing
call CreateNUnitsAtLoc(1,'u013',GetOwningPlayer(GetTriggerUnit()),udg_location01,bj_UNIT_FACING)
call SetUnitAbilityLevelSwapped('A01O',bj_lastCreatedUnit,GetUnitAbilityLevelSwapped('A00O',GetTriggerUnit()))
call IssueTargetOrderById(bj_lastCreatedUnit,852527,GetEnumUnit())
call UnitApplyTimedLifeBJ(1.,'BTLF',bj_lastCreatedUnit)
endfunction
function Cx takes nothing returns nothing
set udg_location01=GetSpellTargetLoc()
set udg_group01=bh(175.,udg_location01)
call ForGroupBJ(udg_group01,function CW)
call DestroyGroup(udg_group01)
call RemoveLocation(udg_location01)
set udg_group01=null
set udg_location01=null
endfunction
function CX takes nothing returns boolean
return(udg_integer04<=(15+0))
endfunction
function Cy takes nothing returns boolean
return(udg_integer04<=(8+0))
endfunction
function CY takes nothing returns boolean
return(UnitHasBuffBJ(GetAttacker(),'B00P'))
endfunction
function Cz takes nothing returns boolean
return(UnitHasBuffBJ(GetTriggerUnit(),'B00J'))
endfunction
function CZ takes nothing returns boolean
return(UnitHasBuffBJ(GetTriggerUnit(),'B00I'))
endfunction
function C0 takes nothing returns boolean
return(UnitHasBuffBJ(GetTriggerUnit(),'B00H'))
endfunction
function C1 takes nothing returns boolean
return(UnitHasBuffBJ(GetTriggerUnit(),'B00G'))
endfunction
function C2 takes nothing returns boolean
return(UnitHasBuffBJ(GetTriggerUnit(),'B00F'))
endfunction
function C3 takes nothing returns boolean
return(UnitHasBuffBJ(GetTriggerUnit(),'B00E'))
endfunction
function C4 takes nothing returns boolean
return(UnitHasBuffBJ(GetTriggerUnit(),'B00D'))
endfunction
function C5 takes nothing returns boolean
return(UnitHasBuffBJ(GetTriggerUnit(),'B003'))
endfunction
function C6 takes nothing returns boolean
return(IsPlayerAlly(GetOwningPlayer(GetTriggerUnit()),GetOwningPlayer(GetAttacker())))
endfunction
function C7 takes nothing returns nothing
if(C6())then
call IssueImmediateOrderById(GetAttacker(),851972)
else
if(C5())then
set udg_integer04=GetRandomInt(1,'d')
if(CX())then
set udg_location01=GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc(1,'u013',GetOwningPlayer(GetTriggerUnit()),udg_location01,bj_UNIT_FACING)
call RemoveLocation(udg_location01)
call SetUnitAbilityLevelSwapped('A00W',bj_lastCreatedUnit,GetUnitAbilityLevelSwapped('A019',GetTriggerUnit()))
call IssueImmediateOrderById(bj_lastCreatedUnit,852096)
call UnitApplyTimedLifeBJ(1.,'BTLF',bj_lastCreatedUnit)
set udg_location01=null
endif
else
if(C4())then
set udg_location01=GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc(1,'u013',GetOwningPlayer(GetTriggerUnit()),udg_location01,bj_UNIT_FACING)
call RemoveLocation(udg_location01)
call SetUnitAbilityLevelSwapped('A00M',bj_lastCreatedUnit,1)
call IssueTargetOrderById(bj_lastCreatedUnit,852662,GetAttacker())
call UnitApplyTimedLifeBJ(1.,'BTLF',bj_lastCreatedUnit)
set udg_location01=null
else
if(C3())then
set udg_location01=GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc(1,'u013',GetOwningPlayer(GetTriggerUnit()),udg_location01,bj_UNIT_FACING)
call RemoveLocation(udg_location01)
call SetUnitAbilityLevelSwapped('A00M',bj_lastCreatedUnit,2)
call IssueTargetOrderById(bj_lastCreatedUnit,852662,GetAttacker())
call UnitApplyTimedLifeBJ(1.,'BTLF',bj_lastCreatedUnit)
set udg_location01=null
else
if(C2())then
set udg_location01=GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc(1,'u013',GetOwningPlayer(GetTriggerUnit()),udg_location01,bj_UNIT_FACING)
call RemoveLocation(udg_location01)
call SetUnitAbilityLevelSwapped('A00M',bj_lastCreatedUnit,3)
call IssueTargetOrderById(bj_lastCreatedUnit,852662,GetAttacker())
call UnitApplyTimedLifeBJ(1.,'BTLF',bj_lastCreatedUnit)
set udg_location01=null
else
if(C1())then
set udg_location01=GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc(1,'u013',GetOwningPlayer(GetTriggerUnit()),udg_location01,bj_UNIT_FACING)
call RemoveLocation(udg_location01)
call SetUnitAbilityLevelSwapped('A00M',bj_lastCreatedUnit,4)
call IssueTargetOrderById(bj_lastCreatedUnit,852662,GetAttacker())
call UnitApplyTimedLifeBJ(1.,'BTLF',bj_lastCreatedUnit)
set udg_location01=null
else
if(C0())then
set udg_location01=GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc(1,'u013',GetOwningPlayer(GetTriggerUnit()),udg_location01,bj_UNIT_FACING)
call RemoveLocation(udg_location01)
call SetUnitAbilityLevelSwapped('A00M',bj_lastCreatedUnit,5)
call IssueTargetOrderById(bj_lastCreatedUnit,852662,GetAttacker())
call UnitApplyTimedLifeBJ(1.,'BTLF',bj_lastCreatedUnit)
set udg_location01=null
else
if(CZ())then
set udg_location01=GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc(1,'u013',GetOwningPlayer(GetTriggerUnit()),udg_location01,bj_UNIT_FACING)
call RemoveLocation(udg_location01)
call SetUnitAbilityLevelSwapped('A00M',bj_lastCreatedUnit,6)
call IssueTargetOrderById(bj_lastCreatedUnit,852662,GetAttacker())
call UnitApplyTimedLifeBJ(1.,'BTLF',bj_lastCreatedUnit)
set udg_location01=null
else
if(Cz())then
set udg_location01=GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc(1,'u013',GetOwningPlayer(GetTriggerUnit()),udg_location01,bj_UNIT_FACING)
call RemoveLocation(udg_location01)
call SetUnitAbilityLevelSwapped('A00M',bj_lastCreatedUnit,7)
call IssueTargetOrderById(bj_lastCreatedUnit,852662,GetAttacker())
call UnitApplyTimedLifeBJ(1.,'BTLF',bj_lastCreatedUnit)
set udg_location01=null
else
if(CY())then
set udg_integer04=GetRandomInt(1,'d')
if(Cy())then
set udg_location01=GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc(1,'u013',GetOwningPlayer(GetTriggerUnit()),udg_location01,bj_UNIT_FACING)
call RemoveLocation(udg_location01)
call SetUnitAbilityLevelSwapped('A09S',bj_lastCreatedUnit,GetUnitAbilityLevelSwapped('A09P',GetTriggerUnit()))
call IssueTargetOrderById(bj_lastCreatedUnit,852665,GetTriggerUnit())
call UnitApplyTimedLifeBJ(1.,'BTLF',bj_lastCreatedUnit)
set udg_location01=null
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endfunction
function C8 takes nothing returns boolean
return(R2I(GetUnitStateSwap(UNIT_STATE_LIFE,udg_unit07))>udg_integer07)
endfunction
function C9 takes nothing returns boolean
return(IsUnitAliveBJ(GetFilterUnit()))
endfunction
function da takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_MAGIC_IMMUNE)==false)
endfunction
function dA takes nothing returns boolean
return GetBooleanAnd(C9(),da())
endfunction
function db takes nothing returns boolean
return(IsPlayerEnemy(GetOwningPlayer(GetFilterUnit()),GetOwningPlayer(GetTriggerUnit())))
endfunction
function dB takes nothing returns boolean
return(IsUnitInGroup(GetFilterUnit(),udg_group04))
endfunction
function dc takes nothing returns boolean
return(IsUnitInGroup(GetFilterUnit(),udg_group05)==false)
endfunction
function dC takes nothing returns boolean
return GetBooleanAnd(dB(),dc())
endfunction
function dd takes nothing returns boolean
return GetBooleanAnd(db(),dC())
endfunction
function dD takes nothing returns boolean
return(IsUnitGroupEmptyBJ(udg_group01))
endfunction
function de takes nothing returns boolean
return(udg_unit07==null)
endfunction
function dE takes nothing returns boolean
return(GetSpellAbilityId()=='A000')
endfunction
function df takes nothing returns nothing
call CreateNUnitsAtLoc(1,'u013',GetOwningPlayer(GetTriggerUnit()),udg_location01,bj_UNIT_FACING)
call SetUnitAbilityLevelSwapped('A00G',bj_lastCreatedUnit,GetUnitAbilityLevelSwapped('A00Y',GetTriggerUnit()))
call IssueTargetOrderById(bj_lastCreatedUnit,852486,GetEnumUnit())
call UnitApplyTimedLifeBJ(1.,'BTLF',bj_lastCreatedUnit)
endfunction
function dF takes nothing returns boolean
return(GetSpellAbilityId()=='A00Y')
endfunction
function dg takes nothing returns boolean
return(IsUnitInGroup(GetTriggerUnit(),udg_group01))
endfunction
function dG takes nothing returns boolean
return(GetSpellAbilityId()=='A01A')
endfunction
function dh takes nothing returns boolean
return(GetSpellAbilityId()=='A092')
endfunction
function dH takes nothing returns boolean
return(IsUnitAliveBJ(GetFilterUnit()))
endfunction
function di takes nothing returns boolean
return(IsUnitInGroup(GetFilterUnit(),udg_group02)==false)
endfunction
function dI takes nothing returns boolean
return GetBooleanAnd(dH(),di())
endfunction
function dj takes nothing returns boolean
return(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(udg_unit03)))
endfunction
function dJ takes nothing returns boolean
return GetBooleanAnd(dI(),dj())
endfunction
function dk takes nothing returns boolean
return(IsUnitGroupEmptyBJ(udg_group01))
endfunction
function dK takes nothing returns boolean
return(GetSpellAbilityId()=='A085')
endfunction
function dl takes nothing returns boolean
return(GetSpellAbilityId()=='A099')
endfunction
function dL takes nothing returns boolean
return(GetFilterUnit()!=udg_unit01)
endfunction
function dm takes nothing returns nothing
call CreateNUnitsAtLoc(1,'u013',GetOwningPlayer(udg_unit01),udg_location01,bj_UNIT_FACING)
call SetUnitAbilityLevelSwapped('A08T',bj_lastCreatedUnit,GetUnitAbilityLevelSwapped('A08U',udg_unit01))
call IssueTargetOrderById(bj_lastCreatedUnit,852092,GetEnumUnit())
call UnitApplyTimedLifeBJ(1.,'BTLF',bj_lastCreatedUnit)
endfunction
function dM takes nothing returns boolean
return(GetSpellAbilityId()=='A08U')
endfunction
function dn takes nothing returns boolean
return(GetSpellAbilityId()=='A02J')
endfunction
function dN takes nothing returns nothing
if(dn())then
call UnitAddAbility(GetSpellAbilityUnit(),'A08Z')
call SetUnitAbilityLevelSwapped('A08Z',GetSpellAbilityUnit(),GetUnitAbilityLevelSwapped('A02J',GetSpellAbilityUnit()))
else
if(dM())then
set udg_unit01=GetSpellAbilityUnit()
set udg_location01=GetSpellTargetLoc()
set udg_group01=bF(300.,udg_location01,Condition(function dL))
call ForGroupBJ(udg_group01,function dm)
call RemoveLocation(udg_location01)
call DestroyGroup(udg_group01)
set udg_location01=null
set udg_group01=null
else
if(dl())then
call AddWeatherEffectSaveLast(udg_rect01,'SNbs')
set udg_weathereffect01=bj_lastCreatedWeatherEffect
call EnableWeatherEffect(udg_weathereffect01,true)
call AP(30.)
call RemoveWeatherEffect(udg_weathereffect01)
else
if(dK())then
set udg_unit03=GetSpellAbilityUnit()
call SetUnitVertexColorBJ(udg_unit03,'d','d','d',40.)
call AddSpecialEffectTargetUnitBJ("weapon",udg_unit03,"Abilities\\Weapons\\PhoenixMissile\\Phoenix_Missile.mdl")
set udg_effect01=bj_lastCreatedEffect
set udg_unit02=GetSpellTargetUnit()
set udg_location01=GetUnitLoc(udg_unit02)
call SetUnitPositionLoc(udg_unit03,udg_location01)
call RemoveLocation(udg_location01)
call bN(udg_unit03,udg_unit02,0)
call SetUnitAnimation(udg_unit03,"attack")
call UnitDamageTargetBJ(udg_unit03,udg_unit02,(175.+(115.*(I2R(GetUnitAbilityLevelSwapped('A085',udg_unit03))-1))),ATTACK_TYPE_HERO,DAMAGE_TYPE_NORMAL)
set udg_unit02=null
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=(2+(GetUnitAbilityLevelSwapped('A085',udg_unit03)*1))
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_location01=GetUnitLoc(udg_unit03)
set udg_group01=bF((500.+(50.*I2R(GetUnitAbilityLevelSwapped('A085',udg_unit03)))),udg_location01,Condition(function dJ))
if(dk())then
exitwhen true
else
set udg_unit02=GroupPickRandomUnit(udg_group01)
set udg_location02=GetUnitLoc(udg_unit02)
call SetUnitPositionLoc(udg_unit03,udg_location02)
call bN(udg_unit03,udg_unit02,0)
call SetUnitAnimation(udg_unit03,"attack")
call UnitDamageTargetBJ(udg_unit03,udg_unit02,(150.+(130.*(I2R(GetUnitAbilityLevelSwapped('A085',udg_unit03))-1))),ATTACK_TYPE_HERO,DAMAGE_TYPE_NORMAL)
call RemoveLocation(udg_location01)
call RemoveLocation(udg_location02)
call DestroyGroup(udg_group01)
call AP(.2)
call GroupAddUnit(udg_group02,udg_unit02)
set udg_unit02=null
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call SetUnitVertexColorBJ(udg_unit03,'d','d','d',.0)
call DestroyEffect(udg_effect01)
call DestroyGroup(udg_group02)
set udg_location01=null
set udg_location02=null
set udg_group01=null
set udg_group02=null
else
if(dh())then
call UnitApplyTimedLifeBJ(4.,'BTLF',GetSpellAbilityUnit())
else
if(dG())then
set udg_unit05=GetSpellTargetUnit()
call SetUnitPathing(GetTriggerUnit(),false)
call PauseUnit(udg_unit05,true)
call SetUnitMoveSpeed(GetTriggerUnit(),522.)
call TriggerSleepAction(.02)
set udg_location01=GetUnitLoc(udg_unit05)
call IssuePointOrderByIdLoc(GetTriggerUnit(),851986,udg_location01)
call RemoveLocation(udg_location01)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=20
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call AP(.25)
set udg_location01=GetUnitLoc(udg_unit05)
set udg_group01=bh(200.,udg_location01)
if(dg())then
call bN(GetTriggerUnit(),udg_unit05,0)
call SetUnitAnimation(GetTriggerUnit(),"attack")
call SetUnitMoveSpeed(GetTriggerUnit(),GetUnitDefaultMoveSpeed(GetTriggerUnit()))
call SetUnitPathing(GetTriggerUnit(),true)
call PlaySoundOnUnitBJ(udg_sound05,'d',udg_unit05)
call ExplodeUnitBJ(udg_unit05)
call CreateNUnitsAtLoc(1,'u013',GetOwningPlayer(GetTriggerUnit()),udg_location01,bj_UNIT_FACING)
call SetUnitAbilityLevelSwapped('A00S',bj_lastCreatedUnit,GetUnitAbilityLevelSwapped('A01A',GetTriggerUnit()))
call IssueImmediateOrderById(bj_lastCreatedUnit,852526)
call UnitApplyTimedLifeBJ(3.,'BTLF',bj_lastCreatedUnit)
call DestroyGroup(udg_group01)
call RemoveLocation(udg_location01)
set udg_group01=null
set udg_location01=null
return
exitwhen true
else
call DestroyGroup(udg_group01)
call RemoveLocation(udg_location01)
set udg_group01=null
set udg_location01=null
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
else
if(dF())then
set udg_location01=GetSpellTargetLoc()
set udg_group01=bh(240.,udg_location01)
call ForGroupBJ(udg_group01,function df)
call DestroyGroup(udg_group01)
call RemoveLocation(udg_location01)
set udg_group01=null
set udg_location01=null
else
if(dE())then
set udg_integer06=0
set udg_integer07=(200*GetUnitAbilityLevelSwapped('A000',GetTriggerUnit()))
set udg_unit06=GetTriggerUnit()
set udg_unit07=GetSpellTargetUnit()
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=(2*GetUnitAbilityLevelSwapped('A000',GetTriggerUnit()))
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(de())then
call DestroyGroup(udg_group05)
set udg_group05=null
exitwhen true
else
set udg_location01=GetUnitLoc(udg_unit06)
set udg_location02=GetUnitLoc(udg_unit07)
call AddLightningLoc("CLPB",udg_location01,udg_location02)
set udg_lightning01=bj_lastCreatedLightning
call RemoveLocation(udg_location01)
call AddSpecialEffectTargetUnitBJ("origin",udg_unit07,"Abilities\\Weapons\\Bolt\\BoltImpact.mdl")
set udg_effect02=bj_lastCreatedEffect
call PlaySoundOnUnitBJ(udg_sound04,'d',udg_unit07)
if(C8())then
set udg_integer06=(udg_integer06+udg_integer07)
call UnitDamageTargetBJ(GetTriggerUnit(),udg_unit07,I2R(udg_integer07),ATTACK_TYPE_NORMAL,DAMAGE_TYPE_LIGHTNING)
else
set udg_integer06=(udg_integer06+R2I(GetUnitStateSwap(UNIT_STATE_LIFE,udg_unit07)))
call UnitDamageTargetBJ(GetTriggerUnit(),udg_unit07,I2R(udg_integer07),ATTACK_TYPE_NORMAL,DAMAGE_TYPE_LIGHTNING)
endif
set udg_unit06=udg_unit07
set udg_integer07=((udg_integer07/10)*9)
set udg_location01=GetUnitLoc(GetTriggerUnit())
set udg_group04=bF(600.,udg_location01,Condition(function dA))
set udg_group01=bF(400.,udg_location02,Condition(function dd))
if(dD())then
set udg_unit07=null
else
set udg_unit07=GroupPickRandomUnit(udg_group01)
call GroupAddUnit(udg_group05,udg_unit07)
endif
call RemoveLocation(udg_location01)
call RemoveLocation(udg_location02)
call DestroyGroup(udg_group01)
call DestroyGroup(udg_group04)
set udg_location01=null
set udg_location02=null
set udg_group01=null
set udg_group04=null
call AP(.25)
call DestroyLightning(udg_lightning01)
call DestroyEffect(udg_effect02)
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set udg_integer06=(udg_integer06/2)
set udg_unit07=GetTriggerUnit()
set udg_location01=GetUnitLoc(udg_unit06)
set udg_location02=GetUnitLoc(udg_unit07)
call AddLightningLoc("CLPB",udg_location01,udg_location02)
set udg_lightning01=bj_lastCreatedLightning
call AddSpecialEffectTargetUnitBJ("origin",udg_unit07,"Abilities\\Weapons\\Bolt\\BoltImpact.mdl")
set udg_effect02=bj_lastCreatedEffect
call PlaySoundOnUnitBJ(udg_sound04,'d',udg_unit07)
call SetWidgetLife(GetTriggerUnit(),(GetUnitStateSwap(UNIT_STATE_LIFE,GetTriggerUnit())+I2R(udg_integer06)))
call RemoveLocation(udg_location01)
call RemoveLocation(udg_location02)
call DestroyGroup(udg_group05)
set udg_location01=null
set udg_location02=null
set udg_group05=null
call AP(.25)
call DestroyLightning(udg_lightning01)
endif
endif
endif
endif
endif
endif
endif
endif
endfunction
function do takes nothing returns boolean
return(GetSpellAbilityId()=='A02J')
endfunction
function dO takes nothing returns nothing
if(do())then
call UnitRemoveAbility(GetTriggerUnit(),'A08Z')
endif
endfunction
function main2 takes nothing returns nothing
local weathereffect we
local player p
local unit u
local integer unitID
local trigger t
local real life
local integer Au
local integer dp
local version v
local integer bx
local integer i
call SetCameraBounds(-4992.+GetCameraMargin(CAMERA_MARGIN_LEFT),-5376.+GetCameraMargin(CAMERA_MARGIN_BOTTOM),5248.-GetCameraMargin(CAMERA_MARGIN_RIGHT),4736.-GetCameraMargin(CAMERA_MARGIN_TOP),-4992.+GetCameraMargin(CAMERA_MARGIN_LEFT),4736.-GetCameraMargin(CAMERA_MARGIN_TOP),5248.-GetCameraMargin(CAMERA_MARGIN_RIGHT),-5376.+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.,100000.)
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("Sound\\Interface\\AutoCastButtonClick1.wav",false,false,false,10,10,"")
call SetSoundParamsFromLabel(udg_sound03,"AutoCastButtonClick")
call SetSoundDuration(udg_sound03,1132)
set udg_sound04=CreateSound("Abilities\\Spells\\Orc\\LightningBolt\\LightningBolt.wav",false,true,true,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(udg_sound04,"LightningBolt")
call SetSoundDuration(udg_sound04,2136)
set udg_sound05=CreateSound("Sound\\Units\\Death\\ArtilleryCorpseExplodeDeath1.wav",false,true,true,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(udg_sound05,"ArtilleryExplodeDeath")
call SetSoundDuration(udg_sound05,1486)
set udg_rect02=Rect(-4512.,-928.,-3104.,384.)
set udg_rect03=Rect(-2304.,-2592.,2304.,2080.)
set udg_rect04=Rect(-576.,2528.,672.,3808.)
set udg_rect05=Rect(-576.,-4736.,640.,-3456.)
set udg_rect06=Rect(-5536.,576.,-1504.,4576.)
set udg_rect07=Rect(-4832.,640.,-1120.,4256.)
set udg_rect08=Rect(1088.,736.,4928.,4512.)
set udg_rect09=Rect(1088.,-5184.,4896.,-1248.)
set udg_rect10=Rect(-4800.,-5120.,-1088.,-1216.)
set udg_rect11=Rect(-4800.,2240.,-3904.,2816.)
set udg_rect12=Rect(4032.,1952.,4928.,2528.)
set udg_rect13=Rect(-4800.,-3424.,-3904.,-2848.)
set udg_rect14=Rect(4000.,-3360.,4896.,-2784.)
set udg_rect15=Rect(-3168.,3584.,-2592.,4416.)
set udg_rect16=Rect(2560.,3680.,3136.,4512.)
set udg_rect17=Rect(2464.,-5152.,3040.,-4320.)
set udg_rect18=Rect(-3296.,-5024.,-2720.,-4192.)
set udg_rect19=Rect(-1152.,-1184.,1152.,640.)
call SetPlayerTechResearched(Player(0),'Rhrt',1)
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),'Rhrt',1)
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),'Rhrt',1)
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),'Rhrt',1)
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),'Rhrt',1)
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),'Rhrt',1)
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),'Rhrt',1)
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),'Rhrt',1)
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),'Rhrt',1)
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),'Rhrt',1)
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),'Rhrt',1)
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),'Rhrt',1)
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)
set p=Player(15)
set u=CreateUnit(p,'n000',.0,-256.,270.)
set u=CreateUnit(p,'ntav',-3456.,-128.,270.)
call SetUnitColor(u,ConvertPlayerColor(0))
set u=CreateUnit(p,'n002',-4032.,-512.,270.)
call SetUnitColor(u,ConvertPlayerColor(0))
set u=CreateUnit(p,'n003',-4224.,-128.,270.)
call SetUnitColor(u,ConvertPlayerColor(0))
set u=CreateUnit(p,'n007',-3264.,3968.,270.)
set u=CreateUnit(p,'n007',2880.,4352.,270.)
set u=CreateUnit(p,'n007',4736.,-3072.,270.)
set u=CreateUnit(p,'n007',-4608.,-3136.,270.)
set u=CreateUnit(p,'n00R',-2496.,3968.,270.)
call SetUnitColor(u,ConvertPlayerColor(10))
set u=CreateUnit(p,'n00R',3264.,4096.,270.)
call SetUnitColor(u,ConvertPlayerColor(10))
set u=CreateUnit(p,'n00R',4480.,-2624.,270.)
call SetUnitColor(u,ConvertPlayerColor(10))
set u=CreateUnit(p,'n00R',-4352.,-2752.,270.)
call SetUnitColor(u,ConvertPlayerColor(10))
set u=CreateUnit(p,'n01K',-3648.,-512.,270.)
call SetUnitColor(u,ConvertPlayerColor(0))
set u=CreateUnit(p,'nmrk',-2112.,-256.,270.)
call SetUnitColor(u,ConvertPlayerColor(0))
set u=CreateUnit(p,'nmrk',2176.,-256.,270.)
call SetUnitColor(u,ConvertPlayerColor(0))
set u=CreateUnit(p,'n004',.0,1856.,270.)
call SetUnitColor(u,ConvertPlayerColor(0))
set u=CreateUnit(p,'n004',.0,-2432.,270.)
call SetUnitColor(u,ConvertPlayerColor(0))
set u=CreateUnit(p,'n00O',-3840.,128.,270.)
call SetUnitColor(u,ConvertPlayerColor(0))
set u=CreateUnit(p,'n012',-2880.,4224.,270.)
set u=CreateUnit(p,'n012',2496.,4096.,270.)
set u=CreateUnit(p,'n012',4480.,-3456.,270.)
set u=CreateUnit(p,'n012',-4352.,-3520.,270.)
set udg_unit08=CreateUnit(p,'n04I',-3840.,-128.,270.)
call SetUnitColor(udg_unit08,ConvertPlayerColor(0))
set u=CreateUnit(p,'n012',-4608.,2496.,270.)
set u=CreateUnit(p,'n007',-4352.,2112.,270.)
set u=CreateUnit(p,'n00R',-4352.,2880.,270.)
call SetUnitColor(u,ConvertPlayerColor(10))
set u=CreateUnit(p,'n012',4480.,2624.,270.)
set u=CreateUnit(p,'n007',4736.,2240.,270.)
set u=CreateUnit(p,'n00R',4480.,1856.,270.)
call SetUnitColor(u,ConvertPlayerColor(10))
set u=CreateUnit(p,'n007',2752.,-4992.,270.)
set u=CreateUnit(p,'n00R',3136.,-4736.,270.)
call SetUnitColor(u,ConvertPlayerColor(10))
set u=CreateUnit(p,'n012',2368.,-4736.,270.)
set u=CreateUnit(p,'n007',-3008.,-4864.,270.)
set u=CreateUnit(p,'n00R',-3392.,-4608.,270.)
call SetUnitColor(u,ConvertPlayerColor(10))
set u=CreateUnit(p,'n012',-2624.,-4608.,270.)
set p=Player(0)
set u=CreateUnit(p,'hwtw',-3456.,3264.,270.)
set u=CreateUnit(p,'hwtw',-3712.,3008.,270.)
set u=CreateUnit(p,'hbar',-3328.,2880.,270.)
set p=Player(1)
set u=CreateUnit(p,'hwtw',-1984.,3264.,270.)
set u=CreateUnit(p,'hwtw',-1472.,3264.,270.)
set u=CreateUnit(p,'hbar',-1728.,3008.,270.)
set p=Player(2)
set u=CreateUnit(p,'hwtw',-3648.,1600.,270.)
set u=CreateUnit(p,'hwtw',-3648.,1088.,270.)
set u=CreateUnit(p,'hbar',-3392.,1344.,270.)
set p=Player(3)
set u=CreateUnit(p,'hwtw',3456.,3328.,270.)
set u=CreateUnit(p,'hwtw',3712.,3072.,270.)
set u=CreateUnit(p,'hbar',3328.,2944.,270.)
set p=Player(4)
set u=CreateUnit(p,'hbar',1728.,3136.,270.)
set u=CreateUnit(p,'hwtw',1984.,3392.,270.)
set u=CreateUnit(p,'hwtw',1472.,3392.,270.)
set p=Player(5)
set u=CreateUnit(p,'hwtw',3776.,1088.,270.)
set u=CreateUnit(p,'hwtw',3776.,1600.,270.)
set u=CreateUnit(p,'hbar',3520.,1344.,270.)
set p=Player(6)
set u=CreateUnit(p,'hwtw',3712.,-3648.,270.)
set u=CreateUnit(p,'hwtw',3456.,-3904.,270.)
set u=CreateUnit(p,'hbar',3328.,-3520.,270.)
set p=Player(7)
set u=CreateUnit(p,'hwtw',1536.,-4032.,270.)
set u=CreateUnit(p,'hwtw',2048.,-4032.,270.)
set u=CreateUnit(p,'hbar',1792.,-3776.,270.)
set p=Player(8)
set u=CreateUnit(p,'hbar',3456.,-1920.,270.)
set u=CreateUnit(p,'hwtw',3712.,-1664.,270.)
set u=CreateUnit(p,'hwtw',3712.,-2176.,270.)
set p=Player(9)
set u=CreateUnit(p,'hwtw',-3456.,-3904.,270.)
set u=CreateUnit(p,'hwtw',-3712.,-3648.,270.)
set u=CreateUnit(p,'hbar',-3328.,-3520.,270.)
set p=Player(10)
set u=CreateUnit(p,'hwtw',-1472.,-3904.,270.)
set u=CreateUnit(p,'hwtw',-1984.,-3904.,270.)
set u=CreateUnit(p,'hbar',-1728.,-3648.,270.)
set p=Player(11)
set u=CreateUnit(p,'hbar',-3392.,-1856.,270.)
set u=CreateUnit(p,'hwtw',-3648.,-2112.,270.)
set u=CreateUnit(p,'hwtw',-3648.,-1600.,270.)
set p=Player(15)
set u=CreateUnit(p,'earc',61.8,3222.9,135.993)
set u=CreateUnit(p,'esen',37.4,3397.1,359.561)
set u=CreateUnit(p,'edry',-4.3,3308.8,176.259)
call SetUnitState(u,UNIT_STATE_MANA,0)
set u=CreateUnit(p,'e00D',102.6,3062.2,171.007)
set u=CreateUnit(p,'echm',62.7,3024.1,203.594)
set u=CreateUnit(p,'ewsp',50.1,3124.5,183.62)
set u=CreateUnit(p,'hpea',25.,3257.2,268.184)
set u=CreateUnit(p,'hfoo',-135.1,3458.,235.73)
set u=CreateUnit(p,'hkni',-109.6,3369.4,160.339)
set u=CreateUnit(p,'hrif',-126.,3296.6,56.779)
set u=CreateUnit(p,'hmtm',-109.5,3221.2,145.749)
set u=CreateUnit(p,'hgry',-71.8,3168.6,78.708)
set u=CreateUnit(p,'hmpr',-31.9,3245.,43.287)
call SetUnitState(u,UNIT_STATE_MANA,0)
set u=CreateUnit(p,'hsor',-51.6,3330.8,294.673)
call SetUnitState(u,UNIT_STATE_MANA,0)
set u=CreateUnit(p,'hspt',-58.3,3415.1,288.993)
call SetUnitState(u,UNIT_STATE_MANA,0)
set u=CreateUnit(p,'hmtt',-60.6,3148.5,230.918)
set u=CreateUnit(p,'uaco',103.7,3516.6,201.331)
set u=CreateUnit(p,'ugho',128.4,3454.,209.604)
set u=CreateUnit(p,'uabo',140.2,3349.6,37.596)
call SetUnitState(u,UNIT_STATE_MANA,0)
set u=CreateUnit(p,'umtw',163.4,3255.4,22.215)
set u=CreateUnit(p,'ucry',157.3,3150.1,75.138)
call SetUnitState(u,UNIT_STATE_MANA,0)
set u=CreateUnit(p,'uban',176.6,3510.9,93.024)
call SetUnitState(u,UNIT_STATE_MANA,0)
set u=CreateUnit(p,'unec',202.6,3453.8,10.295)
call SetUnitState(u,UNIT_STATE_MANA,0)
set u=CreateUnit(p,'uobs',233.9,3357.3,25.907)
call SetUnitState(u,UNIT_STATE_MANA,0)
set u=CreateUnit(p,'ufro',252.3,3262.8,19.391)
call SetUnitState(u,UNIT_STATE_MANA,0)
set u=CreateUnit(p,'opeo',40.6,3093.,225.567)
set u=CreateUnit(p,'ogru',-138.8,3126.6,89.003)
set u=CreateUnit(p,'orai',16.6,3048.1,325.711)
set u=CreateUnit(p,'otau',-96.,3042.1,274.282)
set u=CreateUnit(p,'ohun',-37.3,2987.,330.764)
set u=CreateUnit(p,'ocat',46.6,2945.2,285.082)
set u=CreateUnit(p,'okod',158.5,2906.3,212.185)
set u=CreateUnit(p,'n03A',233.1,3158.8,277.128)
set u=CreateUnit(p,'n018',418.5,3248.1,336.774)
call SetUnitState(u,UNIT_STATE_MANA,0)
set u=CreateUnit(p,'n01G',387.7,3142.2,13.832)
call SetUnitState(u,UNIT_STATE_MANA,0)
set u=CreateUnit(p,'n01I',302.8,3064.3,186.773)
call SetUnitState(u,UNIT_STATE_MANA,0)
set u=CreateUnit(p,'N00H',201.1,-3840.6,78.159)
set u=CreateUnit(p,'N00D',325.6,-3823.4,191.706)
set u=CreateUnit(p,'O009',410.7,-4161.6,337.752)
set u=CreateUnit(p,'N035',213.7,-4137.5,215.745)
set u=CreateUnit(p,'N02X',245.3,-3921.3,112.394)
set u=CreateUnit(p,'N038',285.2,-4078.2,29.093)
set u=CreateUnit(p,'N02W',149.,-4070.6,266.756)
set u=CreateUnit(p,'U011',35.4,-4037.4,119.469)
set u=CreateUnit(p,'U00F',-364.6,-4025.4,325.282)
set u=CreateUnit(p,'N025',384.7,-4088.2,175.369)
set u=CreateUnit(p,'N00I',311.,-3962.4,150.473)
set u=CreateUnit(p,'N02D',25.6,-3577.1,73.083)
set u=CreateUnit(p,'N01L',70.1,-4263.5,228.94)
set u=CreateUnit(p,'N01Q',354.8,-4314.3,193.684)
set u=CreateUnit(p,'N03I',55.9,-3720.6,191.234)
set u=CreateUnit(p,'N02P',277.8,-4190.1,74.292)
set u=CreateUnit(p,'O00Q',86.7,-3858.8,236.422)
set u=CreateUnit(p,'O00D',-48.1,-4132.6,36.058)
set u=CreateUnit(p,'N00P',-68.6,-4053.8,271.469)
set u=CreateUnit(p,'N00C',394.,-3846.2,35.707)
set u=CreateUnit(p,'U00H',285.5,-3754.7,303.979)
set u=CreateUnit(p,'U00B',-316.9,-4091.8,143.046)
set u=CreateUnit(p,'H00Z',-142.2,-4137.5,147.826)
set u=CreateUnit(p,'O006',183.,-4006.,298.892)
set u=CreateUnit(p,'O004',-213.5,-4119.9,29.774)
set u=CreateUnit(p,'H019',116.2,-4159.2,294.574)
set u=CreateUnit(p,'H00A',148.6,-3888.8,150.122)
set u=CreateUnit(p,'H017',173.2,-4254.5,180.731)
set u=CreateUnit(p,'N00M',415.8,-3679.3,229.775)
set u=CreateUnit(p,'O000',-133.4,-4363.4,85.861)
set u=CreateUnit(p,'E00C',53.5,-3955.7,130.324)
set u=CreateUnit(p,'E00E',34.3,-4113.,193.783)
set u=CreateUnit(p,'E003',-259.3,-4018.8,304.429)
set u=CreateUnit(p,'h004',3.9,-4159.2,120.842)
set u=CreateUnit(p,'U005',-295.,-3626.7,293.663)
set u=CreateUnit(p,'Udre',-21.2,-3869.9,230.28)
call SetUnitState(u,UNIT_STATE_MANA,0)
set u=CreateUnit(p,'Ulic',-39.9,-3801.6,215.624)
call SetUnitState(u,UNIT_STATE_MANA,0)
set u=CreateUnit(p,'Udea',-43.4,-3718.8,254.385)
call SetUnitState(u,UNIT_STATE_MANA,0)
set u=CreateUnit(p,'Ewar',-127.4,-3975.6,171.809)
call SetUnitState(u,UNIT_STATE_MANA,0)
set u=CreateUnit(p,'Edem',-98.3,-3880.5,88.783)
call SetUnitState(u,UNIT_STATE_MANA,0)
set u=CreateUnit(p,'Emoo',-122.5,-3819.8,10.591)
call SetUnitState(u,UNIT_STATE_MANA,0)
set u=CreateUnit(p,'Ekee',-135.3,-3738.,326.699)
call SetUnitState(u,UNIT_STATE_MANA,0)
set u=CreateUnit(p,'Oshd',-203.7,-3985.5,273.546)
call SetUnitState(u,UNIT_STATE_MANA,0)
set u=CreateUnit(p,'Otch',-226.9,-3887.4,170.996)
call SetUnitState(u,UNIT_STATE_MANA,0)
set u=CreateUnit(p,'Ofar',-211.7,-3794.2,224.271)
call SetUnitState(u,UNIT_STATE_MANA,0)
set u=CreateUnit(p,'Obla',-234.5,-3715.,219.426)
call SetUnitState(u,UNIT_STATE_MANA,0)
set u=CreateUnit(p,'H009',-355.2,-3957.5,117.667)
set u=CreateUnit(p,'Hmkg',-336.7,-3884.,350.134)
call SetUnitState(u,UNIT_STATE_MANA,0)
set u=CreateUnit(p,'Hpal',-349.8,-3722.7,170.271)
call SetUnitState(u,UNIT_STATE_MANA,0)
set u=CreateUnit(p,'Hamg',-331.3,-3808.9,4.966)
call SetUnitState(u,UNIT_STATE_MANA,0)
set u=CreateUnit(p,'H01L',-209.3,-4201.8,339.697)
set u=CreateUnit(p,'N04A',-64.1,-4238.7,259.868)
set u=CreateUnit(p,'H01M',177.,-3610.6,5.032)
set u=CreateUnit(p,'N036',257.4,-4006.1,359.407)
set u=CreateUnit(p,'O00Q',248.7,-3644.4,226.204)
set u=CreateUnit(p,'N04D',-43.,-3949.8,236.268)
set u=CreateUnit(p,'N04C',-135.1,-3622.1,313.724)
set u=CreateUnit(p,'e00N',312.6,2954.6,168.162)
set u=CreateUnit(p,'efdr',290.3,3054.1,289.301)
set u=CreateUnit(p,'uobs',181.2,2992.4,112.284)
set u=CreateUnit(p,'nw2w',382.3,3042.1,219.755)
set u=CreateUnit(p,'hhes',240.,3156.6,327.468)
set u=CreateUnit(p,'hmtm',179.1,3074.5,92.145)
call ConfigureNeutralVictim()
set filterIssueHauntOrderAtLocBJ=Filter(function IssueHauntOrderAtLocBJFilter)
set filterEnumDestructablesInCircleBJ=Filter(function A1)
set filterGetUnitsInRectOfPlayer=Filter(function GetUnitsInRectOfPlayerFilter)
set filterGetUnitsOfTypeIdAll=Filter(function GetUnitsOfTypeIdAllFilter)
set filterGetUnitsOfPlayerAndTypeId=Filter(function GetUnitsOfPlayerAndTypeIdFilter)
set filterMeleeTrainedUnitIsHeroBJ=Filter(function MeleeTrainedUnitIsHeroBJFilter)
set filterLivingPlayerUnitsOfTypeId=Filter(function bl)
set Au=0
loop
exitwhen Au==16
set bj_FORCE_PLAYER[Au]=CreateForce()
call ForceAddPlayer(bj_FORCE_PLAYER[Au],Player(Au))
set Au=Au+1
endloop
set bj_FORCE_ALL_PLAYERS=CreateForce()
call ForceEnumPlayers(bj_FORCE_ALL_PLAYERS,null)
set bj_cineModePriorSpeed=GetGameSpeed()
set bj_cineModePriorFogSetting=IsFogEnabled()
set bj_cineModePriorMaskSetting=IsFogMaskEnabled()
set Au=0
loop
exitwhen Au>=bj_MAX_QUEUED_TRIGGERS
set bj_queuedExecTriggers[Au]=null
set bj_queuedExecUseConds[Au]=false
set Au=Au+1
endloop
set bj_isSinglePlayer=false
set dp=0
set Au=0
loop
exitwhen Au>=12
if(GetPlayerController(Player(Au))==MAP_CONTROL_USER and GetPlayerSlotState(Player(Au))==PLAYER_SLOT_STATE_PLAYING)then
set dp=dp+1
endif
set Au=Au+1
endloop
set bj_isSinglePlayer=(dp==1)
set bj_rescueSound=CreateSoundFromLabel("Rescue",false,false,false,10000,10000)
set bj_questDiscoveredSound=CreateSoundFromLabel("QuestNew",false,false,false,10000,10000)
set bj_questUpdatedSound=CreateSoundFromLabel("QuestUpdate",false,false,false,10000,10000)
set bj_questCompletedSound=CreateSoundFromLabel("QuestCompleted",false,false,false,10000,10000)
set bj_questFailedSound=CreateSoundFromLabel("QuestFailed",false,false,false,10000,10000)
set bj_questHintSound=CreateSoundFromLabel("Hint",false,false,false,10000,10000)
set bj_questSecretSound=CreateSoundFromLabel("SecretFound",false,false,false,10000,10000)
set bj_questItemAcquiredSound=CreateSoundFromLabel("ItemReward",false,false,false,10000,10000)
set bj_questWarningSound=CreateSoundFromLabel("Warning",false,false,false,10000,10000)
set bj_victoryDialogSound=CreateSoundFromLabel("QuestCompleted",false,false,false,10000,10000)
set bj_defeatDialogSound=CreateSoundFromLabel("QuestFailed",false,false,false,10000,10000)
set bj_delayedSuspendDecayTrig=CreateTrigger()
call TriggerRegisterTimerExpireEvent(bj_delayedSuspendDecayTrig,bj_delayedSuspendDecayTimer)
call TriggerAddAction(bj_delayedSuspendDecayTrig,function AX)
set v=VersionGet()
if(v==VERSION_REIGN_OF_CHAOS)then
set bj_MELEE_MAX_TWINKED_HEROES=bj_MELEE_MAX_TWINKED_HEROES_V0
else
set bj_MELEE_MAX_TWINKED_HEROES=bj_MELEE_MAX_TWINKED_HEROES_V1
endif
call InitQueuedTriggers()
call bS()
call InitDNCSounds()
call InitMapRects()
call InitSummonableCaps()
set bx=0
loop
set bj_stockAllowedPermanent[bx]=false
set bj_stockAllowedCharged[bx]=false
set bj_stockAllowedArtifact[bx]=false
set bx=bx+1
exitwhen bx>10
endloop
call SetAllItemTypeSlots(11)
call SetAllUnitTypeSlots(11)
set bj_stockUpdateTimer=CreateTimer()
call TimerStart(bj_stockUpdateTimer,bj_STOCK_RESTOCK_INITIAL_DELAY,false,function bZ)
set bj_stockItemPurchased=CreateTrigger()
call TriggerRegisterPlayerUnitEvent(bj_stockItemPurchased,Player(15),EVENT_PLAYER_UNIT_SELL_ITEM,null)
call TriggerAddAction(bj_stockItemPurchased,function RemovePurchasedItem)
call DetectGameStarted()
set i=0
set i=0
loop
exitwhen(i>33)
set udg_forces01[i]=CreateForce()
set i=i+1
endloop
set i=0
loop
exitwhen(i>1)
set udg_strings01[i]=""
set udg_strings02[i]=""
set udg_strings03[i]=""
set udg_strings04[i]=""
set udg_booleans01[i]=false
set udg_strings05[i]=""
set udg_strings06[i]=""
set udg_booleans02[i]=false
set udg_booleans03[i]=false
set udg_strings07[i]=""
set udg_booleans04[i]=false
set udg_strings08[i]=""
set udg_integers03[i]=0
set udg_integers05[i]=0
set udg_integers06[i]=0
set i=i+1
endloop
set udg_dialog01=DialogCreate()
call TriggerAddAction(udg_trigger01,function Bg)
call TriggerAddAction(udg_trigger02,function BG)
call TriggerAddAction(udg_trigger03,function Bh)
call TriggerAddAction(udg_trigger04,function BH)
call TriggerRegisterTimerEventSingle(udg_trigger05,.01)
call TriggerAddAction(udg_trigger05,function Bi)
call TriggerRegisterTimerEventPeriodic(udg_trigger06,.5)
call TriggerAddAction(udg_trigger06,function Bj)
call TriggerRegisterDialogEvent(udg_trigger07,udg_dialog01)
call TriggerAddAction(udg_trigger07,function Bm)
call TriggerRegisterTimerEventSingle(udg_trigger08,30.)
call TriggerAddAction(udg_trigger08,function BN)
call TriggerRegisterPlayerChatEvent(udg_trigger09,Player(0),"applesnacks",true)
call TriggerRegisterPlayerChatEvent(udg_trigger09,Player(1),"applesnacks",true)
call TriggerRegisterPlayerChatEvent(udg_trigger09,Player(2),"applesnacks",true)
call TriggerRegisterPlayerChatEvent(udg_trigger09,Player(3),"applesnacks",true)
call TriggerRegisterPlayerChatEvent(udg_trigger09,Player(4),"applesnacks",true)
call TriggerRegisterPlayerChatEvent(udg_trigger09,Player(5),"applesnacks",true)
call TriggerRegisterPlayerChatEvent(udg_trigger09,Player(6),"applesnacks",true)
call TriggerRegisterPlayerChatEvent(udg_trigger09,Player(7),"applesnacks",true)
call TriggerRegisterPlayerChatEvent(udg_trigger09,Player(8),"applesnacks",true)
call TriggerRegisterPlayerChatEvent(udg_trigger09,Player(9),"applesnacks",true)
call TriggerRegisterPlayerChatEvent(udg_trigger09,Player(10),"applesnacks",true)
call TriggerRegisterPlayerChatEvent(udg_trigger09,Player(11),"applesnacks",true)
call TriggerAddAction(udg_trigger09,function Bo)
call TriggerRegisterTimerEventSingle(udg_trigger10,90.)
call TriggerAddAction(udg_trigger10,function BP)
call TriggerRegisterTimerEventSingle(udg_trigger11,180.)
call TriggerAddAction(udg_trigger11,function Bs)
call TriggerRegisterAnyUnitEventBJ(udg_trigger12,EVENT_PLAYER_UNIT_SELL)
call TriggerAddAction(udg_trigger12,function By)
call TriggerRegisterPlayerChatEvent(udg_trigger13,Player(0),"-name ",false)
call TriggerRegisterPlayerChatEvent(udg_trigger13,Player(1),"-name ",false)
call TriggerRegisterPlayerChatEvent(udg_trigger13,Player(2),"-name ",false)
call TriggerRegisterPlayerChatEvent(udg_trigger13,Player(3),"-name ",false)
call TriggerRegisterPlayerChatEvent(udg_trigger13,Player(4),"-name ",false)
call TriggerRegisterPlayerChatEvent(udg_trigger13,Player(5),"-name ",false)
call TriggerRegisterPlayerChatEvent(udg_trigger13,Player(6),"-name ",false)
call TriggerRegisterPlayerChatEvent(udg_trigger13,Player(7),"-name ",false)
call TriggerRegisterPlayerChatEvent(udg_trigger13,Player(8),"-name ",false)
call TriggerRegisterPlayerChatEvent(udg_trigger13,Player(9),"-name ",false)
call TriggerRegisterPlayerChatEvent(udg_trigger13,Player(10),"-name ",false)
call TriggerRegisterPlayerChatEvent(udg_trigger13,Player(11),"-name ",false)
call TriggerAddCondition(udg_trigger13,Condition(function BY))
call TriggerAddAction(udg_trigger13,function B3)
call TriggerRegisterPlayerChatEvent(udg_trigger14,Player(0),"-namecheck",false)
call TriggerRegisterPlayerChatEvent(udg_trigger14,Player(1),"-namecheck",false)
call TriggerAddCondition(udg_trigger14,Condition(function B4))
call TriggerAddAction(udg_trigger14,function B6)
call TriggerRegisterPlayerChatEvent(udg_trigger15,Player(0),"-Count",true)
call TriggerRegisterPlayerChatEvent(udg_trigger15,Player(1),"-Count",true)
call TriggerRegisterPlayerChatEvent(udg_trigger15,Player(2),"-Count",true)
call TriggerRegisterPlayerChatEvent(udg_trigger15,Player(3),"-Count",true)
call TriggerRegisterPlayerChatEvent(udg_trigger15,Player(4),"-Count",true)
call TriggerRegisterPlayerChatEvent(udg_trigger15,Player(5),"-Count",true)
call TriggerRegisterPlayerChatEvent(udg_trigger15,Player(6),"-Count",true)
call TriggerRegisterPlayerChatEvent(udg_trigger15,Player(7),"-Count",true)
call TriggerRegisterPlayerChatEvent(udg_trigger15,Player(8),"-Count",true)
call TriggerRegisterPlayerChatEvent(udg_trigger15,Player(9),"-Count",true)
call TriggerRegisterPlayerChatEvent(udg_trigger15,Player(10),"-Count",true)
call TriggerRegisterPlayerChatEvent(udg_trigger15,Player(11),"-Count",true)
call TriggerAddAction(udg_trigger15,function ca)
call TriggerRegisterPlayerChatEvent(udg_trigger16,Player(0),"-cam ",false)
call TriggerRegisterPlayerChatEvent(udg_trigger16,Player(1),"-cam ",false)
call TriggerRegisterPlayerChatEvent(udg_trigger16,Player(2),"-cam ",false)
call TriggerRegisterPlayerChatEvent(udg_trigger16,Player(3),"-cam ",false)
call TriggerRegisterPlayerChatEvent(udg_trigger16,Player(4),"-cam ",false)
call TriggerRegisterPlayerChatEvent(udg_trigger16,Player(5),"-cam ",false)
call TriggerRegisterPlayerChatEvent(udg_trigger16,Player(6),"-cam ",false)
call TriggerRegisterPlayerChatEvent(udg_trigger16,Player(7),"-cam ",false)
call TriggerRegisterPlayerChatEvent(udg_trigger16,Player(8),"-cam ",false)
call TriggerRegisterPlayerChatEvent(udg_trigger16,Player(9),"-cam ",false)
call TriggerRegisterPlayerChatEvent(udg_trigger16,Player(10),"-cam ",false)
call TriggerRegisterPlayerChatEvent(udg_trigger16,Player(11),"-cam ",false)
call TriggerAddCondition(udg_trigger16,Condition(function cA))
call TriggerAddAction(udg_trigger16,function cc)
call TriggerRegisterTimerEventPeriodic(udg_trigger17,90.)
call TriggerAddAction(udg_trigger17,function cd)
call Ar(udg_trigger18,udg_rect11)
call Ar(udg_trigger18,udg_rect15)
call TriggerAddCondition(udg_trigger18,Condition(function cD))
call TriggerAddAction(udg_trigger18,function ce)
call Ar(udg_trigger19,udg_rect12)
call Ar(udg_trigger19,udg_rect16)
call TriggerAddCondition(udg_trigger19,Condition(function cE))
call TriggerAddAction(udg_trigger19,function cf)
call Ar(udg_trigger20,udg_rect14)
call Ar(udg_trigger20,udg_rect17)
call TriggerAddCondition(udg_trigger20,Condition(function cF))
call TriggerAddAction(udg_trigger20,function cg)
call Ar(udg_trigger21,udg_rect13)
call Ar(udg_trigger21,udg_rect18)
call TriggerAddCondition(udg_trigger21,Condition(function cG))
call TriggerAddAction(udg_trigger21,function ch)
call TriggerRegisterTimerExpireEvent(udg_trigger22,udg_timer01)
call TriggerAddAction(udg_trigger22,function cj)
call TriggerRegisterTimerEventPeriodic(udg_trigger23,6.)
call TriggerAddAction(udg_trigger23,function cM)
call TriggerRegisterTimerEventPeriodic(udg_trigger24,7.)
call TriggerAddAction(udg_trigger24,function cP)
call TriggerRegisterTimerEventPeriodic(udg_trigger25,8.)
call TriggerAddAction(udg_trigger25,function cv)
call TriggerRegisterTimerEventPeriodic(udg_trigger26,9.)
call TriggerAddAction(udg_trigger26,function cx)
call TriggerRegisterTimerEventPeriodic(udg_trigger27,10.)
call TriggerAddAction(udg_trigger27,function c2)
call TriggerRegisterTimerEventPeriodic(udg_trigger28,11.)
call TriggerAddAction(udg_trigger28,function c5)
call TriggerRegisterTimerEventPeriodic(udg_trigger29,12.)
call TriggerAddAction(udg_trigger29,function c7)
call TriggerRegisterAnyUnitEventBJ(udg_trigger30,EVENT_PLAYER_UNIT_UPGRADE_FINISH)
call TriggerAddCondition(udg_trigger30,Condition(function c8))
call TriggerAddAction(udg_trigger30,function Ca)
call TriggerRegisterAnyUnitEventBJ(udg_trigger31,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(udg_trigger31,Condition(function CA))
call TriggerAddAction(udg_trigger31,function CE)
call TriggerRegisterPlayerEventLeave(udg_trigger32,Player(0))
call TriggerRegisterPlayerEventLeave(udg_trigger32,Player(1))
call TriggerRegisterPlayerEventLeave(udg_trigger32,Player(2))
call TriggerRegisterPlayerEventLeave(udg_trigger32,Player(3))
call TriggerRegisterPlayerEventLeave(udg_trigger32,Player(4))
call TriggerRegisterPlayerEventLeave(udg_trigger32,Player(5))
call TriggerRegisterPlayerEventLeave(udg_trigger32,Player(6))
call TriggerRegisterPlayerEventLeave(udg_trigger32,Player(7))
call TriggerRegisterPlayerEventLeave(udg_trigger32,Player(8))
call TriggerRegisterPlayerEventLeave(udg_trigger32,Player(9))
call TriggerRegisterPlayerEventLeave(udg_trigger32,Player(10))
call TriggerRegisterPlayerEventLeave(udg_trigger32,Player(11))
call TriggerAddAction(udg_trigger32,function Cm)
call TriggerRegisterAnyUnitEventBJ(udg_trigger33,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerAddCondition(udg_trigger33,Condition(function CM))
call TriggerAddAction(udg_trigger33,function Cn)
call TriggerRegisterAnyUnitEventBJ(udg_trigger34,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerAddCondition(udg_trigger34,Condition(function CN))
call TriggerAddAction(udg_trigger34,function Co)
call TriggerRegisterAnyUnitEventBJ(udg_trigger35,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerAddCondition(udg_trigger35,Condition(function CO))
call TriggerAddAction(udg_trigger35,function Cp)
call TriggerRegisterAnyUnitEventBJ(udg_trigger36,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(udg_trigger36,Condition(function CP))
call TriggerAddAction(udg_trigger36,function Cq)
call TriggerRegisterAnyUnitEventBJ(udg_trigger37,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(udg_trigger37,Condition(function CQ))
call TriggerAddAction(udg_trigger37,function Cr)
call TriggerRegisterAnyUnitEventBJ(udg_trigger38,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(udg_trigger38,Condition(function CU))
call TriggerAddAction(udg_trigger38,function CV)
call TriggerRegisterAnyUnitEventBJ(udg_trigger39,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(udg_trigger39,Condition(function Cw))
call TriggerAddAction(udg_trigger39,function Cx)
call TriggerRegisterAnyUnitEventBJ(udg_trigger40,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddAction(udg_trigger40,function C7)
call TriggerRegisterAnyUnitEventBJ(udg_trigger41,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddAction(udg_trigger41,function dN)
call TriggerRegisterAnyUnitEventBJ(udg_trigger42,EVENT_PLAYER_UNIT_SPELL_ENDCAST)
call TriggerAddAction(udg_trigger42,function dO)
call ConditionalTriggerExecute(udg_trigger01)
call ConditionalTriggerExecute(udg_trigger02)
call ConditionalTriggerExecute(udg_trigger03)
endfunction
function InitTrig_init takes nothing returns nothing
set udg_trigger01 = CreateTrigger()
set udg_trigger02 = CreateTrigger()
set udg_trigger03 = CreateTrigger()
set udg_trigger04 = CreateTrigger()
set udg_trigger05 = CreateTrigger()
set udg_trigger06 = CreateTrigger()
set udg_trigger07 = CreateTrigger()
set udg_trigger08 = CreateTrigger()
set udg_trigger09 = CreateTrigger()
set udg_trigger10 = CreateTrigger()
set udg_trigger11 = CreateTrigger()
set udg_trigger12 = CreateTrigger()
set udg_trigger13 = CreateTrigger()
set udg_trigger14 = CreateTrigger()
set udg_trigger15 = CreateTrigger()
set udg_trigger16 = CreateTrigger()
set udg_trigger17 = CreateTrigger()
set udg_trigger18 = CreateTrigger()
set udg_trigger19 = CreateTrigger()
set udg_trigger20 = CreateTrigger()
set udg_trigger21 = CreateTrigger()
set udg_trigger22 = CreateTrigger()
set udg_trigger23 = CreateTrigger()
set udg_trigger24 = CreateTrigger()
set udg_trigger25 = CreateTrigger()
set udg_trigger26 = CreateTrigger()
set udg_trigger27 = CreateTrigger()
set udg_trigger28 = CreateTrigger()
set udg_trigger29 = CreateTrigger()
set udg_trigger30 = CreateTrigger()
set udg_trigger31 = CreateTrigger()
set udg_trigger32 = CreateTrigger()
set udg_trigger33 = CreateTrigger()
set udg_trigger34 = CreateTrigger()
set udg_trigger35 = CreateTrigger()
set udg_trigger36 = CreateTrigger()
set udg_trigger37 = CreateTrigger()
set udg_trigger38 = CreateTrigger()
set udg_trigger39 = CreateTrigger()
set udg_trigger40 = CreateTrigger()
set udg_trigger41 = CreateTrigger()
set udg_trigger42 = CreateTrigger()
call ExecuteFunc("main2")
endfunction