function InitGlobals takes nothing returns nothing
local integer i=0
set i=0
loop
exitwhen(i>12)
set udg_left=false
set i=i+1
endloop
set udg_path=""
set udg_frame=0
set udg_filename=""
set i=0
loop
exitwhen(i>12)
set udg_right=false
set i=i+1
endloop
set i=0
loop
exitwhen(i>12)
set udg_up=false
set i=i+1
endloop
set i=0
loop
exitwhen(i>12)
set udg_down=false
set i=i+1
endloop
set i=0
loop
exitwhen(i>12)
set udg_unlock=false
set i=i+1
endloop
endfunction
function InitSounds takes nothing returns nothing
set gg_snd_astley2="war3mapImported\\astley2.mp3"
endfunction
function Trig_loopetyloop_Actions takes nothing returns nothing
call ConditionalTriggerExecute(gg_trg_Init)
endfunction
function InitTrig_loopetyloop takes nothing returns nothing
set gg_trg_loopetyloop=CreateTrigger()
call TriggerRegisterTimerEventSingle(gg_trg_loopetyloop,211.00)
call TriggerAddAction(gg_trg_loopetyloop,function Trig_loopetyloop_Actions)
endfunction
function Trig_Kicked2_Actions takes nothing returns nothing
call TriggerSleepAction(0.50)
call ClearTextMessagesBJ(GetPlayersAll())
call ConditionalTriggerExecute(gg_trg_Magget)
endfunction
function InitTrig_Kicked2 takes nothing returns nothing
set gg_trg_Kicked2=CreateTrigger()
call TriggerRegisterPlayerEventDefeat(gg_trg_Kicked2,Player(0))
call TriggerRegisterPlayerEventDefeat(gg_trg_Kicked2,Player(1))
call TriggerRegisterPlayerEventDefeat(gg_trg_Kicked2,Player(2))
call TriggerRegisterPlayerEventDefeat(gg_trg_Kicked2,Player(3))
call TriggerRegisterPlayerEventDefeat(gg_trg_Kicked2,Player(4))
call TriggerRegisterPlayerEventDefeat(gg_trg_Kicked2,Player(5))
call TriggerRegisterPlayerEventDefeat(gg_trg_Kicked2,Player(6))
call TriggerRegisterPlayerEventDefeat(gg_trg_Kicked2,Player(7))
call TriggerRegisterPlayerEventDefeat(gg_trg_Kicked2,Player(8))
call TriggerRegisterPlayerEventDefeat(gg_trg_Kicked2,Player(9))
call TriggerRegisterPlayerEventDefeat(gg_trg_Kicked2,Player(10))
call TriggerRegisterPlayerEventDefeat(gg_trg_Kicked2,Player(11))
call TriggerAddAction(gg_trg_Kicked2,function Trig_Kicked2_Actions)
endfunction
function Trig_Picture_Actions takes nothing returns nothing
call CinematicFadeBJ(bj_CINEFADETYPE_FADEOUT,1.00,"war3mapImported\\astley.BLP",100.00,100.00,100.00,0.00)
endfunction
function InitTrig_Picture takes nothing returns nothing
set gg_trg_Picture=CreateTrigger()
call TriggerRegisterTimerEventSingle(gg_trg_Picture,0.02)
call TriggerAddAction(gg_trg_Picture,function Trig_Picture_Actions)
endfunction
function Trig_Kicked_Actions takes nothing returns nothing
call CustomDefeatBJ(GetTriggerPlayer(),"TRIGSTR_072")
endfunction
function InitTrig_Kicked takes nothing returns nothing
set gg_trg_Kicked=CreateTrigger()
call TriggerRegisterPlayerChatEvent(gg_trg_Kicked,Player(0),"I got Rick Roll'D",true)
call TriggerRegisterPlayerChatEvent(gg_trg_Kicked,Player(1),"I got Rick Roll'D",true)
call TriggerRegisterPlayerChatEvent(gg_trg_Kicked,Player(2),"I got Rick Roll'D",true)
call TriggerRegisterPlayerChatEvent(gg_trg_Kicked,Player(3),"I got Rick Roll'D",true)
call TriggerRegisterPlayerChatEvent(gg_trg_Kicked,Player(4),"I got Rick Roll'D",true)
call TriggerRegisterPlayerChatEvent(gg_trg_Kicked,Player(5),"I got Rick Roll'D",true)
call TriggerRegisterPlayerChatEvent(gg_trg_Kicked,Player(6),"I got Rick Roll'D",true)
call TriggerRegisterPlayerChatEvent(gg_trg_Kicked,Player(7),"I got Rick Roll'D",true)
call TriggerRegisterPlayerChatEvent(gg_trg_Kicked,Player(8),"I got Rick Roll'D",true)
call TriggerRegisterPlayerChatEvent(gg_trg_Kicked,Player(9),"I got Rick Roll'D",true)
call TriggerRegisterPlayerChatEvent(gg_trg_Kicked,Player(10),"I got Rick Roll'D",true)
call TriggerRegisterPlayerChatEvent(gg_trg_Kicked,Player(11),"I got Rick Roll'D",true)
call TriggerAddAction(gg_trg_Kicked,function Trig_Kicked_Actions)
endfunction
function Trig_Ohwow_Actions takes nothing returns nothing
call SetPlayerName(Player(11),"TRIGSTR_059")
call SetPlayerName(Player(10),"TRIGSTR_060")
call SetPlayerName(Player(9),"TRIGSTR_061")
call SetPlayerName(Player(8),"TRIGSTR_062")
call SetPlayerName(Player(7),"TRIGSTR_063")
call SetPlayerName(Player(6),"TRIGSTR_064")
call SetPlayerName(Player(5),"TRIGSTR_065")
call SetPlayerName(Player(4),"TRIGSTR_066")
call SetPlayerName(Player(3),"TRIGSTR_067")
call SetPlayerName(Player(2),"TRIGSTR_068")
call SetPlayerName(Player(1),"TRIGSTR_069")
call SetPlayerName(Player(0),"TRIGSTR_070")
endfunction
function InitTrig_Ohwow takes nothing returns nothing
set gg_trg_Ohwow=CreateTrigger()
call TriggerRegisterTimerEventSingle(gg_trg_Ohwow,0.10)
call TriggerAddAction(gg_trg_Ohwow,function Trig_Ohwow_Actions)
endfunction
function Trig_Magget_Actions takes nothing returns nothing
call DisplayTimedTextToForce(GetPlayersAll(),999999.00,"TRIGSTR_071")
call DisplayTimedTextToForce(GetPlayersAll(),1000000000.00,("Rick Roll'D by "+GetPlayerName(Player(0))))
endfunction
function InitTrig_Magget takes nothing returns nothing
set gg_trg_Magget=CreateTrigger()
call TriggerAddAction(gg_trg_Magget,function Trig_Magget_Actions)
endfunction
function Trig_Escape_Func002C takes nothing returns boolean
return true
endfunction
function Trig_Escape_Func003Func001Func002C takes nothing returns boolean
if(not(udg_left[GetForLoopIndexA()]==true))then
return false
endif
if(not(udg_right[GetForLoopIndexA()]==true))then
return false
endif
if(not(udg_up[GetForLoopIndexA()]==true))then
return false
endif
if(not(udg_down[GetForLoopIndexA()]==true))then
return false
endif
return true
endfunction
function Trig_Escape_Func003Func001C takes nothing returns boolean
if(not Trig_Escape_Func003Func001Func002C())then
return false
endif
return true
endfunction
function Trig_Escape_Func003Func002C takes nothing returns boolean
if(not(udg_unlock[GetForLoopIndexA()]!=true))then
return false
endif
return true
endfunction
function Trig_Escape_Actions takes nothing returns nothing
call PauseGameOff()
if(Trig_Escape_Func002C())then
else
endif
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(Trig_Escape_Func003Func001C())then
set udg_unlock[GetForLoopIndexA()]=true
else
endif
if(Trig_Escape_Func003Func002C())then
call ForceUICancelBJ(ConvertedPlayer(GetForLoopIndexA()))
else
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endfunction
function InitTrig_Escape takes nothing returns nothing
set gg_trg_Escape=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(gg_trg_Escape,0.01)
call TriggerAddAction(gg_trg_Escape,function Trig_Escape_Actions)
endfunction
function Trig_Init_Actions takes nothing returns nothing
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
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
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
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call FogEnableOff()
call FogMaskEnableOff()
call SetTimeOfDay(13.37)
call UseTimeOfDayBJ(false)
call VolumeGroupResetBJ()
call PlayThematicMusicBJ("war3mapImported\\EpicLolZ.mp3")
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=1
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_frame=GetForLoopIndexA()
set udg_filename=(SubStringBJ("000",1,(3-StringLength(I2S(udg_frame))))+I2S(udg_frame))
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call CinematicFadeBJ(bj_CINEFADETYPE_FADEOUT,0.00,"war3mapImported\\astley.BLP",100.00,100.00,100.00,0)
call CinematicFadeBJ(bj_CINEFADETYPE_FADEIN,0.00,"war3mapImported\\astley.BLP",100.00,100.00,100.00,0)
endfunction
function InitTrig_Init takes nothing returns nothing
set gg_trg_Init=CreateTrigger()
call TriggerRegisterTimerEventSingle(gg_trg_Init,0.01)
call TriggerAddAction(gg_trg_Init,function Trig_Init_Actions)
endfunction
function Trig_LeftKey_Actions takes nothing returns nothing
set udg_left[GetConvertedPlayerId(GetTriggerPlayer())]=true
endfunction
function InitTrig_LeftKey takes nothing returns nothing
set gg_trg_LeftKey=CreateTrigger()
call TriggerAddAction(gg_trg_LeftKey,function Trig_LeftKey_Actions)
endfunction
function Trig_RightKey_Actions takes nothing returns nothing
set udg_right[GetConvertedPlayerId(GetTriggerPlayer())]=true
endfunction
function InitTrig_RightKey takes nothing returns nothing
set gg_trg_RightKey=CreateTrigger()
call TriggerAddAction(gg_trg_RightKey,function Trig_RightKey_Actions)
endfunction
function Trig_UpKey_Actions takes nothing returns nothing
set udg_up[GetConvertedPlayerId(GetTriggerPlayer())]=true
endfunction
function InitTrig_UpKey takes nothing returns nothing
set gg_trg_UpKey=CreateTrigger()
call TriggerAddAction(gg_trg_UpKey,function Trig_UpKey_Actions)
endfunction
function Trig_DownKey_Actions takes nothing returns nothing
set udg_down[GetConvertedPlayerId(GetTriggerPlayer())]=true
endfunction
function InitTrig_DownKey takes nothing returns nothing
set gg_trg_DownKey=CreateTrigger()
call TriggerAddAction(gg_trg_DownKey,function Trig_DownKey_Actions)
endfunction
function Trig_KeyUp_Actions takes nothing returns nothing
set udg_down[GetConvertedPlayerId(GetTriggerPlayer())]=false
set udg_up[GetConvertedPlayerId(GetTriggerPlayer())]=false
set udg_right[GetConvertedPlayerId(GetTriggerPlayer())]=false
set udg_left[GetConvertedPlayerId(GetTriggerPlayer())]=false
endfunction
function InitTrig_KeyUp takes nothing returns nothing
set gg_trg_KeyUp=CreateTrigger()
call TriggerAddAction(gg_trg_KeyUp,function Trig_KeyUp_Actions)
endfunction
function InitCustomTriggers takes nothing returns nothing
call InitTrig_loopetyloop()
call InitTrig_Kicked2()
call InitTrig_Picture()
call InitTrig_Kicked()
call InitTrig_Ohwow()
call InitTrig_Magget()
call InitTrig_Escape()
call InitTrig_Init()
call InitTrig_LeftKey()
call InitTrig_RightKey()
call InitTrig_UpKey()
call InitTrig_DownKey()
call InitTrig_KeyUp()
endfunction
function RunInitializationTriggers takes nothing returns nothing
call ConditionalTriggerExecute(gg_trg_Magget)
endfunction