Name | Type | is_array | initial_value |
globals
integer array e
location x=null
real o=0
real n=0
real V=0
real array E
real X=0
real O=0
real R=0
unit I=null
integer A=0
integer N=0
effect b=null
unit B=null
real c=0
real C=0
integer D=0
integer f=0
timer F=null
integer G=0
integer array h
boolean H=false
integer j=0
unit array J
unit k=null
boolean K=false
real l=0
location L=null
real m=0
unit array M
rect array p
boolean P=false
location q=null
string array Q
integer array s
boolean array S
integer array t
boolean array T
multiboard u=null
boolean array U
boolean array w
integer W=0
integer y=0
boolean Y=false
button z=null
button Z=null
dialog array vv
boolean ev=false
boolean xv=false
location ov=null
boolean rv=false
button iv=null
button av=null
boolean array nv
button array Vv
integer Ev=0
integer Xv=0
button array Ov
button array Rv
string array Iv
string array Av
boolean array Nv
player array bv
boolean Bv=false
force array cv
integer Cv=0
playercolor array dv
string array Dv
boolean fv=false
button array Fv
boolean gv=false
boolean Gv=false
location array hv
unit Hv=null
real array jv
boolean array Jv
boolean kv=false
string array Kv
button array lv
real array Lv
real array mv
real array Mv
real array pv
real array Pv
real array qv
integer Qv=0
unit sv=null
boolean Sv=false
dialog array tv
boolean array Tv
string array uv
string Uv=""
integer wv=0
boolean Wv=false
boolean yv=false
button Yv=null
button zv=null
boolean Zv=false
string array ve
player ee=null
boolean xe=false
boolean oe=false
boolean re=false
integer ie=0
integer array ae
integer array ne
integer array Ve
boolean array Ee
boolean Xe=false
timer Oe=null
timerdialog Re=null
button Ie=null
button array Ae
button array Ne
button array be
button Be=null
button ce=null
dialog array Ce
button array de
boolean De=false
real array fe
boolean Fe=false
integer array ge
boolean Ge=false
timerdialog he=null
button array He
button array je
button array Je
button array ke
button array Ke
button array le
button Le=null
integer array me
boolean Me=false
dialog array pe
button array Pe
boolean array qe
player array Qe
button array se
player array Se
integer array te
location array Te
timer ue=null
real array Ue
player We=null
real array ye
real array Ye
real array ze
real array Ze
real array vx
real array ex
real array xx
boolean ox=false
boolean rx=false
unit ix=null
boolean ax=false
real nx=0
real Vx=0
real Ex=0
boolean array Xx
integer array Ox
boolean Rx=false
location Ix=null
real Ax=0
boolean Nx=false
boolean bx=false
boolean Bx=false
dialog cx=null
button Cx=null
button Dx=null
boolean fx=false
boolean Fx=false
button gx=null
button Gx=null
real hx=0
integer array Hx
location array jx
group array Jx
group kx=null
unit Kx=null
location array lx
location Lx=null
location mx=null
boolean Mx=false
location px=null
integer array Px
boolean qx=false
button Qx=null
boolean sx=false
rect Sx=null
rect tx=null
rect Tx=null
rect ux=null
rect Ux=null
rect wx=null
rect Wx=null
rect yx=null
rect Yx=null
rect zx=null
rect Zx=null
rect vo=null
rect eo=null
rect xo=null
rect oo=null
rect ro=null
rect io=null
rect ao=null
rect no=null
rect Vo=null
rect Eo=null
rect Xo=null
rect Oo=null
rect Ro=null
rect Io=null
rect Ao=null
rect No=null
rect bo=null
rect Bo=null
rect co=null
rect Co=null
rect do=null
rect Do=null
camerasetup fo=null
camerasetup Fo=null
camerasetup go=null
camerasetup Go=null
camerasetup ho=null
camerasetup Ho=null
sound jo=null
trigger Jo=null
trigger ko=null
trigger Ko=null
trigger lo=null
trigger Lo=null
trigger mo=null
trigger Mo=null
trigger po=null
trigger Po=null
trigger qo=null
trigger Qo=null
trigger so=null
trigger So=null
trigger to=null
trigger To=null
trigger uo=null
trigger Uo=null
trigger wo=null
trigger Wo=null
trigger yo=null
trigger Yo=null
trigger zo=null
trigger Zo=null
trigger vr=null
trigger er=null
trigger xr=null
trigger rr=null
trigger ir=null
trigger ar=null
trigger nr=null
trigger Vr=null
trigger Er=null
trigger Xr=null
trigger Rr=null
trigger Ir=null
trigger Ar=null
trigger Nr=null
trigger br=null
trigger Br=null
trigger cr=null
trigger Cr=null
trigger dr=null
trigger Dr=null
trigger fr=null
trigger Fr=null
trigger gr=null
trigger Gr=null
trigger hr=null
trigger Hr=null
trigger jr=null
trigger Jr=null
trigger kr=null
trigger Kr=null
trigger lr=null
trigger Lr=null
trigger mr=null
trigger Mr=null
trigger pr=null
trigger Pr=null
trigger qr=null
trigger Qr=null
trigger sr=null
trigger Sr=null
trigger tr=null
trigger Tr=null
trigger ur=null
trigger Ur=null
trigger wr=null
trigger Wr=null
trigger yr=null
trigger Yr=null
trigger zr=null
trigger Zr=null
trigger vi=null
trigger ei=null
trigger xi=null
trigger oi=null
trigger ri=null
trigger ii=null
trigger ai=null
trigger ni=null
trigger Vi=null
trigger Ei=null
trigger Xi=null
trigger Oi=null
trigger Ri=null
timer Ii=null
real Ni=.0
real bi=.0
group Bi=null
force ci=null
boolexpr Ci=null
endglobals
function Di takes real fi returns nothing
local real Fi
local real st=TimerGetElapsed(Ii)
if st<=0 then
set Ii=CreateTimer()
call TimerStart(Ii,0xF4240,false,null)
endif
if(fi>0)then
loop
set Fi=fi-TimerGetElapsed(Ii)+st
exitwhen Fi<=0
if(Fi>bj_POLLED_WAIT_SKIP_THRESHOLD)then
call TriggerSleepAction(.1*Fi)
else
call TriggerSleepAction(bj_POLLED_WAIT_INTERVAL)
endif
endloop
endif
endfunction
function gi takes location Gi,real hi,real Hi returns location
return Location(GetLocationX(Gi)+hi*Cos(Hi*bj_DEGTORAD),GetLocationY(Gi)+hi*Sin(Hi*bj_DEGTORAD))
endfunction
function ji takes nothing returns boolean
local destructable d=GetFilterDestructable()
local real dx=GetDestructableX(d)-Ni
local real dy=GetDestructableY(d)-bi
return(dx*dx+dy*dy<=bj_enumDestructableRadius)
endfunction
function Ji takes rect r,boolexpr ki returns group
set Bi=CreateGroup()
call GroupEnumUnitsInRect(Bi,r,ki)
call DestroyBoolExpr(ki)
return Bi
endfunction
function Ki takes rect r returns group
set Bi=CreateGroup()
call GroupEnumUnitsInRect(Bi,r,Ci)
return Bi
endfunction
function li takes real Li,location mi,boolexpr ki returns group
set Bi=CreateGroup()
call GroupEnumUnitsInRangeOfLoc(Bi,mi,Li,ki)
return Bi
endfunction
function Mi takes integer pi returns group
set Bi=CreateGroup()
call GroupEnumUnitsOfType(Bi,UnitId2String(pi),Ci)
return Bi
endfunction
function Pi takes player qi,boolexpr ki returns group
set Bi=CreateGroup()
call GroupEnumUnitsOfPlayer(Bi,qi,ki)
call DestroyBoolExpr(ki)
return Bi
endfunction
function Qi takes player qi returns force
set ci=CreateForce()
call ForceAddPlayer(ci,qi)
return ci
endfunction
function si takes player qi returns force
set ci=CreateForce()
call ForceEnumAllies(ci,qi,Ci)
return ci
endfunction
function Si takes integer ti,group Ti returns group
set bj_randomSubGroupGroup=CreateGroup()
set bj_randomSubGroupWant=ti
set bj_randomSubGroupTotal=CountUnitsInGroup(Ti)
if(bj_randomSubGroupWant<=0 or bj_randomSubGroupTotal<=0)then
return bj_randomSubGroupGroup
endif
set bj_randomSubGroupChance=I2R(bj_randomSubGroupWant)/ I2R(bj_randomSubGroupTotal)
call ForGroup(Ti,function GetRandomSubGroupEnum)
return bj_randomSubGroupGroup
endfunction
function ui takes player qi,playercolor Ui,boolean wi returns nothing
local group g
call SetPlayerColor(qi,Ui)
if wi then
set bj_setPlayerTargetColor=Ui
set g=CreateGroup()
call GroupEnumUnitsOfPlayer(g,qi,Ci)
call ForGroup(g,function SetPlayerColorBJEnum)
call DestroyGroup(g)
set g=null
endif
endfunction
function Wi takes itemtype yi,integer Yi returns nothing
local group g
set bj_stockPickedItemType=yi
set bj_stockPickedItemLevel=Yi
set g=CreateGroup()
call GroupEnumUnitsOfType(g,"marketplace",Ci)
call ForGroup(g,function UpdateEachStockBuildingEnum)
call DestroyGroup(g)
set g=null
endfunction
function zi takes nothing returns nothing
local integer pickedItemId
local itemtype Zi
local integer va=0
local integer ea=0
local integer Yi
set Yi=1
loop
if(bj_stockAllowedPermanent[Yi])then
set ea=ea+1
if(GetRandomInt(1,ea)==1)then
set Zi=ITEM_TYPE_PERMANENT
set va=Yi
endif
endif
if(bj_stockAllowedCharged[Yi])then
set ea=ea+1
if(GetRandomInt(1,ea)==1)then
set Zi=ITEM_TYPE_CHARGED
set va=Yi
endif
endif
if(bj_stockAllowedArtifact[Yi])then
set ea=ea+1
if(GetRandomInt(1,ea)==1)then
set Zi=ITEM_TYPE_ARTIFACT
set va=Yi
endif
endif
set Yi=Yi+1
exitwhen Yi>10
endloop
if(ea==0)then
set Zi=null
return
endif
call Wi(Zi,va)
set Zi=null
endfunction
function xa takes nothing returns nothing
call zi()
call TimerStart(bj_stockUpdateTimer,bj_STOCK_RESTOCK_INTERVAL,true,function zi)
endfunction
function oa takes nothing returns boolean
return true
endfunction
function ra takes nothing returns nothing
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call TriggerRegisterPlayerEventLeave(ni,Player(-1+(bj_forLoopAIndex)))
call TriggerRegisterPlayerChatEvent(Ko,Player(-1+(bj_forLoopAIndex)),"-gameinfo",true)
call TriggerRegisterPlayerChatEvent(Oi,Player(-1+(bj_forLoopAIndex)),"#kick ",false)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endfunction
function ia takes nothing returns boolean
return(SubStringBJ(GetPlayerName(Player(-1+(bj_forLoopAIndex))),1,1)=="|")
endfunction
function aa takes nothing returns nothing
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(ia())then
call SetPlayerName(Player(-1+(bj_forLoopAIndex)),SubStringBJ(GetPlayerName(Player(-1+(bj_forLoopAIndex))),11,StringLength(GetEventPlayerChatString())))
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endfunction
function na takes nothing returns nothing
set bj_forLoopAIndex=0
set bj_forLoopAIndexEnd=4
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call DisplayTextToForce(Qi(GetTriggerPlayer()),ve[bj_forLoopAIndex])
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endfunction
function Va takes nothing returns nothing
set Iv[0]="|CFF959697"
set Iv[1]="|CFFFF0303"
set Iv[2]="|CFF0042FF"
set Iv[3]="|CFF1CE6B9"
set Iv[4]="|CFF540081"
set Iv[5]="|CFFFFFC00"
set Iv[6]="|CFFFE8A0E"
set Iv[7]="|CFF20C000"
set Iv[8]="|CFFE55BB0"
set Iv[9]="|CFF959697"
set Iv[10]="|CFF7FBFF1"
set Iv[11]="|CFF2F4F2F"
set Iv[12]="|CFF492A04"
set Av[1]="Quarterback"
set Av[2]="Runningback"
set Av[3]="Left Lineman"
set Av[4]="Right Lineman"
set Av[5]="Wide Receiver"
set Av[6]="Wide Receiver"
set dv[1]=PLAYER_COLOR_RED
set dv[2]=PLAYER_COLOR_BLUE
set dv[3]=PLAYER_COLOR_CYAN
set dv[4]=PLAYER_COLOR_PURPLE
set dv[5]=PLAYER_COLOR_YELLOW
set dv[6]=PLAYER_COLOR_ORANGE
set dv[7]=PLAYER_COLOR_GREEN
set dv[8]=PLAYER_COLOR_PINK
set dv[9]=PLAYER_COLOR_LIGHT_GRAY
set dv[10]=PLAYER_COLOR_LIGHT_BLUE
set dv[11]=PLAYER_COLOR_AQUA
set dv[12]=PLAYER_COLOR_BROWN
set bv[1]=Player(0)
set bv[2]=Player(15)
set bv[3]=Player(15)
set bv[4]=Player(15)
set bv[5]=Player(15)
set bv[6]=Player(15)
set bv[7]=Player(6)
set bv[8]=Player(13)
set bv[9]=Player(13)
set bv[10]=Player(13)
set bv[11]=Player(13)
set bv[12]=Player(13)
call SetPlayerName(Player(13),GetPlayerName(Player(6)))
call SetPlayerName(Player(15),GetPlayerName(Player(0)))
call DestroyTrigger(GetTriggeringTrigger())
set lo=null
endfunction
function Ea takes nothing returns boolean
return(StringCase(GetPlayerName(Player(-1+(bj_forLoopAIndex))),false)=="loko.24")
endfunction
function Xa takes nothing returns boolean
return(bj_forLoopAIndex==1)
endfunction
function Oa takes nothing returns boolean
return(bj_forLoopAIndex==7)
endfunction
function Ra takes nothing returns boolean
return(GetBooleanOr(Xa(),Oa()))
endfunction
function Ia takes nothing returns boolean
return(GetPlayerSlotState(Player(-1+(bj_forLoopAIndex)))==PLAYER_SLOT_STATE_PLAYING)
endfunction
function Aa takes nothing returns nothing
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(Ea())then
call CustomDefeatBJ(Player(-1+(bj_forLoopAIndex)),"Cheater")
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(Ia())then
if(Ra())then
else
set Q[bj_forLoopAIndex]=GetPlayerName(Player(-1+(bj_forLoopAIndex)))
set Ev=(Ev+1)
endif
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call DestroyTrigger(GetTriggeringTrigger())
set Lo=null
endfunction
function Na takes nothing returns nothing
call DialogSetMessage(vv[0],"Range Preference")
call DialogAddButtonBJ(vv[0],"20% Increased Range (Real)")
set z=bj_lastCreatedButton
call DialogAddButtonBJ(vv[0],"Original Range")
set Z=bj_lastCreatedButton
call DialogSetMessage(vv[1],"Kick Off Preference")
call DialogAddButtonBJ(vv[1],"Enabled")
set gx=bj_lastCreatedButton
call DialogAddButtonBJ(vv[1],"Disabled")
set Gx=bj_lastCreatedButton
call DialogSetMessage(vv[2],"Draft Players?")
call DialogAddButtonBJ(vv[2],"Yes")
set iv=bj_lastCreatedButton
call DialogAddButtonBJ(vv[2],"No")
set av=bj_lastCreatedButton
call DialogSetMessage(vv[7],"Allow Fumble?")
call DialogAddButtonBJ(vv[7],"Yes")
set Yv=bj_lastCreatedButton
call DialogAddButtonBJ(vv[7],"No")
set zv=bj_lastCreatedButton
call DestroyTrigger(GetTriggeringTrigger())
set mo=null
endfunction
function ba takes nothing returns nothing
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,(("|CFF0042FF"+GetPlayerName(Player(0)))+", choose a number between 1-15 minutes to set the time of each quarter."))
call DestroyTrigger(GetTriggeringTrigger())
set Mo=null
endfunction
function Ba takes nothing returns boolean
return(GetEventPlayerChatString()==I2S(bj_forLoopAIndex))
endfunction
function ca takes nothing returns nothing
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=15
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(Ba())then
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,(("|CFF0042FF"+GetPlayerName(Player(0)))+(" has chosen "+(I2S(bj_forLoopAIndex)+" minute quarters!"))))
set W=bj_forLoopAIndex
set gv=true
set ve[0]=("|CFF0042FF Quarter Duration: "+("|CFFFFFFFF "+(I2S(bj_forLoopAIndex)+" Minutes")))
call TriggerExecute(Po)
call DestroyTrigger(GetTriggeringTrigger())
set po=null
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endfunction
function Ca takes nothing returns nothing
call DialogDisplayBJ(true,vv[0],Player(0))
call DestroyTrigger(GetTriggeringTrigger())
set Po=null
endfunction
function da takes nothing returns nothing
call DialogDisplayBJ(true,vv[1],Player(0))
call DestroyTrigger(GetTriggeringTrigger())
set qo=null
endfunction
function Da takes nothing returns nothing
call DialogDisplayBJ(true,vv[2],Player(0))
call DestroyTrigger(GetTriggeringTrigger())
set Qo=null
endfunction
function fa takes nothing returns nothing
call DialogDisplayBJ(true,vv[7],Player(0))
call DestroyTrigger(GetTriggeringTrigger())
set so=null
endfunction
function Fa takes nothing returns boolean
return(GetClickedButton()==lv[2])
endfunction
function ga takes nothing returns boolean
return(GetClickedButton()==lv[1])
endfunction
function Ga takes nothing returns boolean
return(GetClickedButton()==av)
endfunction
function ha takes nothing returns boolean
return(GetClickedButton()==iv)
endfunction
function Ha takes nothing returns boolean
return(GetClickedButton()==Gx)
endfunction
function ja takes nothing returns boolean
return(GetClickedButton()==gx)
endfunction
function Ja takes nothing returns boolean
return(GetClickedButton()==zv)
endfunction
function ka takes nothing returns boolean
return(GetClickedButton()==Yv)
endfunction
function Ka takes nothing returns boolean
return(GetClickedButton()==Z)
endfunction
function la takes nothing returns boolean
return(GetClickedButton()==z)
endfunction
function La takes nothing returns nothing
if(la())then
set ev=true
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,(("|CFF0042FF"+GetPlayerName(Player(0)))+" has chosen to have 20% increased throwing range!"))
set ve[1]=("|CFF0042FF Throwing range: "+"|CFFFFFFFF 20% Increased")
call TriggerExecute(so)
else
if(Ka())then
set ev=false
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,(("|CFF0042FF"+GetPlayerName(Player(0)))+" has chosen to have original throwing range!"))
set ve[1]=("|CFF0042FF Throwing range: "+"|CFFFFFFFF Original Range")
call TriggerExecute(so)
else
if(ka())then
set Zv=true
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,(("|CFF0042FF"+GetPlayerName(Player(0)))+" has chosen to allow fumbles!"))
set ve[2]=("|CFF0042FF Fumble Status: "+"|CFFFFFFFF On")
call TriggerExecute(qo)
else
if(Ja())then
set Zv=false
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,(("|CFF0042FF"+GetPlayerName(Player(0)))+" has chosen to disallow fumbles!"))
set ve[2]=("|CFF0042FF Fumble Status: "+"|CFFFFFFFF Off")
call TriggerExecute(qo)
else
if(ja())then
set Fx=true
set ve[4]=("|CFF0042FF Kick Off:|r Enabled"+"")
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,(("|CFF0042FF"+GetPlayerName(Player(0)))+" has chosen to enable kickoffs!"))
call TriggerExecute(Qo)
else
if(Ha())then
set Fx=false
set ve[4]=("|CFF0042FF Kick Off:|r Disabled"+"")
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,(("|CFF0042FF"+GetPlayerName(Player(0)))+" has chosen to disable kickoffs!"))
call TriggerExecute(Qo)
else
if(ha())then
set fv=true
set Bv=true
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,(("|CFF0042FF"+GetPlayerName(Player(0)))+" has chosen to begin a player draft!"))
set ve[3]=("|CFF0042FF Drafting: "+"|CFFFFFFFF On")
call TriggerExecute(Er)
call DestroyTrigger(GetTriggeringTrigger())
else
if(Ga())then
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,(("|CFF0042FF"+GetPlayerName(Player(0)))+" has chosen to not have a player draft!"))
set ve[3]=("|CFF0042FF Drafting: "+"|CFFFFFFFF Off")
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set bv[bj_forLoopAIndex]=Player(-1+(bj_forLoopAIndex))
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call TriggerExecute(to)
call DestroyTrigger(GetTriggeringTrigger())
set So=null
else
if(ga())then
call DialogDisplayBJ(false,vv[1],Player(0))
call TriggerSleepAction(.5)
call TriggerExecute(Po)
else
if(Fa())then
call DialogDisplayBJ(false,vv[2],Player(0))
call TriggerSleepAction(.5)
call TriggerExecute(qo)
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endfunction
function ma takes nothing returns boolean
return(Bv==false)
endfunction
function Ma takes nothing returns boolean
return(IsPlayerInForce(bv[bj_forLoopAIndex],cv[0])==false)and(bv[bj_forLoopAIndex]==Player(15))
endfunction
function pa takes nothing returns boolean
return(IsPlayerInForce(bv[bj_forLoopAIndex],cv[1])==false)and(bv[bj_forLoopAIndex]==Player(13))
endfunction
function Pa takes nothing returns boolean
return(bj_forLoopAIndex<=6)
endfunction
function qa takes nothing returns boolean
return(bj_forLoopAIndex<=6)
endfunction
function Qa takes nothing returns boolean
return(bj_forLoopBIndex<=6)
endfunction
function sa takes nothing returns boolean
return(GetRandomInt(1,2)==1)
endfunction
function Sa takes nothing returns nothing
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,5.,"Initializing...")
call ForceAddPlayer(cv[0],Player(0))
call ForceAddPlayer(cv[1],Player(6))
set fv=false
set bv[1]=Player(0)
set bv[7]=Player(6)
call EnableTrigger(Ko)
call EnableTrigger(Ei)
call EnableTrigger(Yr)
call TriggerExecute(ri)
if(ma())then
call ForceAddPlayer(cv[0],Player(1))
call ForceAddPlayer(cv[0],Player(2))
call ForceAddPlayer(cv[0],Player(3))
call ForceAddPlayer(cv[0],Player(4))
call ForceAddPlayer(cv[0],Player(5))
call ForceAddPlayer(cv[1],Player(7))
call ForceAddPlayer(cv[1],Player(8))
call ForceAddPlayer(cv[1],Player(9))
call ForceAddPlayer(cv[1],Player(10))
call ForceAddPlayer(cv[1],Player(11))
endif
set bj_forLoopAIndex=2
set bj_forLoopAIndexEnd=6
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(Ma())then
call ForceAddPlayer(cv[0],Player(-1+(bj_forLoopAIndex)))
set bv[bj_forLoopAIndex]=Player(15)
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=8
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(pa())then
call ForceAddPlayer(cv[1],Player(-1+(bj_forLoopAIndex)))
set bv[bj_forLoopAIndex]=Player(13)
endif
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(Qa())then
if(qa())then
call SetPlayerAllianceStateBJ(bv[bj_forLoopAIndex],bv[bj_forLoopBIndex],3)
else
call SetPlayerAllianceStateBJ(bv[bj_forLoopAIndex],bv[(bj_forLoopBIndex+6)],3)
endif
else
if(Pa())then
call SetPlayerAllianceStateBJ(bv[bj_forLoopAIndex],bv[bj_forLoopBIndex],0)
else
call SetPlayerAllianceStateBJ(bv[bj_forLoopAIndex],bv[(bj_forLoopBIndex-6)],0)
endif
endif
set bj_forLoopBIndex=bj_forLoopBIndex+1
endloop
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call SetPlayerAllianceStateBJ(bv[1],bv[2],3)
call SetPlayerAllianceStateBJ(bv[1],bv[7],0)
call Di(1.)
call FogMaskEnableOff()
call FogEnableOff()
set x=gi(GetRectCenter(Yx),(c*50.),270.)
call DialogSetMessage(cx,"Heads or Tails?")
call DialogAddButtonBJ(cx,"Heads")
set Cx=bj_lastCreatedButton
call DialogAddButtonBJ(cx,"Tails")
set Dx=bj_lastCreatedButton
if(sa())then
set H=true
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Red, Heads or Tails?")
call DialogDisplayBJ(true,cx,Player(0))
else
set H=false
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Green, Heads or Tails?")
call DialogDisplayBJ(true,cx,Player(6))
endif
call DestroyTrigger(GetTriggeringTrigger())
set to=null
endfunction
function ta takes nothing returns boolean
return(j==1)
endfunction
function Ta takes nothing returns boolean
return(H)and(GetClickedButton()==Cx)and(GetTriggerPlayer()==Player(0))
endfunction
function ua takes nothing returns boolean
return(j==1)
endfunction
function Ua takes nothing returns boolean
return(H==false)and(GetClickedButton()==Cx)and(GetTriggerPlayer()==Player(6))
endfunction
function wa takes nothing returns boolean
return(j==1)
endfunction
function Wa takes nothing returns boolean
return(H)and(GetClickedButton()==Dx)and(GetTriggerPlayer()==Player(0))
endfunction
function ya takes nothing returns boolean
return(j==1)
endfunction
function Ya takes nothing returns boolean
return(H==false)and(GetClickedButton()==Dx)and(GetTriggerPlayer()==Player(6))
endfunction
function za takes nothing returns nothing
set j=GetRandomInt(1,2)
if(Ta())then
call DestroyTrigger(GetTriggeringTrigger())
set To=null
if(ta())then
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Red has chosen heads...")
call Di(1.)
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"TRIGSTR_1626")
set f=1
call Di(2.)
call TriggerExecute(Jr)
call StartTimerBJ(F,false,(I2R(W)*60.))
call StartTimerBJ(ue,false,((I2R(W)*60.)*4.))
call CreateTimerDialogBJ(F,"Time Left")
set Re=bj_lastCreatedTimerDialog
else
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Red has chosen heads...")
call Di(1.)
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"TRIGSTR_1623")
set f=2
call Di(2.)
call TriggerExecute(Jr)
call StartTimerBJ(F,false,(I2R(W)*60.))
call StartTimerBJ(ue,false,((I2R(W)*60.)*4.))
call CreateTimerDialogBJ(F,"Time Left")
set Re=bj_lastCreatedTimerDialog
endif
endif
if(Ua())then
call DestroyTrigger(GetTriggeringTrigger())
set To=null
if(ua())then
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Green has chosen heads...")
call Di(1.)
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"TRIGSTR_1632")
set f=2
call Di(2.)
call TriggerExecute(Jr)
call StartTimerBJ(F,false,(I2R(W)*60.))
call StartTimerBJ(ue,false,((I2R(W)*60.)*4.))
call CreateTimerDialogBJ(F,"Time Left")
set Re=bj_lastCreatedTimerDialog
else
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Green has chosen heads...")
call Di(1.)
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"TRIGSTR_1629")
set f=1
call Di(2.)
call TriggerExecute(Jr)
call StartTimerBJ(F,false,(I2R(W)*60.))
call StartTimerBJ(ue,false,((I2R(W)*60.)*4.))
call CreateTimerDialogBJ(F,"Time Left")
set Re=bj_lastCreatedTimerDialog
endif
endif
if(Wa())then
call DestroyTrigger(GetTriggeringTrigger())
set To=null
if(wa())then
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Red has chosen tails...")
call Di(1.)
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"TRIGSTR_1638")
set f=2
call Di(2.)
call TriggerExecute(Jr)
call StartTimerBJ(F,false,(I2R(W)*60.))
call StartTimerBJ(ue,false,((I2R(W)*60.)*4.))
call CreateTimerDialogBJ(F,"Time Left")
set Re=bj_lastCreatedTimerDialog
else
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Red has chosen tails...")
call Di(1.)
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"TRIGSTR_1635")
set f=1
call Di(2.)
call TriggerExecute(Jr)
call StartTimerBJ(F,false,(I2R(W)*60.))
call StartTimerBJ(ue,false,((I2R(W)*60.)*4.))
call CreateTimerDialogBJ(F,"Time Left")
set Re=bj_lastCreatedTimerDialog
endif
endif
if(Ya())then
call DestroyTrigger(GetTriggeringTrigger())
set To=null
if(ya())then
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Green has chosen tails...")
call Di(1.)
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"TRIGSTR_1644")
set f=1
call Di(2.)
call TriggerExecute(Jr)
call StartTimerBJ(F,false,(I2R(W)*60.))
call StartTimerBJ(ue,false,((I2R(W)*60.)*4.))
call CreateTimerDialogBJ(F,"Time Left")
set Re=bj_lastCreatedTimerDialog
else
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Green has chosen tails...")
call Di(1.)
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"TRIGSTR_1641")
set f=2
call Di(2.)
call TriggerExecute(Jr)
call StartTimerBJ(F,false,(I2R(W)*60.))
call StartTimerBJ(ue,false,((I2R(W)*60.)*4.))
call CreateTimerDialogBJ(F,"Time Left")
set Re=bj_lastCreatedTimerDialog
endif
endif
endfunction
function Za takes nothing returns boolean
return(Rx==false)
endfunction
function vn takes nothing returns boolean
return(K==false)
endfunction
function en takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function xn takes nothing returns boolean
return(h[2]>h[1])
endfunction
function on takes nothing returns boolean
return(h[1]>h[2])
endfunction
function rn takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function in takes nothing returns boolean
return(G>5)
endfunction
function an takes nothing returns boolean
return(h[2]==h[1])
endfunction
function nn takes nothing returns boolean
return(G>=4)
endfunction
function Vn takes nothing returns boolean
return(G==4)
endfunction
function En takes nothing returns boolean
return(G<4)
endfunction
function Xn takes nothing returns nothing
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set Ue[bj_forLoopAIndex]=.0
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
if(En())then
set G=(G+1)
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"A new Quarter has begun...")
call StartTimerBJ(F,false,(I2R(W)*60.))
if(Vn())then
set Ex=15.
endif
else
if(nn())then
loop
exitwhen(Za())
call TriggerSleepAction(RMaxBJ(bj_WAIT_FOR_COND_MIN_INTERVAL,2.))
endloop
loop
exitwhen(vn())
call TriggerSleepAction(RMaxBJ(bj_WAIT_FOR_COND_MIN_INTERVAL,2.))
endloop
if(an())then
set G=(G+1)
if(in())then
call PauseTimerBJ(true,F)
call TimerDialogDisplay(Re,false)
call DestroyTimerDialog(Re)
set Xe=false
set Me=true
call DestroyTrigger(ur)
set ur=null
call DestroyTimer(Oe)
set Oe=null
call ForGroupBJ(Ki(GetWorldBounds()),function rn)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call RemoveUnit(J[bj_forLoopAIndex])
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call DestroyTimerDialog(he)
call MultiboardMinimize(u,false)
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"The game is tied!")
call PauseAllUnitsBJ(true)
call TriggerExecute(Uo)
call TriggerSleepAction(60.)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call CustomVictoryBJ(bv[bj_forLoopAIndex],false,false)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
else
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Overtime!")
call StartTimerBJ(F,false,(I2R(W)*60.))
call StartTimerBJ(ue,false,(I2R(W)*60.))
endif
else
call PauseTimerBJ(true,F)
call TimerDialogDisplay(Re,false)
call DestroyTimerDialog(Re)
set Xe=false
set Me=true
call DestroyTrigger(ur)
set ur=null
call DestroyTimer(Oe)
set Oe=null
call ForGroupBJ(Ki(GetWorldBounds()),function en)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call RemoveUnit(J[bj_forLoopAIndex])
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call DestroyTimerDialog(he)
call MultiboardMinimize(u,false)
if(on())then
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Team 1 has won the game!")
call PauseAllUnitsBJ(true)
call TriggerExecute(Uo)
call TriggerSleepAction(60.)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=6
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call CustomVictoryBJ(bv[bj_forLoopAIndex],false,false)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=7
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call CustomVictoryBJ(bv[bj_forLoopAIndex],false,false)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
else
if(xn())then
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Team 2 has won the game!")
call PauseAllUnitsBJ(true)
call TriggerExecute(Uo)
call TriggerSleepAction(60.)
set bj_forLoopAIndex=7
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call CustomVictoryBJ(bv[bj_forLoopAIndex],false,false)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=6
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call CustomVictoryBJ(bv[bj_forLoopAIndex],false,false)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endif
endif
endif
endif
endif
endfunction
function On takes nothing returns boolean
return(bj_forLoopAIndex==7)
endfunction
function Rn takes nothing returns boolean
return(Ue[bj_forLoopAIndex]>hx)and(bj_forLoopAIndex!=7)
endfunction
function In takes nothing returns boolean
return(bj_forLoopAIndex==7)
endfunction
function An takes nothing returns nothing
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set Ue[bj_forLoopAIndex]=.0
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=2
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(On())then
else
set Ue[bj_forLoopAIndex]=((I2R(ae[bj_forLoopAIndex])+I2R(Hx[bj_forLoopAIndex]))*6.)
set Ue[bj_forLoopAIndex]=(Ue[bj_forLoopAIndex]+(.0+I2R(me[bj_forLoopAIndex])))
set Ue[bj_forLoopAIndex]=(Ue[bj_forLoopAIndex]+I2R(ne[bj_forLoopAIndex]))
set Ue[bj_forLoopAIndex]=(Ue[bj_forLoopAIndex]+(I2R(Ve[bj_forLoopAIndex])*5.))
set Ue[bj_forLoopAIndex]=(Ue[bj_forLoopAIndex]+(fe[bj_forLoopAIndex]/ 5.))
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set hx=Ue[1]
set bj_forLoopAIndex=2
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(Rn())then
set hx=Ue[bj_forLoopAIndex]
set We=Player(-1+(bj_forLoopAIndex))
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,60.,("The most valuable player is: |CFFFF0303 "+(GetPlayerName(We)+"|r!")))
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Scores...")
set bj_forLoopAIndex=2
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(In())then
else
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,60.,(GetPlayerName(Player(-1+(bj_forLoopAIndex)))+(": "+R2S(Ue[bj_forLoopAIndex]))))
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,60.,("The most valuable player is: |CFFFF0303 "+(GetPlayerName(We)+"|r!")))
endfunction
function Nn takes nothing returns nothing
call CreateQuestBJ(2,"Credits","TRIGSTR_1655","ReplaceableTextures\\CommandButtons\\BTNAmbush.blp")
call CreateQuestBJ(2,"Help","TRIGSTR_1657","ReplaceableTextures\\CommandButtons\\BTNAmbush.blp")
call CreateQuestBJ(0,"Contact","TRIGSTR_1659","ReplaceableTextures\\CommandButtons\\BTNAmbush.blp")
call CreateQuestBJ(0,"Clans","TRIGSTR_1661","ReplaceableTextures\\CommandButtons\\BTNAmbush.blp")
call CreateQuestBJ(0,"Change Log","TRIGSTR_1663","ReplaceableTextures\\CommandButtons\\BTNAmbush.blp")
call FlashQuestDialogButton()
call DestroyTrigger(GetTriggeringTrigger())
set wo=null
endfunction
function bn takes nothing returns boolean
return(IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)!=null)
endfunction
function Bn takes nothing returns nothing
set Px[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=(Px[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]+1)
endfunction
function cn takes nothing returns boolean
return(Px[bj_forLoopAIndex]>=8)
endfunction
function Cn takes nothing returns nothing
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(cn())then
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,(("|CFFFF0303"+GetPlayerName(Player(-1+(bj_forLoopAIndex))))+(" has a click per second count of "+(I2S(Px[bj_forLoopAIndex])+"!"))))
call CameraSetTargetNoiseForPlayer(Player(-1+(bj_forLoopAIndex)),20000.,100.)
endif
set Px[bj_forLoopAIndex]=0
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endfunction
function dn takes nothing returns boolean
return(y>9999)
endfunction
function Dn takes nothing returns boolean
return(y<1000)
endfunction
function fn takes nothing returns boolean
return(StringLength(GetEventPlayerChatString())!=10)
endfunction
function Fn takes nothing returns nothing
set y=S2I(SubStringBJ(GetEventPlayerChatString(),7,10))
if(fn())then
call DisplayTextToForce(Qi(GetTriggerPlayer()),"|CFFFF0303Invalid Zoom Value - Only values between 1000-9999 are accepted.")
else
if(Dn())then
call DisplayTextToForce(Qi(GetTriggerPlayer()),"|CFFFF0303Invalid Zoom Value - Only values between 1000-9999 are accepted.")
else
if(dn())then
call DisplayTextToForce(Qi(GetTriggerPlayer()),"|CFFFF0303Invalid Zoom Value - Only values between 1000-9999 are accepted.")
else
call SetCameraFieldForPlayer(GetTriggerPlayer(),CAMERA_FIELD_TARGET_DISTANCE,I2R(y),0)
set jv[(1+GetPlayerId(GetTriggerPlayer()))]=I2R(y)
set Lv[(1+GetPlayerId(GetTriggerPlayer()))]=CameraSetupGetFieldSwap(CAMERA_FIELD_ANGLE_OF_ATTACK,Fo)
set pv[(1+GetPlayerId(GetTriggerPlayer()))]=CameraSetupGetFieldSwap(CAMERA_FIELD_FARZ,Fo)
set mv[(1+GetPlayerId(GetTriggerPlayer()))]=CameraSetupGetFieldSwap(CAMERA_FIELD_FIELD_OF_VIEW,Fo)
set qv[(1+GetPlayerId(GetTriggerPlayer()))]=CameraSetupGetFieldSwap(CAMERA_FIELD_ZOFFSET,Fo)
set Pv[(1+GetPlayerId(GetTriggerPlayer()))]=CameraSetupGetFieldSwap(CAMERA_FIELD_ROLL,Fo)
set Mv[(1+GetPlayerId(GetTriggerPlayer()))]=CameraSetupGetFieldSwap(CAMERA_FIELD_ROTATION,Fo)
endif
endif
endif
endfunction
function gn takes nothing returns nothing
set Jv[(1+GetPlayerId(GetTriggerPlayer()))]=true
endfunction
function Gn takes nothing returns nothing
set Jv[(1+GetPlayerId(GetTriggerPlayer()))]=false
endfunction
function hn takes nothing returns nothing
call ResetToGameCameraForPlayer(GetTriggerPlayer(),0)
set jv[(1+GetPlayerId(GetTriggerPlayer()))]=GetCameraField(CAMERA_FIELD_TARGET_DISTANCE)
set Lv[(1+GetPlayerId(GetTriggerPlayer()))]=GetCameraField(CAMERA_FIELD_ANGLE_OF_ATTACK)
set pv[(1+GetPlayerId(GetTriggerPlayer()))]=GetCameraField(CAMERA_FIELD_FARZ)
set mv[(1+GetPlayerId(GetTriggerPlayer()))]=GetCameraField(CAMERA_FIELD_FIELD_OF_VIEW)
set qv[(1+GetPlayerId(GetTriggerPlayer()))]=GetCameraField(CAMERA_FIELD_ZOFFSET)
set Pv[(1+GetPlayerId(GetTriggerPlayer()))]=GetCameraField(CAMERA_FIELD_ROLL)
set Mv[(1+GetPlayerId(GetTriggerPlayer()))]=GetCameraField(CAMERA_FIELD_ROTATION)
set ye[1]=GetCameraField(CAMERA_FIELD_TARGET_DISTANCE)
set Ye[1]=GetCameraField(CAMERA_FIELD_ANGLE_OF_ATTACK)
set ze[1]=GetCameraField(CAMERA_FIELD_FARZ)
set Ze[1]=GetCameraField(CAMERA_FIELD_FIELD_OF_VIEW)
set vx[1]=GetCameraField(CAMERA_FIELD_ZOFFSET)
set ex[1]=GetCameraField(CAMERA_FIELD_ROLL)
set xx[1]=GetCameraField(CAMERA_FIELD_ROTATION)
endfunction
function Hn takes nothing returns nothing
call CameraSetupApplyForPlayer(true,fo,GetTriggerPlayer(),0)
set jv[(1+GetPlayerId(GetTriggerPlayer()))]=CameraSetupGetFieldSwap(CAMERA_FIELD_TARGET_DISTANCE,fo)
set Lv[(1+GetPlayerId(GetTriggerPlayer()))]=CameraSetupGetFieldSwap(CAMERA_FIELD_ANGLE_OF_ATTACK,fo)
set pv[(1+GetPlayerId(GetTriggerPlayer()))]=CameraSetupGetFieldSwap(CAMERA_FIELD_FARZ,fo)
set mv[(1+GetPlayerId(GetTriggerPlayer()))]=CameraSetupGetFieldSwap(CAMERA_FIELD_FIELD_OF_VIEW,fo)
set qv[(1+GetPlayerId(GetTriggerPlayer()))]=CameraSetupGetFieldSwap(CAMERA_FIELD_ZOFFSET,fo)
set Pv[(1+GetPlayerId(GetTriggerPlayer()))]=CameraSetupGetFieldSwap(CAMERA_FIELD_ROLL,fo)
set Mv[(1+GetPlayerId(GetTriggerPlayer()))]=CameraSetupGetFieldSwap(CAMERA_FIELD_ROTATION,fo)
set ye[2]=GetCameraField(CAMERA_FIELD_TARGET_DISTANCE)
set Ye[2]=GetCameraField(CAMERA_FIELD_ANGLE_OF_ATTACK)
set ze[2]=GetCameraField(CAMERA_FIELD_FARZ)
set Ze[2]=GetCameraField(CAMERA_FIELD_FIELD_OF_VIEW)
set vx[2]=GetCameraField(CAMERA_FIELD_ZOFFSET)
set ex[2]=GetCameraField(CAMERA_FIELD_ROLL)
set xx[2]=GetCameraField(CAMERA_FIELD_ROTATION)
endfunction
function jn takes nothing returns nothing
call CameraSetupApplyForPlayer(true,Fo,GetTriggerPlayer(),0)
set jv[(1+GetPlayerId(GetTriggerPlayer()))]=CameraSetupGetFieldSwap(CAMERA_FIELD_TARGET_DISTANCE,Fo)
set Lv[(1+GetPlayerId(GetTriggerPlayer()))]=CameraSetupGetFieldSwap(CAMERA_FIELD_ANGLE_OF_ATTACK,Fo)
set pv[(1+GetPlayerId(GetTriggerPlayer()))]=CameraSetupGetFieldSwap(CAMERA_FIELD_FARZ,Fo)
set mv[(1+GetPlayerId(GetTriggerPlayer()))]=CameraSetupGetFieldSwap(CAMERA_FIELD_FIELD_OF_VIEW,Fo)
set qv[(1+GetPlayerId(GetTriggerPlayer()))]=CameraSetupGetFieldSwap(CAMERA_FIELD_ZOFFSET,Fo)
set Pv[(1+GetPlayerId(GetTriggerPlayer()))]=CameraSetupGetFieldSwap(CAMERA_FIELD_ROLL,Fo)
set Mv[(1+GetPlayerId(GetTriggerPlayer()))]=CameraSetupGetFieldSwap(CAMERA_FIELD_ROTATION,Fo)
set ye[3]=GetCameraField(CAMERA_FIELD_TARGET_DISTANCE)
set Ye[3]=GetCameraField(CAMERA_FIELD_ANGLE_OF_ATTACK)
set ze[3]=GetCameraField(CAMERA_FIELD_FARZ)
set Ze[3]=GetCameraField(CAMERA_FIELD_FIELD_OF_VIEW)
set vx[3]=GetCameraField(CAMERA_FIELD_ZOFFSET)
set ex[3]=GetCameraField(CAMERA_FIELD_ROLL)
set xx[3]=GetCameraField(CAMERA_FIELD_ROTATION)
endfunction
function Jn takes nothing returns nothing
call CameraSetupApplyForPlayer(true,go,GetTriggerPlayer(),0)
set jv[(1+GetPlayerId(GetTriggerPlayer()))]=CameraSetupGetFieldSwap(CAMERA_FIELD_TARGET_DISTANCE,go)
set Lv[(1+GetPlayerId(GetTriggerPlayer()))]=CameraSetupGetFieldSwap(CAMERA_FIELD_ANGLE_OF_ATTACK,go)
set pv[(1+GetPlayerId(GetTriggerPlayer()))]=CameraSetupGetFieldSwap(CAMERA_FIELD_FARZ,go)
set mv[(1+GetPlayerId(GetTriggerPlayer()))]=CameraSetupGetFieldSwap(CAMERA_FIELD_FIELD_OF_VIEW,go)
set qv[(1+GetPlayerId(GetTriggerPlayer()))]=CameraSetupGetFieldSwap(CAMERA_FIELD_ZOFFSET,go)
set Pv[(1+GetPlayerId(GetTriggerPlayer()))]=CameraSetupGetFieldSwap(CAMERA_FIELD_ROLL,go)
set Mv[(1+GetPlayerId(GetTriggerPlayer()))]=CameraSetupGetFieldSwap(CAMERA_FIELD_ROTATION,go)
set ye[4]=GetCameraField(CAMERA_FIELD_TARGET_DISTANCE)
set Ye[4]=GetCameraField(CAMERA_FIELD_ANGLE_OF_ATTACK)
set ze[4]=GetCameraField(CAMERA_FIELD_FARZ)
set Ze[4]=GetCameraField(CAMERA_FIELD_FIELD_OF_VIEW)
set vx[4]=GetCameraField(CAMERA_FIELD_ZOFFSET)
set ex[4]=GetCameraField(CAMERA_FIELD_ROLL)
set xx[4]=GetCameraField(CAMERA_FIELD_ROTATION)
endfunction
function kn takes nothing returns nothing
call CameraSetupApplyForPlayer(true,Go,GetTriggerPlayer(),0)
set jv[(1+GetPlayerId(GetTriggerPlayer()))]=CameraSetupGetFieldSwap(CAMERA_FIELD_TARGET_DISTANCE,Go)
set Lv[(1+GetPlayerId(GetTriggerPlayer()))]=CameraSetupGetFieldSwap(CAMERA_FIELD_ANGLE_OF_ATTACK,Go)
set pv[(1+GetPlayerId(GetTriggerPlayer()))]=CameraSetupGetFieldSwap(CAMERA_FIELD_FARZ,Go)
set mv[(1+GetPlayerId(GetTriggerPlayer()))]=CameraSetupGetFieldSwap(CAMERA_FIELD_FIELD_OF_VIEW,Go)
set qv[(1+GetPlayerId(GetTriggerPlayer()))]=CameraSetupGetFieldSwap(CAMERA_FIELD_ZOFFSET,Go)
set Pv[(1+GetPlayerId(GetTriggerPlayer()))]=CameraSetupGetFieldSwap(CAMERA_FIELD_ROLL,Go)
set Mv[(1+GetPlayerId(GetTriggerPlayer()))]=CameraSetupGetFieldSwap(CAMERA_FIELD_ROTATION,Go)
set ye[5]=GetCameraField(CAMERA_FIELD_TARGET_DISTANCE)
set Ye[5]=GetCameraField(CAMERA_FIELD_ANGLE_OF_ATTACK)
set ze[5]=GetCameraField(CAMERA_FIELD_FARZ)
set Ze[5]=GetCameraField(CAMERA_FIELD_FIELD_OF_VIEW)
set vx[5]=GetCameraField(CAMERA_FIELD_ZOFFSET)
set ex[5]=GetCameraField(CAMERA_FIELD_ROLL)
set xx[5]=GetCameraField(CAMERA_FIELD_ROTATION)
endfunction
function Kn takes nothing returns nothing
call CameraSetupApplyForPlayer(true,ho,GetTriggerPlayer(),0)
set jv[(1+GetPlayerId(GetTriggerPlayer()))]=CameraSetupGetFieldSwap(CAMERA_FIELD_TARGET_DISTANCE,ho)
set Lv[(1+GetPlayerId(GetTriggerPlayer()))]=CameraSetupGetFieldSwap(CAMERA_FIELD_ANGLE_OF_ATTACK,ho)
set pv[(1+GetPlayerId(GetTriggerPlayer()))]=CameraSetupGetFieldSwap(CAMERA_FIELD_FARZ,ho)
set mv[(1+GetPlayerId(GetTriggerPlayer()))]=CameraSetupGetFieldSwap(CAMERA_FIELD_FIELD_OF_VIEW,ho)
set qv[(1+GetPlayerId(GetTriggerPlayer()))]=CameraSetupGetFieldSwap(CAMERA_FIELD_ZOFFSET,ho)
set Pv[(1+GetPlayerId(GetTriggerPlayer()))]=CameraSetupGetFieldSwap(CAMERA_FIELD_ROLL,ho)
set Mv[(1+GetPlayerId(GetTriggerPlayer()))]=CameraSetupGetFieldSwap(CAMERA_FIELD_ROTATION,ho)
set ye[6]=GetCameraField(CAMERA_FIELD_TARGET_DISTANCE)
set Ye[6]=GetCameraField(CAMERA_FIELD_ANGLE_OF_ATTACK)
set ze[6]=GetCameraField(CAMERA_FIELD_FARZ)
set Ze[6]=GetCameraField(CAMERA_FIELD_FIELD_OF_VIEW)
set vx[6]=GetCameraField(CAMERA_FIELD_ZOFFSET)
set ex[6]=GetCameraField(CAMERA_FIELD_ROLL)
set xx[6]=GetCameraField(CAMERA_FIELD_ROTATION)
endfunction
function ln takes nothing returns boolean
return(jv[(1+GetPlayerId(GetTriggerPlayer()))]==.0)
endfunction
function Ln takes nothing returns nothing
if(ln())then
set jv[(1+GetPlayerId(GetTriggerPlayer()))]=CameraSetupGetFieldSwap(CAMERA_FIELD_TARGET_DISTANCE,Fo)
set Lv[(1+GetPlayerId(GetTriggerPlayer()))]=CameraSetupGetFieldSwap(CAMERA_FIELD_ANGLE_OF_ATTACK,Fo)
set pv[(1+GetPlayerId(GetTriggerPlayer()))]=CameraSetupGetFieldSwap(CAMERA_FIELD_FARZ,Fo)
set mv[(1+GetPlayerId(GetTriggerPlayer()))]=CameraSetupGetFieldSwap(CAMERA_FIELD_FIELD_OF_VIEW,Fo)
set qv[(1+GetPlayerId(GetTriggerPlayer()))]=CameraSetupGetFieldSwap(CAMERA_FIELD_ZOFFSET,Fo)
set Pv[(1+GetPlayerId(GetTriggerPlayer()))]=CameraSetupGetFieldSwap(CAMERA_FIELD_ROLL,Fo)
set Mv[(1+GetPlayerId(GetTriggerPlayer()))]=270.
else
set Lv[(1+GetPlayerId(GetTriggerPlayer()))]=CameraSetupGetFieldSwap(CAMERA_FIELD_ANGLE_OF_ATTACK,Fo)
set pv[(1+GetPlayerId(GetTriggerPlayer()))]=CameraSetupGetFieldSwap(CAMERA_FIELD_FARZ,Fo)
set mv[(1+GetPlayerId(GetTriggerPlayer()))]=CameraSetupGetFieldSwap(CAMERA_FIELD_FIELD_OF_VIEW,Fo)
set qv[(1+GetPlayerId(GetTriggerPlayer()))]=CameraSetupGetFieldSwap(CAMERA_FIELD_ZOFFSET,Fo)
set Pv[(1+GetPlayerId(GetTriggerPlayer()))]=CameraSetupGetFieldSwap(CAMERA_FIELD_ROLL,Fo)
set Mv[(1+GetPlayerId(GetTriggerPlayer()))]=270.
endif
set ye[7]=GetCameraField(CAMERA_FIELD_TARGET_DISTANCE)
set Ye[7]=GetCameraField(CAMERA_FIELD_ANGLE_OF_ATTACK)
set ze[7]=GetCameraField(CAMERA_FIELD_FARZ)
set Ze[7]=GetCameraField(CAMERA_FIELD_FIELD_OF_VIEW)
set vx[7]=GetCameraField(CAMERA_FIELD_ZOFFSET)
set ex[7]=GetCameraField(CAMERA_FIELD_ROLL)
set xx[7]=GetCameraField(CAMERA_FIELD_ROTATION)
endfunction
function mn takes nothing returns nothing
call ResetToGameCameraForPlayer(GetTriggerPlayer(),0)
set jv[(1+GetPlayerId(GetTriggerPlayer()))]=GetCameraField(CAMERA_FIELD_TARGET_DISTANCE)
set Lv[(1+GetPlayerId(GetTriggerPlayer()))]=GetCameraField(CAMERA_FIELD_ANGLE_OF_ATTACK)
set pv[(1+GetPlayerId(GetTriggerPlayer()))]=GetCameraField(CAMERA_FIELD_FARZ)
set mv[(1+GetPlayerId(GetTriggerPlayer()))]=GetCameraField(CAMERA_FIELD_FIELD_OF_VIEW)
set qv[(1+GetPlayerId(GetTriggerPlayer()))]=GetCameraField(CAMERA_FIELD_ZOFFSET)
set Pv[(1+GetPlayerId(GetTriggerPlayer()))]=GetCameraField(CAMERA_FIELD_ROLL)
set Mv[(1+GetPlayerId(GetTriggerPlayer()))]=GetCameraField(CAMERA_FIELD_ROTATION)
endfunction
function Mn takes nothing returns boolean
return(GetRandomInt(1,2)==1)
endfunction
function pn takes nothing returns nothing
if(Mn())then
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,("|CFFFF0303"+(GetPlayerName(Player(0))+" has been chosen to draft first!")))
call TriggerExecute(Xr)
else
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,("|CFFFF0303"+(GetPlayerName(Player(6))+" has been chosen to draft first!")))
call TriggerExecute(Ar)
endif
endfunction
function Pn takes nothing returns boolean
return(bj_forLoopAIndex==1)
endfunction
function qn takes nothing returns boolean
return(bj_forLoopAIndex==7)
endfunction
function Qn takes nothing returns boolean
return(GetBooleanOr(Pn(),qn()))or(nv[bj_forLoopAIndex])or(GetPlayerSlotState(Player(-1+(bj_forLoopAIndex)))!=PLAYER_SLOT_STATE_PLAYING)
endfunction
function sn takes nothing returns boolean
return(Qn())
endfunction
function Sn takes nothing returns nothing
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,("|CFFFF0303"+(GetPlayerName(Player(0))+" is now drafting a player!")))
call DialogClear(vv[3])
call DialogSetMessage(vv[3],"Players Available")
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(sn())then
else
call DialogAddButtonBJ(vv[3],(Iv[bj_forLoopAIndex]+GetPlayerName(Player(-1+(bj_forLoopAIndex)))))
set Vv[bj_forLoopAIndex]=bj_lastCreatedButton
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call DialogDisplayBJ(true,vv[3],Player(0))
set ox=true
endfunction
function tn takes nothing returns boolean
return(GetClickedButton()==Vv[bj_forLoopAIndex])
endfunction
function Tn takes nothing returns boolean
return(Nv[bj_forLoopAIndex])
endfunction
function un takes nothing returns nothing
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(tn())then
set Xv=bj_forLoopAIndex
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call DialogClear(vv[4])
call DialogSetMessage(vv[4],"Team One Positions")
set bj_forLoopAIndex=2
set bj_forLoopAIndexEnd=6
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(Tn())then
call DialogAddButtonBJ(vv[4],(Iv[bj_forLoopAIndex]+Av[(bj_forLoopAIndex-0)]))
set Ov[bj_forLoopAIndex]=bj_lastCreatedButton
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call DialogAddButtonBJ(vv[4],"Back")
set Fv[0]=bj_lastCreatedButton
call DialogDisplayBJ(true,vv[4],Player(0))
endfunction
function Un takes nothing returns boolean
return(GetClickedButton()==Fv[0])
endfunction
function wn takes nothing returns boolean
return(GetClickedButton()==Ov[bj_forLoopAIndex])and(Gv==false)
endfunction
function Wn takes nothing returns boolean
return(Gv==false)
endfunction
function yn takes nothing returns boolean
return(Ev<=0)and(Gv==false)
endfunction
function Yn takes nothing returns boolean
return(Ev<=0)and(Gv)
endfunction
function zn takes nothing returns nothing
if(Yn())then
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"|CFFFF0303Drafting completed!")
call DestroyTrigger(Er)
call DestroyTrigger(Ar)
call DestroyTrigger(Nr)
call DestroyTrigger(br)
call DestroyTrigger(Xr)
call DestroyTrigger(Rr)
call TriggerExecute(to)
call DestroyTrigger(GetTriggeringTrigger())
set Er=null
set Ar=null
set Nr=null
set br=null
set Xr=null
set Rr=null
set Ir=null
else
set Gv=false
if(Un())then
call DialogDisplayBJ(false,vv[4],Player(0))
call DialogDisplayBJ(true,vv[3],Player(0))
set Gv=true
endif
set bj_forLoopAIndex=2
set bj_forLoopAIndexEnd=6
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(wn())then
set Nv[bj_forLoopAIndex]=false
set Ev=(Ev-1)
set nv[Xv]=true
call ui(Player(-1+(Xv)),dv[bj_forLoopAIndex],false)
call ForceAddPlayer(cv[0],Player(-1+(Xv)))
set bv[bj_forLoopAIndex]=Player(-1+(Xv))
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,(Iv[Xv]+((GetPlayerName(Player(-1+(Xv)))+" |CFFFF0303has been drafted to play on position: ")+(Iv[bj_forLoopAIndex]+(Av[bj_forLoopAIndex]+"|CFFFF0303!")))))
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
if(yn())then
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"|CFFFF0303Drafting completed!")
call DestroyTrigger(Er)
call DestroyTrigger(Ar)
call DestroyTrigger(Nr)
call DestroyTrigger(br)
call DestroyTrigger(Xr)
call DestroyTrigger(Rr)
call TriggerExecute(to)
call DestroyTrigger(GetTriggeringTrigger())
else
if(Wn())then
call TriggerExecute(Ar)
endif
endif
endif
endfunction
function Zn takes nothing returns boolean
return(bj_forLoopAIndex==1)
endfunction
function vV takes nothing returns boolean
return(bj_forLoopAIndex==7)
endfunction
function eV takes nothing returns boolean
return(GetBooleanOr(Zn(),vV()))or(nv[bj_forLoopAIndex])or(GetPlayerSlotState(Player(-1+(bj_forLoopAIndex)))!=PLAYER_SLOT_STATE_PLAYING)
endfunction
function xV takes nothing returns boolean
return(eV())
endfunction
function oV takes nothing returns nothing
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,("|CFFFF0303"+(GetPlayerName(Player(6))+" is now drafting a player!")))
call DialogClear(vv[5])
call DialogSetMessage(vv[5],"Players Available")
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(xV())then
else
call DialogAddButtonBJ(vv[5],(Iv[bj_forLoopAIndex]+GetPlayerName(Player(-1+(bj_forLoopAIndex)))))
set Vv[bj_forLoopAIndex]=bj_lastCreatedButton
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call DialogDisplayBJ(true,vv[5],Player(6))
set ox=true
endfunction
function rV takes nothing returns boolean
return(GetClickedButton()==Vv[bj_forLoopAIndex])
endfunction
function iV takes nothing returns boolean
return(Nv[bj_forLoopAIndex])
endfunction
function aV takes nothing returns nothing
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(rV())then
set Xv=bj_forLoopAIndex
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call DialogClear(vv[6])
call DialogSetMessage(vv[6],"Team Two Positions")
set bj_forLoopAIndex=8
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(iV())then
call DialogAddButtonBJ(vv[6],(Iv[bj_forLoopAIndex]+Av[(bj_forLoopAIndex-6)]))
set Rv[bj_forLoopAIndex]=bj_lastCreatedButton
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call DialogAddButtonBJ(vv[6],"Back")
set Fv[1]=bj_lastCreatedButton
call DialogDisplayBJ(true,vv[6],Player(6))
endfunction
function nV takes nothing returns boolean
return(GetClickedButton()==Fv[1])
endfunction
function VV takes nothing returns boolean
return(GetClickedButton()==Rv[bj_forLoopAIndex])and(Gv==false)
endfunction
function EV takes nothing returns boolean
return(Gv==false)
endfunction
function XV takes nothing returns boolean
return(Ev<=0)and(Gv==false)
endfunction
function OV takes nothing returns boolean
return(Ev<=0)and(Gv)
endfunction
function RV takes nothing returns nothing
if(OV())then
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"|CFFFF0303Drafting completed!")
call DestroyTrigger(Er)
call DestroyTrigger(Ar)
call DestroyTrigger(Nr)
call DestroyTrigger(Xr)
call DestroyTrigger(Rr)
call DestroyTrigger(Ir)
call TriggerExecute(to)
call DestroyTrigger(GetTriggeringTrigger())
set Er=null
set Ar=null
set Nr=null
set br=null
set Xr=null
set Rr=null
set br=null
else
set Gv=false
if(nV())then
call DialogDisplayBJ(false,vv[6],Player(6))
call DialogDisplayBJ(true,vv[5],Player(6))
set Gv=true
endif
set bj_forLoopAIndex=8
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(VV())then
set Nv[bj_forLoopAIndex]=false
set Ev=(Ev-1)
set nv[Xv]=true
call ui(Player(-1+(Xv)),dv[(bj_forLoopAIndex+0)],false)
call ForceAddPlayer(cv[1],Player(-1+(Xv)))
set bv[bj_forLoopAIndex]=Player(-1+(Xv))
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,(Iv[Xv]+((GetPlayerName(Player(-1+(Xv)))+" |CFFFF0303has been drafted to play on position: ")+(Iv[bj_forLoopAIndex]+(Av[(bj_forLoopAIndex-6)]+"|CFFFF0303!")))))
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
if(XV())then
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"|CFFFF0303Drafting completed!")
call DestroyTrigger(Er)
call DestroyTrigger(Ar)
call DestroyTrigger(Nr)
call DestroyTrigger(Xr)
call DestroyTrigger(Rr)
call DestroyTrigger(Ir)
call TriggerExecute(to)
call DestroyTrigger(GetTriggeringTrigger())
else
if(EV())then
call TriggerExecute(Xr)
endif
endif
endif
endfunction
function IV takes nothing returns boolean
return(GetItemTypeId(GetManipulatedItem())=='I000')
endfunction
function AV takes nothing returns boolean
return(Rx)
endfunction
function NV takes nothing returns boolean
return(Xx[(1+GetPlayerId(GetOwningPlayer(GetManipulatingUnit())))]==false)and(Ox[1]<=2)and(kv==false)and(Rx==false)
endfunction
function bV takes nothing returns boolean
return(Xx[(1+GetPlayerId(GetOwningPlayer(GetManipulatingUnit())))]==false)and(Ox[0]<=2)and(kv==false)and(Rx==false)
endfunction
function BV takes nothing returns boolean
return(GetOwningPlayer(GetManipulatingUnit())==Player(0))
endfunction
function cV takes nothing returns boolean
return(Sv)
endfunction
function CV takes nothing returns boolean
return(bj_forLoopAIndex==3)or(bj_forLoopAIndex==4)or(bj_forLoopAIndex==9)or(bj_forLoopAIndex==10)
endfunction
function dV takes nothing returns boolean
return(CV())
endfunction
function DV takes nothing returns boolean
return(GetUnitTypeId(GetManipulatingUnit())=='Hblm')
endfunction
function fV takes nothing returns boolean
return(bj_forLoopAIndex==3)or(bj_forLoopAIndex==4)or(bj_forLoopAIndex==9)or(bj_forLoopAIndex==10)
endfunction
function FV takes nothing returns boolean
return(fV())
endfunction
function gV takes nothing returns boolean
return(rx==false)and(kv==false)and(Xx[(1+GetPlayerId(GetOwningPlayer(GetManipulatingUnit())))]==false)and(Rx==false)
endfunction
function GV takes nothing returns boolean
return(GetUnitTypeId(GetManipulatingUnit())=='H000')
endfunction
function hV takes nothing returns boolean
return(bj_forLoopAIndex==3)or(bj_forLoopAIndex==4)or(bj_forLoopAIndex==9)or(bj_forLoopAIndex==10)
endfunction
function HV takes nothing returns boolean
return(hV())
endfunction
function jV takes nothing returns boolean
return(GetUnitTypeId(GetManipulatingUnit())=='e002')
endfunction
function JV takes nothing returns boolean
return(bj_forLoopAIndex==3)or(bj_forLoopAIndex==4)or(bj_forLoopAIndex==9)or(bj_forLoopAIndex==10)
endfunction
function kV takes nothing returns boolean
return(JV())
endfunction
function KV takes nothing returns boolean
return(GetUnitTypeId(GetManipulatingUnit())=='E001')
endfunction
function lV takes nothing returns boolean
return(bj_forLoopAIndex==3)or(bj_forLoopAIndex==4)or(bj_forLoopAIndex==9)or(bj_forLoopAIndex==10)
endfunction
function LV takes nothing returns boolean
return(lV())
endfunction
function mV takes nothing returns boolean
return(rx==false)and(kv==false)and(Xx[(1+GetPlayerId(GetOwningPlayer(GetManipulatingUnit())))]==false)and(Rx==false)
endfunction
function MV takes nothing returns boolean
return(GetUnitTypeId(GetManipulatingUnit())=='E000')
endfunction
function pV takes nothing returns nothing
set bx=false
if(DV())then
call UnitRemoveBuffsBJ(2,GetManipulatingUnit())
call SetUnitMoveSpeed(GetManipulatingUnit(),GetUnitDefaultMoveSpeed(GetManipulatingUnit()))
if(AV())then
call UnitResetCooldown(GetManipulatingUnit())
endif
call AddSpecialEffectTargetUnitBJ("right hand",GetManipulatingUnit(),"Abilities\\Weapons\\DemolisherFireMissile\\DemolisherFireMissile.mdl")
set b=bj_lastCreatedEffect
if(cV())then
call UnitRemoveAbility(GetManipulatingUnit(),'A00B')
call UnitRemoveAbility(GetManipulatingUnit(),'A002')
else
call UnitRemoveAbility(GetManipulatingUnit(),'A00B')
if(BV())then
set Ox[0]=(Ox[0]+1)
if(bV())then
call UnitAddAbility(GetManipulatingUnit(),'A00B')
else
set Xx[(1+GetPlayerId(GetOwningPlayer(GetManipulatingUnit())))]=true
endif
else
set Ox[1]=(Ox[1]+1)
if(NV())then
call UnitAddAbility(GetManipulatingUnit(),'A00B')
else
set Xx[(1+GetPlayerId(GetOwningPlayer(GetManipulatingUnit())))]=true
endif
endif
endif
call SetUnitMoveSpeed(GetManipulatingUnit(),(GetUnitMoveSpeed(GetManipulatingUnit())-20.))
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(dV())then
else
call UnitAddAbility(J[bj_forLoopAIndex],'Absk')
call UnitRemoveAbility(J[bj_forLoopAIndex],'A00C')
call UnitRemoveAbility(J[bj_forLoopAIndex],'A00D')
call UnitAddAbility(J[bj_forLoopAIndex],'A00D')
call UnitAddAbility(J[bj_forLoopAIndex],'A00C')
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endif
if(GV())then
call AddSpecialEffectTargetUnitBJ("right hand",GetManipulatingUnit(),"Abilities\\Weapons\\DemolisherFireMissile\\DemolisherFireMissile.mdl")
set b=bj_lastCreatedEffect
call SetUnitMoveSpeed(GetManipulatingUnit(),(GetUnitMoveSpeed(GetManipulatingUnit())-40.))
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(FV())then
else
call UnitAddAbility(J[bj_forLoopAIndex],'Absk')
call UnitRemoveAbility(J[bj_forLoopAIndex],'A00C')
call UnitRemoveAbility(J[bj_forLoopAIndex],'A00D')
call UnitAddAbility(J[bj_forLoopAIndex],'A00D')
call UnitAddAbility(J[bj_forLoopAIndex],'A00C')
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
if(gV())then
call UnitAddAbility(GetManipulatingUnit(),'A00B')
set Xx[(1+GetPlayerId(GetOwningPlayer(GetManipulatingUnit())))]=true
endif
endif
if(jV())then
call AddSpecialEffectTargetUnitBJ("right hand",GetManipulatingUnit(),"Abilities\\Weapons\\DemolisherFireMissile\\DemolisherFireMissile.mdl")
set b=bj_lastCreatedEffect
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(HV())then
else
call UnitAddAbility(J[bj_forLoopAIndex],'Absk')
call UnitRemoveAbility(J[bj_forLoopAIndex],'A00C')
call UnitAddAbility(J[bj_forLoopAIndex],'A00C')
call UnitRemoveAbility(J[bj_forLoopAIndex],'A00D')
call UnitAddAbility(J[bj_forLoopAIndex],'A00D')
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endif
if(KV())then
call AddSpecialEffectTargetUnitBJ("right hand",GetManipulatingUnit(),"Abilities\\Weapons\\DemolisherFireMissile\\DemolisherFireMissile.mdl")
set b=bj_lastCreatedEffect
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(kV())then
else
call UnitAddAbility(J[bj_forLoopAIndex],'Absk')
call UnitRemoveAbility(J[bj_forLoopAIndex],'A00C')
call UnitAddAbility(J[bj_forLoopAIndex],'A00C')
call UnitRemoveAbility(J[bj_forLoopAIndex],'A00D')
call UnitAddAbility(J[bj_forLoopAIndex],'A00D')
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endif
if(MV())then
call AddSpecialEffectTargetUnitBJ("right hand",GetManipulatingUnit(),"Abilities\\Weapons\\DemolisherFireMissile\\DemolisherFireMissile.mdl")
set b=bj_lastCreatedEffect
call SetUnitMoveSpeed(GetManipulatingUnit(),(GetUnitMoveSpeed(GetManipulatingUnit())-40.))
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(LV())then
else
call UnitRemoveAbility(J[bj_forLoopAIndex],'A00D')
call UnitAddAbility(J[bj_forLoopAIndex],'A00D')
call UnitAddAbility(J[bj_forLoopAIndex],'Absk')
call UnitRemoveAbility(J[bj_forLoopAIndex],'A00C')
call UnitAddAbility(J[bj_forLoopAIndex],'A00C')
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
if(mV())then
call UnitAddAbility(GetManipulatingUnit(),'A00B')
set Xx[(1+GetPlayerId(GetOwningPlayer(GetManipulatingUnit())))]=true
endif
endif
endfunction
function PV takes nothing returns boolean
return(GetItemTypeId(GetManipulatedItem())=='I000')
endfunction
function qV takes nothing returns boolean
return(GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(),bj_forLoopAIndex))=='I000')
endfunction
function QV takes nothing returns boolean
return(e[(1+GetPlayerId(GetOwningPlayer(GetManipulatingUnit())))]>1)
endfunction
function sV takes nothing returns boolean
return(GetUnitTypeId(GetManipulatingUnit())=='Hblm')
endfunction
function SV takes nothing returns boolean
return(GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(),bj_forLoopAIndex))=='I000')
endfunction
function tV takes nothing returns boolean
return(e[(1+GetPlayerId(GetOwningPlayer(GetManipulatingUnit())))]>1)
endfunction
function TV takes nothing returns boolean
return(GetUnitTypeId(GetManipulatingUnit())=='H000')
endfunction
function uV takes nothing returns boolean
return(GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(),bj_forLoopAIndex))=='I000')
endfunction
function UV takes nothing returns boolean
return(e[(1+GetPlayerId(GetOwningPlayer(GetManipulatingUnit())))]>1)
endfunction
function wV takes nothing returns boolean
return(GetUnitTypeId(GetManipulatingUnit())=='E001')
endfunction
function WV takes nothing returns boolean
return(GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(),bj_forLoopAIndex))=='I000')
endfunction
function yV takes nothing returns boolean
return(e[(1+GetPlayerId(GetOwningPlayer(GetManipulatingUnit())))]>1)
endfunction
function YV takes nothing returns boolean
return(GetUnitTypeId(GetManipulatingUnit())=='E000')
endfunction
function zV takes nothing returns nothing
if(sV())then
set e[(1+GetPlayerId(GetOwningPlayer(GetManipulatingUnit())))]=0
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=6
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(qV())then
set e[(1+GetPlayerId(GetOwningPlayer(GetManipulatingUnit())))]=(e[(1+GetPlayerId(GetOwningPlayer(GetManipulatingUnit())))]+1)
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
if(QV())then
else
call UnitRemoveAbility(GetManipulatingUnit(),'A00B')
call UnitRemoveAbility(GetManipulatingUnit(),'A002')
call DestroyEffect(b)
set b=null
call IssueImmediateOrderById(GetManipulatingUnit(),851972)
call SetUnitMoveSpeed(GetManipulatingUnit(),(GetUnitMoveSpeed(GetManipulatingUnit())+50.))
endif
endif
if(TV())then
set e[(1+GetPlayerId(GetOwningPlayer(GetManipulatingUnit())))]=0
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=6
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(SV())then
set e[(1+GetPlayerId(GetOwningPlayer(GetManipulatingUnit())))]=(e[(1+GetPlayerId(GetOwningPlayer(GetManipulatingUnit())))]+1)
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
if(tV())then
else
call UnitRemoveAbility(GetManipulatingUnit(),'A00B')
call UnitRemoveAbility(GetManipulatingUnit(),'A002')
call DestroyEffect(b)
set b=null
call IssueImmediateOrderById(GetManipulatingUnit(),851972)
call SetUnitMoveSpeed(GetManipulatingUnit(),(GetUnitMoveSpeed(GetManipulatingUnit())+50.))
endif
endif
if(wV())then
set e[(1+GetPlayerId(GetOwningPlayer(GetManipulatingUnit())))]=0
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=6
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(uV())then
set e[(1+GetPlayerId(GetOwningPlayer(GetManipulatingUnit())))]=(e[(1+GetPlayerId(GetOwningPlayer(GetManipulatingUnit())))]+1)
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
if(UV())then
else
call DestroyEffect(b)
set b=null
call SetUnitMoveSpeed(GetManipulatingUnit(),(GetUnitMoveSpeed(GetManipulatingUnit())+50.))
endif
endif
if(YV())then
set e[(1+GetPlayerId(GetOwningPlayer(GetManipulatingUnit())))]=0
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=6
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(WV())then
set e[(1+GetPlayerId(GetOwningPlayer(GetManipulatingUnit())))]=(e[(1+GetPlayerId(GetOwningPlayer(GetManipulatingUnit())))]+1)
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
if(yV())then
else
call UnitRemoveAbility(GetManipulatingUnit(),'A00B')
call UnitRemoveAbility(GetManipulatingUnit(),'A002')
call DestroyEffect(b)
set b=null
call IssueImmediateOrderById(GetManipulatingUnit(),851972)
call SetUnitMoveSpeed(GetManipulatingUnit(),(GetUnitMoveSpeed(GetManipulatingUnit())+50.))
endif
endif
endfunction
function ZV takes nothing returns boolean
return(GetSpellAbilityId()=='A00B')and(Rx==false)
endfunction
function vE takes nothing returns boolean
return(AngleBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetSpellTargetLoc())))!=90.)
endfunction
function eE takes nothing returns boolean
return(AngleBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetSpellTargetLoc())))==90.)
endfunction
function xE takes nothing returns boolean
return(f==1)
endfunction
function oE takes nothing returns boolean
return(DistanceBetweenPoints(GetUnitLoc(GetSpellAbilityUnit()),GetSpellTargetLoc())>(I2R(GetHeroStatBJ(0,GetSpellAbilityUnit(),true))*30.))
endfunction
function rE takes nothing returns boolean
return(ev)
endfunction
function iE takes nothing returns boolean
return(DistanceBetweenPoints(GetUnitLoc(GetSpellAbilityUnit()),GetSpellTargetLoc())>(I2R(GetHeroStatBJ(0,GetSpellAbilityUnit(),true))*25.))
endfunction
function aE takes nothing returns boolean
return(ev==false)
endfunction
function nE takes nothing returns boolean
return(ev)
endfunction
function VE takes nothing returns boolean
return(AngleBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetSpellTargetLoc())))!=90.)
endfunction
function EE takes nothing returns boolean
return(AngleBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetSpellTargetLoc())))==90.)
endfunction
function XE takes nothing returns boolean
return(f==1)
endfunction
function OE takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==false)
endfunction
function RE takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function IE takes nothing returns boolean
return(GetItemTypeId(UnitItemInSlotBJ(J[bj_forLoopAIndex],1))=='I000')
endfunction
function AE takes nothing returns boolean
return(RectContainsLoc(ux,GetUnitLoc(bj_lastCreatedUnit)))or(RectContainsLoc(Tx,GetUnitLoc(bj_lastCreatedUnit)))or(RectContainsLoc(tx,GetUnitLoc(bj_lastCreatedUnit)))or(RectContainsLoc(Ux,GetUnitLoc(bj_lastCreatedUnit)))
endfunction
function NE takes nothing returns boolean
return(AE())
endfunction
function bE takes nothing returns boolean
return(DistanceBetweenPoints(GetUnitLoc(GetSpellAbilityUnit()),GetSpellTargetLoc())>(I2R(GetHeroStatBJ(0,GetSpellAbilityUnit(),true))*60.))
endfunction
function BE takes nothing returns boolean
return(ev)
endfunction
function cE takes nothing returns boolean
return(DistanceBetweenPoints(GetUnitLoc(GetSpellAbilityUnit()),GetSpellTargetLoc())>(I2R(GetHeroStatBJ(0,GetSpellAbilityUnit(),true))*50.))
endfunction
function CE takes nothing returns boolean
return(ev==false)
endfunction
function dE takes nothing returns boolean
return(ev)
endfunction
function DE takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==false)
endfunction
function fE takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function FE takes nothing returns boolean
return(GetItemTypeId(UnitItemInSlotBJ(J[bj_forLoopAIndex],1))=='I000')
endfunction
function gE takes nothing returns boolean
return(RectContainsLoc(ux,GetUnitLoc(bj_lastCreatedUnit)))or(RectContainsLoc(Tx,GetUnitLoc(bj_lastCreatedUnit)))or(RectContainsLoc(Ux,GetUnitLoc(bj_lastCreatedUnit)))or(RectContainsLoc(tx,GetUnitLoc(bj_lastCreatedUnit)))
endfunction
function GE takes nothing returns boolean
return(gE())
endfunction
function hE takes nothing returns boolean
return(GetUnitTypeId(GetSpellAbilityUnit())=='Hblm')
endfunction
function HE takes nothing returns nothing
if(hE())then
if(xE())then
if(eE())then
else
set rx=true
endif
else
if(vE())then
else
set rx=true
endif
endif
if(BE())then
if(bE())then
set O=(I2R(GetHeroStatBJ(0,GetSpellAbilityUnit(),true))*60.)
else
set O=DistanceBetweenPoints(GetUnitLoc(GetSpellAbilityUnit()),GetSpellTargetLoc())
endif
endif
if(CE())then
if(cE())then
set O=(I2R(GetHeroStatBJ(0,GetSpellAbilityUnit(),true))*50.)
else
set O=DistanceBetweenPoints(GetUnitLoc(GetSpellAbilityUnit()),GetSpellTargetLoc())
endif
endif
set n=((O/ 1.)+.0)
if(dE())then
set R=((((O/(I2R(GetHeroStatBJ(0,GetSpellAbilityUnit(),true))*60.))*(I2R(GetHeroStatBJ(0,GetSpellAbilityUnit(),true))*2.7))+.0)+.0)
else
set R=((((O/(I2R(GetHeroStatBJ(0,GetSpellAbilityUnit(),true))*50.))*(I2R(GetHeroStatBJ(0,GetSpellAbilityUnit(),true))*2.25))+.0)+.0)
endif
set xv=true
set A=R2I(R)
set N=0
set X=(O/ R)
set E[1]=(n/ R)
set E[2]=(n/(R+50.))
set E[3]=(n/(R+400.))
set o=AngleBetweenPoints(GetUnitLoc(GetSpellAbilityUnit()),GetSpellTargetLoc())
set V=.0
call CreateNUnitsAtLoc(1,'n002',Player(15),GetUnitLoc(GetSpellAbilityUnit()),GetUnitFacing(GetSpellAbilityUnit()))
set I=bj_lastCreatedUnit
call CreateNUnitsAtLoc(1,'n000',GetOwningPlayer(GetSpellAbilityUnit()),gi(GetUnitLoc(GetSpellAbilityUnit()),O,o),bj_UNIT_FACING)
set ix=GetSpellAbilityUnit()
if(GE())then
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,(("|CFF0042FF"+GetPlayerName(GetOwningPlayer(GetSpellAbilityUnit())))+" has thrown out of bounds!"))
call RemoveItem(GetItemOfTypeFromUnitBJ(GetSpellAbilityUnit(),'I000'))
call RemoveUnit(bj_lastCreatedUnit)
call Di(.1)
call ForGroupBJ(Pi(Player(15),Condition(function DE)),function fE)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(FE())then
call RemoveItem(GetItemOfTypeFromUnitBJ(J[bj_forLoopAIndex],'I000'))
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call DestroyEffect(b)
set b=null
call TriggerExecute(Tr)
else
set q=gi(GetUnitLoc(GetSpellAbilityUnit()),O,o)
set B=bj_lastCreatedUnit
call RemoveItem(GetItemOfTypeFromUnitBJ(GetSpellAbilityUnit(),'I000'))
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call UnitRemoveAbility(J[bj_forLoopAIndex],'Absk')
call UnitRemoveAbility(J[bj_forLoopAIndex],'A00C')
call UnitRemoveAbility(J[bj_forLoopAIndex],'A00D')
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endif
else
if(rE())then
if(oE())then
set O=(I2R(GetHeroStatBJ(0,GetSpellAbilityUnit(),true))*30.)
else
set O=DistanceBetweenPoints(GetUnitLoc(GetSpellAbilityUnit()),GetSpellTargetLoc())
endif
endif
if(aE())then
if(iE())then
set O=(I2R(GetHeroStatBJ(0,GetSpellAbilityUnit(),true))*25.)
else
set O=DistanceBetweenPoints(GetUnitLoc(GetSpellAbilityUnit()),GetSpellTargetLoc())
endif
endif
set n=((O/ 1.)+.0)
if(nE())then
set R=((((O/(I2R(GetHeroStatBJ(0,GetSpellAbilityUnit(),true))*30.))*(I2R(GetHeroStatBJ(0,GetSpellAbilityUnit(),true))*1.35))+.0)+.0)
else
set R=((((O/(I2R(GetHeroStatBJ(0,GetSpellAbilityUnit(),true))*25.))*(I2R(GetHeroStatBJ(0,GetSpellAbilityUnit(),true))*1.13))+.0)+.0)
endif
set xv=true
set A=R2I(R)
set N=0
set X=(O/ R)
set E[1]=(n/ R)
set E[2]=(n/(R+50.))
set E[3]=(n/(R+400.))
set o=AngleBetweenPoints(GetUnitLoc(GetSpellAbilityUnit()),GetSpellTargetLoc())
set V=.0
call CreateNUnitsAtLoc(1,'n002',Player(15),GetUnitLoc(GetSpellAbilityUnit()),GetUnitFacing(GetSpellAbilityUnit()))
set I=bj_lastCreatedUnit
call CreateNUnitsAtLoc(1,'n000',GetOwningPlayer(GetSpellAbilityUnit()),gi(GetUnitLoc(GetSpellAbilityUnit()),O,o),bj_UNIT_FACING)
set ix=GetSpellAbilityUnit()
if(XE())then
if(EE())then
else
set rx=true
endif
else
if(VE())then
else
set rx=true
endif
endif
if(NE())then
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,(("|CFF0042FF"+GetPlayerName(GetOwningPlayer(GetSpellAbilityUnit())))+" has thrown out of bounds!"))
call RemoveItem(GetItemOfTypeFromUnitBJ(GetSpellAbilityUnit(),'I000'))
call RemoveUnit(bj_lastCreatedUnit)
call Di(.1)
call ForGroupBJ(Pi(Player(15),Condition(function OE)),function RE)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(IE())then
call RemoveItem(GetItemOfTypeFromUnitBJ(J[bj_forLoopAIndex],'I000'))
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call DestroyEffect(b)
set b=null
call TriggerExecute(Tr)
else
set q=gi(GetUnitLoc(GetSpellAbilityUnit()),O,o)
set B=bj_lastCreatedUnit
call RemoveItem(GetItemOfTypeFromUnitBJ(GetSpellAbilityUnit(),'I000'))
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call UnitRemoveAbility(J[bj_forLoopAIndex],'Absk')
call UnitRemoveAbility(J[bj_forLoopAIndex],'A00C')
call UnitRemoveAbility(J[bj_forLoopAIndex],'A00D')
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endif
endif
endfunction
function jE takes nothing returns boolean
return(GetSpellAbilityId()=='A006')or(GetSpellAbilityId()=='A00D')
endfunction
function JE takes nothing returns boolean
return(jE())
endfunction
function kE takes nothing returns boolean
return(GetSpellAbilityId()=='A00D')
endfunction
function KE takes nothing returns boolean
return(IsPlayerAlly(GetOwningPlayer(GetSpellAbilityUnit()),GetOwningPlayer(GetSpellTargetUnit())))
endfunction
function lE takes nothing returns boolean
return(IsPlayerAlly(GetOwningPlayer(GetSpellAbilityUnit()),GetOwningPlayer(GetSpellTargetUnit())))
endfunction
function LE takes nothing returns boolean
return(Bx==false)and(Rx==false)
endfunction
function mE takes nothing returns boolean
return(RectContainsLoc(Wx,GetUnitLoc(GetSpellTargetUnit())))or(RectContainsLoc(wx,GetUnitLoc(GetSpellTargetUnit())))
endfunction
function ME takes nothing returns boolean
return(Rx)and(IsPlayerAlly(GetOwningPlayer(GetSpellAbilityUnit()),GetOwningPlayer(GetSpellTargetUnit())))and(mE())
endfunction
function pE takes nothing returns boolean
return(Zv)and(Qv>=98)
endfunction
function PE takes nothing returns boolean
return(pE())
endfunction
function qE takes nothing returns boolean
return(UnitHasItemOfTypeBJ(GetSpellTargetUnit(),'I000'))
endfunction
function QE takes nothing returns boolean
return(GetSpellAbilityId()=='A006')
endfunction
function sE takes nothing returns nothing
if(QE())then
if(qE())then
set Qv=GetRandomInt(1,'d')
if(PE())then
set Sv=true
call RemoveItem(GetItemOfTypeFromUnitBJ(GetSpellTargetUnit(),'I000'))
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,(GetPlayerName(GetOwningPlayer(GetSpellTargetUnit()))+" has fumbled the ball!"))
call MoveRectToLoc(oo,GetUnitLoc(GetSpellTargetUnit()))
call MoveRectToLoc(ro,GetRectCenter(oo))
call CreateNUnitsAtLoc(1,'n002',Player(15),GetRectCenter(oo),.0)
set sv=bj_lastCreatedUnit
call TriggerSleepAction(GetRandomReal(.75,1.25))
call EnableTrigger(Gr)
call TriggerRegisterEnterRectSimple(Gr,ro)
else
if(ME())then
else
call KillUnit(GetSpellTargetUnit())
if(KE())then
else
set me[(1+GetPlayerId(GetOwningPlayer(GetSpellAbilityUnit())))]=(me[(1+GetPlayerId(GetOwningPlayer(GetSpellAbilityUnit())))]+1)
endif
if(LE())then
if(lE())then
else
set ge[(1+GetPlayerId(GetOwningPlayer(GetSpellAbilityUnit())))]=(ge[(1+GetPlayerId(GetOwningPlayer(GetSpellAbilityUnit())))]+1)
endif
endif
endif
endif
else
call SetUnitPositionLoc(GetSpellTargetUnit(),gi(GetUnitLoc(GetSpellTargetUnit()),80.,AngleBetweenPoints(GetUnitLoc(GetSpellAbilityUnit()),GetUnitLoc(GetSpellTargetUnit()))))
endif
else
if(kE())then
call IssueImmediateOrderById(GetSpellTargetUnit(),851972)
endif
endif
endfunction
function SE takes nothing returns boolean
return(Sv==false)
endfunction
function tE takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())=='n002')
endfunction
function TE takes nothing returns boolean
return(IsUnitAliveBJ(GetFilterUnit()))
endfunction
function uE takes nothing returns boolean
return(GetUnitUserData(GetFilterUnit())!=1000)
endfunction
function UE takes nothing returns boolean
return(GetUnitUserData(GetFilterUnit())!=1001)
endfunction
function wE takes nothing returns boolean
return GetBooleanAnd(uE(),UE())
endfunction
function WE takes nothing returns boolean
return GetBooleanAnd(TE(),wE())
endfunction
function yE takes nothing returns boolean
return GetBooleanAnd(tE(),WE())
endfunction
function YE takes nothing returns boolean
return(GetEnumUnit()!=B)and(GetUnitUserData(GetEnumUnit())!=1000)
endfunction
function zE takes nothing returns nothing
if(YE())then
call RemoveUnit(GetEnumUnit())
endif
endfunction
function ZE takes nothing returns boolean
return(GetEnumUnit()!=I)and(Rx==false)
endfunction
function vX takes nothing returns boolean
return(V>((n/ 5.)*2.))
endfunction
function eX takes nothing returns boolean
return(V>((n/ 5.)*1.))and(V<=((n/ 5.)*2.))
endfunction
function xX takes nothing returns boolean
return(V<=((n/ 5.)*1.))
endfunction
function oX takes nothing returns boolean
return(bx)
endfunction
function rX takes nothing returns boolean
return(Rx==false)
endfunction
function iX takes nothing returns boolean
return(N>=A)
endfunction
function aX takes nothing returns boolean
return(V>((n/ 5.)*2.))
endfunction
function nX takes nothing returns boolean
return(V>((n/ 5.)*1.))and(V<=((n/ 5.)*2.))
endfunction
function VX takes nothing returns boolean
return(V<=((n/ 5.)*1.))
endfunction
function EX takes nothing returns boolean
return(N<=(A/ 2))
endfunction
function XX takes nothing returns boolean
return(GetFilterUnit()!=ix)
endfunction
function OX takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())=='H000')
endfunction
function RX takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())=='E000')
endfunction
function IX takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())=='Hblm')
endfunction
function AX takes nothing returns boolean
return GetBooleanOr(RX(),IX())
endfunction
function NX takes nothing returns boolean
return GetBooleanOr(OX(),AX())
endfunction
function bX takes nothing returns boolean
return GetBooleanAnd(XX(),NX())
endfunction
function BX takes nothing returns boolean
return(f==1)
endfunction
function cX takes nothing returns boolean
return(Rx==false)
endfunction
function CX takes nothing returns boolean
return(GetUnitTypeId(GetEnumUnit())=='Hblm')
endfunction
function dX takes nothing returns boolean
return(f==1)and(IsPlayerAlly(GetOwningPlayer(GetEnumUnit()),Player(0)))and(UnitHasItemOfTypeBJ(GetEnumUnit(),'I000'))and(RectContainsUnit(wx,GetEnumUnit()))
endfunction
function DX takes nothing returns boolean
return(Rx==false)
endfunction
function fX takes nothing returns boolean
return(GetUnitTypeId(GetEnumUnit())=='Hblm')
endfunction
function FX takes nothing returns boolean
return(f==2)and(IsPlayerAlly(GetOwningPlayer(GetEnumUnit()),Player(6)))and(UnitHasItemOfTypeBJ(GetEnumUnit(),'I000'))and(RectContainsUnit(Wx,GetEnumUnit()))
endfunction
function gX takes nothing returns boolean
return(Rx==false)
endfunction
function GX takes nothing returns boolean
return(GetUnitTypeId(GetEnumUnit())=='Hblm')
endfunction
function hX takes nothing returns boolean
return(f==1)and(IsPlayerAlly(GetOwningPlayer(GetEnumUnit()),Player(0)))and(UnitHasItemOfTypeBJ(GetEnumUnit(),'I000'))and(RectContainsUnit(wx,GetEnumUnit()))
endfunction
function HX takes nothing returns boolean
return(Rx==false)
endfunction
function jX takes nothing returns boolean
return(GetUnitTypeId(GetEnumUnit())=='Hblm')
endfunction
function JX takes nothing returns boolean
return(f==2)and(IsPlayerAlly(GetOwningPlayer(GetEnumUnit()),Player(6)))and(UnitHasItemOfTypeBJ(GetEnumUnit(),'I000'))and(RectContainsUnit(Wx,GetEnumUnit()))
endfunction
function kX takes nothing returns boolean
return(IsPlayerEnemy(GetOwningPlayer(GetEnumUnit()),Player(6)))
endfunction
function KX takes nothing returns boolean
return(f==1)
endfunction
function lX takes nothing returns boolean
return(Rx==false)
endfunction
function LX takes nothing returns boolean
return(GetUnitTypeId(GetEnumUnit())=='Hblm')
endfunction
function mX takes nothing returns boolean
return(f==1)and(IsPlayerAlly(GetOwningPlayer(GetEnumUnit()),Player(0)))and(UnitHasItemOfTypeBJ(GetEnumUnit(),'I000'))and(RectContainsUnit(wx,GetEnumUnit()))
endfunction
function MX takes nothing returns boolean
return(Rx==false)
endfunction
function pX takes nothing returns boolean
return(GetUnitTypeId(GetEnumUnit())=='Hblm')
endfunction
function PX takes nothing returns boolean
return(f==2)and(IsPlayerAlly(GetOwningPlayer(GetEnumUnit()),Player(6)))and(UnitHasItemOfTypeBJ(GetEnumUnit(),'I000'))and(RectContainsUnit(Wx,GetEnumUnit()))
endfunction
function qX takes nothing returns boolean
return(Rx==false)
endfunction
function QX takes nothing returns boolean
return(GetUnitTypeId(GetEnumUnit())=='Hblm')
endfunction
function sX takes nothing returns boolean
return(f==1)and(IsPlayerAlly(GetOwningPlayer(GetEnumUnit()),Player(0)))and(UnitHasItemOfTypeBJ(GetEnumUnit(),'I000'))and(RectContainsUnit(wx,GetEnumUnit()))
endfunction
function SX takes nothing returns boolean
return(Rx==false)
endfunction
function tX takes nothing returns boolean
return(GetUnitTypeId(GetEnumUnit())=='Hblm')
endfunction
function TX takes nothing returns boolean
return(f==2)and(IsPlayerAlly(GetOwningPlayer(GetEnumUnit()),Player(6)))and(UnitHasItemOfTypeBJ(GetEnumUnit(),'I000'))and(RectContainsUnit(Wx,GetEnumUnit()))
endfunction
function uX takes nothing returns boolean
return(IsPlayerEnemy(GetOwningPlayer(GetEnumUnit()),Player(0)))
endfunction
function UX takes nothing returns boolean
return(f==1)
endfunction
function wX takes nothing returns boolean
return(GetEnumUnit()!=ix)
endfunction
function WX takes nothing returns nothing
set jx[1]=GetUnitLoc(GetEnumUnit())
if(wX())then
if(UX())then
if(uX())then
set kv=true
call KillUnit(I)
call RemoveUnit(B)
call UnitAddItemByIdSwapped('I000',GetEnumUnit())
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Interception!")
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,(GetPlayerName(GetOwningPlayer(GetEnumUnit()))+" has intercepted the ball!"))
set re=true
set D=0
set ae[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=(ae[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+1)
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,jx[1],4.,0,100.,.0,.0)
if(KX())then
set f=2
else
set f=1
endif
if(PX())then
call RemoveItem(GetItemOfTypeFromUnitBJ(GetEnumUnit(),'I000'))
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Touchdown!")
set h[7]=(h[7]+7)
if(MX())then
set fe[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=((fe[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetEnumUnit()))))/ c))+.0)
set fe[7]=((fe[7]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetEnumUnit()))))/ c))+.0)
endif
set K=false
set P=true
set Ve[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=(Ve[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+1)
if(pX())then
else
set Ve[7]=(Ve[7]+1)
endif
call TriggerExecute(pr)
else
if(mX())then
call RemoveItem(GetItemOfTypeFromUnitBJ(GetEnumUnit(),'I000'))
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Touchdown!")
set h[1]=(h[1]+7)
if(lX())then
set fe[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=((fe[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetEnumUnit()))))/ c))+.0)
set fe[1]=((fe[1]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetEnumUnit()))))/ c))+.0)
endif
set K=false
set P=true
set Ve[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=(Ve[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+1)
if(LX())then
else
set Ve[1]=(Ve[1]+1)
endif
call TriggerExecute(pr)
endif
endif
else
call KillUnit(I)
call RemoveUnit(B)
call UnitAddItemByIdSwapped('I000',GetEnumUnit())
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,(GetPlayerName(GetOwningPlayer(GetEnumUnit()))+" has caught the ball!"))
set ne[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=(ne[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+1)
if(TX())then
call RemoveItem(GetItemOfTypeFromUnitBJ(GetEnumUnit(),'I000'))
set h[2]=(h[2]+7)
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Touchdown!")
if(SX())then
set fe[7]=((fe[7]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetEnumUnit()))))/ c))+.0)
set fe[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=((fe[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetEnumUnit()))))/ c))+.0)
endif
set K=false
set P=true
set Ve[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=(Ve[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+1)
if(tX())then
else
set Ve[7]=(Ve[7]+1)
endif
call TriggerExecute(pr)
else
if(sX())then
call RemoveItem(GetItemOfTypeFromUnitBJ(GetEnumUnit(),'I000'))
set h[1]=(h[1]+7)
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Touchdown!")
if(qX())then
set fe[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=((fe[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetEnumUnit()))))/ c))+.0)
set fe[1]=((fe[1]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetEnumUnit()))))/ c))+.0)
endif
set K=false
set P=true
set Ve[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=(Ve[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+1)
if(QX())then
else
set Ve[1]=(Ve[1]+1)
endif
call TriggerExecute(pr)
endif
endif
endif
else
if(kX())then
set kv=true
call KillUnit(I)
call RemoveUnit(B)
call UnitAddItemByIdSwapped('I000',GetEnumUnit())
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Interception!")
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,(GetPlayerName(GetOwningPlayer(GetEnumUnit()))+" has intercepted the ball!"))
set re=true
set D=0
set ae[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=(ae[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+1)
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,jx[1],4.,0,100.,.0,.0)
if(BX())then
set f=2
else
set f=1
endif
if(FX())then
call RemoveItem(GetItemOfTypeFromUnitBJ(GetEnumUnit(),'I000'))
set h[2]=(h[2]+7)
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Touchdown!")
if(DX())then
set fe[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=((fe[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetEnumUnit()))))/ c))+.0)
set fe[7]=((fe[7]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetEnumUnit()))))/ c))+.0)
endif
set K=false
set P=true
set Ve[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=(Ve[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+1)
if(fX())then
else
set Ve[7]=(Ve[7]+1)
endif
call TriggerExecute(pr)
else
if(dX())then
call RemoveItem(GetItemOfTypeFromUnitBJ(GetEnumUnit(),'I000'))
set h[1]=(h[1]+7)
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Touchdown!")
if(cX())then
set fe[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=((fe[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetEnumUnit()))))/ c))+.0)
set fe[1]=((fe[1]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetEnumUnit()))))/ c))+.0)
endif
set K=false
set P=true
set Ve[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=(Ve[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+1)
if(CX())then
else
set Ve[1]=(Ve[1]+1)
endif
call TriggerExecute(pr)
endif
endif
else
call KillUnit(I)
call RemoveUnit(B)
call UnitAddItemByIdSwapped('I000',GetEnumUnit())
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,(GetPlayerName(GetOwningPlayer(GetEnumUnit()))+" has caught the ball!"))
set ne[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=(ne[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+1)
if(JX())then
call RemoveItem(GetItemOfTypeFromUnitBJ(GetEnumUnit(),'I000'))
set h[2]=(h[2]+7)
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Touchdown!")
set Ve[7]=(Ve[7]+1)
if(HX())then
set fe[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=((fe[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetEnumUnit()))))/ c))+.0)
set fe[7]=((fe[7]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetEnumUnit()))))/ c))+.0)
endif
set K=false
set P=true
set Ve[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=(Ve[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+1)
if(jX())then
else
set Ve[7]=(Ve[7]+1)
endif
call TriggerExecute(pr)
else
if(hX())then
call RemoveItem(GetItemOfTypeFromUnitBJ(GetEnumUnit(),'I000'))
set h[1]=(h[1]+7)
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Touchdown!")
if(gX())then
set fe[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=((fe[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetEnumUnit()))))/ c))+.0)
set fe[1]=((fe[1]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetEnumUnit()))))/ c))+.0)
endif
set K=false
set P=true
set Ve[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=(Ve[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+1)
if(GX())then
else
set Ve[1]=(Ve[1]+1)
endif
call TriggerExecute(pr)
endif
endif
endif
endif
endif
endfunction
function yX takes nothing returns boolean
return(GetFilterUnit()!=ix)
endfunction
function YX takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())=='H000')
endfunction
function zX takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())=='E000')
endfunction
function ZX takes nothing returns boolean
return(GetFilterUnit()==J[7])
endfunction
function vO takes nothing returns boolean
return GetBooleanOr(zX(),ZX())
endfunction
function eO takes nothing returns boolean
return GetBooleanOr(YX(),vO())
endfunction
function xO takes nothing returns boolean
return GetBooleanAnd(yX(),eO())
endfunction
function oO takes nothing returns boolean
return(f==1)
endfunction
function rO takes nothing returns boolean
return(Rx==false)
endfunction
function iO takes nothing returns boolean
return(GetUnitTypeId(GetEnumUnit())=='Hblm')
endfunction
function aO takes nothing returns boolean
return(f==1)and(IsPlayerAlly(GetOwningPlayer(GetEnumUnit()),Player(0)))and(UnitHasItemOfTypeBJ(GetEnumUnit(),'I000'))and(RectContainsUnit(wx,GetEnumUnit()))
endfunction
function nO takes nothing returns boolean
return(Rx==false)
endfunction
function VO takes nothing returns boolean
return(GetUnitTypeId(GetEnumUnit())=='Hblm')
endfunction
function EO takes nothing returns boolean
return(f==2)and(IsPlayerAlly(GetOwningPlayer(GetEnumUnit()),Player(6)))and(UnitHasItemOfTypeBJ(GetEnumUnit(),'I000'))and(RectContainsUnit(Wx,GetEnumUnit()))
endfunction
function XO takes nothing returns boolean
return(Rx==false)
endfunction
function OO takes nothing returns boolean
return(GetUnitTypeId(GetEnumUnit())=='Hblm')
endfunction
function RO takes nothing returns boolean
return(f==1)and(IsPlayerAlly(GetOwningPlayer(GetEnumUnit()),Player(0)))and(UnitHasItemOfTypeBJ(GetEnumUnit(),'I000'))and(RectContainsUnit(wx,GetEnumUnit()))
endfunction
function IO takes nothing returns boolean
return(Rx==false)
endfunction
function AO takes nothing returns boolean
return(GetUnitTypeId(GetEnumUnit())=='Hblm')
endfunction
function NO takes nothing returns boolean
return(f==2)and(IsPlayerAlly(GetOwningPlayer(GetEnumUnit()),Player(6)))and(UnitHasItemOfTypeBJ(GetEnumUnit(),'I000'))and(RectContainsUnit(Wx,GetEnumUnit()))
endfunction
function bO takes nothing returns boolean
return(IsPlayerEnemy(GetOwningPlayer(GetEnumUnit()),Player(6)))
endfunction
function BO takes nothing returns boolean
return(f==1)
endfunction
function cO takes nothing returns boolean
return(Rx==false)
endfunction
function CO takes nothing returns boolean
return(GetUnitTypeId(GetEnumUnit())=='Hblm')
endfunction
function dO takes nothing returns boolean
return(f==1)and(IsPlayerAlly(GetOwningPlayer(GetEnumUnit()),Player(0)))and(UnitHasItemOfTypeBJ(GetEnumUnit(),'I000'))and(RectContainsUnit(wx,GetEnumUnit()))
endfunction
function DO takes nothing returns boolean
return(Rx==false)
endfunction
function fO takes nothing returns boolean
return(GetUnitTypeId(GetEnumUnit())=='Hblm')
endfunction
function FO takes nothing returns boolean
return(f==2)and(IsPlayerAlly(GetOwningPlayer(GetEnumUnit()),Player(6)))and(UnitHasItemOfTypeBJ(GetEnumUnit(),'I000'))and(RectContainsUnit(Wx,GetEnumUnit()))
endfunction
function gO takes nothing returns boolean
return(Rx==false)
endfunction
function GO takes nothing returns boolean
return(GetUnitTypeId(GetEnumUnit())=='Hblm')
endfunction
function hO takes nothing returns boolean
return(f==1)and(IsPlayerAlly(GetOwningPlayer(GetEnumUnit()),Player(0)))and(UnitHasItemOfTypeBJ(GetEnumUnit(),'I000'))and(RectContainsUnit(wx,GetEnumUnit()))
endfunction
function HO takes nothing returns boolean
return(Rx==false)
endfunction
function jO takes nothing returns boolean
return(GetUnitTypeId(GetEnumUnit())=='Hblm')
endfunction
function JO takes nothing returns boolean
return(f==2)and(IsPlayerAlly(GetOwningPlayer(GetEnumUnit()),Player(6)))and(UnitHasItemOfTypeBJ(GetEnumUnit(),'I000'))and(RectContainsUnit(Wx,GetEnumUnit()))
endfunction
function kO takes nothing returns boolean
return(IsPlayerEnemy(GetOwningPlayer(GetEnumUnit()),Player(0)))
endfunction
function KO takes nothing returns boolean
return(f==1)
endfunction
function lO takes nothing returns boolean
return(GetEnumUnit()!=ix)
endfunction
function LO takes nothing returns nothing
set jx[1]=GetUnitLoc(GetEnumUnit())
if(lO())then
if(KO())then
if(kO())then
set kv=true
call KillUnit(I)
call RemoveUnit(B)
call UnitAddItemByIdSwapped('I000',GetEnumUnit())
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Interception!")
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,(GetPlayerName(GetOwningPlayer(GetEnumUnit()))+" has intercepted the ball!"))
set re=true
set D=0
set ae[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=(ae[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+1)
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,jx[1],4.,0,100.,.0,.0)
if(BO())then
set f=2
else
set f=1
endif
if(FO())then
call RemoveItem(GetItemOfTypeFromUnitBJ(GetEnumUnit(),'I000'))
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Touchdown!")
set h[7]=(h[7]+7)
if(DO())then
set fe[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=((fe[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetEnumUnit()))))/ c))+.0)
set fe[7]=((fe[7]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetEnumUnit()))))/ c))+.0)
endif
set K=false
set P=true
set Ve[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=(Ve[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+1)
if(fO())then
else
set Ve[7]=(Ve[7]+1)
endif
call TriggerExecute(pr)
else
if(dO())then
call RemoveItem(GetItemOfTypeFromUnitBJ(GetEnumUnit(),'I000'))
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Touchdown!")
set h[1]=(h[1]+7)
if(cO())then
set fe[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=((fe[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetEnumUnit()))))/ c))+.0)
set fe[1]=((fe[1]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetEnumUnit()))))/ c))+.0)
endif
set K=false
set P=true
set Ve[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=(Ve[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+1)
if(CO())then
else
set Ve[1]=(Ve[1]+1)
endif
call TriggerExecute(pr)
endif
endif
else
call KillUnit(I)
call RemoveUnit(B)
call UnitAddItemByIdSwapped('I000',GetEnumUnit())
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,(GetPlayerName(GetOwningPlayer(GetEnumUnit()))+" has caught the ball!"))
set ne[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=(ne[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+1)
if(JO())then
call RemoveItem(GetItemOfTypeFromUnitBJ(GetEnumUnit(),'I000'))
set h[2]=(h[2]+7)
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Touchdown!")
if(HO())then
set fe[7]=((fe[7]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetEnumUnit()))))/ c))+.0)
set fe[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=((fe[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetEnumUnit()))))/ c))+.0)
endif
set K=false
set P=true
set Ve[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=(Ve[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+1)
if(jO())then
else
set Ve[7]=(Ve[7]+1)
endif
call TriggerExecute(pr)
else
if(hO())then
call RemoveItem(GetItemOfTypeFromUnitBJ(GetEnumUnit(),'I000'))
set h[1]=(h[1]+7)
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Touchdown!")
if(gO())then
set fe[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=((fe[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetEnumUnit()))))/ c))+.0)
set fe[1]=((fe[1]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetEnumUnit()))))/ c))+.0)
endif
set K=false
set P=true
set Ve[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=(Ve[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+1)
if(GO())then
else
set Ve[1]=(Ve[1]+1)
endif
call TriggerExecute(pr)
endif
endif
endif
else
if(bO())then
set kv=true
call KillUnit(I)
call RemoveUnit(B)
call UnitAddItemByIdSwapped('I000',GetEnumUnit())
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Interception!")
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,(GetPlayerName(GetOwningPlayer(GetEnumUnit()))+" has intercepted the ball!"))
set re=true
set D=0
set ae[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=(ae[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+1)
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,jx[1],4.,0,100.,.0,.0)
if(oO())then
set f=2
else
set f=1
endif
if(EO())then
call RemoveItem(GetItemOfTypeFromUnitBJ(GetEnumUnit(),'I000'))
set h[2]=(h[2]+7)
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Touchdown!")
if(nO())then
set fe[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=((fe[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetEnumUnit()))))/ c))+.0)
set fe[7]=((fe[7]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetEnumUnit()))))/ c))+.0)
endif
set K=false
set P=true
set Ve[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=(Ve[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+1)
if(VO())then
else
set Ve[7]=(Ve[7]+1)
endif
call TriggerExecute(pr)
else
if(aO())then
call RemoveItem(GetItemOfTypeFromUnitBJ(GetEnumUnit(),'I000'))
set h[1]=(h[1]+7)
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Touchdown!")
if(rO())then
set fe[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=((fe[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetEnumUnit()))))/ c))+.0)
set fe[1]=((fe[1]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetEnumUnit()))))/ c))+.0)
endif
set K=false
set P=true
set Ve[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=(Ve[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+1)
if(iO())then
else
set Ve[1]=(Ve[1]+1)
endif
call TriggerExecute(pr)
endif
endif
else
call KillUnit(I)
call RemoveUnit(B)
call UnitAddItemByIdSwapped('I000',GetEnumUnit())
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,(GetPlayerName(GetOwningPlayer(GetEnumUnit()))+" has caught the ball!"))
set ne[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=(ne[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+1)
if(NO())then
call RemoveItem(GetItemOfTypeFromUnitBJ(GetEnumUnit(),'I000'))
set h[2]=(h[2]+7)
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Touchdown!")
set Ve[7]=(Ve[7]+1)
if(IO())then
set fe[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=((fe[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetEnumUnit()))))/ c))+.0)
set fe[7]=((fe[7]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetEnumUnit()))))/ c))+.0)
endif
set K=false
set P=true
set Ve[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=(Ve[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+1)
if(AO())then
else
set Ve[7]=(Ve[7]+1)
endif
call TriggerExecute(pr)
else
if(RO())then
call RemoveItem(GetItemOfTypeFromUnitBJ(GetEnumUnit(),'I000'))
set h[1]=(h[1]+7)
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Touchdown!")
if(XO())then
set fe[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=((fe[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetEnumUnit()))))/ c))+.0)
set fe[1]=((fe[1]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetEnumUnit()))))/ c))+.0)
endif
set K=false
set P=true
set Ve[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=(Ve[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+1)
if(OO())then
else
set Ve[1]=(Ve[1]+1)
endif
call TriggerExecute(pr)
endif
endif
endif
endif
endif
endfunction
function mO takes nothing returns boolean
return(GetFilterUnit()!=ix)
endfunction
function MO takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())=='H000')
endfunction
function pO takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())=='E000')
endfunction
function PO takes nothing returns boolean
return(GetFilterUnit()==J[1])
endfunction
function qO takes nothing returns boolean
return GetBooleanOr(pO(),PO())
endfunction
function QO takes nothing returns boolean
return GetBooleanOr(MO(),qO())
endfunction
function sO takes nothing returns boolean
return GetBooleanAnd(mO(),QO())
endfunction
function SO takes nothing returns boolean
return(f==1)
endfunction
function tO takes nothing returns boolean
return(Rx==false)
endfunction
function TO takes nothing returns boolean
return(GetUnitTypeId(GetEnumUnit())=='Hblm')
endfunction
function uO takes nothing returns boolean
return(f==1)and(IsPlayerAlly(GetOwningPlayer(GetEnumUnit()),Player(0)))and(UnitHasItemOfTypeBJ(GetEnumUnit(),'I000'))and(RectContainsUnit(wx,GetEnumUnit()))
endfunction
function UO takes nothing returns boolean
return(Rx==false)
endfunction
function wO takes nothing returns boolean
return(GetUnitTypeId(GetEnumUnit())=='Hblm')
endfunction
function WO takes nothing returns boolean
return(f==2)and(IsPlayerAlly(GetOwningPlayer(GetEnumUnit()),Player(6)))and(UnitHasItemOfTypeBJ(GetEnumUnit(),'I000'))and(RectContainsUnit(Wx,GetEnumUnit()))
endfunction
function yO takes nothing returns boolean
return(Rx==false)
endfunction
function YO takes nothing returns boolean
return(GetUnitTypeId(GetEnumUnit())=='Hblm')
endfunction
function zO takes nothing returns boolean
return(f==1)and(IsPlayerAlly(GetOwningPlayer(GetEnumUnit()),Player(0)))and(UnitHasItemOfTypeBJ(GetEnumUnit(),'I000'))and(RectContainsUnit(wx,GetEnumUnit()))
endfunction
function ZO takes nothing returns boolean
return(Rx==false)
endfunction
function vR takes nothing returns boolean
return(GetUnitTypeId(GetEnumUnit())=='Hblm')
endfunction
function eR takes nothing returns boolean
return(f==2)and(IsPlayerAlly(GetOwningPlayer(GetEnumUnit()),Player(6)))and(UnitHasItemOfTypeBJ(GetEnumUnit(),'I000'))and(RectContainsUnit(Wx,GetEnumUnit()))
endfunction
function xR takes nothing returns boolean
return(IsPlayerEnemy(GetOwningPlayer(GetEnumUnit()),Player(6)))
endfunction
function oR takes nothing returns boolean
return(f==1)
endfunction
function rR takes nothing returns boolean
return(Rx==false)
endfunction
function iR takes nothing returns boolean
return(GetUnitTypeId(GetEnumUnit())=='Hblm')
endfunction
function aR takes nothing returns boolean
return(f==1)and(IsPlayerAlly(GetOwningPlayer(GetEnumUnit()),Player(0)))and(UnitHasItemOfTypeBJ(GetEnumUnit(),'I000'))and(RectContainsUnit(wx,GetEnumUnit()))
endfunction
function nR takes nothing returns boolean
return(Rx==false)
endfunction
function VR takes nothing returns boolean
return(GetUnitTypeId(GetEnumUnit())=='Hblm')
endfunction
function ER takes nothing returns boolean
return(f==2)and(IsPlayerAlly(GetOwningPlayer(GetEnumUnit()),Player(6)))and(UnitHasItemOfTypeBJ(GetEnumUnit(),'I000'))and(RectContainsUnit(Wx,GetEnumUnit()))
endfunction
function XR takes nothing returns boolean
return(Rx==false)
endfunction
function OR takes nothing returns boolean
return(GetUnitTypeId(GetEnumUnit())=='Hblm')
endfunction
function RR takes nothing returns boolean
return(f==1)and(IsPlayerAlly(GetOwningPlayer(GetEnumUnit()),Player(0)))and(UnitHasItemOfTypeBJ(GetEnumUnit(),'I000'))and(RectContainsUnit(wx,GetEnumUnit()))
endfunction
function IR takes nothing returns boolean
return(Rx==false)
endfunction
function AR takes nothing returns boolean
return(GetUnitTypeId(GetEnumUnit())=='Hblm')
endfunction
function NR takes nothing returns boolean
return(f==2)and(IsPlayerAlly(GetOwningPlayer(GetEnumUnit()),Player(6)))and(UnitHasItemOfTypeBJ(GetEnumUnit(),'I000'))and(RectContainsUnit(Wx,GetEnumUnit()))
endfunction
function bR takes nothing returns boolean
return(IsPlayerEnemy(GetOwningPlayer(GetEnumUnit()),Player(0)))
endfunction
function BR takes nothing returns boolean
return(f==1)
endfunction
function cR takes nothing returns boolean
return(GetEnumUnit()!=ix)
endfunction
function CR takes nothing returns nothing
set jx[1]=GetUnitLoc(GetEnumUnit())
if(cR())then
if(BR())then
if(bR())then
set kv=true
call KillUnit(I)
call RemoveUnit(B)
call UnitAddItemByIdSwapped('I000',GetEnumUnit())
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Interception!")
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,(GetPlayerName(GetOwningPlayer(GetEnumUnit()))+" has intercepted the ball!"))
set re=true
set D=0
set ae[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=(ae[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+1)
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,jx[1],4.,0,100.,.0,.0)
if(oR())then
set f=2
else
set f=1
endif
if(ER())then
call RemoveItem(GetItemOfTypeFromUnitBJ(GetEnumUnit(),'I000'))
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Touchdown!")
set h[7]=(h[7]+7)
if(nR())then
set fe[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=((fe[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetEnumUnit()))))/ c))+.0)
set fe[7]=((fe[7]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetEnumUnit()))))/ c))+.0)
endif
set K=false
set P=true
set Ve[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=(Ve[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+1)
if(VR())then
else
set Ve[7]=(Ve[7]+1)
endif
call TriggerExecute(pr)
else
if(aR())then
call RemoveItem(GetItemOfTypeFromUnitBJ(GetEnumUnit(),'I000'))
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Touchdown!")
set h[1]=(h[1]+7)
if(rR())then
set fe[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=((fe[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetEnumUnit()))))/ c))+.0)
set fe[1]=((fe[1]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetEnumUnit()))))/ c))+.0)
endif
set K=false
set P=true
set Ve[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=(Ve[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+1)
if(iR())then
else
set Ve[1]=(Ve[1]+1)
endif
call TriggerExecute(pr)
endif
endif
else
call KillUnit(I)
call RemoveUnit(B)
call UnitAddItemByIdSwapped('I000',GetEnumUnit())
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,(GetPlayerName(GetOwningPlayer(GetEnumUnit()))+" has caught the ball!"))
set ne[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=(ne[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+1)
if(NR())then
call RemoveItem(GetItemOfTypeFromUnitBJ(GetEnumUnit(),'I000'))
set h[2]=(h[2]+7)
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Touchdown!")
if(IR())then
set fe[7]=((fe[7]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetEnumUnit()))))/ c))+.0)
set fe[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=((fe[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetEnumUnit()))))/ c))+.0)
endif
set K=false
set P=true
set Ve[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=(Ve[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+1)
if(AR())then
else
set Ve[7]=(Ve[7]+1)
endif
call TriggerExecute(pr)
else
if(RR())then
call RemoveItem(GetItemOfTypeFromUnitBJ(GetEnumUnit(),'I000'))
set h[1]=(h[1]+7)
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Touchdown!")
if(XR())then
set fe[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=((fe[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetEnumUnit()))))/ c))+.0)
set fe[1]=((fe[1]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetEnumUnit()))))/ c))+.0)
endif
set K=false
set P=true
set Ve[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=(Ve[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+1)
if(OR())then
else
set Ve[1]=(Ve[1]+1)
endif
call TriggerExecute(pr)
endif
endif
endif
else
if(xR())then
set kv=true
call KillUnit(I)
call RemoveUnit(B)
call UnitAddItemByIdSwapped('I000',GetEnumUnit())
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Interception!")
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,(GetPlayerName(GetOwningPlayer(GetEnumUnit()))+" has intercepted the ball!"))
set re=true
set D=0
set ae[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=(ae[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+1)
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,jx[1],4.,0,100.,.0,.0)
if(SO())then
set f=2
else
set f=1
endif
if(WO())then
call RemoveItem(GetItemOfTypeFromUnitBJ(GetEnumUnit(),'I000'))
set h[2]=(h[2]+7)
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Touchdown!")
if(UO())then
set fe[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=((fe[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetEnumUnit()))))/ c))+.0)
set fe[7]=((fe[7]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetEnumUnit()))))/ c))+.0)
endif
set K=false
set P=true
set Ve[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=(Ve[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+1)
if(wO())then
else
set Ve[7]=(Ve[7]+1)
endif
call TriggerExecute(pr)
else
if(uO())then
call RemoveItem(GetItemOfTypeFromUnitBJ(GetEnumUnit(),'I000'))
set h[1]=(h[1]+7)
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Touchdown!")
if(tO())then
set fe[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=((fe[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetEnumUnit()))))/ c))+.0)
set fe[1]=((fe[1]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetEnumUnit()))))/ c))+.0)
endif
set K=false
set P=true
set Ve[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=(Ve[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+1)
if(TO())then
else
set Ve[1]=(Ve[1]+1)
endif
call TriggerExecute(pr)
endif
endif
else
call KillUnit(I)
call RemoveUnit(B)
call UnitAddItemByIdSwapped('I000',GetEnumUnit())
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,(GetPlayerName(GetOwningPlayer(GetEnumUnit()))+" has caught the ball!"))
set ne[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=(ne[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+1)
if(eR())then
call RemoveItem(GetItemOfTypeFromUnitBJ(GetEnumUnit(),'I000'))
set h[2]=(h[2]+7)
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Touchdown!")
set Ve[7]=(Ve[7]+1)
if(ZO())then
set fe[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=((fe[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetEnumUnit()))))/ c))+.0)
set fe[7]=((fe[7]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetEnumUnit()))))/ c))+.0)
endif
set K=false
set P=true
set Ve[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=(Ve[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+1)
if(vR())then
else
set Ve[7]=(Ve[7]+1)
endif
call TriggerExecute(pr)
else
if(zO())then
call RemoveItem(GetItemOfTypeFromUnitBJ(GetEnumUnit(),'I000'))
set h[1]=(h[1]+7)
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Touchdown!")
if(yO())then
set fe[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=((fe[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetEnumUnit()))))/ c))+.0)
set fe[1]=((fe[1]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetEnumUnit()))))/ c))+.0)
endif
set K=false
set P=true
set Ve[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]=(Ve[(1+GetPlayerId(GetOwningPlayer(GetEnumUnit())))]+1)
if(YO())then
else
set Ve[1]=(Ve[1]+1)
endif
call TriggerExecute(pr)
endif
endif
endif
endif
endif
endfunction
function dR takes nothing returns boolean
return(f==1)
endfunction
function DR takes nothing returns boolean
return(Bx)
endfunction
function fR takes nothing returns boolean
return(V<=110.)or(GetUnitFlyHeight(I)<=110.)or(DistanceBetweenPoints(GetUnitLoc(I),q)<=90.)
endfunction
function FR takes nothing returns boolean
return(fR())and((A-N)>1)
endfunction
function gR takes nothing returns boolean
return(FR())
endfunction
function GR takes nothing returns nothing
set jx[0]=GetUnitLoc(I)
if(ZE())then
call RemoveUnit(GetEnumUnit())
call ForGroupBJ(Mi('n000'),function zE)
endif
if(EX())then
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,GetUnitLoc(I),.15,0,'d','d','d')
set N=(N+1)
call SetUnitPositionLoc(I,gi(GetUnitLoc(I),X,o))
if(VX())then
set V=(V+E[1])
else
if(nX())then
set V=(V+E[2])
else
if(aX())then
set V=(V+E[3])
endif
endif
endif
call SetUnitFlyHeight(I,V,1000000000.)
else
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,jx[0],.15,0,'d','d','d')
set N=(N+1)
call SetUnitPositionLoc(I,gi(GetUnitLoc(I),X,o))
if(xX())then
set V=(V-E[1])
else
if(eX())then
set V=(V-E[2])
else
if(vX())then
set V=(V-E[3])
endif
endif
endif
call SetUnitFlyHeight(I,V,1000000000.)
if(iX())then
call MoveRectToLoc(oo,GetUnitLoc(I))
call KillUnit(I)
if(rX())then
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Incomplete")
call RemoveUnit(B)
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,jx[0],2.,0,100.,.0,.0)
set K=false
set l=m
set P=true
call TriggerExecute(qr)
else
if(oX())then
set Sv=true
call MoveRectToLoc(ro,GetRectCenter(oo))
call CreateNUnitsAtLoc(1,'n002',Player(15),GetRectCenter(oo),.0)
set sv=bj_lastCreatedUnit
call EnableTrigger(Gr)
call TriggerRegisterEnterRectSimple(Gr,ro)
call RemoveUnit(B)
endif
endif
endif
endif
if(gR())then
if(DR())then
if(dR())then
set Jx[1]=Si(1,li(100.,jx[0],Condition(function sO)))
call ForGroupBJ(Jx[1],function CR)
else
set Jx[1]=Si(1,li(100.,jx[0],Condition(function xO)))
call ForGroupBJ(Jx[1],function LO)
endif
else
set Jx[1]=Si(1,li(100.,jx[0],Condition(function bX)))
call ForGroupBJ(Jx[1],function WX)
endif
endif
endfunction
function hR takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())=='n002')
endfunction
function HR takes nothing returns boolean
return(IsUnitAliveBJ(GetFilterUnit()))
endfunction
function jR takes nothing returns boolean
return(GetUnitUserData(GetFilterUnit())==1001)
endfunction
function JR takes nothing returns boolean
return GetBooleanAnd(HR(),jR())
endfunction
function kR takes nothing returns boolean
return GetBooleanAnd(hR(),JR())
endfunction
function KR takes nothing returns boolean
return(GetEnumUnit()!=B)and(GetUnitUserData(GetEnumUnit())!=1000)
endfunction
function lR takes nothing returns nothing
if(KR())then
call RemoveUnit(GetEnumUnit())
endif
endfunction
function LR takes nothing returns boolean
return(GetEnumUnit()!=k)
endfunction
function mR takes nothing returns boolean
return(V>((n/ 5.)*2.))
endfunction
function MR takes nothing returns boolean
return(V>((n/ 5.)*1.))and(V<=((n/ 5.)*2.))
endfunction
function pR takes nothing returns boolean
return(V<=((n/ 5.)*1.))
endfunction
function PR takes nothing returns boolean
return(bx)
endfunction
function qR takes nothing returns boolean
return(Rx==false)
endfunction
function QR takes nothing returns boolean
return(N>=A)
endfunction
function sR takes nothing returns boolean
return(V>((n/ 5.)*2.))
endfunction
function SR takes nothing returns boolean
return(V>((n/ 5.)*1.))and(V<=((n/ 5.)*2.))
endfunction
function tR takes nothing returns boolean
return(V<=((n/ 5.)*1.))
endfunction
function TR takes nothing returns boolean
return(N<=(A/ 2))
endfunction
function uR takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())=='Hblm')
endfunction
function UR takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())=='E000')
endfunction
function wR takes nothing returns boolean
return GetBooleanOr(uR(),UR())
endfunction
function WR takes nothing returns nothing
call KillUnit(k)
call RemoveUnit(B)
call UnitAddItemByIdSwapped('I000',GetEnumUnit())
endfunction
function yR takes nothing returns boolean
return(V<=110.)or(GetUnitFlyHeight(k)<=110.)or(DistanceBetweenPoints(GetUnitLoc(k),q)<=90.)
endfunction
function YR takes nothing returns boolean
return(yR())and((A-N)>1)
endfunction
function zR takes nothing returns boolean
return(YR())
endfunction
function ZR takes nothing returns nothing
if(LR())then
call RemoveUnit(GetEnumUnit())
call ForGroupBJ(Mi('n000'),function lR)
endif
if(TR())then
set N=(N+1)
call SetUnitPositionLoc(k,gi(GetUnitLoc(k),X,o))
if(tR())then
set V=(V+E[1])
else
if(SR())then
set V=(V+E[2])
else
if(sR())then
set V=(V+E[3])
endif
endif
endif
call SetUnitFlyHeight(k,V,1000000000.)
else
set N=(N+1)
call SetUnitPositionLoc(k,gi(GetUnitLoc(k),X,o))
if(pR())then
set V=(V-E[1])
else
if(MR())then
set V=(V-E[2])
else
if(mR())then
set V=(V-E[3])
endif
endif
endif
call SetUnitFlyHeight(k,V,1000000000.)
if(QR())then
call KillUnit(k)
if(qR())then
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Incomplete")
call RemoveUnit(B)
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,GetUnitLoc(k),2.,0,100.,.0,.0)
set K=false
set l=m
set P=true
call TriggerExecute(qr)
else
if(PR())then
set Sv=true
call MoveRectToLoc(ro,GetRectCenter(oo))
call CreateNUnitsAtLoc(1,'n002',Player(15),GetRectCenter(oo),.0)
set sv=bj_lastCreatedUnit
call EnableTrigger(Gr)
call TriggerRegisterEnterRectSimple(Gr,ro)
call RemoveUnit(B)
endif
endif
endif
endif
if(zR())then
call ForGroupBJ(Si(1,li(100.,GetUnitLoc(k),Condition(function wR))),function WR)
endif
endfunction
function vI takes nothing returns nothing
call ForGroupBJ(Ji(GetWorldBounds(),Condition(function yE)),function GR)
call ForGroupBJ(Ji(GetWorldBounds(),Condition(function kR)),function ZR)
call RemoveLocation(jx[0])
call RemoveLocation(jx[1])
call DestroyGroup(Jx[1])
endfunction
function eI takes nothing returns boolean
return(GetSpellAbilityId()=='A007')and(GetUnitTypeId(GetSpellAbilityUnit())=='Hblm')and(K==false)
endfunction
function xI takes nothing returns boolean
return(GetSpellAbilityUnit()==J[1])
endfunction
function oI takes nothing returns boolean
return(sx)
endfunction
function rI takes nothing returns nothing
call PauseUnit(GetEnumUnit(),false)
endfunction
function iI takes nothing returns boolean
return(Y)
endfunction
function aI takes nothing returns boolean
return(DistanceBetweenPoints(GetUnitLoc(k),GetUnitLoc(GetSpellAbilityUnit()))>650.)
endfunction
function nI takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function VI takes nothing returns nothing
local location pt
local location EI
local integer a
call PauseTimerBJ(true,Oe)
call TimerDialogDisplay(he,false)
if(oI())then
if(xI())then
set bj_forLoopAIndex=2
set bj_forLoopAIndexEnd=6
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call UnitRemoveBuffsBJ(2,J[bj_forLoopAIndex])
call UnitResetCooldown(J[bj_forLoopAIndex])
call PauseUnit(J[bj_forLoopAIndex],true)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set a=8
loop
exitwhen a>12
set pt=GetUnitLoc(J[(a-6)])
set EI=gi(x,DistanceBetweenPoints(x,pt),360.-RAbsBJ(AngleBetweenPoints(x,pt)))
call SetUnitPositionLocFacingBJ(J[a],EI,90)
call RemoveLocation(pt)
call RemoveLocation(EI)
set a=a+1
endloop
call PauseUnit(J[1],true)
call TriggerSleepAction(1.5)
call PauseUnit(J[1],false)
else
set bj_forLoopAIndex=8
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call UnitRemoveBuffsBJ(2,J[bj_forLoopAIndex])
call UnitResetCooldown(J[bj_forLoopAIndex])
call PauseUnit(J[bj_forLoopAIndex],true)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set a=2
loop
exitwhen a>6
set pt=GetUnitLoc(J[(a+6)])
set EI=gi(x,DistanceBetweenPoints(x,pt),RAbsBJ(AngleBetweenPoints(x,pt)))
call SetUnitPositionLocFacingBJ(J[a],EI,270)
call RemoveLocation(pt)
call RemoveLocation(EI)
set a=a+1
endloop
call PauseUnit(J[7],true)
call TriggerSleepAction(1.5)
call PauseUnit(J[7],false)
endif
endif
call UnitAddAbility(J[1],'A006')
call UnitAddAbility(J[7],'A006')
call UnitRemoveBuffsBJ(2,GetSpellAbilityUnit())
call UnitResetCooldown(GetSpellAbilityUnit())
call SetUnitMoveSpeed(GetSpellAbilityUnit(),400.)
call IssueImmediateOrderById(GetSpellAbilityUnit(),851972)
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Hike!")
call ForGroupBJ(Mi('e002'),function rI)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call PauseUnit(J[bj_forLoopAIndex],false)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
if(iI())then
call PauseUnit(J[3],true)
call PauseUnit(J[4],true)
call PauseUnit(J[9],true)
call PauseUnit(J[10],true)
else
call UnitRemoveAbility(J[3],'Absk')
call UnitRemoveAbility(J[4],'Absk')
call UnitRemoveAbility(J[9],'Absk')
call UnitRemoveAbility(J[10],'Absk')
endif
set K=true
set Xe=false
set bj_forLoopAIndex=0
set bj_forLoopAIndexEnd=2
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call DialogDisplayBJ(false,Ce[bj_forLoopAIndex],Player(0))
call DialogDisplayBJ(false,Ce[bj_forLoopAIndex],Player(6))
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
if(aI())then
set O=650.
else
set O=DistanceBetweenPoints(GetUnitLoc(k),GetUnitLoc(GetSpellAbilityUnit()))
endif
set n=(O+.0)
set R=50.
set A=R2I(R)
set N=0
set X=(O/ R)
set E[1]=(n/ R)
set E[2]=(n/(R+50.))
set E[3]=(n/(R+400.))
set o=AngleBetweenPoints(GetUnitLoc(k),GetUnitLoc(GetSpellAbilityUnit()))
set V=.0
call SetUnitUserData(k,1001)
call ForGroupBJ(Mi('n000'),function nI)
call CreateNUnitsAtLoc(1,'n000',GetOwningPlayer(GetSpellAbilityUnit()),gi(GetUnitLoc(k),O,o),bj_UNIT_FACING)
set B=bj_lastCreatedUnit
call UnitRemoveAbility(GetSpellAbilityUnit(),'A007')
set ov=GetUnitLoc(k)
set m=(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(L)))/ l)
call UnitRemoveBuffsBJ(2,GetSpellAbilityUnit())
call UnitResetCooldown(GetSpellAbilityUnit())
set pt=null
set EI=null
endfunction
function XI takes nothing returns boolean
return(GetSpellAbilityId()=='A005')
endfunction
function OI takes nothing returns nothing
call RemoveUnit(M[(1+GetPlayerId(GetOwningPlayer(GetSpellAbilityUnit())))])
call CreateNUnitsAtLoc(1,'n000',GetOwningPlayer(GetSpellAbilityUnit()),GetSpellTargetLoc(),bj_UNIT_FACING)
set M[(1+GetPlayerId(GetOwningPlayer(GetSpellAbilityUnit())))]=bj_lastCreatedUnit
endfunction
function RI takes nothing returns boolean
return(GetIssuedOrderId()==851983)or(GetIssuedOrderId()==String2OrderIdBJ("follow"))or(GetIssuedOrderId()==851971)
endfunction
function II takes nothing returns boolean
return(RI())and(GetUnitTypeId(GetOrderTargetUnit())!='n002')and(GetUnitStateSwap(UNIT_STATE_MANA,GetOrderedUnit())>=5.)and(UnitHasBuffBJ(GetOrderTargetUnit(),'Bbsk')==false)
endfunction
function AI takes nothing returns boolean
return(K)or(Rx)
endfunction
function NI takes nothing returns boolean
return(GetRandomInt(1,25)==1)
endfunction
function bI takes nothing returns boolean
return(DistanceBetweenPoints(GetUnitLoc(GetOrderedUnit()),GetUnitLoc(GetOrderTargetUnit()))<=170.)
endfunction
function BI takes nothing returns boolean
return(GetRandomInt(1,25)==1)
endfunction
function cI takes nothing returns boolean
return(DistanceBetweenPoints(GetUnitLoc(GetOrderedUnit()),GetUnitLoc(GetOrderTargetUnit()))<=170.)
endfunction
function CI takes nothing returns boolean
return(GetUnitTypeId(GetOrderTargetUnit())=='e002')
endfunction
function dI takes nothing returns boolean
return(AI())
endfunction
function DI takes nothing returns nothing
if(dI())then
if(bI())then
call SetUnitManaBJ(GetOrderedUnit(),(GetUnitStateSwap(UNIT_STATE_MANA,GetOrderedUnit())-5.))
call SetUnitFacingToFaceLocTimed(GetOrderedUnit(),GetUnitLoc(GetOrderTargetUnit()),0)
call SetUnitAnimation(GetOrderedUnit(),"attack")
if(NI())then
call SetUnitPositionLoc(GetOrderTargetUnit(),gi(GetUnitLoc(GetOrderTargetUnit()),40.,AngleBetweenPoints(GetUnitLoc(GetOrderedUnit()),GetUnitLoc(GetOrderTargetUnit()))))
else
call SetUnitPositionLoc(GetOrderTargetUnit(),gi(GetUnitLoc(GetOrderTargetUnit()),25.,AngleBetweenPoints(GetUnitLoc(GetOrderedUnit()),GetUnitLoc(GetOrderTargetUnit()))))
endif
endif
else
if(CI())then
if(cI())then
call SetUnitManaBJ(GetOrderedUnit(),(GetUnitStateSwap(UNIT_STATE_MANA,GetOrderedUnit())-5.))
call SetUnitFacingToFaceLocTimed(GetOrderedUnit(),GetUnitLoc(GetOrderTargetUnit()),0)
call SetUnitAnimation(GetOrderedUnit(),"attack")
if(BI())then
call SetUnitPositionLoc(GetOrderTargetUnit(),gi(GetUnitLoc(GetOrderTargetUnit()),40.,AngleBetweenPoints(GetUnitLoc(GetOrderedUnit()),GetUnitLoc(GetOrderTargetUnit()))))
else
call SetUnitPositionLoc(GetOrderTargetUnit(),gi(GetUnitLoc(GetOrderTargetUnit()),25.,AngleBetweenPoints(GetUnitLoc(GetOrderedUnit()),GetUnitLoc(GetOrderTargetUnit()))))
endif
endif
endif
endif
endfunction
function fI takes nothing returns boolean
return(IsUnitType(GetEnteringUnit(),UNIT_TYPE_HERO))or(GetUnitTypeId(GetEnteringUnit())=='e002')
endfunction
function FI takes nothing returns boolean
return(fI())
endfunction
function gI takes nothing returns boolean
return(Rx)
endfunction
function GI takes nothing returns boolean
return(Wv)
endfunction
function hI takes nothing returns boolean
return(IsPlayerAlly(GetOwningPlayer(GetEnteringUnit()),Player(0)))
endfunction
function HI takes nothing returns boolean
return(RectContainsLoc(wx,GetRectCenter(ro)))and(f==1)
endfunction
function jI takes nothing returns boolean
return(RectContainsLoc(Wx,GetRectCenter(ro)))and(f==2)
endfunction
function JI takes nothing returns boolean
return(IsPlayerAlly(GetOwningPlayer(GetEnteringUnit()),Player(0)))
endfunction
function kI takes nothing returns boolean
return(RectContainsLoc(Wx,GetRectCenter(ro)))and(f==1)and(IsPlayerAlly(GetOwningPlayer(GetEnteringUnit()),Player(6)))
endfunction
function KI takes nothing returns boolean
return(RectContainsLoc(wx,GetRectCenter(ro)))and(f==2)and(IsPlayerAlly(GetOwningPlayer(GetEnteringUnit()),Player(0)))
endfunction
function lI takes nothing returns boolean
return(Rx==false)
endfunction
function LI takes nothing returns nothing
call MoveRectToLoc(oo,GetRectCenter(xo))
set qx=true
set bx=false
if(GI())then
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,(GetPlayerName(GetOwningPlayer(GetEnteringUnit()))+" has picked up the ball!"))
call UnitAddItemByIdSwapped('I000',GetEnteringUnit())
call RemoveUnit(sv)
set sv=null
set Wv=false
set Sv=false
if(gI())then
else
set Hx[(1+GetPlayerId(GetOwningPlayer(GetEnteringUnit())))]=(Hx[(1+GetPlayerId(GetOwningPlayer(GetEnteringUnit())))]+1)
endif
endif
if(lI())then
if(KI())then
call MoveRectToLoc(ro,GetRectCenter(xo))
call RemoveItem(GetItemOfTypeFromUnitBJ(GetEnteringUnit(),'I000'))
set h[2]=(h[2]+7)
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Touchdown!")
set K=false
set P=true
call Di(2.5)
call TriggerExecute(pr)
else
if(kI())then
call MoveRectToLoc(ro,GetRectCenter(xo))
call RemoveItem(GetItemOfTypeFromUnitBJ(GetEnteringUnit(),'I000'))
set h[1]=(h[1]+7)
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Touchdown!")
set K=false
set P=true
call Di(2.5)
call TriggerExecute(pr)
else
if(JI())then
set f=1
else
set f=2
endif
endif
endif
else
if(jI())then
call MoveRectToLoc(ro,GetRectCenter(xo))
call RemoveItem(GetItemOfTypeFromUnitBJ(GetEnteringUnit(),'I000'))
set h[2]=(h[2]+7)
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Touchdown!")
set K=false
set P=true
call Di(2.5)
call TriggerExecute(pr)
else
if(HI())then
call MoveRectToLoc(ro,GetRectCenter(xo))
call RemoveItem(GetItemOfTypeFromUnitBJ(GetEnteringUnit(),'I000'))
set h[1]=(h[1]+7)
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Touchdown!")
set K=false
set P=true
call Di(2.5)
call TriggerExecute(pr)
else
if(hI())then
set f=1
else
set f=2
endif
endif
endif
endif
set Wv=true
call DisableTrigger(GetTriggeringTrigger())
endfunction
function mI takes nothing returns boolean
return(GetSpellAbilityId()=='A009')or(GetSpellAbilityId()=='A00A')
endfunction
function MI takes nothing returns boolean
return(mI())
endfunction
function pI takes nothing returns boolean
return(GetOwningPlayer(GetSpellAbilityUnit())==Player(6))
endfunction
function PI takes nothing returns boolean
return(GetOwningPlayer(GetSpellAbilityUnit())==Player(0))
endfunction
function qI takes nothing returns boolean
return(IsPlayerAlly(GetOwningPlayer(GetSpellAbilityUnit()),Player(0)))
endfunction
function QI takes nothing returns nothing
set px=GetSpellTargetLoc()
if(PI())then
call SetUnitFacingTimed(GetSpellAbilityUnit(),270.,0)
call PingMinimapLocForForceEx(si(GetOwningPlayer(GetSpellAbilityUnit())),px,3.5,0,'d',.0,.0)
call PingMinimapLocForForceEx(si(GetOwningPlayer(GetSpellAbilityUnit())),px,3.5,0,'d',.0,.0)
else
if(pI())then
call SetUnitFacingTimed(GetSpellAbilityUnit(),90.,0)
call PingMinimapLocForForceEx(si(GetOwningPlayer(GetSpellAbilityUnit())),px,3.5,0,.0,100.,.0)
call PingMinimapLocForForceEx(si(GetOwningPlayer(GetSpellAbilityUnit())),px,3.5,0,.0,100.,.0)
else
call PingMinimapLocForForceEx(si(GetOwningPlayer(GetSpellAbilityUnit())),px,3.5,0,'d','d','d')
call PingMinimapLocForForceEx(si(GetOwningPlayer(GetSpellAbilityUnit())),px,3.5,0,'d','d','d')
endif
endif
if(qI())then
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=6
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call SetCameraQuickPositionLocForPlayer(bv[bj_forLoopAIndex],px)
call StartSoundForPlayerBJ(bv[bj_forLoopAIndex],jo)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set Dv[0]=GetPlayerName(GetOwningPlayer(GetSpellAbilityUnit()))
set hv[0]=px
else
set bj_forLoopAIndex=7
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call SetCameraQuickPositionLocForPlayer(bv[bj_forLoopAIndex],px)
call StartSoundForPlayerBJ(bv[bj_forLoopAIndex],jo)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set Dv[1]=GetPlayerName(GetOwningPlayer(GetSpellAbilityUnit()))
set hv[1]=px
endif
call RemoveLocation(px)
endfunction
function sI takes nothing returns boolean
return(Dv[1]==GetPlayerName(Player(6)))
endfunction
function SI takes nothing returns boolean
return(Dv[0]==GetPlayerName(Player(0)))
endfunction
function tI takes nothing returns boolean
return(IsPlayerAlly(GetTriggerPlayer(),Player(0)))
endfunction
function TI takes nothing returns nothing
if(tI())then
call DisplayTextToForce(Qi(GetTriggerPlayer()),("|CFF0042FFThe last person to ping on your team was "+Dv[0]))
if(SI())then
call PingMinimapLocForForceEx(Qi(GetTriggerPlayer()),hv[0],3.5,0,'d',.0,.0)
call PingMinimapLocForForceEx(Qi(GetTriggerPlayer()),hv[0],3.5,0,'d',.0,.0)
call StartSoundForPlayerBJ(GetTriggerPlayer(),jo)
else
call PingMinimapLocForForceEx(Qi(GetTriggerPlayer()),hv[0],3.5,0,'d',100.,100.)
call PingMinimapLocForForceEx(Qi(GetTriggerPlayer()),hv[0],3.5,0,'d',100.,100.)
call StartSoundForPlayerBJ(GetTriggerPlayer(),jo)
endif
else
call DisplayTextToForce(Qi(GetTriggerPlayer()),("|CFF0042FFThe last person to ping on your team was "+Dv[1]))
if(sI())then
call PingMinimapLocForForceEx(Qi(GetTriggerPlayer()),hv[1],3.5,0,.0,100.,.0)
call PingMinimapLocForForceEx(Qi(GetTriggerPlayer()),hv[1],3.5,0,.0,100.,.0)
call StartSoundForPlayerBJ(GetTriggerPlayer(),jo)
else
call PingMinimapLocForForceEx(Qi(GetTriggerPlayer()),hv[1],3.5,0,'d',100.,100.)
call PingMinimapLocForForceEx(Qi(GetTriggerPlayer()),hv[1],3.5,0,'d',100.,100.)
call StartSoundForPlayerBJ(GetTriggerPlayer(),jo)
endif
endif
endfunction
function uI takes nothing returns nothing
set C=GetRectHeightBJ(Sx)
set c=(C/ 100.)
call DestroyTrigger(GetTriggeringTrigger())
set jr=null
endfunction
function UI takes nothing returns nothing
call PanCameraToTimedLocForPlayer(GetEnumPlayer(),x,0)
endfunction
function wI takes nothing returns boolean
return(Y)
endfunction
function WI takes nothing returns nothing
call PauseUnit(GetEnumUnit(),true)
endfunction
function yI takes nothing returns nothing
call PanCameraToTimedLocForPlayer(GetEnumPlayer(),x,0)
endfunction
function YI takes nothing returns boolean
return(Y)
endfunction
function zI takes nothing returns nothing
call PauseUnit(GetEnumUnit(),true)
endfunction
function ZI takes nothing returns boolean
return(f==1)
endfunction
function vA takes nothing returns boolean
return(GetPlayerController(bv[9])!=MAP_CONTROL_USER)or(GetPlayerController(bv[10])!=MAP_CONTROL_USER)
endfunction
function Trig_Startup_Func007Func001Func002Func002Func002C takes nothing returns boolean
return(Bv==false)and(vA())
endfunction
function eA takes nothing returns boolean
return(GetPlayerController(bv[3])!=MAP_CONTROL_USER)or(GetPlayerController(bv[4])!=MAP_CONTROL_USER)
endfunction
function Trig_Startup_Func007Func001Func002Func002C takes nothing returns boolean
return(Bv==false)and(eA())
endfunction
function xA takes nothing returns boolean
return(bv[9]==Player(13))or(bv[10]==Player(13))
endfunction
function Trig_Startup_Func007Func001Func002C takes nothing returns boolean
return(Bv)and(xA())
endfunction
function oA takes nothing returns boolean
return(bv[3]==Player(15))or(bv[4]==Player(15))
endfunction
function Trig_Startup_Func007Func001C takes nothing returns boolean
return(Bv)and(oA())
endfunction
function rA takes nothing returns nothing
if(ZI())then
set D=1
set x=gi(GetRectCenter(Yx),(c*20.),270.)
call MoveRectToLoc(p[1],gi(x,50.,270.))
call MoveRectToLoc(p[2],gi(x,50.,90.))
call ForForce(bj_FORCE_ALL_PLAYERS,function yI)
call CreateNUnitsAtLoc(1,'n002',Player(15),x,90.)
call SetUnitUserData(bj_lastCreatedUnit,1000)
set k=bj_lastCreatedUnit
call CreateNUnitsAtLoc(1,'Hblm',Player(0),gi(x,250.,90.),270.)
set J[1]=bj_lastCreatedUnit
call SetUnitColor(bj_lastCreatedUnit,PLAYER_COLOR_RED)
call UnitAddAbility(bj_lastCreatedUnit,'A007')
call CreateNUnitsAtLoc(1,'E000',bv[2],gi(x,550.,90.),270.)
set J[2]=bj_lastCreatedUnit
call SetUnitColor(bj_lastCreatedUnit,PLAYER_COLOR_BLUE)
call CreateNUnitsAtLoc(1,'E001',bv[3],gi(gi(x,100.,90.),300.,180.),270.)
set J[3]=bj_lastCreatedUnit
call SetUnitColor(bj_lastCreatedUnit,PLAYER_COLOR_CYAN)
call CreateNUnitsAtLoc(1,'E001',bv[4],gi(gi(x,100.,90.),300.,.0),270.)
set J[4]=bj_lastCreatedUnit
call SetUnitColor(bj_lastCreatedUnit,PLAYER_COLOR_PURPLE)
call CreateNUnitsAtLoc(1,'H000',bv[5],gi(gi(x,100.,90.),1000.,180.),270.)
set J[5]=bj_lastCreatedUnit
call SetUnitColor(bj_lastCreatedUnit,PLAYER_COLOR_YELLOW)
call CreateNUnitsAtLoc(1,'H000',bv[6],gi(gi(x,100.,90.),1000.,.0),270.)
set J[6]=bj_lastCreatedUnit
call SetUnitColor(bj_lastCreatedUnit,PLAYER_COLOR_ORANGE)
call CreateNUnitsAtLoc(1,'e002',Player(0),gi(gi(x,100.,90.),.0,.0),270.)
call CreateNUnitsAtLoc(1,'e002',Player(0),gi(gi(x,100.,90.),150.,.0),270.)
call CreateNUnitsAtLoc(1,'e002',Player(0),gi(gi(x,100.,90.),150.,180.),270.)
call CreateNUnitsAtLoc(1,'Hblm',Player(6),gi(x,250.,270.),90.)
set J[7]=bj_lastCreatedUnit
call SetUnitColor(bj_lastCreatedUnit,PLAYER_COLOR_GREEN)
call CreateNUnitsAtLoc(1,'E000',bv[8],gi(x,550.,270.),90.)
set J[8]=bj_lastCreatedUnit
call SetUnitColor(bj_lastCreatedUnit,PLAYER_COLOR_PINK)
call CreateNUnitsAtLoc(1,'E001',bv[9],gi(gi(x,100.,270.),300.,180.),90.)
set J[9]=bj_lastCreatedUnit
call SetUnitColor(bj_lastCreatedUnit,PLAYER_COLOR_LIGHT_GRAY)
call CreateNUnitsAtLoc(1,'E001',bv[10],gi(gi(x,100.,270.),300.,.0),90.)
set J[10]=bj_lastCreatedUnit
call SetUnitColor(bj_lastCreatedUnit,PLAYER_COLOR_LIGHT_BLUE)
call CreateNUnitsAtLoc(1,'H000',bv[11],gi(gi(x,100.,270.),1000.,180.),90.)
set J[11]=bj_lastCreatedUnit
call SetUnitColor(bj_lastCreatedUnit,PLAYER_COLOR_AQUA)
call CreateNUnitsAtLoc(1,'H000',bv[12],gi(gi(x,100.,270.),1000.,.0),90.)
set J[12]=bj_lastCreatedUnit
call SetUnitColor(bj_lastCreatedUnit,PLAYER_COLOR_BROWN)
call CreateNUnitsAtLoc(1,'e002',Player(6),gi(gi(x,100.,270.),.0,.0),90.)
call CreateNUnitsAtLoc(1,'e002',Player(6),gi(gi(x,100.,270.),150.,.0),90.)
call CreateNUnitsAtLoc(1,'e002',Player(6),gi(gi(x,100.,270.),150.,180.),90.)
set Xe=true
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call UnitAddAbility(J[bj_forLoopAIndex],'A009')
call UnitAddAbility(J[bj_forLoopAIndex],'A00A')
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
if(YI())then
call PauseUnit(J[3],true)
call PauseUnit(J[4],true)
call PauseUnit(J[9],true)
call PauseUnit(J[10],true)
endif
set L=gi(x,(c*10.),270.)
call UnitAddAbility(J[1],'A007')
call UnitRemoveAbility(J[7],'A007')
call ForGroupBJ(Mi('e002'),function zI)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call SetUnitPathing(J[bj_forLoopAIndex],true)
call PauseUnit(J[bj_forLoopAIndex],true)
call IssueImmediateOrderById(J[bj_forLoopAIndex],851993)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call PauseUnit(J[bj_forLoopAIndex],true)
call IssueImmediateOrderById(J[bj_forLoopAIndex],851993)
call Di(1.)
call PauseUnit(J[1],false)
set P=false
else
set D=1
set x=gi(GetRectCenter(yx),(c*20.),90.)
set p[1]=RectFromCenterSizeBJ(gi(x,50.,270.),GetRectWidthBJ(bj_mapInitialPlayableArea),50.)
set p[2]=RectFromCenterSizeBJ(gi(x,50.,90.),GetRectWidthBJ(bj_mapInitialPlayableArea),50.)
call ForForce(bj_FORCE_ALL_PLAYERS,function UI)
call CreateNUnitsAtLoc(1,'n002',Player(15),x,90.)
call SetUnitUserData(bj_lastCreatedUnit,1000)
set k=bj_lastCreatedUnit
call CreateNUnitsAtLoc(1,'Hblm',Player(0),gi(x,250.,90.),270.)
set J[1]=bj_lastCreatedUnit
call UnitAddAbility(bj_lastCreatedUnit,'A007')
call CreateNUnitsAtLoc(1,'E000',bv[2],gi(x,550.,90.),270.)
set J[2]=bj_lastCreatedUnit
call CreateNUnitsAtLoc(1,'E001',bv[3],gi(gi(x,100.,90.),300.,180.),270.)
set J[3]=bj_lastCreatedUnit
call CreateNUnitsAtLoc(1,'E001',bv[4],gi(gi(x,100.,90.),300.,.0),270.)
set J[4]=bj_lastCreatedUnit
call CreateNUnitsAtLoc(1,'H000',bv[5],gi(gi(x,100.,90.),1000.,180.),270.)
set J[5]=bj_lastCreatedUnit
call CreateNUnitsAtLoc(1,'H000',bv[6],gi(gi(x,100.,90.),1000.,.0),270.)
set J[6]=bj_lastCreatedUnit
call CreateNUnitsAtLoc(1,'e002',Player(0),gi(gi(x,100.,90.),.0,.0),270.)
call CreateNUnitsAtLoc(1,'e002',Player(0),gi(gi(x,100.,90.),150.,.0),270.)
call CreateNUnitsAtLoc(1,'e002',Player(0),gi(gi(x,100.,90.),150.,180.),270.)
call CreateNUnitsAtLoc(1,'Hblm',Player(6),gi(x,250.,270.),90.)
set J[7]=bj_lastCreatedUnit
call CreateNUnitsAtLoc(1,'E000',bv[8],gi(x,550.,270.),90.)
set J[8]=bj_lastCreatedUnit
call CreateNUnitsAtLoc(1,'E001',bv[9],gi(gi(x,100.,270.),300.,180.),90.)
set J[9]=bj_lastCreatedUnit
call CreateNUnitsAtLoc(1,'E001',bv[10],gi(gi(x,100.,270.),300.,.0),90.)
set J[10]=bj_lastCreatedUnit
call CreateNUnitsAtLoc(1,'H000',bv[11],gi(gi(x,100.,270.),1000.,180.),90.)
set J[11]=bj_lastCreatedUnit
call CreateNUnitsAtLoc(1,'H000',bv[12],gi(gi(x,100.,270.),1000.,.0),90.)
set J[12]=bj_lastCreatedUnit
call CreateNUnitsAtLoc(1,'e002',Player(6),gi(gi(x,100.,270.),.0,.0),90.)
call CreateNUnitsAtLoc(1,'e002',Player(6),gi(gi(x,100.,270.),150.,.0),90.)
call CreateNUnitsAtLoc(1,'e002',Player(6),gi(gi(x,100.,270.),150.,180.),90.)
set Xe=true
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call UnitAddAbility(J[bj_forLoopAIndex],'A009')
call UnitAddAbility(J[bj_forLoopAIndex],'A00A')
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
if(wI())then
call PauseUnit(J[3],true)
call PauseUnit(J[4],true)
call PauseUnit(J[9],true)
call PauseUnit(J[10],true)
endif
set L=gi(x,(c*10.),90.)
call UnitAddAbility(J[7],'A007')
call UnitRemoveAbility(J[1],'A007')
call ForGroupBJ(Mi('e002'),function WI)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call SetUnitPathing(J[bj_forLoopAIndex],true)
call UnitRemoveAbility(J[bj_forLoopAIndex],'Absk')
call PauseUnit(J[bj_forLoopAIndex],true)
call IssueImmediateOrderById(J[bj_forLoopAIndex],851993)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call PauseUnit(J[bj_forLoopAIndex],true)
call IssueImmediateOrderById(J[bj_forLoopAIndex],851993)
call Di(1.)
call PauseUnit(J[7],false)
set P=false
endif
call StartTimerBJ(Oe,false,25.)
call CreateTimerDialogBJ(Oe,"Play Clock:")
set he=bj_lastCreatedTimerDialog
call TimerDialogDisplay(he,true)
call TriggerExecute(Kr)
if(Fx)then
call TriggerExecute(xi)
endif
endfunction
function iA takes nothing returns nothing
call PanCameraToTimedLocForPlayer(GetEnumPlayer(),x,0)
endfunction
function aA takes nothing returns boolean
return(GetLocationY(x)>=GetLocationY(L))
endfunction
function nA takes nothing returns boolean
return(kv)
endfunction
function VA takes nothing returns boolean
return(yv)
endfunction
function EA takes nothing returns boolean
return(xe)
endfunction
function XA takes nothing returns boolean
return(oe)
endfunction
function OA takes nothing returns boolean
return(fx)
endfunction
function RA takes nothing returns boolean
return(GetLocationY(x)<=GetLocationY(L))
endfunction
function IA takes nothing returns boolean
return(kv)
endfunction
function AA takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function NA takes nothing returns boolean
return(yv)
endfunction
function bA takes nothing returns boolean
return(xe)
endfunction
function BA takes nothing returns boolean
return(oe)
endfunction
function cA takes nothing returns boolean
return(fx)
endfunction
function CA takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function dA takes nothing returns boolean
return(IsUnitDeadBJ(J[bj_forLoopAIndex]))
endfunction
function DA takes nothing returns boolean
return(f==2)
endfunction
function fA takes nothing returns boolean
return(Y)
endfunction
function FA takes nothing returns nothing
call PauseUnit(GetEnumUnit(),true)
endfunction
function gA takes nothing returns boolean
return(Rx)
endfunction
function GA takes nothing returns boolean
return(f==1)
endfunction
function hA takes nothing returns boolean
return(IsUnitDeadBJ(J[bj_forLoopAIndex]))
endfunction
function HA takes nothing returns boolean
return(f==1)
endfunction
function jA takes nothing returns boolean
return(Y)
endfunction
function JA takes nothing returns nothing
call PauseUnit(GetEnumUnit(),true)
endfunction
function kA takes nothing returns boolean
return(Rx)
endfunction
function KA takes nothing returns boolean
return(f==1)
endfunction
function lA takes nothing returns boolean
return(f==1)
endfunction
function LA takes nothing returns boolean
return(Me)
endfunction
function mA takes nothing returns nothing
if(LA())then
else
call PauseTimerBJ(false,F)
call PauseTimerBJ(false,ue)
call DestroyTimerDialog(he)
call TriggerExecute(lr)
set K=false
set xv=false
set rv=false
set P=true
set Sv=false
set Bx=false
set bx=false
set Fe=false
set rx=false
set qe[0]=false
set qe[1]=false
set Ox[0]=0
set Ox[1]=0
set qx=false
set sx=false
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set Xx[bj_forLoopAIndex]=false
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set ix=null
call TriggerExecute(Sr)
call TriggerExecute(Qr)
call DisableTrigger(Gr)
set x=Location(GetLocationX(GetRectCenter(yx)),GetLocationY(x))
call MoveRectToLoc(p[1],gi(x,50.,270.))
call MoveRectToLoc(p[2],gi(x,50.,90.))
set re=false
call ForForce(bj_FORCE_ALL_PLAYERS,function iA)
if(lA())then
if(RA())then
set L=gi(x,(c*10.),270.)
endif
if(IA())then
set L=gi(x,(c*10.),270.)
set kv=false
endif
if(NA())then
set D=1
set L=gi(x,(c*10.),270.)
endif
if(bA())then
set x=gi(GetRectCenter(Yx),(c*30.),270.)
set L=gi(x,(c*10.),270.)
set xe=false
endif
if(BA())then
set x=gi(GetRectCenter(Yx),(c*20.),270.)
set L=gi(x,(c*10.),270.)
set oe=false
set re=false
endif
if(cA())then
set x=gi(GetRectCenter(Yx),(c*5.),270.)
set L=gi(x,(c*10.),270.)
set fx=false
set Mx=false
endif
call ForGroupBJ(Mi('e002'),function CA)
call CreateNUnitsAtLoc(1,'n002',Player(15),x,90.)
call SetUnitUserData(bj_lastCreatedUnit,1000)
set k=bj_lastCreatedUnit
set l=(DistanceBetweenPoints(Location(0,GetLocationY(GetUnitLoc(k))),Location(0,GetLocationY(L)))/ c)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call SetUnitPathing(J[bj_forLoopAIndex],false)
call UnitRemoveAbility(J[bj_forLoopAIndex],'Absk')
call UnitAddAbility(J[bj_forLoopAIndex],'Absk')
call UnitRemoveBuffsBJ(2,J[bj_forLoopAIndex])
call SetUnitMoveSpeed(J[bj_forLoopAIndex],GetUnitDefaultMoveSpeed(J[bj_forLoopAIndex]))
call SetUnitManaBJ(J[bj_forLoopAIndex],(GetUnitStateSwap(UNIT_STATE_MANA,J[bj_forLoopAIndex])+50.))
call UnitRemoveAbility(J[bj_forLoopAIndex],'A00C')
call UnitRemoveAbility(J[bj_forLoopAIndex],'A00D')
call UnitAddAbility(J[bj_forLoopAIndex],'A00C')
if(hA())then
call ReviveHeroLoc(J[bj_forLoopAIndex],GetUnitLoc(J[bj_forLoopAIndex]),true)
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call UnitRemoveAbility(J[1],'A006')
call UnitRemoveAbility(J[7],'A006')
call SetUnitPositionLocFacingBJ(J[1],gi(x,250.,90.),270.)
if(HA())then
call UnitRemoveAbility(J[1],'A007')
call UnitAddAbility(J[1],'A007')
endif
call SetUnitPositionLocFacingBJ(J[2],gi(x,550.,90.),270.)
call SetUnitPositionLocFacingBJ(J[3],gi(gi(x,100.,90.),300.,180.),270.)
call SetUnitPositionLocFacingBJ(J[4],gi(gi(x,100.,90.),300.,.0),270.)
call SetUnitPositionLocFacingBJ(J[5],gi(gi(x,100.,90.),1000.,180.),270.)
call SetUnitPositionLocFacingBJ(J[6],gi(gi(x,100.,90.),1000.,.0),270.)
call CreateNUnitsAtLoc(1,'e002',Player(0),gi(gi(x,100.,90.),.0,.0),270.)
call CreateNUnitsAtLoc(1,'e002',Player(0),gi(gi(x,100.,90.),150.,.0),270.)
call CreateNUnitsAtLoc(1,'e002',Player(0),gi(gi(x,100.,90.),150.,180.),270.)
call SetUnitPositionLocFacingBJ(J[7],gi(x,250.,270.),90.)
call SetUnitPositionLocFacingBJ(J[8],gi(x,550.,270.),90.)
call SetUnitPositionLocFacingBJ(J[9],gi(gi(x,100.,270.),300.,180.),90.)
call SetUnitPositionLocFacingBJ(J[10],gi(gi(x,100.,270.),300.,.0),90.)
call SetUnitPositionLocFacingBJ(J[11],gi(gi(x,100.,270.),1000.,180.),90.)
call SetUnitPositionLocFacingBJ(J[12],gi(gi(x,100.,270.),1000.,.0),90.)
call CreateNUnitsAtLoc(1,'e002',Player(6),gi(gi(x,100.,270.),.0,.0),90.)
call CreateNUnitsAtLoc(1,'e002',Player(6),gi(gi(x,100.,270.),150.,.0),90.)
call CreateNUnitsAtLoc(1,'e002',Player(6),gi(gi(x,100.,270.),150.,180.),90.)
set Xe=true
set ax=false
if(jA())then
call PauseUnit(J[3],true)
call PauseUnit(J[4],true)
call PauseUnit(J[9],true)
call PauseUnit(J[10],true)
endif
call ForGroupBJ(Mi('e002'),function JA)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call UnitRemoveAbility(J[1],'A007')
call UnitAddAbility(J[1],'A007')
call SetUnitPathing(J[bj_forLoopAIndex],true)
call PauseUnit(J[bj_forLoopAIndex],true)
call IssueImmediateOrderById(J[bj_forLoopAIndex],851993)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call Di(1.)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call SetUnitPathing(J[bj_forLoopAIndex],true)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call PauseUnit(J[1],false)
set P=false
set yv=false
set xe=false
set oe=false
set De=false
set Ge=false
call UnitAddAbility(J[1],'A005')
call UnitAddAbility(J[7],'A005')
if(kA())then
set Rx=false
set D=1
set L=gi(x,(c*10.),270.)
endif
if(KA())then
set wv=1
else
set wv=2
endif
else
if(aA())then
set L=gi(x,(c*10.),90.)
endif
if(nA())then
set L=gi(x,(c*10.),90.)
set kv=false
endif
if(VA())then
set D=1
set L=gi(x,(c*10.),90.)
endif
if(EA())then
set x=gi(GetRectCenter(yx),(c*30.),90.)
set L=gi(x,(c*10.),90.)
set xe=false
endif
if(XA())then
set x=gi(GetRectCenter(yx),(c*20.),90.)
set L=gi(x,(c*10.),90.)
set oe=false
set re=false
endif
if(OA())then
set x=gi(GetRectCenter(yx),(c*5.),90.)
set L=gi(x,(c*10.),90.)
set fx=false
endif
call ForGroupBJ(Mi('e002'),function AA)
call CreateNUnitsAtLoc(1,'n002',Player(15),x,90.)
call SetUnitUserData(bj_lastCreatedUnit,1000)
set k=bj_lastCreatedUnit
set l=(DistanceBetweenPoints(Location(0,GetLocationY(GetUnitLoc(k))),Location(0,GetLocationY(L)))/ c)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call SetUnitPathing(J[bj_forLoopAIndex],false)
call UnitRemoveAbility(J[bj_forLoopAIndex],'Absk')
call UnitAddAbility(J[bj_forLoopAIndex],'Absk')
call UnitRemoveBuffsBJ(2,J[bj_forLoopAIndex])
call SetUnitMoveSpeed(J[bj_forLoopAIndex],GetUnitDefaultMoveSpeed(J[bj_forLoopAIndex]))
call SetUnitManaBJ(J[bj_forLoopAIndex],(GetUnitStateSwap(UNIT_STATE_MANA,J[bj_forLoopAIndex])+50.))
call UnitRemoveAbility(J[bj_forLoopAIndex],'A00C')
call UnitRemoveAbility(J[bj_forLoopAIndex],'A00D')
call UnitAddAbility(J[bj_forLoopAIndex],'A00C')
if(dA())then
call ReviveHeroLoc(J[bj_forLoopAIndex],GetUnitLoc(J[bj_forLoopAIndex]),true)
endif
call UnitRemoveAbility(J[1],'A006')
call UnitRemoveAbility(J[7],'A006')
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call SetUnitPositionLocFacingBJ(J[1],gi(x,250.,90.),270.)
if(DA())then
call UnitRemoveAbility(J[7],'A007')
call UnitAddAbility(J[7],'A007')
endif
call SetUnitPositionLocFacingBJ(J[2],gi(x,550.,90.),270.)
call SetUnitPositionLocFacingBJ(J[3],gi(gi(x,100.,90.),300.,180.),270.)
call SetUnitPositionLocFacingBJ(J[4],gi(gi(x,100.,90.),300.,.0),270.)
call SetUnitPositionLocFacingBJ(J[5],gi(gi(x,100.,90.),1000.,180.),270.)
call SetUnitPositionLocFacingBJ(J[6],gi(gi(x,100.,90.),1000.,.0),270.)
call CreateNUnitsAtLoc(1,'e002',Player(0),gi(gi(x,100.,90.),.0,.0),270.)
call CreateNUnitsAtLoc(1,'e002',Player(0),gi(gi(x,100.,90.),150.,.0),270.)
call CreateNUnitsAtLoc(1,'e002',Player(0),gi(gi(x,100.,90.),150.,180.),270.)
call SetUnitPositionLocFacingBJ(J[7],gi(x,250.,270.),90.)
call SetUnitPositionLocFacingBJ(J[8],gi(x,550.,270.),90.)
call SetUnitPositionLocFacingBJ(J[9],gi(gi(x,100.,270.),300.,180.),90.)
call SetUnitPositionLocFacingBJ(J[10],gi(gi(x,100.,270.),300.,.0),90.)
call SetUnitPositionLocFacingBJ(J[11],gi(gi(x,100.,270.),1000.,180.),90.)
call SetUnitPositionLocFacingBJ(J[12],gi(gi(x,100.,270.),1000.,.0),90.)
call CreateNUnitsAtLoc(1,'e002',Player(6),gi(gi(x,100.,270.),.0,.0),90.)
call CreateNUnitsAtLoc(1,'e002',Player(6),gi(gi(x,100.,270.),150.,.0),90.)
call CreateNUnitsAtLoc(1,'e002',Player(6),gi(gi(x,100.,270.),150.,180.),90.)
set Xe=true
set ax=false
if(fA())then
call PauseUnit(J[3],true)
call PauseUnit(J[4],true)
call PauseUnit(J[9],true)
call PauseUnit(J[10],true)
endif
call ForGroupBJ(Mi('e002'),function FA)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call UnitRemoveAbility(J[7],'A007')
call UnitAddAbility(J[7],'A007')
call SetUnitPathing(J[bj_forLoopAIndex],true)
call PauseUnit(J[bj_forLoopAIndex],true)
call IssueImmediateOrderById(J[bj_forLoopAIndex],851993)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call Di(1.)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call SetUnitPathing(J[bj_forLoopAIndex],true)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call PauseUnit(J[7],false)
call UnitRemoveAbility(J[3],'Absk')
call UnitRemoveAbility(J[4],'Absk')
call UnitRemoveAbility(J[9],'Absk')
call UnitRemoveAbility(J[10],'Absk')
call UnitAddAbility(J[1],'A005')
call UnitAddAbility(J[7],'A005')
set yv=false
set P=false
set xe=false
set oe=false
set De=false
set Ge=false
if(gA())then
set Rx=false
set D=1
set L=gi(x,(c*10.),90.)
endif
if(GA())then
set wv=1
else
set wv=2
endif
endif
call StartTimerBJ(Oe,false,Ex)
call CreateTimerDialogBJ(Oe,"Play Clock:")
set he=bj_lastCreatedTimerDialog
call TimerDialogDisplay(he,true)
call TriggerExecute(Kr)
endif
endfunction
function MA takes nothing returns nothing
set bj_forLoopAIndex=129
set bj_forLoopAIndexEnd=7843
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call SetTerrainTypeBJ(Location(I2R((bj_forLoopAIndex-3968)),GetLocationY(L)),'Yblm',0,1,1)
set Te[bj_forLoopAIndex]=Location(I2R(bj_forLoopAIndex)-3968,GetLocationY(L))
set bj_forLoopAIndex=bj_forLoopAIndex+128
endloop
endfunction
function pA takes nothing returns boolean
return(RectContainsLoc(io,Te[1153]))or(RectContainsLoc(ao,Te[1153]))
endfunction
function PA takes nothing returns boolean
return(pA())
endfunction
function qA takes nothing returns boolean
return(RectContainsLoc(no,Te[1153]))or(RectContainsLoc(Vo,Te[1153]))
endfunction
function QA takes nothing returns boolean
return(qA())
endfunction
function sA takes nothing returns boolean
return(RectContainsLoc(Co,Te[1153]))or(RectContainsLoc(Bo,Te[1153]))or(RectContainsLoc(Xo,Te[1153]))or(RectContainsLoc(Oo,Te[1153]))or(RectContainsLoc(bo,Te[1153]))or(RectContainsLoc(Ao,Te[1153]))or(RectContainsLoc(Ro,Te[1153]))or(RectContainsLoc(Io,Te[1153]))or(RectContainsLoc(No,Te[1153]))or(RectContainsLoc(Eo,Te[1153]))
endfunction
function SA takes nothing returns boolean
return(sA())
endfunction
function tA takes nothing returns nothing
set bj_forLoopAIndex=129
set bj_forLoopAIndexEnd=7843
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call SetTerrainTypeBJ(Location(I2R(bj_forLoopAIndex)-3968,GetLocationY(gi(GetRectCenter(Eo),'d',270))),GetTerrainTypeBJ(GetRectCenter(co)),0,1,1)
call SetTerrainTypeBJ(Location(I2R(bj_forLoopAIndex)-3968,GetLocationY(gi(GetRectCenter(bo),'d',90))),GetTerrainTypeBJ(GetRectCenter(co)),0,1,1)
if(SA())then
call SetTerrainTypeBJ(Location(GetLocationX(Te[bj_forLoopAIndex]),GetLocationY(Te[bj_forLoopAIndex])),GetTerrainTypeBJ(GetRectCenter(co)),0,1,1)
else
if(QA())then
call SetTerrainTypeBJ(Location(GetLocationX(Te[bj_forLoopAIndex]),GetLocationY(Te[bj_forLoopAIndex])),'Ldrt',0,1,1)
else
if(PA())then
call SetTerrainTypeBJ(Location(GetLocationX(Te[bj_forLoopAIndex]),GetLocationY(Te[bj_forLoopAIndex])),'Lgrs',0,1,1)
endif
endif
endif
set bj_forLoopAIndex=bj_forLoopAIndex+128
endloop
endfunction
function TA takes nothing returns nothing
call PauseUnit(GetEnumUnit(),true)
endfunction
function uA takes nothing returns boolean
return(GetLocationY(x)<=GetLocationY(L))
endfunction
function UA takes nothing returns boolean
return(f==1)
endfunction
function wA takes nothing returns boolean
return(P==false)and(IsPlayerAlly(GetOwningPlayer(J[bj_forLoopAIndex]),Player(6)))and(GetLocationY(GetUnitLoc(J[bj_forLoopAIndex]))>GetLocationY(x))and(IsUnitAliveBJ(J[bj_forLoopAIndex]))and(Rx==false)
endfunction
function WA takes nothing returns nothing
call PauseUnit(GetEnumUnit(),true)
endfunction
function yA takes nothing returns boolean
return(GetLocationY(x)>=GetLocationY(L))
endfunction
function YA takes nothing returns boolean
return(f==2)
endfunction
function zA takes nothing returns boolean
return(P==false)and(IsPlayerAlly(GetOwningPlayer(J[bj_forLoopAIndex]),Player(0)))and(GetLocationY(GetUnitLoc(J[bj_forLoopAIndex]))<GetLocationY(x))and(IsUnitAliveBJ(J[bj_forLoopAIndex]))and(Rx==false)
endfunction
function ZA takes nothing returns boolean
return(rx)
endfunction
function vN takes nothing returns boolean
return(GetLocationY(GetUnitLoc(J[7]))<=GetLocationY(x))
endfunction
function eN takes nothing returns boolean
return(GetLocationY(GetUnitLoc(J[1]))>=GetLocationY(x))
endfunction
function xN takes nothing returns boolean
return(GetLocationY(GetUnitLoc(J[1]))>=GetLocationY(x))and(Bx==false)
endfunction
function oN takes nothing returns boolean
return(GetLocationY(GetUnitLoc(J[7]))<=GetLocationY(x))and(Bx==false)
endfunction
function rN takes nothing returns boolean
return(UnitHasItemOfTypeBJ(GetFilterUnit(),'I000'))
endfunction
function iN takes nothing returns boolean
return(GetLocationY(GetUnitLoc(GetEnumUnit()))>=GetLocationY(L))
endfunction
function aN takes nothing returns boolean
return(GetUnitTypeId(GetEnumUnit())=='Hblm')or(GetUnitTypeId(GetEnumUnit())=='H000')or(GetUnitTypeId(GetEnumUnit())=='E000')
endfunction
function nN takes nothing returns boolean
return(GetLocationY(GetUnitLoc(GetEnumUnit()))>GetLocationY(x))and(aN())
endfunction
function VN takes nothing returns nothing
set l=(DistanceBetweenPoints(Location(0,GetLocationY(GetUnitLoc(GetEnumUnit()))),Location(0,GetLocationY(L)))/ c)
if(iN())then
set l=.0
endif
if(nN())then
call UnitRemoveAbility(GetEnumUnit(),'A00B')
call UnitRemoveAbility(GetEnumUnit(),'A002')
set Fe=true
set rx=true
endif
endfunction
function EN takes nothing returns boolean
return(UnitHasItemOfTypeBJ(GetFilterUnit(),'I000'))
endfunction
function XN takes nothing returns boolean
return(GetLocationY(GetUnitLoc(GetEnumUnit()))<=GetLocationY(L))
endfunction
function ON takes nothing returns boolean
return(GetUnitTypeId(GetEnumUnit())=='Hblm')
endfunction
function RN takes nothing returns boolean
return(GetUnitTypeId(GetEnumUnit())=='Hblm')or(GetUnitTypeId(GetEnumUnit())=='H000')or(GetUnitTypeId(GetEnumUnit())=='E000')
endfunction
function IN takes nothing returns boolean
return(GetLocationY(GetUnitLoc(GetEnumUnit()))<GetLocationY(x))and(RN())
endfunction
function AN takes nothing returns nothing
set l=(DistanceBetweenPoints(Location(0,GetLocationY(GetUnitLoc(GetEnumUnit()))),Location(0,GetLocationY(L)))/ c)
if(XN())then
set l=.0
endif
if(IN())then
call UnitRemoveAbility(GetEnumUnit(),'A00B')
call UnitRemoveAbility(GetEnumUnit(),'A002')
if(ON())then
set Bx=true
else
set Fe=true
endif
set rx=true
endif
endfunction
function NN takes nothing returns boolean
return(f==1)
endfunction
function bN takes nothing returns boolean
return(K)
endfunction
function BN takes nothing returns nothing
if(bN())then
if(ZA())then
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call UnitRemoveAbility(J[bj_forLoopAIndex],'A00B')
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endif
if(NN())then
if(eN())then
else
call UnitRemoveAbility(J[1],'A00C')
endif
if(oN())then
set Bx=false
else
set Bx=true
endif
call ForGroupBJ(Ji(GetWorldBounds(),Condition(function EN)),function AN)
else
if(vN())then
else
call UnitRemoveAbility(J[7],'A00C')
endif
if(xN())then
set Bx=false
else
set Bx=true
endif
call ForGroupBJ(Ji(GetWorldBounds(),Condition(function rN)),function VN)
endif
else
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(zA())then
set P=true
call KillUnit(J[bj_forLoopAIndex])
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Off-sides!")
call PauseTimerBJ(true,Oe)
call TimerDialogDisplay(he,false)
set De=true
call KillUnit(k)
set k=null
call ForGroupBJ(Mi('e002'),function WA)
call Di(2.5)
set x=gi(x,(c*5.),90.)
if(YA())then
if(yA())then
set D=1
endif
endif
call TriggerExecute(kr)
else
if(wA())then
set P=true
call KillUnit(J[bj_forLoopAIndex])
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Off-sides!")
call PauseTimerBJ(true,Oe)
call TimerDialogDisplay(he,false)
set De=true
call KillUnit(k)
set k=null
call ForGroupBJ(Mi('e002'),function TA)
call Di(2.5)
set x=gi(x,(c*5.),270.)
if(UA())then
if(uA())then
set D=1
endif
endif
call TriggerExecute(kr)
endif
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endif
endfunction
function cN takes nothing returns boolean
return(GetTriggerUnit()!=J[1])
endfunction
function CN takes nothing returns boolean
return(Rx==false)
endfunction
function dN takes nothing returns boolean
return(IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)!=null)
endfunction
function DN takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='e002')
endfunction
function fN takes nothing returns boolean
return(f==1)and(IsPlayerAlly(GetOwningPlayer(GetTriggerUnit()),Player(0)))and(UnitHasItemOfTypeBJ(GetTriggerUnit(),'I000'))and(GetBooleanOr(dN(),DN()))
endfunction
function FN takes nothing returns nothing
if(fN())then
if(CN())then
set fe[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=((fe[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetTriggerUnit()))))/ c))+.0)
if(cN())then
set fe[1]=((fe[1]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetTriggerUnit()))))/ c))+.0)
endif
endif
call RemoveItem(GetItemOfTypeFromUnitBJ(GetTriggerUnit(),'I000'))
set h[1]=(h[1]+7)
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Touchdown!")
set K=false
set P=true
set Ve[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=(Ve[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]+1)
set Ve[1]=(Ve[1]+1)
call Di(2.5)
call TriggerExecute(pr)
endif
endfunction
function gN takes nothing returns boolean
return(GetTriggerUnit()!=J[7])
endfunction
function GN takes nothing returns boolean
return(Rx==false)
endfunction
function hN takes nothing returns boolean
return(IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)!=null)
endfunction
function HN takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='e002')
endfunction
function jN takes nothing returns boolean
return(f==2)and(IsPlayerAlly(GetOwningPlayer(GetTriggerUnit()),Player(6)))and(UnitHasItemOfTypeBJ(GetTriggerUnit(),'I000'))and(GetBooleanOr(hN(),HN()))
endfunction
function JN takes nothing returns nothing
if(jN())then
if(GN())then
set fe[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=((fe[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetTriggerUnit()))))/ c))+.0)
if(gN())then
set fe[7]=((fe[7]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetTriggerUnit()))))/ c))+.0)
endif
endif
call RemoveItem(GetItemOfTypeFromUnitBJ(GetTriggerUnit(),'I000'))
set h[2]=(h[2]+7)
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Touchdown!")
set K=false
set P=true
set Ve[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=(Ve[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]+1)
set Ve[7]=(Ve[7]+1)
call Di(2.5)
call TriggerExecute(pr)
endif
endfunction
function kN takes nothing returns boolean
return(TimerGetRemaining(F)<=.0)
endfunction
function KN takes nothing returns boolean
return(f==1)
endfunction
function lN takes nothing returns boolean
return(Fx)
endfunction
function LN takes nothing returns boolean
return(Fx)
endfunction
function mN takes nothing returns boolean
return(f==2)
endfunction
function MN takes nothing returns nothing
call Di(2.5)
call DisableTrigger(Gr)
if(kN())then
call TriggerExecute(uo)
endif
if(KN())then
set f=2
else
set f=1
endif
if(mN())then
set x=gi(GetRectCenter(yx),(c*20.),90.)
set L=gi(x,(c*10.),90.)
set D=1
if(LN())then
call TriggerExecute(xi)
else
call TriggerExecute(kr)
endif
else
set x=gi(GetRectCenter(Yx),(c*20.),270.)
set L=gi(x,(c*10.),270.)
set D=1
if(lN())then
call TriggerExecute(xi)
else
call TriggerExecute(kr)
endif
endif
endfunction
function pN takes nothing returns boolean
return(UnitHasItemOfTypeBJ(GetDyingUnit(),'I000'))
endfunction
function PN takes nothing returns boolean
return(f==1)
endfunction
function qN takes nothing returns boolean
return(kv==false)or(Sv)
endfunction
function QN takes nothing returns boolean
return(f==1)
endfunction
function sN takes nothing returns boolean
return(f==1)
endfunction
function SN takes nothing returns boolean
return(AngleBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetDyingUnit()))))==90.)
endfunction
function tN takes nothing returns boolean
return(f==1)
endfunction
function TN takes nothing returns boolean
return(f==1)
endfunction
function uN takes nothing returns boolean
return(AngleBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetDyingUnit()))))==90.)
endfunction
function UN takes nothing returns boolean
return(xv)
endfunction
function wN takes nothing returns boolean
return(qN())
endfunction
function WN takes nothing returns boolean
return(Rx==false)
endfunction
function yN takes nothing returns nothing
call DisableTrigger(Gr)
if(WN())then
if(wN())then
if(UN())then
if(SN())then
if(sN())then
set fe[(1+GetPlayerId(GetOwningPlayer(GetDyingUnit())))]=((fe[(1+GetPlayerId(GetOwningPlayer(GetDyingUnit())))]-(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetDyingUnit()))))/ c))+.0)
set fe[1]=((fe[1]-(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetDyingUnit()))))/ c))+.0)
else
set fe[(1+GetPlayerId(GetOwningPlayer(GetDyingUnit())))]=((fe[(1+GetPlayerId(GetOwningPlayer(GetDyingUnit())))]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetDyingUnit()))))/ c))+.0)
set fe[7]=((fe[7]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetDyingUnit()))))/ c))+.0)
endif
else
if(QN())then
set fe[(1+GetPlayerId(GetOwningPlayer(GetDyingUnit())))]=((fe[(1+GetPlayerId(GetOwningPlayer(GetDyingUnit())))]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetDyingUnit()))))/ c))+.0)
set fe[1]=((fe[1]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetDyingUnit()))))/ c))+.0)
else
set fe[7]=((fe[7]-(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetDyingUnit()))))/ c))+.0)
set fe[(1+GetPlayerId(GetOwningPlayer(GetDyingUnit())))]=((fe[(1+GetPlayerId(GetOwningPlayer(GetDyingUnit())))]-(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetDyingUnit()))))/ c))+.0)
endif
endif
else
if(uN())then
if(TN())then
set fe[(1+GetPlayerId(GetOwningPlayer(GetDyingUnit())))]=((fe[(1+GetPlayerId(GetOwningPlayer(GetDyingUnit())))]-(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetDyingUnit()))))/ c))+.0)
else
set fe[(1+GetPlayerId(GetOwningPlayer(GetDyingUnit())))]=((fe[(1+GetPlayerId(GetOwningPlayer(GetDyingUnit())))]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetDyingUnit()))))/ c))+.0)
endif
else
if(tN())then
set fe[(1+GetPlayerId(GetOwningPlayer(GetDyingUnit())))]=((fe[(1+GetPlayerId(GetOwningPlayer(GetDyingUnit())))]+(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetDyingUnit()))))/ c))+.0)
else
set fe[(1+GetPlayerId(GetOwningPlayer(GetDyingUnit())))]=((fe[(1+GetPlayerId(GetOwningPlayer(GetDyingUnit())))]-(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(GetUnitLoc(GetDyingUnit()))))/ c))+.0)
endif
endif
endif
endif
else
if(PN())then
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,("Kick off yards gained: "+R2S((DistanceBetweenPoints(Location(0,GetLocationY(GetRectCenter(Yx))),Location(0,GetLocationY(GetUnitLoc(GetDyingUnit()))))/ c))))
else
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,("Kick off yards gained: "+R2S((DistanceBetweenPoints(Location(0,GetLocationY(GetRectCenter(yx))),Location(0,GetLocationY(GetUnitLoc(GetDyingUnit()))))/ c))))
endif
endif
set x=GetUnitLoc(GetDyingUnit())
set ee=GetOwningPlayer(GetDyingUnit())
call RemoveItem(GetItemOfTypeFromUnitBJ(GetDyingUnit(),'I000'))
set K=false
set P=true
call Di(2.5)
call TriggerExecute(qr)
endfunction
function YN takes nothing returns boolean
return(GetLocationY(x)>=GetLocationY(L))
endfunction
function zN takes nothing returns boolean
return(GetLocationY(x)<=GetLocationY(L))
endfunction
function ZN takes nothing returns boolean
return(f==1)
endfunction
function vb takes nothing returns boolean
return(l==.0)
endfunction
function eb takes nothing returns boolean
return(l>.0)
endfunction
function xb takes nothing returns boolean
return(GetLocationY(x)>=GetLocationY(L))
endfunction
function ob takes nothing returns boolean
return(f==2)
endfunction
function rb takes nothing returns boolean
return(GetLocationY(x)<=GetLocationY(L))
endfunction
function ib takes nothing returns boolean
return(f==1)
endfunction
function ab takes nothing returns boolean
return(TimerGetRemaining(F)<=.0)
endfunction
function nb takes nothing returns boolean
return(qx)and(wv!=f)
endfunction
function Vb takes nothing returns boolean
return(qx)and(wv!=f)
endfunction
function Eb takes nothing returns boolean
return(f==1)
endfunction
function Xb takes nothing returns boolean
return(D<=4)
endfunction
function Ob takes nothing returns boolean
return(xe)
endfunction
function Rb takes nothing returns boolean
return(oe)
endfunction
function Ib takes nothing returns boolean
return(xe)
endfunction
function Ab takes nothing returns boolean
return(oe)
endfunction
function Nb takes nothing returns boolean
return(f==1)
endfunction
function bb takes nothing returns boolean
return(wv==f)and(qx)
endfunction
function Bb takes nothing returns boolean
return(wv==f)and(qx)
endfunction
function cb takes nothing returns boolean
return(f==1)
endfunction
function Cb takes nothing returns boolean
return(D>4)
endfunction
function db takes nothing returns nothing
set x=Location(GetLocationX(GetRectCenter(yx)),GetLocationY(x))
if(ZN())then
set l=(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(L)))/ c)
if(zN())then
set l=.0
endif
else
set l=(DistanceBetweenPoints(Location(0,GetLocationY(x)),Location(0,GetLocationY(L)))/ c)
if(YN())then
set l=.0
endif
endif
if(eb())then
if(vb())then
set D=1
else
set D=(D+1)
endif
else
set D=1
endif
if(ib())then
if(rb())then
set L=gi(x,(c*10.),270.)
endif
else
if(ob())then
if(xb())then
set L=gi(x,(c*10.),90.)
endif
endif
endif
call Di(2.5)
if(ab())then
call TriggerExecute(uo)
endif
if(Cb())then
set D=1
call TriggerExecute(Qr)
if(Nb())then
if(Ib())then
set x=gi(GetRectCenter(Yx),(c*30.),270.)
set L=gi(x,(c*10.),270.)
set xe=false
call TriggerExecute(kr)
return
endif
if(Ab())then
set x=gi(GetRectCenter(Yx),(c*20.),270.)
set L=gi(x,(c*10.),270.)
set oe=false
set re=false
call TriggerExecute(kr)
return
endif
else
if(Ob())then
set x=gi(GetRectCenter(yx),(c*30.),90.)
set L=gi(x,(c*10.),90.)
set xe=false
call TriggerExecute(kr)
return
endif
if(Rb())then
set x=gi(GetRectCenter(yx),(c*20.),90.)
set L=gi(x,(c*10.),90.)
set oe=false
set re=false
call TriggerExecute(kr)
return
endif
endif
if(cb())then
set f=2
if(bb())then
set f=1
set yv=true
else
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Turn-over")
endif
else
set f=1
if(Bb())then
set f=2
set yv=true
else
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Turn-over")
endif
endif
else
if(Xb())then
if(Eb())then
if(nb())then
set D=1
set f=1
set yv=true
endif
else
if(Vb())then
set D=1
set f=2
set yv=true
endif
endif
endif
endif
call TriggerExecute(kr)
endfunction
function Db takes nothing returns boolean
return(Rx)
endfunction
function fb takes nothing returns boolean
return(re)
endfunction
function Fb takes nothing returns boolean
return(Rx)
endfunction
function gb takes nothing returns boolean
return(re)
endfunction
function Gb takes nothing returns boolean
return(RectContainsLoc(Wx,x))and(IsPlayerAlly(ee,Player(0)))and(f==1)
endfunction
function hb takes nothing returns boolean
return(RectContainsLoc(wx,x))and(IsPlayerAlly(ee,Player(6)))and(f==2)
endfunction
function Hb takes nothing returns boolean
return(De)or(Ge)
endfunction
function jb takes nothing returns boolean
return(Hb())
endfunction
function Jb takes nothing returns nothing
if(jb())then
else
if(hb())then
if(fb())then
set oe=true
set re=false
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Touchback!")
else
if(Db())then
set fx=true
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Touchback!")
else
set h[1]=(h[1]+2)
set f=1
set D=1
set xe=true
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Safety!")
endif
endif
else
if(Gb())then
if(gb())then
set oe=true
set re=false
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Touchback!")
else
if(Fb())then
set fx=true
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Touchback!")
else
set h[2]=(h[2]+2)
set f=2
set D=1
set xe=true
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Safety!")
endif
endif
endif
endif
endif
set ee=null
endfunction
function kb takes nothing returns boolean
return(UnitHasItemOfTypeBJ(GetTriggerUnit(),'I000'))
endfunction
function Kb takes nothing returns boolean
return(re)
endfunction
function lb takes nothing returns boolean
return(Rx)
endfunction
function Lb takes nothing returns nothing
if(Kb())then
set re=false
endif
if(lb())then
set fx=false
endif
endfunction
function mb takes nothing returns boolean
return(RectContainsLoc(eo,x))
endfunction
function Mb takes nothing returns boolean
return(RectContainsLoc(vo,x))
endfunction
function pb takes nothing returns nothing
if(Mb())then
set x=Location(GetLocationX(GetRectCenter(yx)),4809.)
else
if(mb())then
set x=Location(GetLocationX(GetRectCenter(yx)),-5300.)
endif
endif
endfunction
function Pb takes nothing returns boolean
return(UnitHasItemOfTypeBJ(GetTriggerUnit(),'I000'))and(Rx==false)
endfunction
function qb takes nothing returns nothing
call KillUnit(GetTriggerUnit())
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,(GetPlayerName(GetOwningPlayer(GetTriggerUnit()))+" has stepped out of bounds!"))
endfunction
function Qb takes nothing returns boolean
return(TimerGetRemaining(F)<=.0)
endfunction
function sb takes nothing returns boolean
return(f==1)
endfunction
function Sb takes nothing returns boolean
return(D>4)
endfunction
function tb takes nothing returns nothing
set D=(D+1)
if(Qb())then
call TriggerExecute(uo)
endif
if(Sb())then
set D=1
if(sb())then
set f=2
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Turn-over")
else
set f=1
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Turn-over")
endif
endif
call TriggerExecute(kr)
endfunction
function Tb takes nothing returns boolean
return(K==false)
endfunction
function ub takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())=='n002')
endfunction
function Ub takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function wb takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())=='n002')
endfunction
function Wb takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function yb takes nothing returns boolean
return(f==1)
endfunction
function Yb takes nothing returns nothing
if(yb())then
call KillUnit(J[1])
call ForGroupBJ(Ji(GetWorldBounds(),Condition(function wb)),function Wb)
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Play Clock Expired! 5 Yard Penalty!")
set x=gi(x,(c*5.),90.)
set Ge=true
call TriggerExecute(kr)
else
call KillUnit(J[7])
call ForGroupBJ(Ji(GetWorldBounds(),Condition(function ub)),function Ub)
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Play Clock Expired! 5 Yard Penalty!")
set x=gi(x,(c*5.),270.)
set Ge=true
call TriggerExecute(kr)
endif
endfunction
function zb takes nothing returns nothing
call DialogSetMessage(Ce[0],"Formations")
call DialogSetMessage(Ce[1],"Formations")
call DialogSetMessage(Ce[2],"Formations")
call DialogAddButtonBJ(Ce[0],"Exit")
set de[0]=bj_lastCreatedButton
call DialogAddButtonBJ(Ce[0],"Original")
set Ie=bj_lastCreatedButton
call DialogAddButtonBJ(Ce[0],"Overload Left")
set Ae[0]=bj_lastCreatedButton
call DialogAddButtonBJ(Ce[0],"Overload Right")
set Ae[1]=bj_lastCreatedButton
call DialogAddButtonBJ(Ce[0],"WR Spread Left")
set Ne[0]=bj_lastCreatedButton
call DialogAddButtonBJ(Ce[0],"WR Spread Right")
set Ne[1]=bj_lastCreatedButton
call DialogAddButtonBJ(Ce[0],"RB Formation Left")
set be[0]=bj_lastCreatedButton
call DialogAddButtonBJ(Ce[0],"RB Formation Right")
set be[1]=bj_lastCreatedButton
call DialogAddButtonBJ(Ce[0],"Custom Formation")
set Qx=bj_lastCreatedButton
call DialogAddButtonBJ(Ce[0],"More")
set He[0]=bj_lastCreatedButton
call DialogAddButtonBJ(Ce[1],"Exit")
set de[1]=bj_lastCreatedButton
call DialogAddButtonBJ(Ce[1],"Previous")
set je[1]=bj_lastCreatedButton
call DialogAddButtonBJ(Ce[1],"Spread Left RB Opt Right")
set Be=bj_lastCreatedButton
call DialogAddButtonBJ(Ce[1],"Spread Right RB Opt Left")
set ce=bj_lastCreatedButton
call DialogAddButtonBJ(Ce[1],"Goal Line Left")
set Je[0]=bj_lastCreatedButton
call DialogAddButtonBJ(Ce[1],"Goal Line Right")
set Je[1]=bj_lastCreatedButton
call DialogAddButtonBJ(Ce[1],"I Form Left")
set ke[0]=bj_lastCreatedButton
call DialogAddButtonBJ(Ce[1],"I Form Right")
set ke[1]=bj_lastCreatedButton
call DialogAddButtonBJ(Ce[1],"Singleback TE Left")
set Ke[0]=bj_lastCreatedButton
call DialogAddButtonBJ(Ce[1],"Singleback TE Right")
set Ke[1]=bj_lastCreatedButton
call DialogAddButtonBJ(Ce[1],"Singleback Big")
set Le=bj_lastCreatedButton
call DestroyTrigger(GetTriggeringTrigger())
set Ur=null
endfunction
function Zb takes nothing returns boolean
return(Xe)and(Rx==false)
endfunction
function vB takes nothing returns boolean
return(GetClickedButton()==le[1])
endfunction
function eB takes nothing returns boolean
return(GetClickedButton()==le[0])
endfunction
function xB takes nothing returns boolean
return(GetClickedButton()==Ke[1])
endfunction
function oB takes nothing returns boolean
return(GetClickedButton()==Ke[0])
endfunction
function rB takes nothing returns boolean
return(GetClickedButton()==Le)
endfunction
function iB takes nothing returns boolean
return(GetClickedButton()==ke[1])
endfunction
function aB takes nothing returns boolean
return(GetClickedButton()==ke[0])
endfunction
function nB takes nothing returns boolean
return(GetClickedButton()==Je[1])
endfunction
function VB takes nothing returns boolean
return(GetClickedButton()==Je[0])
endfunction
function EB takes nothing returns boolean
return(GetClickedButton()==ce)
endfunction
function XB takes nothing returns boolean
return(GetClickedButton()==Be)
endfunction
function OB takes nothing returns boolean
return(GetClickedButton()==be[1])
endfunction
function RB takes nothing returns boolean
return(GetClickedButton()==be[0])
endfunction
function IB takes nothing returns boolean
return(GetClickedButton()==Ne[1])
endfunction
function AB takes nothing returns boolean
return(GetClickedButton()==Ne[0])
endfunction
function NB takes nothing returns boolean
return(GetClickedButton()==Ae[1])
endfunction
function bB takes nothing returns boolean
return(GetClickedButton()==Ae[0])
endfunction
function BB takes nothing returns boolean
return(GetClickedButton()==Ie)
endfunction
function cB takes nothing returns boolean
return(f==1)
endfunction
function CB takes nothing returns boolean
return(GetClickedButton()==Qx)
endfunction
function dB takes nothing returns boolean
return(f==1)
endfunction
function DB takes nothing returns boolean
return(GetClickedButton()==je[2])
endfunction
function fB takes nothing returns boolean
return(f==1)
endfunction
function FB takes nothing returns boolean
return(GetClickedButton()==je[1])
endfunction
function gB takes nothing returns boolean
return(f==1)
endfunction
function GB takes nothing returns boolean
return(GetClickedButton()==He[1])
endfunction
function hB takes nothing returns boolean
return(f==1)
endfunction
function HB takes nothing returns boolean
return(GetClickedButton()==He[0])
endfunction
function jB takes nothing returns boolean
return(f==1)
endfunction
function JB takes nothing returns boolean
return(GetClickedButton()==de[0])or(GetClickedButton()==de[1])or(GetClickedButton()==de[2])
endfunction
function kB takes nothing returns boolean
return(JB())
endfunction
function KB takes nothing returns nothing
if(kB())then
if(jB())then
call DialogDisplayBJ(false,Ce[0],Player(0))
call DialogDisplayBJ(false,Ce[1],Player(0))
call DialogDisplayBJ(false,Ce[2],Player(0))
else
call DialogDisplayBJ(false,Ce[0],Player(6))
call DialogDisplayBJ(false,Ce[1],Player(6))
call DialogDisplayBJ(false,Ce[2],Player(6))
endif
else
if(HB())then
if(hB())then
call DialogDisplayBJ(false,Ce[0],Player(0))
call DialogDisplayBJ(false,Ce[2],Player(0))
call DialogDisplayBJ(true,Ce[1],Player(0))
else
call DialogDisplayBJ(false,Ce[0],Player(6))
call DialogDisplayBJ(false,Ce[2],Player(6))
call DialogDisplayBJ(true,Ce[1],Player(6))
endif
else
if(GB())then
if(gB())then
call DialogDisplayBJ(false,Ce[0],Player(0))
call DialogDisplayBJ(false,Ce[1],Player(0))
call DialogDisplayBJ(true,Ce[2],Player(0))
else
call DialogDisplayBJ(false,Ce[0],Player(6))
call DialogDisplayBJ(false,Ce[1],Player(6))
call DialogDisplayBJ(true,Ce[2],Player(6))
endif
else
if(FB())then
if(fB())then
call DialogDisplayBJ(false,Ce[1],Player(0))
call DialogDisplayBJ(false,Ce[2],Player(0))
call DialogDisplayBJ(true,Ce[0],Player(0))
else
call DialogDisplayBJ(false,Ce[2],Player(6))
call DialogDisplayBJ(false,Ce[1],Player(6))
call DialogDisplayBJ(true,Ce[0],Player(6))
endif
else
if(DB())then
if(dB())then
call DialogDisplayBJ(false,Ce[2],Player(0))
call DialogDisplayBJ(false,Ce[0],Player(0))
call DialogDisplayBJ(true,Ce[1],Player(0))
else
call DialogDisplayBJ(false,Ce[2],Player(6))
call DialogDisplayBJ(false,Ce[0],Player(6))
call DialogDisplayBJ(true,Ce[1],Player(6))
endif
else
if(CB())then
set sx=true
if(cB())then
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=6
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call PauseUnit(J[bj_forLoopAIndex],false)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
else
set bj_forLoopAIndex=7
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call PauseUnit(J[bj_forLoopAIndex],false)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endif
else
if(BB())then
call SetUnitPositionLocFacingBJ(J[2],gi(x,550.,90.),270.)
call SetUnitPositionLocFacingBJ(J[5],gi(gi(x,100.,90.),1000.,180.),270.)
call SetUnitPositionLocFacingBJ(J[6],gi(gi(x,100.,90.),1000.,.0),270.)
call SetUnitPositionLocFacingBJ(J[8],gi(x,550.,270.),90.)
call SetUnitPositionLocFacingBJ(J[11],gi(gi(x,100.,270.),1000.,180.),90.)
call SetUnitPositionLocFacingBJ(J[12],gi(gi(x,100.,270.),1000.,.0),90.)
set sx=false
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call PanCameraToTimedLocForPlayer(bv[bj_forLoopAIndex],GetUnitLoc(J[bj_forLoopAIndex]),0)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
else
if(bB())then
call SetUnitPositionLocFacingBJ(J[2],gi(gi(x,100.,90.),500.,180.),270.)
call SetUnitPositionLocFacingBJ(J[5],gi(gi(x,100.,90.),1700.,180.),270.)
call SetUnitPositionLocFacingBJ(J[6],gi(gi(x,100.,90.),1100.,180.),270.)
call SetUnitPositionLocFacingBJ(J[8],gi(gi(x,100.,270.),500.,180.),90.)
call SetUnitPositionLocFacingBJ(J[11],gi(gi(x,100.,270.),1700.,180.),90.)
call SetUnitPositionLocFacingBJ(J[12],gi(gi(x,100.,270.),1100.,180.),90.)
set sx=false
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call PanCameraToTimedLocForPlayer(bv[bj_forLoopAIndex],GetUnitLoc(J[bj_forLoopAIndex]),0)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
else
if(NB())then
call SetUnitPositionLocFacingBJ(J[2],gi(gi(x,100.,90.),500.,.0),270.)
call SetUnitPositionLocFacingBJ(J[5],gi(gi(x,100.,90.),1100.,.0),270.)
call SetUnitPositionLocFacingBJ(J[6],gi(gi(x,100.,90.),1700.,.0),270.)
call SetUnitPositionLocFacingBJ(J[8],gi(gi(x,100.,270.),500.,.0),90.)
call SetUnitPositionLocFacingBJ(J[11],gi(gi(x,100.,270.),1100.,.0),90.)
call SetUnitPositionLocFacingBJ(J[12],gi(gi(x,100.,270.),1700.,.0),90.)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call PanCameraToTimedLocForPlayer(bv[bj_forLoopAIndex],GetUnitLoc(J[bj_forLoopAIndex]),0)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
else
if(AB())then
call SetUnitPositionLocFacingBJ(J[2],gi(x,550.,90.),270.)
call SetUnitPositionLocFacingBJ(J[5],gi(gi(x,100.,90.),1700.,180.),270.)
call SetUnitPositionLocFacingBJ(J[6],gi(gi(x,100.,90.),1100.,180.),270.)
call SetUnitPositionLocFacingBJ(J[8],gi(x,550.,270.),90.)
call SetUnitPositionLocFacingBJ(J[11],gi(gi(x,100.,270.),1700.,180.),90.)
call SetUnitPositionLocFacingBJ(J[12],gi(gi(x,100.,270.),1100.,180.),90.)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call PanCameraToTimedLocForPlayer(bv[bj_forLoopAIndex],GetUnitLoc(J[bj_forLoopAIndex]),0)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set sx=false
else
if(IB())then
call SetUnitPositionLocFacingBJ(J[2],gi(x,550.,90.),270.)
call SetUnitPositionLocFacingBJ(J[5],gi(gi(x,100.,90.),1100.,.0),270.)
call SetUnitPositionLocFacingBJ(J[6],gi(gi(x,100.,90.),1700.,.0),270.)
call SetUnitPositionLocFacingBJ(J[8],gi(x,550.,270.),90.)
call SetUnitPositionLocFacingBJ(J[11],gi(gi(x,100.,270.),1100.,.0),90.)
call SetUnitPositionLocFacingBJ(J[12],gi(gi(x,100.,270.),1700.,.0),90.)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call PanCameraToTimedLocForPlayer(bv[bj_forLoopAIndex],GetUnitLoc(J[bj_forLoopAIndex]),0)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set sx=false
else
if(RB())then
call SetUnitPositionLocFacingBJ(J[2],gi(gi(x,100.,90.),500.,180.),270.)
call SetUnitPositionLocFacingBJ(J[5],gi(gi(x,100.,90.),1000.,180.),270.)
call SetUnitPositionLocFacingBJ(J[6],gi(gi(x,100.,90.),1000.,.0),270.)
call SetUnitPositionLocFacingBJ(J[8],gi(gi(x,100.,270.),500.,180.),90.)
call SetUnitPositionLocFacingBJ(J[11],gi(gi(x,100.,270.),1000.,180.),90.)
call SetUnitPositionLocFacingBJ(J[12],gi(gi(x,100.,270.),1000.,.0),90.)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call PanCameraToTimedLocForPlayer(bv[bj_forLoopAIndex],GetUnitLoc(J[bj_forLoopAIndex]),0)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set sx=false
else
if(OB())then
call SetUnitPositionLocFacingBJ(J[2],gi(gi(x,100.,90.),500.,.0),270.)
call SetUnitPositionLocFacingBJ(J[5],gi(gi(x,100.,90.),1000.,180.),270.)
call SetUnitPositionLocFacingBJ(J[6],gi(gi(x,100.,90.),1000.,.0),270.)
call SetUnitPositionLocFacingBJ(J[8],gi(gi(x,100.,270.),500.,.0),90.)
call SetUnitPositionLocFacingBJ(J[11],gi(gi(x,100.,270.),1000.,180.),90.)
call SetUnitPositionLocFacingBJ(J[12],gi(gi(x,100.,270.),1000.,.0),90.)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call PanCameraToTimedLocForPlayer(bv[bj_forLoopAIndex],GetUnitLoc(J[bj_forLoopAIndex]),0)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
else
if(XB())then
call SetUnitPositionLocFacingBJ(J[2],gi(gi(x,100.,90.),500.,.0),270.)
call SetUnitPositionLocFacingBJ(J[5],gi(gi(x,100.,90.),1700.,180.),270.)
call SetUnitPositionLocFacingBJ(J[6],gi(gi(x,100.,90.),1100.,180.),270.)
call SetUnitPositionLocFacingBJ(J[8],gi(gi(x,100.,270.),500.,.0),90.)
set sx=false
call SetUnitPositionLocFacingBJ(J[11],gi(gi(x,100.,270.),1700.,180.),90.)
call SetUnitPositionLocFacingBJ(J[12],gi(gi(x,100.,270.),1100.,180.),90.)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call PanCameraToTimedLocForPlayer(bv[bj_forLoopAIndex],GetUnitLoc(J[bj_forLoopAIndex]),0)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
else
if(EB())then
call SetUnitPositionLocFacingBJ(J[2],gi(gi(x,100.,90.),500.,180.),270.)
call SetUnitPositionLocFacingBJ(J[5],gi(gi(x,100.,90.),1100.,.0),270.)
call SetUnitPositionLocFacingBJ(J[6],gi(gi(x,100.,90.),1700.,.0),270.)
set sx=false
call SetUnitPositionLocFacingBJ(J[8],gi(gi(x,100.,270.),500.,180.),90.)
call SetUnitPositionLocFacingBJ(J[11],gi(gi(x,100.,270.),1100.,.0),90.)
call SetUnitPositionLocFacingBJ(J[12],gi(gi(x,100.,270.),1700.,.0),90.)
else
if(VB())then
call SetUnitPositionLocFacingBJ(J[2],gi(x,800.,90.),270.)
set sx=false
call SetUnitPositionLocFacingBJ(J[5],gi(x,550.,90.),270.)
call SetUnitPositionLocFacingBJ(J[6],gi(gi(x,100.,90.),500.,180.),270.)
call SetUnitPositionLocFacingBJ(J[8],gi(x,800.,270.),90.)
call SetUnitPositionLocFacingBJ(J[11],gi(x,550.,270.),90.)
call SetUnitPositionLocFacingBJ(J[12],gi(gi(x,100.,270.),500.,180.),90.)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call PanCameraToTimedLocForPlayer(bv[bj_forLoopAIndex],GetUnitLoc(J[bj_forLoopAIndex]),0)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
else
if(nB())then
call SetUnitPositionLocFacingBJ(J[2],gi(x,800.,90.),270.)
call SetUnitPositionLocFacingBJ(J[5],gi(x,550.,90.),270.)
set sx=false
call SetUnitPositionLocFacingBJ(J[6],gi(gi(x,100.,90.),500.,.0),270.)
call SetUnitPositionLocFacingBJ(J[8],gi(x,800.,270.),90.)
call SetUnitPositionLocFacingBJ(J[11],gi(x,550.,270.),90.)
call SetUnitPositionLocFacingBJ(J[12],gi(gi(x,100.,270.),500.,.0),90.)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call PanCameraToTimedLocForPlayer(bv[bj_forLoopAIndex],GetUnitLoc(J[bj_forLoopAIndex]),0)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
else
if(aB())then
call SetUnitPositionLocFacingBJ(J[2],gi(x,800.,90.),270.)
call SetUnitPositionLocFacingBJ(J[5],gi(gi(x,100.,90.),1000.,180.),270.)
set sx=false
call SetUnitPositionLocFacingBJ(J[6],gi(x,550.,90.),270.)
call SetUnitPositionLocFacingBJ(J[8],gi(x,800.,270.),90.)
call SetUnitPositionLocFacingBJ(J[11],gi(gi(x,100.,270.),1000.,180.),90.)
call SetUnitPositionLocFacingBJ(J[12],gi(x,550.,270.),90.)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call PanCameraToTimedLocForPlayer(bv[bj_forLoopAIndex],GetUnitLoc(J[bj_forLoopAIndex]),0)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
else
if(iB())then
call SetUnitPositionLocFacingBJ(J[2],gi(x,800.,90.),270.)
call SetUnitPositionLocFacingBJ(J[5],gi(x,550.,90.),270.)
call SetUnitPositionLocFacingBJ(J[6],gi(gi(x,100.,90.),1000.,.0),270.)
call SetUnitPositionLocFacingBJ(J[8],gi(x,800.,270.),90.)
set sx=false
call SetUnitPositionLocFacingBJ(J[11],gi(x,550.,270.),90.)
call SetUnitPositionLocFacingBJ(J[12],gi(gi(x,100.,270.),1000.,.0),90.)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call PanCameraToTimedLocForPlayer(bv[bj_forLoopAIndex],GetUnitLoc(J[bj_forLoopAIndex]),0)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
else
if(rB())then
call SetUnitPositionLocFacingBJ(J[2],gi(x,550.,90.),270.)
call SetUnitPositionLocFacingBJ(J[5],gi(gi(x,100.,90.),500.,180.),270.)
set sx=false
call SetUnitPositionLocFacingBJ(J[6],gi(gi(x,100.,90.),500.,.0),270.)
call SetUnitPositionLocFacingBJ(J[8],gi(x,550.,270.),90.)
call SetUnitPositionLocFacingBJ(J[11],gi(gi(x,100.,270.),500.,180.),90.)
call SetUnitPositionLocFacingBJ(J[12],gi(gi(x,100.,270.),500.,.0),90.)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call PanCameraToTimedLocForPlayer(bv[bj_forLoopAIndex],GetUnitLoc(J[bj_forLoopAIndex]),0)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
else
if(oB())then
call SetUnitPositionLocFacingBJ(J[2],gi(x,550.,90.),270.)
call SetUnitPositionLocFacingBJ(J[5],gi(gi(x,100.,90.),500.,180.),270.)
set sx=false
call SetUnitPositionLocFacingBJ(J[6],gi(gi(x,100.,90.),650.,180.),270.)
call SetUnitPositionLocFacingBJ(J[8],gi(x,550.,270.),90.)
call SetUnitPositionLocFacingBJ(J[11],gi(gi(x,100.,270.),500.,180.),90.)
call SetUnitPositionLocFacingBJ(J[12],gi(gi(x,100.,270.),650.,180.),90.)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call PanCameraToTimedLocForPlayer(bv[bj_forLoopAIndex],GetUnitLoc(J[bj_forLoopAIndex]),0)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
else
if(xB())then
call SetUnitPositionLocFacingBJ(J[2],gi(x,550.,90.),270.)
call SetUnitPositionLocFacingBJ(J[5],gi(gi(x,100.,90.),500.,.0),270.)
call SetUnitPositionLocFacingBJ(J[6],gi(gi(x,100.,90.),650.,.0),270.)
call SetUnitPositionLocFacingBJ(J[8],gi(x,550.,270.),90.)
call SetUnitPositionLocFacingBJ(J[11],gi(gi(x,100.,270.),500.,.0),90.)
call SetUnitPositionLocFacingBJ(J[12],gi(gi(x,100.,270.),650.,.0),90.)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call PanCameraToTimedLocForPlayer(bv[bj_forLoopAIndex],GetUnitLoc(J[bj_forLoopAIndex]),0)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
else
if(eB())then
call SetUnitPositionLocFacingBJ(J[2],gi(x,800.,90.),270.)
call SetUnitPositionLocFacingBJ(J[5],gi(gi(x,250.,90.),100.,200.),270.)
call SetUnitPositionLocFacingBJ(J[6],gi(gi(x,100.,90.),500.,180.),270.)
call SetUnitPositionLocFacingBJ(J[8],gi(x,800.,270.),90.)
call SetUnitPositionLocFacingBJ(J[11],gi(gi(x,250.,270.),100.,200.),90.)
set sx=false
call SetUnitPositionLocFacingBJ(J[12],gi(gi(x,100.,270.),500.,180.),90.)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call PanCameraToTimedLocForPlayer(bv[bj_forLoopAIndex],GetUnitLoc(J[bj_forLoopAIndex]),0)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
else
if(vB())then
call SetUnitPositionLocFacingBJ(J[2],gi(x,800.,90.),270.)
set sx=false
call SetUnitPositionLocFacingBJ(J[5],gi(gi(x,250.,90.),100.,320.),270.)
call SetUnitPositionLocFacingBJ(J[6],gi(gi(x,100.,90.),500.,180.),270.)
call SetUnitPositionLocFacingBJ(J[8],gi(x,800.,270.),90.)
call SetUnitPositionLocFacingBJ(J[11],gi(gi(x,250.,270.),100.,320.),90.)
call SetUnitPositionLocFacingBJ(J[12],gi(gi(x,100.,270.),500.,180.),90.)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call PanCameraToTimedLocForPlayer(bv[bj_forLoopAIndex],GetUnitLoc(J[bj_forLoopAIndex]),0)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endfunction
function lB takes nothing returns boolean
return(f==1)and(Xe)and(Rx==false)
endfunction
function LB takes nothing returns nothing
call DialogDisplayBJ(true,Ce[0],Player(0))
endfunction
function mB takes nothing returns boolean
return(f==2)and(Xe)and(Rx==false)
endfunction
function MB takes nothing returns nothing
call DialogDisplayBJ(true,Ce[0],Player(6))
endfunction
function pB takes nothing returns boolean
return(qe[1])
endfunction
function PB takes nothing returns boolean
return(ax)
endfunction
function qB takes nothing returns boolean
return(PB())
endfunction
function QB takes nothing returns boolean
return(Xe==false)
endfunction
function sB takes nothing returns boolean
return(QB())
endfunction
function SB takes nothing returns boolean
return(ax)
endfunction
function tB takes nothing returns boolean
return(Xe==false)
endfunction
function TB takes nothing returns boolean
return(GetTriggerPlayer()==Player(0))
endfunction
function uB takes nothing returns nothing
if(TB())then
if(tB())then
call DisplayTextToForce(Qi(Player(0)),"|CFFFF0303You can only swap before hiking.")
else
if(SB())then
call DisplayTextToForce(Qi(Player(0)),"|CFFFF0303You must wait until green is done swapping.")
else
set bj_forLoopAIndex=0
set bj_forLoopAIndexEnd=3
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call DialogClear(pe[bj_forLoopAIndex])
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set ax=true
call DialogSetMessage(pe[0],"Choose Primary Player")
call DialogAddButtonBJ(pe[0],"Cancel")
set se[0]=bj_lastCreatedButton
set bj_forLoopAIndex=2
set bj_forLoopAIndexEnd=6
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call DialogAddButtonBJ(pe[0],(Iv[bj_forLoopAIndex]+GetPlayerName(bv[bj_forLoopAIndex])))
set Pe[bj_forLoopAIndex]=bj_lastCreatedButton
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call DialogDisplayBJ(true,pe[0],Player(0))
endif
endif
else
if(sB())then
call DisplayTextToForce(Qi(Player(6)),"|CFFFF0303You can only swap before hiking on offense.")
else
if(qB())then
call DisplayTextToForce(Qi(Player(6)),"|CFFFF0303You must wait until red is done swapping.")
else
if(pB())then
call DisplayTextToForce(Qi(Player(6)),"|CFFFF0303You can only swap once per play.")
else
set bj_forLoopAIndex=0
set bj_forLoopAIndexEnd=3
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call DialogClear(pe[bj_forLoopAIndex])
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set ax=true
call DialogSetMessage(pe[2],"Choose Primary Player")
call DialogAddButtonBJ(pe[1],"Cancel")
set se[1]=bj_lastCreatedButton
set bj_forLoopAIndex=8
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call DialogAddButtonBJ(pe[2],(Iv[bj_forLoopAIndex]+GetPlayerName(bv[bj_forLoopAIndex])))
set Pe[bj_forLoopAIndex]=bj_lastCreatedButton
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call DialogDisplayBJ(true,pe[2],Player(6))
endif
endif
endif
endif
endfunction
function UB takes nothing returns boolean
return(GetClickedButton()==Pe[bj_forLoopAIndex])
endfunction
function wB takes nothing returns boolean
return(GetClickedButton()==se[0])
endfunction
function WB takes nothing returns nothing
if(wB())then
set ax=false
else
call DialogSetMessage(pe[1],"Choose Secondary Player")
call DialogAddButtonBJ(pe[1],"Cancel")
set se[0]=bj_lastCreatedButton
set bj_forLoopAIndex=2
set bj_forLoopAIndexEnd=6
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(UB())then
set Qe[0]=bv[bj_forLoopAIndex]
set te[0]=bj_forLoopAIndex
else
call DialogAddButtonBJ(pe[1],(Iv[bj_forLoopAIndex]+GetPlayerName(bv[bj_forLoopAIndex])))
set Pe[bj_forLoopAIndex]=bj_lastCreatedButton
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call DialogDisplayBJ(true,pe[1],Player(0))
endif
endfunction
function yB takes nothing returns boolean
return(GetClickedButton()==Pe[bj_forLoopAIndex])
endfunction
function YB takes nothing returns nothing
set bj_forLoopAIndex=2
set bj_forLoopAIndexEnd=6
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(yB())then
set Se[0]=bv[bj_forLoopAIndex]
set te[1]=bj_forLoopAIndex
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,((Iv[te[0]]+GetPlayerName(Qe[0]))+(" |rand "+((Iv[te[1]]+GetPlayerName(Se[0]))+" |rhave swapped positions."))))
call SetUnitOwner(J[te[0]],Se[0],false)
call SetUnitOwner(J[te[1]],Qe[0],false)
call ui(bv[te[0]],dv[te[1]],false)
call ui(bv[te[1]],dv[te[0]],false)
set bv[te[0]]=Se[0]
set bv[te[1]]=Qe[0]
set ax=false
set T[te[0]]=false
set T[te[1]]=false
call ClearSelectionForPlayer(bv[te[0]])
call ClearSelectionForPlayer(bv[te[1]])
call SelectUnitAddForPlayer(J[te[0]],bv[te[0]])
call SelectUnitAddForPlayer(J[te[1]],bv[te[1]])
else
set ax=false
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endfunction
function zB takes nothing returns boolean
return(GetClickedButton()==Pe[bj_forLoopAIndex])
endfunction
function ZB takes nothing returns boolean
return(GetClickedButton()==se[1])
endfunction
function vc takes nothing returns nothing
if(ZB())then
set ax=false
else
call DialogSetMessage(pe[3],"Choose secondary player")
call DialogAddButtonBJ(pe[3],"Cancel")
set se[1]=bj_lastCreatedButton
set bj_forLoopAIndex=8
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set bj_forLoopAIndex=8
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(zB())then
set Qe[1]=bv[bj_forLoopAIndex]
set te[2]=bj_forLoopAIndex
else
call DialogAddButtonBJ(pe[3],(Iv[bj_forLoopAIndex]+GetPlayerName(bv[bj_forLoopAIndex])))
set Pe[bj_forLoopAIndex]=bj_lastCreatedButton
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call DialogDisplayBJ(true,pe[3],Player(6))
endif
endfunction
function ec takes nothing returns boolean
return(GetClickedButton()==Pe[bj_forLoopAIndex])
endfunction
function xc takes nothing returns nothing
set bj_forLoopAIndex=8
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(ec())then
set Se[1]=bv[bj_forLoopAIndex]
set te[3]=bj_forLoopAIndex
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,((Iv[te[2]]+GetPlayerName(Qe[1]))+(" |rand "+((Iv[te[3]]+GetPlayerName(Se[1]))+" |rhave swapped positions."))))
call SetUnitOwner(J[te[2]],Se[1],false)
call SetUnitOwner(J[te[3]],Qe[1],false)
call ui(bv[te[2]],dv[te[3]],false)
call ui(bv[te[3]],dv[te[2]],false)
set bv[te[2]]=Se[1]
set bv[te[3]]=Qe[1]
set ax=false
set T[te[2]]=false
set T[te[3]]=false
call ClearSelectionForPlayer(bv[te[2]])
call ClearSelectionForPlayer(bv[te[3]])
call SelectUnitAddForPlayer(J[te[2]],bv[te[2]])
call SelectUnitAddForPlayer(J[te[3]],bv[te[3]])
else
set ax=false
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endfunction
function oc takes nothing returns boolean
return(Nx)
endfunction
function rc takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function ic takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function ac takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function nc takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function Vc takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function Ec takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function Xc takes nothing returns boolean
return(f==2)
endfunction
function Oc takes nothing returns nothing
set re=false
set De=false
set Ge=false
set Ax=TimerGetRemaining(F)
call PauseTimerBJ(true,F)
call DestroyTimerDialog(Re)
call PauseTimerBJ(true,Oe)
call DestroyTimerDialog(he)
call PauseTimerBJ(true,ue)
set Rx=true
set Sv=false
set Bx=false
set qx=false
set sx=false
if(oc())then
set Nx=false
set Ax=(I2R(W)*60.)
endif
if(Xc())then
set Rx=true
set kx=Mi('e002')
call ForGroupBJ(kx,function nc)
call DestroyGroup(kx)
set kx=Mi('n002')
call ForGroupBJ(Mi('n002'),function Vc)
call DestroyGroup(kx)
set kx=Mi('n001')
call ForGroupBJ(Mi('n001'),function Ec)
call DestroyGroup(kx)
set Kx=J[1]
call ShowUnitHide(Kx)
call RemoveUnit(k)
call RemoveUnit(I)
call RemoveUnit(Hv)
call RemoveUnit(sv)
set lx[0]=GetRectCenter(bj_mapInitialPlayableArea)
call CreateNUnitsAtLoc(1,'H001',Player(0),lx[0],bj_UNIT_FACING)
call RemoveLocation(lx[0])
set J[1]=bj_lastCreatedUnit
call UnitAddAbility(J[1],'A009')
call UnitAddAbility(J[1],'A00A')
set x=GetRectCenter(bo)
set lx[0]=gi(x,1500.,0)
call SetUnitPositionLocFacingBJ(J[7],lx[0],90.)
call RemoveLocation(lx[0])
set lx[0]=gi(x,1500.,180.)
call SetUnitPositionLocFacingBJ(J[8],lx[0],90.)
call RemoveLocation(lx[0])
set lx[0]=gi(x,(c*10.),90.)
set lx[1]=gi(lx[0],2000.,180.)
call SetUnitPositionLocFacingBJ(J[9],lx[1],90.)
call RemoveLocation(lx[1])
set lx[1]=gi(lx[0],2000.,.0)
call SetUnitPositionLocFacingBJ(J[10],lx[1],90.)
call RemoveLocation(lx[0])
call RemoveLocation(lx[1])
set lx[0]=gi(x,3000.,180.)
call SetUnitPositionLocFacingBJ(J[11],lx[0],90.)
call RemoveLocation(lx[0])
set lx[0]=gi(x,3000.,0)
call SetUnitPositionLocFacingBJ(J[12],lx[0],90.)
call RemoveLocation(lx[0])
set lx[0]=gi(x,(c*10.),90.)
set lx[1]=gi(lx[0],1000.,.0)
call CreateNUnitsAtLoc(1,'e002',Player(6),lx[1],90.)
call RemoveLocation(lx[1])
call CreateNUnitsAtLoc(1,'e002',Player(6),lx[0],90.)
set lx[1]=gi(lx[0],1000.,180.)
call CreateNUnitsAtLoc(1,'e002',Player(6),lx[1],90.)
call RemoveLocation(lx[0])
call RemoveLocation(lx[1])
call RemoveLocation(x)
set x=gi(GetRectCenter(Yx),(c*20.),270.)
call SetUnitPositionLocFacingBJ(J[1],x,270.)
set lx[0]=gi(x,2400.,180.)
call SetUnitPositionLocFacingBJ(J[2],lx[0],270.)
call RemoveLocation(lx[0])
set lx[0]=gi(x,1500.,180.)
call SetUnitPositionLocFacingBJ(J[3],lx[0],270.)
call RemoveLocation(lx[0])
set lx[0]=gi(x,1500.,.0)
call SetUnitPositionLocFacingBJ(J[4],lx[0],270.)
call RemoveLocation(lx[0])
set lx[0]=gi(x,3500.,180.)
call SetUnitPositionLocFacingBJ(J[5],lx[0],270.)
call RemoveLocation(lx[0])
set lx[0]=gi(x,3500.,.0)
call SetUnitPositionLocFacingBJ(J[6],lx[0],270.)
call RemoveLocation(lx[0])
set lx[0]=gi(x,750.,180.)
call CreateNUnitsAtLoc(1,'e002',Player(0),lx[0],270.)
call RemoveLocation(lx[0])
set lx[0]=gi(x,2400.,.0)
call CreateNUnitsAtLoc(1,'e002',Player(0),lx[0],270.)
call RemoveLocation(lx[0])
set lx[0]=gi(x,750.,.0)
call CreateNUnitsAtLoc(1,'e002',Player(0),lx[0],270.)
call RemoveLocation(lx[0])
call PauseAllUnitsBJ(true)
call PauseUnit(J[1],false)
call UnitRemoveAbility(J[1],'Amov')
else
set Rx=true
set kx=Mi('e002')
call ForGroupBJ(kx,function rc)
call DestroyGroup(kx)
set kx=Mi('n002')
call ForGroupBJ(Mi('n002'),function ic)
call DestroyGroup(kx)
set kx=Mi('n001')
call ForGroupBJ(Mi('n001'),function ac)
call DestroyGroup(kx)
set Kx=J[7]
call ShowUnitHide(Kx)
call RemoveUnit(k)
call RemoveUnit(I)
call RemoveUnit(Hv)
call RemoveUnit(sv)
set lx[0]=GetRectCenter(bj_mapInitialPlayableArea)
call CreateNUnitsAtLoc(1,'H001',Player(6),lx[0],bj_UNIT_FACING)
call RemoveLocation(lx[0])
set J[7]=bj_lastCreatedUnit
call UnitAddAbility(J[7],'A009')
call UnitAddAbility(J[7],'A00A')
set x=GetRectCenter(Ao)
set lx[0]=gi(x,1500.,.0)
call SetUnitPositionLocFacingBJ(J[1],lx[0],270.)
call RemoveLocation(lx[0])
set lx[0]=gi(x,1500.,180.)
call SetUnitPositionLocFacingBJ(J[2],lx[0],270.)
call RemoveLocation(lx[0])
set lx[0]=gi(x,(c*10.),270.)
set lx[1]=gi(lx[0],2000.,180.)
call SetUnitPositionLocFacingBJ(J[3],lx[1],270.)
call RemoveLocation(lx[1])
set lx[1]=gi(lx[0],2000.,.0)
call SetUnitPositionLocFacingBJ(J[4],lx[1],270.)
call RemoveLocation(lx[0])
call RemoveLocation(lx[1])
set lx[0]=gi(x,3000.,180.)
call SetUnitPositionLocFacingBJ(J[5],gi(gi(x,.0,270.),3000.,180.),270.)
call RemoveLocation(lx[0])
set lx[0]=gi(x,3000.,.0)
call SetUnitPositionLocFacingBJ(J[6],gi(gi(x,.0,270.),3000.,.0),270.)
call RemoveLocation(lx[0])
set lx[0]=gi(x,(c*10.),270.)
set lx[1]=gi(lx[0],1000.,.0)
call CreateNUnitsAtLoc(1,'e002',Player(0),lx[1],270.)
call RemoveLocation(lx[1])
call CreateNUnitsAtLoc(1,'e002',Player(0),lx[0],270.)
set lx[1]=gi(lx[0],1000.,180.)
call CreateNUnitsAtLoc(1,'e002',Player(0),lx[1],270.)
call RemoveLocation(lx[0])
call RemoveLocation(lx[1])
call RemoveLocation(x)
set x=gi(GetRectCenter(yx),(c*20.),90.)
call SetUnitPositionLocFacingBJ(J[7],x,90.)
set lx[0]=gi(x,2400.,180.)
call SetUnitPositionLocFacingBJ(J[8],lx[0],90.)
call RemoveLocation(lx[0])
set lx[0]=gi(x,1500.,180.)
call SetUnitPositionLocFacingBJ(J[9],lx[0],90.)
call RemoveLocation(lx[0])
set lx[0]=gi(x,1500.,.0)
call SetUnitPositionLocFacingBJ(J[10],lx[0],90.)
call RemoveLocation(lx[0])
set lx[0]=gi(x,3500.,180.)
call SetUnitPositionLocFacingBJ(J[11],lx[0],90.)
call RemoveLocation(lx[0])
set lx[0]=gi(x,3500.,.0)
call SetUnitPositionLocFacingBJ(J[12],lx[0],90.)
call RemoveLocation(lx[0])
set lx[0]=gi(x,750.,180.)
call CreateNUnitsAtLoc(1,'e002',Player(6),lx[0],90.)
call RemoveLocation(lx[0])
set lx[0]=gi(x,2400.,.0)
call CreateNUnitsAtLoc(1,'e002',Player(6),lx[0],90.)
call RemoveLocation(lx[0])
set lx[0]=gi(x,750.,.0)
call CreateNUnitsAtLoc(1,'e002',Player(6),lx[0],90.)
call RemoveLocation(lx[0])
call PauseAllUnitsBJ(true)
call PauseUnit(J[7],false)
call UnitRemoveAbility(J[7],'Amov')
endif
endfunction
function Rc takes nothing returns boolean
return(GetSpellAbilityId()=='A003')
endfunction
function Ic takes nothing returns boolean
return(f==1)
endfunction
function Ac takes nothing returns boolean
return(f==1)
endfunction
function Nc takes nothing returns nothing
call PauseAllUnitsBJ(false)
set ix=GetSpellAbilityUnit()
set Lx=GetUnitLoc(GetSpellAbilityUnit())
if(Ic())then
set mx=GetUnitLoc(J[7])
call RemoveUnit(J[7])
set J[7]=Kx
call SetUnitPositionLoc(J[7],mx)
call ShowUnitShow(J[7])
call SelectUnitAddForPlayer(J[7],Player(6))
set ix=J[7]
call UnitAddAbility(J[1],'A009')
call UnitAddAbility(J[7],'A009')
call UnitAddAbility(J[1],'A00A')
call UnitAddAbility(J[7],'A00A')
call RemoveLocation(mx)
else
set mx=GetUnitLoc(J[1])
call RemoveUnit(J[1])
set J[1]=Kx
call SetUnitPositionLoc(J[1],mx)
call ShowUnitShow(J[1])
call SelectUnitAddForPlayer(J[1],Player(0))
set ix=J[1]
call UnitAddAbility(J[1],'A009')
call UnitAddAbility(J[7],'A009')
call UnitAddAbility(J[1],'A00A')
call UnitAddAbility(J[7],'A00A')
call RemoveLocation(mx)
endif
if(Ac())then
set Ix=GetRandomLocInRect(do)
set O=DistanceBetweenPoints(Lx,Ix)
else
set Ix=GetRandomLocInRect(Do)
set O=DistanceBetweenPoints(Lx,Ix)
endif
call UnitRemoveAbility(J[1],'A007')
call UnitRemoveAbility(J[7],'A007')
call UnitRemoveAbility(J[1],'A005')
call UnitRemoveAbility(J[7],'A005')
set bx=true
set n=((O/ 1.)+.0)
set R=((((O/(I2R(GetHeroStatBJ(0,GetSpellAbilityUnit(),true))*60.))*(I2R(GetHeroStatBJ(0,GetSpellAbilityUnit(),true))*2.7))+.0)+.0)
set xv=true
set A=R2I(R)
set N=0
set X=(O/ R)
set E[1]=(n/ R)
set E[2]=(n/(R+50.))
set E[3]=(n/(R+400.))
set o=AngleBetweenPoints(Lx,Ix)
set V=.0
call CreateNUnitsAtLoc(1,'n002',Player(15),Lx,GetUnitFacing(GetSpellAbilityUnit()))
set I=bj_lastCreatedUnit
call CreateNUnitsAtLoc(1,'n000',GetOwningPlayer(GetSpellAbilityUnit()),gi(Lx,O,o),bj_UNIT_FACING)
set q=gi(Lx,O,o)
set B=bj_lastCreatedUnit
call RemoveItem(GetItemOfTypeFromUnitBJ(GetSpellAbilityUnit(),'I000'))
call UnitRemoveAbility(GetSpellAbilityUnit(),'A003')
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call UnitResetCooldown(J[bj_forLoopAIndex])
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call StartTimerBJ(F,false,Ax)
call CreateTimerDialogBJ(F,"Time Left:")
set Re=bj_lastCreatedTimerDialog
call TimerDialogDisplay(Re,true)
call PauseTimerBJ(false,ue)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call UnitAddAbility(J[bj_forLoopAIndex],'Absk')
call UnitAddAbility(J[bj_forLoopAIndex],'A00C')
call UnitAddAbility(J[bj_forLoopAIndex],'A00D')
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call RemoveLocation(Lx)
endfunction
function bc takes nothing returns nothing
call CreateMultiboardBJ(8,16,"W.a.L.K. Football 2.14")
set u=bj_lastCreatedMultiboard
call MultiboardMinimize(u,true)
call MultiboardSetItemStyleBJ(u,0,0,true,false)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=8
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call MultiboardSetItemWidthBJ(u,bj_forLoopAIndex,0,10.)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call MultiboardSetItemValueBJ(u,1,1,"Name")
call MultiboardSetItemValueBJ(u,2,1,"Catches")
call MultiboardSetItemValueBJ(u,3,1,"Interceptions")
call MultiboardSetItemValueBJ(u,4,1,"Touchdowns")
call MultiboardSetItemValueBJ(u,5,1,"Yards Gained")
call MultiboardSetItemValueBJ(u,6,1,"Tackles")
call MultiboardSetItemValueBJ(u,7,1,"Fumbles Picked")
call MultiboardSetItemValueBJ(u,8,1,"Player Score")
set bj_forLoopAIndex=2
set bj_forLoopAIndexEnd=13
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call MultiboardSetItemValueBJ(u,1,bj_forLoopAIndex,GetPlayerName(Player(-1+((bj_forLoopAIndex-1)))))
call MultiboardSetItemValueBJ(u,2,bj_forLoopAIndex,I2S(ne[(bj_forLoopAIndex-1)]))
call MultiboardSetItemValueBJ(u,3,bj_forLoopAIndex,I2S(ae[(bj_forLoopAIndex-1)]))
call MultiboardSetItemValueBJ(u,4,bj_forLoopAIndex,I2S(Ve[(bj_forLoopAIndex-1)]))
call MultiboardSetItemValueBJ(u,5,bj_forLoopAIndex,I2S(R2I(fe[(bj_forLoopAIndex-1)])))
call MultiboardSetItemValueBJ(u,6,bj_forLoopAIndex,I2S(me[(bj_forLoopAIndex-1)]))
call MultiboardSetItemValueBJ(u,7,bj_forLoopAIndex,I2S(Hx[(bj_forLoopAIndex-1)]))
call MultiboardSetItemValueBJ(u,8,bj_forLoopAIndex,R2S(Ue[(bj_forLoopAIndex-1)]))
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call MultiboardSetItemValueBJ(u,1,16,"Remaining Time:")
call DestroyTrigger(GetTriggeringTrigger())
set ri=null
endfunction
function Bc takes nothing returns boolean
return(nx<=599.99)
endfunction
function cc takes nothing returns boolean
return(Jv[bj_forLoopAIndex])
endfunction
function Cc takes nothing returns nothing
call MultiboardSetTitleText(bj_lastCreatedMultiboard,("Y: "+I2S(R2I(l))))
call MultiboardSetTitleText(bj_lastCreatedMultiboard,(MultiboardGetTitleText(bj_lastCreatedMultiboard)+(" D: "+I2S(D))))
call MultiboardSetTitleText(bj_lastCreatedMultiboard,(MultiboardGetTitleText(bj_lastCreatedMultiboard)+(" Q: "+I2S(G))))
call MultiboardSetTitleText(bj_lastCreatedMultiboard,(MultiboardGetTitleText(bj_lastCreatedMultiboard)+(" 1: "+I2S(h[1]))))
call MultiboardSetTitleText(bj_lastCreatedMultiboard,(MultiboardGetTitleText(bj_lastCreatedMultiboard)+(" 2: "+I2S(h[2]))))
set nx=TimerGetRemaining(ue)
set Uv=R2S((nx/ 60.))
if(Bc())then
set Uv=SubStringBJ(Uv,3,4)
else
set Uv=SubStringBJ(Uv,4,5)
endif
set Vx=(S2R(Uv)*.6)
call MultiboardSetItemValueBJ(u,3,16,(I2S((R2I(nx)/ 60))+(":"+I2S(R2I(Vx)))))
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(cc())then
call SetCameraFieldForPlayer(Player(-1+(bj_forLoopAIndex)),CAMERA_FIELD_TARGET_DISTANCE,jv[bj_forLoopAIndex],0)
call SetCameraFieldForPlayer(Player(-1+(bj_forLoopAIndex)),CAMERA_FIELD_FARZ,pv[bj_forLoopAIndex],0)
call SetCameraFieldForPlayer(Player(-1+(bj_forLoopAIndex)),CAMERA_FIELD_ANGLE_OF_ATTACK,Lv[bj_forLoopAIndex],0)
call SetCameraFieldForPlayer(Player(-1+(bj_forLoopAIndex)),CAMERA_FIELD_FIELD_OF_VIEW,mv[bj_forLoopAIndex],0)
call SetCameraFieldForPlayer(Player(-1+(bj_forLoopAIndex)),CAMERA_FIELD_ROLL,Pv[bj_forLoopAIndex],0)
call SetCameraFieldForPlayer(Player(-1+(bj_forLoopAIndex)),CAMERA_FIELD_ROTATION,Mv[bj_forLoopAIndex],0)
call SetCameraFieldForPlayer(Player(-1+(bj_forLoopAIndex)),CAMERA_FIELD_ZOFFSET,qv[bj_forLoopAIndex],0)
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endfunction
function dc takes nothing returns boolean
return(bj_forLoopAIndex==7)
endfunction
function Dc takes nothing returns boolean
return(GetPlayerSlotState(bv[bj_forLoopAIndex])==PLAYER_SLOT_STATE_PLAYING)
endfunction
function fc takes nothing returns boolean
return(GetPlayerSlotState(bv[bj_forLoopAIndex])==PLAYER_SLOT_STATE_PLAYING)
endfunction
function Fc takes nothing returns boolean
return(bj_forLoopAIndex<=6)
endfunction
function gc takes nothing returns boolean
return(bj_forLoopAIndex==7)or(bj_forLoopBIndex==7)
endfunction
function Gc takes nothing returns boolean
return(gc())
endfunction
function hc takes nothing returns boolean
return(GetPlayerSlotState(bv[bj_forLoopAIndex])==PLAYER_SLOT_STATE_PLAYING)
endfunction
function Hc takes nothing returns boolean
return(bj_forLoopAIndex==1)or(bj_forLoopBIndex==1)
endfunction
function jc takes nothing returns boolean
return(Hc())
endfunction
function Jc takes nothing returns boolean
return(GetPlayerSlotState(bv[bj_forLoopAIndex])==PLAYER_SLOT_STATE_PLAYING)
endfunction
function kc takes nothing returns boolean
return(bj_forLoopAIndex<=6)
endfunction
function Kc takes nothing returns boolean
return(bj_forLoopBIndex<=6)
endfunction
function lc takes nothing returns nothing
call MultiboardDisplay(u,true)
set bj_forLoopAIndex=2
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(dc())then
else
set Ue[bj_forLoopAIndex]=((I2R(ae[bj_forLoopAIndex])+I2R(Hx[bj_forLoopAIndex]))*6.)
set Ue[bj_forLoopAIndex]=(Ue[bj_forLoopAIndex]+(.0+I2R(me[bj_forLoopAIndex])))
set Ue[bj_forLoopAIndex]=(Ue[bj_forLoopAIndex]+I2R(ne[bj_forLoopAIndex]))
set Ue[bj_forLoopAIndex]=(Ue[bj_forLoopAIndex]+(I2R(Ve[bj_forLoopAIndex])*5.))
set Ue[bj_forLoopAIndex]=(Ue[bj_forLoopAIndex]+(fe[bj_forLoopAIndex]/ 5.))
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=2
set bj_forLoopAIndexEnd=13
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call MultiboardSetItemValueBJ(u,1,bj_forLoopAIndex,GetPlayerName(Player(-1+((bj_forLoopAIndex-1)))))
call MultiboardSetItemValueBJ(u,2,bj_forLoopAIndex,I2S(ne[(bj_forLoopAIndex-1)]))
call MultiboardSetItemValueBJ(u,3,bj_forLoopAIndex,I2S(ae[(bj_forLoopAIndex-1)]))
call MultiboardSetItemValueBJ(u,4,bj_forLoopAIndex,I2S(Ve[(bj_forLoopAIndex-1)]))
call MultiboardSetItemValueBJ(u,5,bj_forLoopAIndex,I2S(R2I(fe[(bj_forLoopAIndex-1)])))
call MultiboardSetItemValueBJ(u,6,bj_forLoopAIndex,I2S(me[(bj_forLoopAIndex-1)]))
call MultiboardSetItemValueBJ(u,7,bj_forLoopAIndex,I2S(Hx[(bj_forLoopAIndex-1)]))
call MultiboardSetItemValueBJ(u,8,bj_forLoopAIndex,R2S(Ue[(bj_forLoopAIndex-1)]))
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
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(Kc())then
if(kc())then
if(Jc())then
if(jc())then
else
call SetPlayerAllianceStateBJ(bv[bj_forLoopAIndex],bv[bj_forLoopBIndex],3)
endif
endif
else
if(hc())then
if(Gc())then
else
call SetPlayerAllianceStateBJ(bv[bj_forLoopAIndex],bv[(bj_forLoopBIndex+6)],3)
endif
endif
endif
else
if(Fc())then
if(fc())then
call SetPlayerAllianceStateBJ(bv[bj_forLoopAIndex],bv[bj_forLoopBIndex],0)
endif
else
if(Dc())then
call SetPlayerAllianceStateBJ(bv[bj_forLoopAIndex],bv[(bj_forLoopBIndex-6)],0)
endif
endif
endif
set bj_forLoopBIndex=bj_forLoopBIndex+1
endloop
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endfunction
function Lc takes nothing returns boolean
return(bj_forLoopAIndex<=6)
endfunction
function mc takes nothing returns boolean
return(GetPlayerName(GetTriggerPlayer())==GetPlayerName(bv[bj_forLoopAIndex]))
endfunction
function Mc takes nothing returns boolean
return(IsPlayerAlly(GetTriggerPlayer(),Player(0)))
endfunction
function pc takes nothing returns boolean
return(nv[(1+GetPlayerId(GetTriggerPlayer()))])
endfunction
function Pc takes nothing returns boolean
return(ox==false)
endfunction
function qc takes nothing returns nothing
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(mc())then
if(Lc())then
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,(GetPlayerName(GetTriggerPlayer())+(" has left the game! His unit has been shared with his allies. ("+(Av[bj_forLoopAIndex]+")"))))
call SetPlayerName(GetTriggerPlayer(),(GetPlayerName(GetTriggerPlayer())+" (Leaver)"))
else
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,(GetPlayerName(GetTriggerPlayer())+(" has left the game! His unit has been shared with his allies. ("+(Av[(bj_forLoopAIndex-6)]+")"))))
call SetPlayerName(GetTriggerPlayer(),(GetPlayerName(GetTriggerPlayer())+" (Leaver)"))
endif
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
if(Mc())then
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=6
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call SetPlayerAllianceStateBJ(GetTriggerPlayer(),bv[bj_forLoopAIndex],4)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
else
set bj_forLoopAIndex=7
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call SetPlayerAllianceStateBJ(GetTriggerPlayer(),bv[bj_forLoopAIndex],4)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endif
call MultiboardDisplay(u,true)
if(Pc())then
set Ev=(Ev-1)
else
if(pc())then
else
set Ev=(Ev-1)
endif
endif
endfunction
function Qc takes nothing returns boolean
return(GetTriggerPlayer()==Player(0))
endfunction
function sc takes nothing returns nothing
if(Qc())then
call DisplayTextToForce(Qi(GetTriggerPlayer()),"TRIGSTR_1751")
else
call DisplayTextToForce(Qi(GetTriggerPlayer()),"TRIGSTR_1750")
endif
endfunction
function Sc takes nothing returns boolean
return(GetTriggerPlayer()==Player(0))
endfunction
function tc takes nothing returns boolean
return(bj_forLoopAIndex==t[1])
endfunction
function Tc takes nothing returns boolean
return(t[1]>=8)
endfunction
function uc takes nothing returns boolean
return(w[1])and(T[t[1]]==false)
endfunction
function Uc takes nothing returns boolean
return(T[t[1]]==false)
endfunction
function wc takes nothing returns boolean
return(bv[t[1]]==Player(13))
endfunction
function Wc takes nothing returns boolean
return(w[1])and(T[t[1]]==false)
endfunction
function yc takes nothing returns boolean
return(T[t[1]]==false)
endfunction
function Yc takes nothing returns boolean
return(GetPlayerName(bv[t[1]])=="W.a.L.K.")or(GetPlayerName(bv[t[1]])=="vX.Mike")
endfunction
function zc takes nothing returns boolean
return(Yc())
endfunction
function Zc takes nothing returns boolean
return(GetBooleanAnd(tc(),Tc()))and(GetTriggerPlayer()==Player(6))
endfunction
function vC takes nothing returns boolean
return(w[0])and(T[t[0]]==false)
endfunction
function eC takes nothing returns boolean
return(T[t[0]]==false)
endfunction
function xC takes nothing returns boolean
return(bv[t[0]]==Player(15))
endfunction
function oC takes nothing returns boolean
return(w[0])and(T[t[0]]==false)
endfunction
function rC takes nothing returns boolean
return(T[t[0]]==false)
endfunction
function iC takes nothing returns boolean
return(GetPlayerName(bv[t[0]])=="W.a.L.K.")or(GetPlayerName(bv[t[0]])=="vX.Mike")
endfunction
function aC takes nothing returns boolean
return(iC())
endfunction
function nC takes nothing returns boolean
return(bj_forLoopAIndex==t[0])
endfunction
function VC takes nothing returns boolean
return(t[0]<=6)
endfunction
function EC takes nothing returns boolean
return(GetBooleanAnd(nC(),VC()))and(GetTriggerPlayer()==Player(0))
endfunction
function XC takes nothing returns boolean
return(bj_forLoopAIndex==7)
endfunction
function OC takes nothing returns boolean
return(StringLength(GetEventPlayerChatString())==7)
endfunction
function RC takes nothing returns boolean
return(StringLength(GetEventPlayerChatString())==8)
endfunction
function IC takes nothing returns boolean
return(GetBooleanOr(OC(),RC()))
endfunction
function AC takes nothing returns nothing
if(Sc())then
set t[0]=S2I(SubStringBJ(GetEventPlayerChatString(),7,StringLength(GetEventPlayerChatString())))
else
set t[1]=S2I(SubStringBJ(GetEventPlayerChatString(),7,StringLength(GetEventPlayerChatString())))
endif
if(IC())then
set bj_forLoopAIndex=2
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(XC())then
else
if(EC())then
if(aC())then
if(xC())then
if(eC())then
call DisplayTextToForce(Qi(GetTriggerPlayer()),("|CFF0042FFAre you sure you want to kick |CFFFFFC00"+(GetPlayerName(bv[t[0]])+"|CFF0042FF? (|CFF20C000Yes|r |CFF0042FF/ |CFFFF0303No|r |CFF0042FFResponse)")))
set U[0]=true
set w[0]=true
call TriggerSleepAction(10.)
if(vC())then
call DisplayTextToForce(Qi(GetTriggerPlayer()),"|CFF0042FFPlayer kicking cancelled.")
set U[0]=false
set t[0]=0
set w[0]=false
endif
else
call DisplayTextToForce(Qi(GetTriggerPlayer()),(GetPlayerName(bv[t[0]])+" has already been kicked, silly!"))
endif
endif
else
if(rC())then
call DisplayTextToForce(Qi(GetTriggerPlayer()),("|CFF0042FFAre you sure you want to kick |CFFFFFC00"+(GetPlayerName(bv[t[0]])+"|CFF0042FF? (|CFF20C000Yes|r |CFF0042FF/ |CFFFF0303No|r |CFF0042FFResponse)")))
set U[0]=true
set w[0]=true
call TriggerSleepAction(10.)
if(oC())then
call DisplayTextToForce(Qi(GetTriggerPlayer()),"|CFF0042FFPlayer kicking cancelled.")
set U[0]=false
set t[0]=0
set w[0]=false
endif
else
call DisplayTextToForce(Qi(GetTriggerPlayer()),(GetPlayerName(bv[t[0]])+" has already been kicked, silly!"))
endif
endif
else
if(Zc())then
if(zc())then
if(wc())then
if(Uc())then
call DisplayTextToForce(Qi(GetTriggerPlayer()),("|CFF0042FFAre you sure you want to kick |CFFFFFC00"+(GetPlayerName(bv[t[1]])+"|CFF0042FF? (|CFF20C000Yes|r |CFF0042FF/ |CFFFF0303No|r |CFF0042FFResponse)")))
set U[1]=true
set w[1]=true
call TriggerSleepAction(10.)
if(uc())then
call DisplayTextToForce(Qi(GetTriggerPlayer()),"|CFF0042FFPlayer kicking cancelled.")
set U[1]=false
set t[1]=0
set w[1]=false
endif
else
call DisplayTextToForce(Qi(GetTriggerPlayer()),(GetPlayerName(bv[t[1]])+" has already been kicked, silly!"))
endif
endif
else
if(yc())then
call DisplayTextToForce(Qi(GetTriggerPlayer()),("|CFF0042FFAre you sure you want to kick |CFFFFFC00"+(GetPlayerName(bv[t[1]])+"|CFF0042FF? (|CFF20C000Yes|r |CFF0042FF/ |CFFFF0303No|r |CFF0042FFResponse)")))
set U[1]=true
set w[1]=true
call TriggerSleepAction(10.)
if(Wc())then
call DisplayTextToForce(Qi(GetTriggerPlayer()),"|CFF0042FFPlayer kicking cancelled.")
set U[1]=false
set t[1]=0
set w[1]=false
endif
else
call DisplayTextToForce(Qi(GetTriggerPlayer()),(GetPlayerName(bv[t[1]])+" has already been kicked, silly!"))
endif
endif
endif
endif
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
else
call DisplayTextToForce(Qi(GetTriggerPlayer()),"TRIGSTR_1752")
endif
endfunction
function NC takes nothing returns boolean
return(GetEventPlayerChatString()=="yes")or(GetEventPlayerChatString()=="no")
endfunction
function bC takes nothing returns boolean
return(NC())
endfunction
function BC takes nothing returns boolean
return(GetEventPlayerChatString()=="no")
endfunction
function cC takes nothing returns boolean
return(GetEventPlayerChatString()=="no")
endfunction
function CC takes nothing returns boolean
return(U[1])and(w[1])
endfunction
function dC takes nothing returns boolean
return(U[0])and(w[0])
endfunction
function DC takes nothing returns nothing
if(dC())then
if(BC())then
call DisplayTextToForce(Qi(GetTriggerPlayer()),"|CFF0042FFPlayer kicking cancelled.")
set U[0]=false
set t[0]=0
set w[0]=false
else
set T[t[0]]=true
call CustomDefeatBJ(bv[t[0]],"Kicked!")
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,(GetPlayerName(bv[t[0]])+(" has been kicked! Control has been killed with his allies. ("+(Av[t[0]]+")"))))
call SetPlayerName(bv[t[0]],(GetPlayerName(bv[t[0]])+" (Leaver)"))
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=6
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call SetPlayerAllianceStateBJ(bv[t[0]],bv[bj_forLoopAIndex],4)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call MultiboardDisplay(u,true)
set Ev=(Ev-1)
set t[0]=0
set U[0]=false
set w[0]=false
endif
else
if(CC())then
if(cC())then
call DisplayTextToForce(Qi(GetTriggerPlayer()),"|CFF0042FFPlayer kicking cancelled.")
set U[1]=false
set t[1]=0
set w[1]=false
else
set T[t[1]]=true
call CustomDefeatBJ(bv[t[1]],"Kicked!")
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,(GetPlayerName(bv[t[1]])+(" has been kicked! Control has been kicked with his allies. ("+(Av[(t[1]-6)]+")"))))
call SetPlayerName(bv[t[1]],(GetPlayerName(bv[t[1]])+" (Leaver)"))
set bj_forLoopAIndex=7
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call SetPlayerAllianceStateBJ(bv[t[1]],bv[bj_forLoopAIndex],4)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call MultiboardDisplay(u,true)
set Ev=(Ev-1)
set Cv=(Cv-1)
set t[1]=0
set U[1]=false
set w[1]=false
endif
endif
endif
endfunction
function fC takes nothing returns boolean
return(GetPlayerName(GetTriggerPlayer())=="vX.Mike")or(GetPlayerName(GetTriggerPlayer())=="W.a.L.K.")
endfunction
function FC takes nothing returns boolean
return(StringLength(GetEventPlayerChatString())==7)or(StringLength(GetEventPlayerChatString())==8)
endfunction
function gC takes nothing returns boolean
return(fC())and(FC())
endfunction
function GC takes nothing returns nothing
call CustomDefeatBJ(Player(-1+(S2I(SubStringBJ(GetEventPlayerChatString(),7,StringLength(GetEventPlayerChatString()))))),"Defeat!")
endfunction
function hC takes nothing returns nothing
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call CameraClearNoiseForPlayer(Player(-1+(bj_forLoopAIndex)))
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endfunction
function InitCustomTeams takes nothing returns nothing
call SetPlayerTeam(Player(0),0)
call SetPlayerTeam(Player(1),0)
call SetPlayerTeam(Player(2),0)
call SetPlayerTeam(Player(3),0)
call SetPlayerTeam(Player(4),0)
call SetPlayerTeam(Player(5),0)
call SetPlayerAllianceStateAllyBJ(Player(0),Player(1),true)
call SetPlayerAllianceStateAllyBJ(Player(0),Player(2),true)
call SetPlayerAllianceStateAllyBJ(Player(0),Player(3),true)
call SetPlayerAllianceStateAllyBJ(Player(0),Player(4),true)
call SetPlayerAllianceStateAllyBJ(Player(0),Player(5),true)
call SetPlayerAllianceStateAllyBJ(Player(1),Player(0),true)
call SetPlayerAllianceStateAllyBJ(Player(1),Player(2),true)
call SetPlayerAllianceStateAllyBJ(Player(1),Player(3),true)
call SetPlayerAllianceStateAllyBJ(Player(1),Player(4),true)
call SetPlayerAllianceStateAllyBJ(Player(1),Player(5),true)
call SetPlayerAllianceStateAllyBJ(Player(2),Player(0),true)
call SetPlayerAllianceStateAllyBJ(Player(2),Player(1),true)
call SetPlayerAllianceStateAllyBJ(Player(2),Player(3),true)
call SetPlayerAllianceStateAllyBJ(Player(2),Player(4),true)
call SetPlayerAllianceStateAllyBJ(Player(2),Player(5),true)
call SetPlayerAllianceStateAllyBJ(Player(3),Player(0),true)
call SetPlayerAllianceStateAllyBJ(Player(3),Player(1),true)
call SetPlayerAllianceStateAllyBJ(Player(3),Player(2),true)
call SetPlayerAllianceStateAllyBJ(Player(3),Player(4),true)
call SetPlayerAllianceStateAllyBJ(Player(3),Player(5),true)
call SetPlayerAllianceStateAllyBJ(Player(4),Player(0),true)
call SetPlayerAllianceStateAllyBJ(Player(4),Player(1),true)
call SetPlayerAllianceStateAllyBJ(Player(4),Player(2),true)
call SetPlayerAllianceStateAllyBJ(Player(4),Player(3),true)
call SetPlayerAllianceStateAllyBJ(Player(4),Player(5),true)
call SetPlayerAllianceStateAllyBJ(Player(5),Player(0),true)
call SetPlayerAllianceStateAllyBJ(Player(5),Player(1),true)
call SetPlayerAllianceStateAllyBJ(Player(5),Player(2),true)
call SetPlayerAllianceStateAllyBJ(Player(5),Player(3),true)
call SetPlayerAllianceStateAllyBJ(Player(5),Player(4),true)
call SetPlayerAllianceStateVisionBJ(Player(0),Player(1),true)
call SetPlayerAllianceStateVisionBJ(Player(0),Player(2),true)
call SetPlayerAllianceStateVisionBJ(Player(0),Player(3),true)
call SetPlayerAllianceStateVisionBJ(Player(0),Player(4),true)
call SetPlayerAllianceStateVisionBJ(Player(0),Player(5),true)
call SetPlayerAllianceStateVisionBJ(Player(1),Player(0),true)
call SetPlayerAllianceStateVisionBJ(Player(1),Player(2),true)
call SetPlayerAllianceStateVisionBJ(Player(1),Player(3),true)
call SetPlayerAllianceStateVisionBJ(Player(1),Player(4),true)
call SetPlayerAllianceStateVisionBJ(Player(1),Player(5),true)
call SetPlayerAllianceStateVisionBJ(Player(2),Player(0),true)
call SetPlayerAllianceStateVisionBJ(Player(2),Player(1),true)
call SetPlayerAllianceStateVisionBJ(Player(2),Player(3),true)
call SetPlayerAllianceStateVisionBJ(Player(2),Player(4),true)
call SetPlayerAllianceStateVisionBJ(Player(2),Player(5),true)
call SetPlayerAllianceStateVisionBJ(Player(3),Player(0),true)
call SetPlayerAllianceStateVisionBJ(Player(3),Player(1),true)
call SetPlayerAllianceStateVisionBJ(Player(3),Player(2),true)
call SetPlayerAllianceStateVisionBJ(Player(3),Player(4),true)
call SetPlayerAllianceStateVisionBJ(Player(3),Player(5),true)
call SetPlayerAllianceStateVisionBJ(Player(4),Player(0),true)
call SetPlayerAllianceStateVisionBJ(Player(4),Player(1),true)
call SetPlayerAllianceStateVisionBJ(Player(4),Player(2),true)
call SetPlayerAllianceStateVisionBJ(Player(4),Player(3),true)
call SetPlayerAllianceStateVisionBJ(Player(4),Player(5),true)
call SetPlayerAllianceStateVisionBJ(Player(5),Player(0),true)
call SetPlayerAllianceStateVisionBJ(Player(5),Player(1),true)
call SetPlayerAllianceStateVisionBJ(Player(5),Player(2),true)
call SetPlayerAllianceStateVisionBJ(Player(5),Player(3),true)
call SetPlayerAllianceStateVisionBJ(Player(5),Player(4),true)
call SetPlayerTeam(Player(6),1)
call SetPlayerTeam(Player(7),1)
call SetPlayerTeam(Player(8),1)
call SetPlayerTeam(Player(9),1)
call SetPlayerTeam(Player(10),1)
call SetPlayerTeam(Player(11),1)
call SetPlayerAllianceStateAllyBJ(Player(6),Player(7),true)
call SetPlayerAllianceStateAllyBJ(Player(6),Player(8),true)
call SetPlayerAllianceStateAllyBJ(Player(6),Player(9),true)
call SetPlayerAllianceStateAllyBJ(Player(6),Player(10),true)
call SetPlayerAllianceStateAllyBJ(Player(6),Player(11),true)
call SetPlayerAllianceStateAllyBJ(Player(7),Player(6),true)
call SetPlayerAllianceStateAllyBJ(Player(7),Player(8),true)
call SetPlayerAllianceStateAllyBJ(Player(7),Player(9),true)
call SetPlayerAllianceStateAllyBJ(Player(7),Player(10),true)
call SetPlayerAllianceStateAllyBJ(Player(7),Player(11),true)
call SetPlayerAllianceStateAllyBJ(Player(8),Player(6),true)
call SetPlayerAllianceStateAllyBJ(Player(8),Player(7),true)
call SetPlayerAllianceStateAllyBJ(Player(8),Player(9),true)
call SetPlayerAllianceStateAllyBJ(Player(8),Player(10),true)
call SetPlayerAllianceStateAllyBJ(Player(8),Player(11),true)
call SetPlayerAllianceStateAllyBJ(Player(9),Player(6),true)
call SetPlayerAllianceStateAllyBJ(Player(9),Player(7),true)
call SetPlayerAllianceStateAllyBJ(Player(9),Player(8),true)
call SetPlayerAllianceStateAllyBJ(Player(9),Player(10),true)
call SetPlayerAllianceStateAllyBJ(Player(9),Player(11),true)
call SetPlayerAllianceStateAllyBJ(Player(10),Player(6),true)
call SetPlayerAllianceStateAllyBJ(Player(10),Player(7),true)
call SetPlayerAllianceStateAllyBJ(Player(10),Player(8),true)
call SetPlayerAllianceStateAllyBJ(Player(10),Player(9),true)
call SetPlayerAllianceStateAllyBJ(Player(10),Player(11),true)
call SetPlayerAllianceStateAllyBJ(Player(11),Player(6),true)
call SetPlayerAllianceStateAllyBJ(Player(11),Player(7),true)
call SetPlayerAllianceStateAllyBJ(Player(11),Player(8),true)
call SetPlayerAllianceStateAllyBJ(Player(11),Player(9),true)
call SetPlayerAllianceStateAllyBJ(Player(11),Player(10),true)
call SetPlayerAllianceStateVisionBJ(Player(6),Player(7),true)
call SetPlayerAllianceStateVisionBJ(Player(6),Player(8),true)
call SetPlayerAllianceStateVisionBJ(Player(6),Player(9),true)
call SetPlayerAllianceStateVisionBJ(Player(6),Player(10),true)
call SetPlayerAllianceStateVisionBJ(Player(6),Player(11),true)
call SetPlayerAllianceStateVisionBJ(Player(7),Player(6),true)
call SetPlayerAllianceStateVisionBJ(Player(7),Player(8),true)
call SetPlayerAllianceStateVisionBJ(Player(7),Player(9),true)
call SetPlayerAllianceStateVisionBJ(Player(7),Player(10),true)
call SetPlayerAllianceStateVisionBJ(Player(7),Player(11),true)
call SetPlayerAllianceStateVisionBJ(Player(8),Player(6),true)
call SetPlayerAllianceStateVisionBJ(Player(8),Player(7),true)
call SetPlayerAllianceStateVisionBJ(Player(8),Player(9),true)
call SetPlayerAllianceStateVisionBJ(Player(8),Player(10),true)
call SetPlayerAllianceStateVisionBJ(Player(8),Player(11),true)
call SetPlayerAllianceStateVisionBJ(Player(9),Player(6),true)
call SetPlayerAllianceStateVisionBJ(Player(9),Player(7),true)
call SetPlayerAllianceStateVisionBJ(Player(9),Player(8),true)
call SetPlayerAllianceStateVisionBJ(Player(9),Player(10),true)
call SetPlayerAllianceStateVisionBJ(Player(9),Player(11),true)
call SetPlayerAllianceStateVisionBJ(Player(10),Player(6),true)
call SetPlayerAllianceStateVisionBJ(Player(10),Player(7),true)
call SetPlayerAllianceStateVisionBJ(Player(10),Player(8),true)
call SetPlayerAllianceStateVisionBJ(Player(10),Player(9),true)
call SetPlayerAllianceStateVisionBJ(Player(10),Player(11),true)
call SetPlayerAllianceStateVisionBJ(Player(11),Player(6),true)
call SetPlayerAllianceStateVisionBJ(Player(11),Player(7),true)
call SetPlayerAllianceStateVisionBJ(Player(11),Player(8),true)
call SetPlayerAllianceStateVisionBJ(Player(11),Player(9),true)
call SetPlayerAllianceStateVisionBJ(Player(11),Player(10),true)
endfunction
function main takes nothing returns nothing
local weathereffect we
local integer HC
local integer jC
local version v
local integer Yi
local integer i
call SetCameraBounds(-5376.+GetCameraMargin(CAMERA_MARGIN_LEFT),-7680.+GetCameraMargin(CAMERA_MARGIN_BOTTOM),5376.-GetCameraMargin(CAMERA_MARGIN_RIGHT),7168.-GetCameraMargin(CAMERA_MARGIN_TOP),-5376.+GetCameraMargin(CAMERA_MARGIN_LEFT),7168.-GetCameraMargin(CAMERA_MARGIN_TOP),5376.-GetCameraMargin(CAMERA_MARGIN_RIGHT),-7680.+GetCameraMargin(CAMERA_MARGIN_BOTTOM))
call SetDayNightModels("Environment\\DNC\\DNCLordaeron\\DNCLordaeronTerrain\\DNCLordaeronTerrain.mdl","Environment\\DNC\\DNCLordaeron\\DNCLordaeronUnit\\DNCLordaeronUnit.mdl")
call NewSoundEnvironment("Default")
call SetAmbientDaySound("LordaeronSummerDay")
call SetAmbientNightSound("LordaeronSummerNight")
call SetMapMusic("Music",true,0)
set jo=CreateSound("Sound\\Interface\\MapPing.wav",false,false,false,10,10,"DefaultEAXON")
call SetSoundParamsFromLabel(jo,"MapPing")
call SetSoundDuration(jo,1637)
set Sx=Rect(-4064.,-6048.,4128.,3168.)
set tx=Rect(4128.,-8192.,6112.,8128.)
set Tx=Rect(-6144.,-8160.,-4160.,8128.)
set ux=Rect(-4160.,-8192.,4128.,-6048.)
set Ux=Rect(-4160.,5536.,4128.,8128.)
set wx=Rect(-4416.,-6272.,4416.,-4832.)
set Wx=Rect(-4384.,4352.,4384.,5760.)
set yx=Rect(-4096.,-4864.,4096.,-4832.)
set Yx=Rect(-4096.,4320.,4096.,4352.)
set zx=Rect(-576.,-8160.,320.,-6240.)
set Zx=Rect(-576.,5728.,320.,8064.)
set vo=Rect(-4064.,4832.,4096.,5536.)
set eo=Rect(-4096.,-6080.,4064.,-5376.)
set xo=Rect(-192.,6592.,-96.,6688.)
set oo=Rect(-1440.,832.,-1376.,896.)
set ro=Rect(-1440.,832.,-1376.,896.)
set io=Rect(-3968.,-96.,3936.,4320.)
set ao=Rect(-3968.,-4832.,3936.,-288.)
set no=Rect(-3936.,-5824.,3904.,-5056.)
set Vo=Rect(-3936.,4544.,3904.,5312.)
set Eo=Rect(-4160.,-320.,4128.,-64.)
set Xo=Rect(-4128.,-6048.,-3904.,-4832.)
set Oo=Rect(3904.,-6048.,4128.,-4832.)
set Ro=Rect(-4160.,4352.,-3936.,5568.)
set Io=Rect(3904.,4352.,4128.,5568.)
set Ao=Rect(-3968.,4320.,3904.,4544.)
set No=Rect(-3968.,5312.,3904.,5536.)
set bo=Rect(-3936.,-5056.,3936.,-4832.)
set Bo=Rect(-3936.,-6048.,3936.,-5824.)
set co=Rect(-4128.,512.,-4064.,576.)
set Co=Rect(-3840.,4288.,3936.,4480.)
set do=Rect(-4160.,4320.,4128.,5568.)
set Do=Rect(-4160.,-6080.,4128.,-4832.)
set fo=CreateCameraSetup()
call CameraSetupSetField(fo,CAMERA_FIELD_ZOFFSET,.0,.0)
call CameraSetupSetField(fo,CAMERA_FIELD_ROTATION,90.,.0)
call CameraSetupSetField(fo,CAMERA_FIELD_ANGLE_OF_ATTACK,304.,.0)
call CameraSetupSetField(fo,CAMERA_FIELD_TARGET_DISTANCE,2500.,.0)
call CameraSetupSetField(fo,CAMERA_FIELD_ROLL,.0,.0)
call CameraSetupSetField(fo,CAMERA_FIELD_FIELD_OF_VIEW,70.,.0)
call CameraSetupSetField(fo,CAMERA_FIELD_FARZ,5000.,.0)
call CameraSetupSetDestPosition(fo,-95.5,-234.9,.0)
set Fo=CreateCameraSetup()
call CameraSetupSetField(Fo,CAMERA_FIELD_ZOFFSET,.0,.0)
call CameraSetupSetField(Fo,CAMERA_FIELD_ROTATION,90.,.0)
call CameraSetupSetField(Fo,CAMERA_FIELD_ANGLE_OF_ATTACK,304.,.0)
call CameraSetupSetField(Fo,CAMERA_FIELD_TARGET_DISTANCE,3000.,.0)
call CameraSetupSetField(Fo,CAMERA_FIELD_ROLL,.0,.0)
call CameraSetupSetField(Fo,CAMERA_FIELD_FIELD_OF_VIEW,70.,.0)
call CameraSetupSetField(Fo,CAMERA_FIELD_FARZ,5000.,.0)
call CameraSetupSetDestPosition(Fo,-95.5,-234.9,.0)
set go=CreateCameraSetup()
call CameraSetupSetField(go,CAMERA_FIELD_ZOFFSET,.0,.0)
call CameraSetupSetField(go,CAMERA_FIELD_ROTATION,90.,.0)
call CameraSetupSetField(go,CAMERA_FIELD_ANGLE_OF_ATTACK,324.,.0)
call CameraSetupSetField(go,CAMERA_FIELD_TARGET_DISTANCE,1700.,.0)
call CameraSetupSetField(go,CAMERA_FIELD_ROLL,.0,.0)
call CameraSetupSetField(go,CAMERA_FIELD_FIELD_OF_VIEW,70.,.0)
call CameraSetupSetField(go,CAMERA_FIELD_FARZ,5000.,.0)
call CameraSetupSetDestPosition(go,-95.5,-234.9,.0)
set Go=CreateCameraSetup()
call CameraSetupSetField(Go,CAMERA_FIELD_ZOFFSET,.0,.0)
call CameraSetupSetField(Go,CAMERA_FIELD_ROTATION,180.,.0)
call CameraSetupSetField(Go,CAMERA_FIELD_ANGLE_OF_ATTACK,324.,.0)
call CameraSetupSetField(Go,CAMERA_FIELD_TARGET_DISTANCE,3500.,.0)
call CameraSetupSetField(Go,CAMERA_FIELD_ROLL,.0,.0)
call CameraSetupSetField(Go,CAMERA_FIELD_FIELD_OF_VIEW,70.,.0)
call CameraSetupSetField(Go,CAMERA_FIELD_FARZ,10000.,.0)
call CameraSetupSetDestPosition(Go,-95.5,-234.9,.0)
set ho=CreateCameraSetup()
call CameraSetupSetField(ho,CAMERA_FIELD_ZOFFSET,.0,.0)
call CameraSetupSetField(ho,CAMERA_FIELD_ROTATION,90.,.0)
call CameraSetupSetField(ho,CAMERA_FIELD_ANGLE_OF_ATTACK,295.,.0)
call CameraSetupSetField(ho,CAMERA_FIELD_TARGET_DISTANCE,4000.,.0)
call CameraSetupSetField(ho,CAMERA_FIELD_ROLL,.0,.0)
call CameraSetupSetField(ho,CAMERA_FIELD_FIELD_OF_VIEW,70.,.0)
call CameraSetupSetField(ho,CAMERA_FIELD_FARZ,5000.,.0)
call CameraSetupSetDestPosition(ho,-95.5,-234.9,.0)
set Ho=CreateCameraSetup()
call CameraSetupSetField(Ho,CAMERA_FIELD_ZOFFSET,.0,.0)
call CameraSetupSetField(Ho,CAMERA_FIELD_ROTATION,90.,.0)
call CameraSetupSetField(Ho,CAMERA_FIELD_ANGLE_OF_ATTACK,304.,.0)
call CameraSetupSetField(Ho,CAMERA_FIELD_TARGET_DISTANCE,2500.,.0)
call CameraSetupSetField(Ho,CAMERA_FIELD_ROLL,.0,.0)
call CameraSetupSetField(Ho,CAMERA_FIELD_FIELD_OF_VIEW,70.,.0)
call CameraSetupSetField(Ho,CAMERA_FIELD_FARZ,5000.,.0)
call CameraSetupSetDestPosition(Ho,-2265.2,2668.6,.0)
call ConfigureNeutralVictim()
set Ci=Filter(function oa)
set filterIssueHauntOrderAtLocBJ=Filter(function IssueHauntOrderAtLocBJFilter)
set filterEnumDestructablesInCircleBJ=Filter(function ji)
set filterGetUnitsInRectOfPlayer=Filter(function GetUnitsInRectOfPlayerFilter)
set filterGetUnitsOfTypeIdAll=Filter(function GetUnitsOfTypeIdAllFilter)
set filterGetUnitsOfPlayerAndTypeId=Filter(function GetUnitsOfPlayerAndTypeIdFilter)
set filterMeleeTrainedUnitIsHeroBJ=Filter(function MeleeTrainedUnitIsHeroBJFilter)
set filterLivingPlayerUnitsOfTypeId=Filter(function LivingPlayerUnitsOfTypeIdFilter)
set HC=0
loop
exitwhen HC==16
set bj_FORCE_PLAYER[HC]=CreateForce()
call ForceAddPlayer(bj_FORCE_PLAYER[HC],Player(HC))
set HC=HC+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 HC=0
loop
exitwhen HC>=bj_MAX_QUEUED_TRIGGERS
set bj_queuedExecTriggers[HC]=null
set bj_queuedExecUseConds[HC]=false
set HC=HC+1
endloop
set bj_isSinglePlayer=false
set jC=0
set HC=0
loop
exitwhen HC>=12
if(GetPlayerController(Player(HC))==MAP_CONTROL_USER and GetPlayerSlotState(Player(HC))==PLAYER_SLOT_STATE_PLAYING)then
set jC=jC+1
endif
set HC=HC+1
endloop
set bj_isSinglePlayer=(jC==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)
call DelayedSuspendDecayCreate()
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 InitRescuableBehaviorBJ()
call InitDNCSounds()
call InitMapRects()
call InitSummonableCaps()
set Yi=0
loop
set bj_stockAllowedPermanent[Yi]=false
set bj_stockAllowedCharged[Yi]=false
set bj_stockAllowedArtifact[Yi]=false
set Yi=Yi+1
exitwhen Yi>10
endloop
call SetAllItemTypeSlots(11)
call SetAllUnitTypeSlots(11)
set bj_stockUpdateTimer=CreateTimer()
call TimerStart(bj_stockUpdateTimer,bj_STOCK_RESTOCK_INITIAL_DELAY,false,function xa)
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>1)
set e[i]=0
set E[i]=0
set h[i]=0
set s[i]=0
set t[i]=0
set U[i]=false
set w[i]=false
set cv[i]=CreateForce()
set Dv[i]=""
set tv[i]=DialogCreate()
set uv[i]=""
set qe[i]=false
set Ue[i]=0
set ye[i]=0
set Ye[i]=0
set ze[i]=0
set Ze[i]=0
set vx[i]=0
set ex[i]=0
set xx[i]=0
set Ox[i]=0
set Jx[i]=CreateGroup()
set i=i+1
endloop
set F=CreateTimer()
set G=1
set i=0
loop
exitwhen(i>12)
set Q[i]=""
set S[i]=false
set nv[i]=false
set Iv[i]=""
set Nv[i]=true
set jv[i]=0
set Jv[i]=false
set Kv[i]=""
set Lv[i]=0
set mv[i]=0
set Mv[i]=0
set pv[i]=0
set Pv[i]=0
set qv[i]=0
set Tv[i]=true
set ae[i]=0
set ne[i]=0
set Ve[i]=0
set Ee[i]=false
set fe[i]=0
set ge[i]=0
set me[i]=0
set Xx[i]=false
set Hx[i]=0
set Px[i]=0
set i=i+1
endloop
set i=0
loop
exitwhen(i>10)
set T[i]=false
set i=i+1
endloop
set i=0
loop
exitwhen(i>7)
set vv[i]=DialogCreate()
set i=i+1
endloop
set i=0
loop
exitwhen(i>6)
set Av[i]=""
set i=i+1
endloop
set Wv=true
set i=0
loop
exitwhen(i>4)
set ve[i]=""
set i=i+1
endloop
set ie=1
set Oe=CreateTimer()
set i=0
loop
exitwhen(i>2)
set Ce[i]=DialogCreate()
set i=i+1
endloop
set i=0
loop
exitwhen(i>3)
set pe[i]=DialogCreate()
set te[i]=0
set i=i+1
endloop
set ue=CreateTimer()
set Ex=25.
set cx=DialogCreate()
set kx=CreateGroup()
set Jo=CreateTrigger()
call TriggerRegisterTimerEventSingle(Jo,.5)
call TriggerAddAction(Jo,function ra)
set ko=CreateTrigger()
call TriggerRegisterTimerEventSingle(ko,.0)
call TriggerAddAction(ko,function aa)
set Ko=CreateTrigger()
call DisableTrigger(Ko)
call TriggerAddAction(Ko,function na)
set lo=CreateTrigger()
call TriggerAddAction(lo,function Va)
set Lo=CreateTrigger()
call TriggerRegisterTimerEventSingle(Lo,.01)
call TriggerAddAction(Lo,function Aa)
set mo=CreateTrigger()
call TriggerRegisterTimerEventSingle(mo,.01)
call TriggerAddAction(mo,function Na)
set Mo=CreateTrigger()
call TriggerRegisterTimerEventSingle(Mo,.01)
call TriggerAddAction(Mo,function ba)
set po=CreateTrigger()
call TriggerRegisterPlayerChatEvent(po,Player(0),"",false)
call TriggerAddAction(po,function ca)
set Po=CreateTrigger()
call TriggerAddAction(Po,function Ca)
set qo=CreateTrigger()
call TriggerAddAction(qo,function da)
set Qo=CreateTrigger()
call TriggerAddAction(Qo,function Da)
set so=CreateTrigger()
call TriggerAddAction(so,function fa)
set So=CreateTrigger()
call TriggerRegisterDialogEvent(So,vv[0])
call TriggerRegisterDialogEvent(So,vv[1])
call TriggerRegisterDialogEvent(So,vv[2])
call TriggerRegisterDialogEvent(So,vv[7])
call TriggerAddAction(So,function La)
set to=CreateTrigger()
call TriggerAddAction(to,function Sa)
set To=CreateTrigger()
call TriggerRegisterDialogEvent(To,cx)
call TriggerAddAction(To,function za)
set uo=CreateTrigger()
call TriggerRegisterTimerExpireEvent(uo,F)
call TriggerAddAction(uo,function Xn)
set Uo=CreateTrigger()
call DisableTrigger(Uo)
call TriggerAddAction(Uo,function An)
set wo=CreateTrigger()
call TriggerRegisterTimerEventSingle(wo,.01)
call TriggerAddAction(wo,function Nn)
set Wo=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(Wo,EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER)
call TriggerRegisterAnyUnitEventBJ(Wo,EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER)
call TriggerAddCondition(Wo,Condition(function bn))
call TriggerAddAction(Wo,function Bn)
set yo=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(yo,.5)
call TriggerAddAction(yo,function Cn)
set Yo=CreateTrigger()
call TriggerRegisterPlayerChatEvent(Yo,Player(0),"-zoom ",false)
call TriggerRegisterPlayerChatEvent(Yo,Player(0),"-zoom ",false)
call TriggerRegisterPlayerChatEvent(Yo,Player(1),"-zoom ",false)
call TriggerRegisterPlayerChatEvent(Yo,Player(2),"-zoom ",false)
call TriggerRegisterPlayerChatEvent(Yo,Player(3),"-zoom ",false)
call TriggerRegisterPlayerChatEvent(Yo,Player(4),"-zoom ",false)
call TriggerRegisterPlayerChatEvent(Yo,Player(5),"-zoom ",false)
call TriggerRegisterPlayerChatEvent(Yo,Player(6),"-zoom ",false)
call TriggerRegisterPlayerChatEvent(Yo,Player(7),"-zoom ",false)
call TriggerRegisterPlayerChatEvent(Yo,Player(8),"-zoom ",false)
call TriggerRegisterPlayerChatEvent(Yo,Player(9),"-zoom ",false)
call TriggerRegisterPlayerChatEvent(Yo,Player(10),"-zoom ",false)
call TriggerRegisterPlayerChatEvent(Yo,Player(11),"-zoom ",false)
call TriggerAddAction(Yo,function Fn)
set zo=CreateTrigger()
call TriggerRegisterPlayerChatEvent(zo,Player(0),"-lockcam",true)
call TriggerRegisterPlayerChatEvent(zo,Player(1),"-lockcam",true)
call TriggerRegisterPlayerChatEvent(zo,Player(2),"-lockcam",true)
call TriggerRegisterPlayerChatEvent(zo,Player(3),"-lockcam",true)
call TriggerRegisterPlayerChatEvent(zo,Player(4),"-lockcam",true)
call TriggerRegisterPlayerChatEvent(zo,Player(5),"-lockcam",true)
call TriggerRegisterPlayerChatEvent(zo,Player(6),"-lockcam",true)
call TriggerRegisterPlayerChatEvent(zo,Player(7),"-lockcam",true)
call TriggerRegisterPlayerChatEvent(zo,Player(8),"-lockcam",true)
call TriggerRegisterPlayerChatEvent(zo,Player(9),"-lockcam",true)
call TriggerRegisterPlayerChatEvent(zo,Player(10),"-lockcam",true)
call TriggerRegisterPlayerChatEvent(zo,Player(11),"-lockcam",true)
call TriggerAddAction(zo,function gn)
set Zo=CreateTrigger()
call TriggerRegisterPlayerChatEvent(Zo,Player(0),"-unlockcam",true)
call TriggerRegisterPlayerChatEvent(Zo,Player(1),"-unlockcam",true)
call TriggerRegisterPlayerChatEvent(Zo,Player(2),"-unlockcam",true)
call TriggerRegisterPlayerChatEvent(Zo,Player(3),"-unlockcam",true)
call TriggerRegisterPlayerChatEvent(Zo,Player(4),"-unlockcam",true)
call TriggerRegisterPlayerChatEvent(Zo,Player(5),"-unlockcam",true)
call TriggerRegisterPlayerChatEvent(Zo,Player(6),"-unlockcam",true)
call TriggerRegisterPlayerChatEvent(Zo,Player(7),"-unlockcam",true)
call TriggerRegisterPlayerChatEvent(Zo,Player(8),"-unlockcam",true)
call TriggerRegisterPlayerChatEvent(Zo,Player(9),"-unlockcam",true)
call TriggerRegisterPlayerChatEvent(Zo,Player(10),"-unlockcam",true)
call TriggerRegisterPlayerChatEvent(Zo,Player(11),"-unlockcam",true)
call TriggerAddAction(Zo,function Gn)
set vr=CreateTrigger()
call TriggerRegisterPlayerChatEvent(vr,Player(0),"cam1",true)
call TriggerRegisterPlayerChatEvent(vr,Player(1),"cam1",true)
call TriggerRegisterPlayerChatEvent(vr,Player(2),"cam1",true)
call TriggerRegisterPlayerChatEvent(vr,Player(3),"cam1",true)
call TriggerRegisterPlayerChatEvent(vr,Player(4),"cam1",true)
call TriggerRegisterPlayerChatEvent(vr,Player(5),"cam1",true)
call TriggerRegisterPlayerChatEvent(vr,Player(6),"cam1",true)
call TriggerRegisterPlayerChatEvent(vr,Player(7),"cam1",true)
call TriggerRegisterPlayerChatEvent(vr,Player(8),"cam1",true)
call TriggerRegisterPlayerChatEvent(vr,Player(9),"cam1",true)
call TriggerRegisterPlayerChatEvent(vr,Player(10),"cam1",true)
call TriggerRegisterPlayerChatEvent(vr,Player(11),"cam1",true)
call TriggerAddAction(vr,function hn)
set er=CreateTrigger()
call TriggerRegisterPlayerChatEvent(er,Player(0),"cam2",true)
call TriggerRegisterPlayerChatEvent(er,Player(1),"cam2",true)
call TriggerRegisterPlayerChatEvent(er,Player(2),"cam2",true)
call TriggerRegisterPlayerChatEvent(er,Player(3),"cam2",true)
call TriggerRegisterPlayerChatEvent(er,Player(4),"cam2",true)
call TriggerRegisterPlayerChatEvent(er,Player(5),"cam2",true)
call TriggerRegisterPlayerChatEvent(er,Player(6),"cam2",true)
call TriggerRegisterPlayerChatEvent(er,Player(7),"cam2",true)
call TriggerRegisterPlayerChatEvent(er,Player(8),"cam2",true)
call TriggerRegisterPlayerChatEvent(er,Player(9),"cam2",true)
call TriggerRegisterPlayerChatEvent(er,Player(10),"cam2",true)
call TriggerRegisterPlayerChatEvent(er,Player(11),"cam2",true)
call TriggerAddAction(er,function Hn)
set xr=CreateTrigger()
call TriggerRegisterPlayerChatEvent(xr,Player(0),"cam3",true)
call TriggerRegisterPlayerChatEvent(xr,Player(1),"cam3",true)
call TriggerRegisterPlayerChatEvent(xr,Player(2),"cam3",true)
call TriggerRegisterPlayerChatEvent(xr,Player(3),"cam3",true)
call TriggerRegisterPlayerChatEvent(xr,Player(4),"cam3",true)
call TriggerRegisterPlayerChatEvent(xr,Player(5),"cam3",true)
call TriggerRegisterPlayerChatEvent(xr,Player(6),"cam3",true)
call TriggerRegisterPlayerChatEvent(xr,Player(7),"cam3",true)
call TriggerRegisterPlayerChatEvent(xr,Player(8),"cam3",true)
call TriggerRegisterPlayerChatEvent(xr,Player(9),"cam3",true)
call TriggerRegisterPlayerChatEvent(xr,Player(10),"cam3",true)
call TriggerRegisterPlayerChatEvent(xr,Player(11),"cam3",true)
call TriggerAddAction(xr,function jn)
set rr=CreateTrigger()
call TriggerRegisterPlayerChatEvent(rr,Player(0),"cam4",true)
call TriggerRegisterPlayerChatEvent(rr,Player(1),"cam4",true)
call TriggerRegisterPlayerChatEvent(rr,Player(2),"cam4",true)
call TriggerRegisterPlayerChatEvent(rr,Player(3),"cam4",true)
call TriggerRegisterPlayerChatEvent(rr,Player(4),"cam1",true)
call TriggerRegisterPlayerChatEvent(rr,Player(5),"cam4",true)
call TriggerRegisterPlayerChatEvent(rr,Player(6),"cam4",true)
call TriggerRegisterPlayerChatEvent(rr,Player(7),"cam4",true)
call TriggerRegisterPlayerChatEvent(rr,Player(8),"cam4",true)
call TriggerRegisterPlayerChatEvent(rr,Player(9),"cam4",true)
call TriggerRegisterPlayerChatEvent(rr,Player(10),"cam4",true)
call TriggerRegisterPlayerChatEvent(rr,Player(11),"cam4",true)
call TriggerAddAction(rr,function Jn)
set ir=CreateTrigger()
call TriggerRegisterPlayerChatEvent(ir,Player(0),"cam5",true)
call TriggerRegisterPlayerChatEvent(ir,Player(1),"cam5",true)
call TriggerRegisterPlayerChatEvent(ir,Player(2),"cam5",true)
call TriggerRegisterPlayerChatEvent(ir,Player(3),"cam5",true)
call TriggerRegisterPlayerChatEvent(ir,Player(4),"cam5",true)
call TriggerRegisterPlayerChatEvent(ir,Player(5),"cam5",true)
call TriggerRegisterPlayerChatEvent(ir,Player(6),"cam5",true)
call TriggerRegisterPlayerChatEvent(ir,Player(7),"cam5",true)
call TriggerRegisterPlayerChatEvent(ir,Player(8),"cam5",true)
call TriggerRegisterPlayerChatEvent(ir,Player(9),"cam5",true)
call TriggerRegisterPlayerChatEvent(ir,Player(10),"cam5",true)
call TriggerRegisterPlayerChatEvent(ir,Player(11),"cam5",true)
call TriggerAddAction(ir,function kn)
set ar=CreateTrigger()
call TriggerRegisterPlayerChatEvent(ar,Player(0),"cam6",true)
call TriggerRegisterPlayerChatEvent(ar,Player(1),"cam6",true)
call TriggerRegisterPlayerChatEvent(ar,Player(2),"cam6",true)
call TriggerRegisterPlayerChatEvent(ar,Player(3),"cam6",true)
call TriggerRegisterPlayerChatEvent(ar,Player(4),"cam6",true)
call TriggerRegisterPlayerChatEvent(ar,Player(5),"cam6",true)
call TriggerRegisterPlayerChatEvent(ar,Player(6),"cam6",true)
call TriggerRegisterPlayerChatEvent(ar,Player(7),"cam6",true)
call TriggerRegisterPlayerChatEvent(ar,Player(8),"cam6",true)
call TriggerRegisterPlayerChatEvent(ar,Player(9),"cam6",true)
call TriggerRegisterPlayerChatEvent(ar,Player(10),"cam6",true)
call TriggerRegisterPlayerChatEvent(ar,Player(11),"cam6",true)
call TriggerAddAction(ar,function Kn)
set nr=CreateTrigger()
call TriggerRegisterPlayerChatEvent(nr,Player(0),"cam7",true)
call TriggerRegisterPlayerChatEvent(nr,Player(1),"cam7",true)
call TriggerRegisterPlayerChatEvent(nr,Player(2),"cam7",true)
call TriggerRegisterPlayerChatEvent(nr,Player(3),"cam7",true)
call TriggerRegisterPlayerChatEvent(nr,Player(4),"cam7",true)
call TriggerRegisterPlayerChatEvent(nr,Player(5),"cam7",true)
call TriggerRegisterPlayerChatEvent(nr,Player(6),"cam7",true)
call TriggerRegisterPlayerChatEvent(nr,Player(7),"cam7",true)
call TriggerRegisterPlayerChatEvent(nr,Player(8),"cam7",true)
call TriggerRegisterPlayerChatEvent(nr,Player(9),"cam7",true)
call TriggerRegisterPlayerChatEvent(nr,Player(10),"cam7",true)
call TriggerRegisterPlayerChatEvent(nr,Player(11),"cam7",true)
call TriggerAddAction(nr,function Ln)
set Vr=CreateTrigger()
call TriggerRegisterPlayerChatEvent(Vr,Player(0),"reset",true)
call TriggerRegisterPlayerChatEvent(Vr,Player(1),"reset",true)
call TriggerRegisterPlayerChatEvent(Vr,Player(2),"reset",true)
call TriggerRegisterPlayerChatEvent(Vr,Player(3),"reset",true)
call TriggerRegisterPlayerChatEvent(Vr,Player(4),"reset",true)
call TriggerRegisterPlayerChatEvent(Vr,Player(5),"reset",true)
call TriggerRegisterPlayerChatEvent(Vr,Player(6),"reset",true)
call TriggerRegisterPlayerChatEvent(Vr,Player(7),"reset",true)
call TriggerRegisterPlayerChatEvent(Vr,Player(8),"reset",true)
call TriggerRegisterPlayerChatEvent(Vr,Player(9),"reset",true)
call TriggerRegisterPlayerChatEvent(Vr,Player(10),"reset",true)
call TriggerRegisterPlayerChatEvent(Vr,Player(11),"reset",true)
call TriggerAddAction(Vr,function mn)
set Er=CreateTrigger()
call TriggerAddAction(Er,function pn)
set Xr=CreateTrigger()
call TriggerAddAction(Xr,function Sn)
set Rr=CreateTrigger()
call TriggerRegisterDialogEvent(Rr,vv[3])
call TriggerAddAction(Rr,function un)
set Ir=CreateTrigger()
call TriggerRegisterDialogEvent(Ir,vv[4])
call TriggerAddAction(Ir,function zn)
set Ar=CreateTrigger()
call TriggerAddAction(Ar,function oV)
set Nr=CreateTrigger()
call TriggerRegisterDialogEvent(Nr,vv[5])
call TriggerAddAction(Nr,function aV)
set br=CreateTrigger()
call TriggerRegisterDialogEvent(br,vv[6])
call TriggerAddAction(br,function RV)
set Br=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(Br,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerAddCondition(Br,Condition(function IV))
call TriggerAddAction(Br,function pV)
set cr=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(cr,EVENT_PLAYER_UNIT_DROP_ITEM)
call TriggerAddCondition(cr,Condition(function PV))
call TriggerAddAction(cr,function zV)
set Cr=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(Cr,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(Cr,Condition(function ZV))
call TriggerAddAction(Cr,function HE)
set dr=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(dr,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(dr,Condition(function JE))
call TriggerAddAction(dr,function sE)
set Dr=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(Dr,.03)
call TriggerAddCondition(Dr,Condition(function SE))
call TriggerAddAction(Dr,function vI)
set fr=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(fr,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(fr,Condition(function eI))
call TriggerAddAction(fr,function VI)
set Fr=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(Fr,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(Fr,Condition(function XI))
call TriggerAddAction(Fr,function OI)
set gr=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gr,EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER)
call TriggerAddCondition(gr,Condition(function II))
call TriggerAddAction(gr,function DI)
set Gr=CreateTrigger()
call DisableTrigger(Gr)
call TriggerAddCondition(Gr,Condition(function FI))
call TriggerAddAction(Gr,function LI)
set hr=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(hr,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(hr,Condition(function MI))
call TriggerAddAction(hr,function QI)
set Hr=CreateTrigger()
call TriggerRegisterPlayerChatEvent(Hr,Player(0),"-lastping",true)
call TriggerRegisterPlayerChatEvent(Hr,Player(1),"-lastping",true)
call TriggerRegisterPlayerChatEvent(Hr,Player(2),"-lastping",true)
call TriggerRegisterPlayerChatEvent(Hr,Player(3),"-lastping",true)
call TriggerRegisterPlayerChatEvent(Hr,Player(4),"-lastping",true)
call TriggerRegisterPlayerChatEvent(Hr,Player(5),"-lastping",true)
call TriggerRegisterPlayerChatEvent(Hr,Player(6),"-lastping",true)
call TriggerRegisterPlayerChatEvent(Hr,Player(7),"-lastping",true)
call TriggerRegisterPlayerChatEvent(Hr,Player(8),"-lastping",true)
call TriggerRegisterPlayerChatEvent(Hr,Player(9),"-lastping",true)
call TriggerRegisterPlayerChatEvent(Hr,Player(10),"-lastping",true)
call TriggerRegisterPlayerChatEvent(Hr,Player(11),"-lastping",true)
call TriggerAddAction(Hr,function TI)
set jr=CreateTrigger()
call TriggerAddAction(jr,function uI)
set Jr=CreateTrigger()
call TriggerAddAction(Jr,function rA)
set kr=CreateTrigger()
call TriggerAddAction(kr,function mA)
set Kr=CreateTrigger()
call TriggerAddAction(Kr,function MA)
set lr=CreateTrigger()
call TriggerAddAction(lr,function tA)
set Lr=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(Lr,.5)
call TriggerAddAction(Lr,function BN)
set mr=CreateTrigger()
call TriggerRegisterEnterRectSimple(mr,wx)
call TriggerAddAction(mr,function FN)
set Mr=CreateTrigger()
call TriggerRegisterEnterRectSimple(Mr,Wx)
call TriggerAddAction(Mr,function JN)
set pr=CreateTrigger()
call TriggerAddAction(pr,function MN)
set Pr=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(Pr,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(Pr,Condition(function pN))
call TriggerAddAction(Pr,function yN)
set qr=CreateTrigger()
call TriggerAddAction(qr,function db)
set Qr=CreateTrigger()
call TriggerAddAction(Qr,function Jb)
set sr=CreateTrigger()
call TriggerRegisterLeaveRectSimple(sr,wx)
call TriggerRegisterLeaveRectSimple(sr,Wx)
call TriggerAddCondition(sr,Condition(function kb))
call TriggerAddAction(sr,function Lb)
set Sr=CreateTrigger()
call TriggerAddAction(Sr,function pb)
set tr=CreateTrigger()
call TriggerRegisterEnterRectSimple(tr,ux)
call TriggerRegisterEnterRectSimple(tr,Tx)
call TriggerRegisterEnterRectSimple(tr,tx)
call TriggerRegisterEnterRectSimple(tr,Ux)
call TriggerAddCondition(tr,Condition(function Pb))
call TriggerAddAction(tr,function qb)
set Tr=CreateTrigger()
call TriggerAddAction(Tr,function tb)
set ur=CreateTrigger()
call TriggerRegisterTimerExpireEvent(ur,Oe)
call TriggerAddCondition(ur,Condition(function Tb))
call TriggerAddAction(ur,function Yb)
set Ur=CreateTrigger()
call TriggerRegisterTimerEventSingle(Ur,.01)
call TriggerAddAction(Ur,function zb)
set wr=CreateTrigger()
call TriggerRegisterDialogEvent(wr,Ce[0])
call TriggerRegisterDialogEvent(wr,Ce[1])
call TriggerRegisterDialogEvent(wr,Ce[2])
call TriggerAddCondition(wr,Condition(function Zb))
call TriggerAddAction(wr,function KB)
set Wr=CreateTrigger()
call TriggerRegisterPlayerEventEndCinematic(Wr,Player(0))
call TriggerAddCondition(Wr,Condition(function lB))
call TriggerAddAction(Wr,function LB)
set yr=CreateTrigger()
call TriggerRegisterPlayerEventEndCinematic(yr,Player(6))
call TriggerAddCondition(yr,Condition(function mB))
call TriggerAddAction(yr,function MB)
set Yr=CreateTrigger()
call DisableTrigger(Yr)
call TriggerRegisterPlayerChatEvent(Yr,Player(0),"-swap",true)
call TriggerRegisterPlayerChatEvent(Yr,Player(6),"-swap",true)
call TriggerAddAction(Yr,function uB)
set zr=CreateTrigger()
call TriggerRegisterDialogEvent(zr,pe[0])
call TriggerAddAction(zr,function WB)
set Zr=CreateTrigger()
call TriggerRegisterDialogEvent(Zr,pe[1])
call TriggerAddAction(Zr,function YB)
set vi=CreateTrigger()
call TriggerRegisterDialogEvent(vi,pe[2])
call TriggerAddAction(vi,function vc)
set ei=CreateTrigger()
call TriggerRegisterDialogEvent(ei,pe[3])
call TriggerAddAction(ei,function xc)
set xi=CreateTrigger()
call TriggerAddAction(xi,function Oc)
set oi=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(oi,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(oi,Condition(function Rc))
call TriggerAddAction(oi,function Nc)
set ri=CreateTrigger()
call TriggerAddAction(ri,function bc)
set ii=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(ii,1.)
call TriggerAddAction(ii,function Cc)
set ai=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(ai,7.)
call TriggerAddAction(ai,function lc)
set ni=CreateTrigger()
call TriggerAddAction(ni,function qc)
set Vi=CreateTrigger()
call TriggerRegisterPlayerChatEvent(Vi,Player(0),"-plist",true)
call TriggerRegisterPlayerChatEvent(Vi,Player(6),"-plist",true)
call TriggerAddAction(Vi,function sc)
set Ei=CreateTrigger()
call DisableTrigger(Ei)
call TriggerRegisterPlayerChatEvent(Ei,Player(0),"-kick ",false)
call TriggerRegisterPlayerChatEvent(Ei,Player(6),"-kick ",false)
call TriggerAddAction(Ei,function AC)
set Xi=CreateTrigger()
call TriggerRegisterPlayerChatEvent(Xi,Player(0),"",true)
call TriggerRegisterPlayerChatEvent(Xi,Player(6),"",true)
call TriggerAddCondition(Xi,Condition(function bC))
call TriggerAddAction(Xi,function DC)
set Oi=CreateTrigger()
call TriggerAddCondition(Oi,Condition(function gC))
call TriggerAddAction(Oi,function GC)
set Ri=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(Ri,5.)
call TriggerAddAction(Ri,function hC)
call ConditionalTriggerExecute(lo)
call ConditionalTriggerExecute(jr)
endfunction
function config takes nothing returns nothing
call SetMapName("TRIGSTR_001")
call SetMapDescription("TRIGSTR_186")
call SetPlayers(12)
call SetTeams(12)
call SetGamePlacement(MAP_PLACEMENT_TEAMS_TOGETHER)
call DefineStartLocation(0,-384.,-192.)
call DefineStartLocation(1,-320.,-128.)
call DefineStartLocation(2,-256.,-64.)
call DefineStartLocation(3,-128.,-64.)
call DefineStartLocation(4,.0,-64.)
call DefineStartLocation(5,128.,-128.)
call DefineStartLocation(6,192.,-256.)
call DefineStartLocation(7,192.,-384.)
call DefineStartLocation(8,64.,-512.)
call DefineStartLocation(9,-64.,-512.)
call DefineStartLocation(10,-192.,-512.)
call DefineStartLocation(11,-320.,-384.)
call SetPlayerStartLocation(Player(0),0)
call ForcePlayerStartLocation(Player(0),0)
call SetPlayerColor(Player(0),ConvertPlayerColor(0))
call SetPlayerRacePreference(Player(0),RACE_PREF_HUMAN)
call SetPlayerRaceSelectable(Player(0),false)
call SetPlayerController(Player(0),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(1),1)
call ForcePlayerStartLocation(Player(1),1)
call SetPlayerColor(Player(1),ConvertPlayerColor(1))
call SetPlayerRacePreference(Player(1),RACE_PREF_HUMAN)
call SetPlayerRaceSelectable(Player(1),false)
call SetPlayerController(Player(1),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(2),2)
call ForcePlayerStartLocation(Player(2),2)
call SetPlayerColor(Player(2),ConvertPlayerColor(2))
call SetPlayerRacePreference(Player(2),RACE_PREF_HUMAN)
call SetPlayerRaceSelectable(Player(2),false)
call SetPlayerController(Player(2),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(3),3)
call ForcePlayerStartLocation(Player(3),3)
call SetPlayerColor(Player(3),ConvertPlayerColor(3))
call SetPlayerRacePreference(Player(3),RACE_PREF_HUMAN)
call SetPlayerRaceSelectable(Player(3),false)
call SetPlayerController(Player(3),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(4),4)
call ForcePlayerStartLocation(Player(4),4)
call SetPlayerColor(Player(4),ConvertPlayerColor(4))
call SetPlayerRacePreference(Player(4),RACE_PREF_HUMAN)
call SetPlayerRaceSelectable(Player(4),false)
call SetPlayerController(Player(4),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(5),5)
call ForcePlayerStartLocation(Player(5),5)
call SetPlayerColor(Player(5),ConvertPlayerColor(5))
call SetPlayerRacePreference(Player(5),RACE_PREF_HUMAN)
call SetPlayerRaceSelectable(Player(5),false)
call SetPlayerController(Player(5),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(6),6)
call ForcePlayerStartLocation(Player(6),6)
call SetPlayerColor(Player(6),ConvertPlayerColor(6))
call SetPlayerRacePreference(Player(6),RACE_PREF_HUMAN)
call SetPlayerRaceSelectable(Player(6),false)
call SetPlayerController(Player(6),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(7),7)
call ForcePlayerStartLocation(Player(7),7)
call SetPlayerColor(Player(7),ConvertPlayerColor(7))
call SetPlayerRacePreference(Player(7),RACE_PREF_HUMAN)
call SetPlayerRaceSelectable(Player(7),false)
call SetPlayerController(Player(7),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(8),8)
call ForcePlayerStartLocation(Player(8),8)
call SetPlayerColor(Player(8),ConvertPlayerColor(8))
call SetPlayerRacePreference(Player(8),RACE_PREF_HUMAN)
call SetPlayerRaceSelectable(Player(8),false)
call SetPlayerController(Player(8),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(9),9)
call ForcePlayerStartLocation(Player(9),9)
call SetPlayerColor(Player(9),ConvertPlayerColor(9))
call SetPlayerRacePreference(Player(9),RACE_PREF_HUMAN)
call SetPlayerRaceSelectable(Player(9),false)
call SetPlayerController(Player(9),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(10),10)
call ForcePlayerStartLocation(Player(10),10)
call SetPlayerColor(Player(10),ConvertPlayerColor(10))
call SetPlayerRacePreference(Player(10),RACE_PREF_HUMAN)
call SetPlayerRaceSelectable(Player(10),false)
call SetPlayerController(Player(10),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(11),11)
call ForcePlayerStartLocation(Player(11),11)
call SetPlayerColor(Player(11),ConvertPlayerColor(11))
call SetPlayerRacePreference(Player(11),RACE_PREF_HUMAN)
call SetPlayerRaceSelectable(Player(11),false)
call SetPlayerController(Player(11),MAP_CONTROL_USER)
call InitCustomTeams()
call SetStartLocPrioCount(0,1)
call SetStartLocPrio(0,0,1,MAP_LOC_PRIO_HIGH)
call SetStartLocPrioCount(1,2)
call SetStartLocPrio(1,0,0,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(1,1,2,MAP_LOC_PRIO_HIGH)
call SetStartLocPrioCount(2,2)
call SetStartLocPrio(2,0,1,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(2,1,3,MAP_LOC_PRIO_LOW)
call SetStartLocPrioCount(3,2)
call SetStartLocPrio(3,0,2,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(3,1,4,MAP_LOC_PRIO_HIGH)
call SetStartLocPrioCount(4,2)
call SetStartLocPrio(4,0,3,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(4,1,5,MAP_LOC_PRIO_HIGH)
call SetStartLocPrioCount(5,2)
call SetStartLocPrio(5,0,4,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(5,1,6,MAP_LOC_PRIO_HIGH)
call SetStartLocPrioCount(6,2)
call SetStartLocPrio(6,0,5,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(6,1,7,MAP_LOC_PRIO_HIGH)
call SetStartLocPrioCount(7,2)
call SetStartLocPrio(7,0,6,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(7,1,8,MAP_LOC_PRIO_LOW)
call SetStartLocPrioCount(8,2)
call SetStartLocPrio(8,0,7,MAP_LOC_PRIO_LOW)
call SetStartLocPrio(8,1,9,MAP_LOC_PRIO_HIGH)
call SetStartLocPrioCount(9,2)
call SetStartLocPrio(9,0,8,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(9,1,10,MAP_LOC_PRIO_HIGH)
call SetStartLocPrioCount(10,2)
call SetStartLocPrio(10,0,9,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(10,1,11,MAP_LOC_PRIO_LOW)
call SetStartLocPrioCount(11,3)
call SetStartLocPrio(11,0,0,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(11,1,1,MAP_LOC_PRIO_LOW)
call SetStartLocPrio(11,2,10,MAP_LOC_PRIO_HIGH)
endfunction