function RemoveUnitX takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function BazookaExplosion takes location where returns nothing
local unit explode
call TriggerSleepAction(0.75)
set explode = CreateUnitAtLoc(Player(11), 'u009', where, 0.00)
call TriggerSleepAction(3.00)
call RemoveUnit(explode)
call RemoveLocation(where)
set explode = null
endfunction
function PolarProjectionX takes real x, real dist, real angle returns real
return x + dist * Cos(Deg2Rad(angle))
endfunction
function PolarProjectionY takes real y, real dist, real angle returns real
return y + dist * Sin(Deg2Rad(angle))
endfunction
function SpawnMove takes location spawn, location move, integer id returns nothing
local unit specimen = CreateUnitAtLoc(Player(11), id, spawn, 0.00)
call IssuePointOrderLoc(specimen, "move", move)
call RemoveLocation(spawn)
call RemoveLocation(move)
set specimen = null
set spawn = null
set move = null
endfunction
function RemoveDestructible takes nothing returns nothing
call RemoveDestructable(GetEnumDestructable())
endfunction
Name | Type | is_array | initial_value |
AAssasin | unit | Yes | |
AbleToRev | boolean | Yes | false |
ArrivalEffect | effect | Yes | |
ArrivalEffect1 | effect | Yes | |
B_Interruption | boolean | Yes | |
BH | unit | Yes | |
boosting | group | No | |
CheckPointGroup | group | No | |
CheckPointPoint | location | No | |
CurrentMine | unit | No | |
Deceiver | unit | No | |
defeat | group | No | |
Dialog | dialog | No | |
Dialogbutton1 | button | Yes | |
Dialogbutton2 | button | Yes | |
DutchmanTimer | timer | No | |
Effect | effect | No | |
EffectoP | location | No | |
EffectPoint | location | No | |
Escaper | unit | Yes | |
FaceTimer | timer | No | |
HelpItem | item | No | |
HoleTimer | timer | No | |
IntoGame | boolean | Yes | |
KeyPlayer | player | No | |
lagangle | real | No | |
laganglel | real | No | |
lagsubtract | real | No | 4.00 |
LaunchWispPoint | location | No | |
leaveout | group | No | |
LevelGroup | group | No | |
LeverDead | boolean | Yes | |
lives | integer | Yes | 9999 |
LP | location | No | |
LP2 | location | No | |
Lv5SoulKeep | unit | No | |
Lvlup | integer | No | |
MB_targ | unit | No | |
MB_TempPoint | location | No | |
Mechanism | item | Yes | |
MechanismPointX | real | Yes | |
MechanismPointY | real | Yes | |
MechPoint | location | No | |
MoveInt | integer | No | |
MovePoint | location | No | |
MoveTimer | timer | No | |
MovieDialog | dialog | No | |
MultiBoardTimer | timer | No | |
ObstacleTimer | timer | No | |
pathtimer | timer | No | |
PatrolTimer | timer | No | |
players | force | No | |
Pod | unit | No | |
PodGroup | group | No | |
PodTimer | timer | No | |
Point | location | No | |
Pointt | location | No | |
PrePoint | location | No | |
PTime | boolean | No | |
revive | boolean | No | |
revivespot | location | No | |
SBTimer | timer | No | |
SC2 | location | No | |
SCPoint | location | No | |
SCTimer | timer | No | |
SCU2 | location | No | |
SCUPoint | location | No | |
SecretMachine | item | No | |
ShootingPoint | location | Yes | |
ShootWTimer | timer | No | |
shot | location | Yes | |
shot1 | location | Yes | |
shot2 | location | Yes | |
shot3 | location | Yes | |
ShotPoint | location | No | |
Skip | integer | No | |
SkipButton | button | Yes | |
SlideTimer | timer | No | |
SP | location | No | |
SP2 | location | No | |
Spawning | timer | No | |
SpecialPoint | location | No | |
SpinTimer | timer | No | |
spit | unit | No | |
spit1 | player | No | |
SPP | location | No | |
SquarePoint | location | No | |
SquarePoint2 | location | No | |
Stop | boolean | No | |
SubTimer | timer | No | |
TankMovePoint | location | Yes | |
TankSpawnPoint | location | Yes | |
TeleportPoint | location | No | |
TempInteger1 | integer | No | |
TempMage | unit | No | |
TempMovePoint | location | Yes | |
TempPathPoint | location | No | |
tempPoint | location | No | |
TempPoint1 | location | No | |
TempPoint2 | location | No | |
TempPoint3 | location | No | |
TempPoint4 | location | No | |
TempPoint5 | location | No | |
TempPoint6 | location | No | |
Temppointt | location | No | |
TempUnitGroup | group | No | |
TerrainMoveTimer | timer | No | |
TerrainPoint | location | No | |
TerrainPointt | location | No | |
TerrainTimer | timer | No | |
Time | real | No | |
Timer | timer | No | |
TimeTilTele | timer | No | |
TMP | location | No | |
TPPoint | location | No | |
TTerrainTimer | timer | No | |
VCTimer | timer | No | |
WheelMove | location | No | |
WheelTimer | timer | No | |
WheelTimer2 | timer | No | |
wheretospit | location | No | |
WHTelePoint | location | No |
function Trig_Set1_Func009A takes nothing returns nothing
call SetUnitPathing(GetEnumUnit(), false)
endfunction
function Trig_Set1_Func008A takes nothing returns nothing
call SetUnitOwner( GetEnumUnit(), Player(11), true )
endfunction
function Trig_Set1_Actions takes nothing returns nothing
local group all = CreateGroup()
call PauseUnit(gg_unit_ebal_0118, true)
call GroupEnumUnitsInRect(all, GetPlayableMapRect(), null)
call ForGroup(all, function Trig_Set1_Func009A)
call DestroyGroup(all)
call SetUnitUserData(gg_unit_u003_0156, 0)
set all = GetUnitsOfPlayerAll(Player(10))
call ForGroup(all, function Trig_Set1_Func008A)
call DestroyGroup(all)
set all = null
set udg_players = GetPlayersAll()
set udg_defeat = GetUnitsOfTypeIdAll('Hmkg')
set udg_revivespot = GetRectCenter(gg_rct_current)
call CreateQuestBJ( bj_QUESTTYPE_REQ_DISCOVERED, "TRIGSTR_132", "TRIGSTR_144", "war3mapPreview.tga" )
call CreateQuestBJ( bj_QUESTTYPE_REQ_DISCOVERED, "TRIGSTR_134", "TRIGSTR_145", "ReplaceableTextures\\CommandButtons\\BTNLoadDwarf.blp" )
call CreateQuestBJ( bj_QUESTTYPE_REQ_DISCOVERED, "TRIGSTR_136", "TRIGSTR_146", "ReplaceableTextures\\CommandButtons\\BTNSentryWard.blp" )
call CreateQuestBJ( bj_QUESTTYPE_REQ_DISCOVERED, "TRIGSTR_339", "TRIGSTR_340", "ReplaceableTextures\\WorldEditUI\\Doodad-Cinematic.blp" )
call CreateQuestBJ( bj_QUESTTYPE_REQ_DISCOVERED, "TRIGSTR_542", "TRIGSTR_543", "ReplaceableTextures\\CommandButtons\\BTNAnimateDead.blp" )
endfunction
//===========================================================================
function InitTrig_Set1 takes nothing returns nothing
set gg_trg_Set1 = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Set1, 0.50 )
call TriggerAddAction( gg_trg_Set1, function Trig_Set1_Actions )
endfunction
function Trig_Set2_Func001A takes nothing returns nothing
if GetItemTypeId(GetEnumItem()) == 'I000' then
set udg_TempInteger1 = udg_TempInteger1 + 1
set udg_Mechanism[udg_TempInteger1] = GetEnumItem()
set udg_MechanismPointX[udg_TempInteger1] = GetItemX(GetEnumItem())
set udg_MechanismPointY[udg_TempInteger1] = GetItemY(GetEnumItem())
else
endif
endfunction
function Trig_Set2_Func002Func002002 takes nothing returns nothing
call CustomDefeatBJ( GetEnumPlayer(), "TRIGSTR_355" )
endfunction
function Trig_Set2_Func002Func003C takes nothing returns boolean
if ( ( GetPlayerSlotState(Player(1)) == PLAYER_SLOT_STATE_EMPTY ) ) then
return true
endif
if ( ( GetPlayerSlotState(Player(0)) == PLAYER_SLOT_STATE_EMPTY ) ) then
return true
endif
if ( ( GetPlayerController(Player(0)) != MAP_CONTROL_USER ) ) then
return true
endif
if ( ( GetPlayerController(Player(1)) != MAP_CONTROL_USER ) ) then
return true
endif
return false
endfunction
function Trig_Set2_Func002C takes nothing returns boolean
if ( not ( udg_Stop == false ) ) then
return false
endif
if ( not Trig_Set2_Func002Func003C() ) then
return false
endif
return true
endfunction
function Trig_Set2_Actions takes nothing returns nothing
call EnumItemsInRectBJ( GetPlayableMapRect(), function Trig_Set2_Func001A )
if ( Trig_Set2_Func002C() ) then
call ForForce( GetPlayersAll(), function Trig_Set2_Func002Func002002 )
else
endif
call StopMusicBJ( false )
call PlayMusicBJ( gg_snd_Mainscreen )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_193" )
call FogMaskEnableOn( )
call FogEnableOff( )
endfunction
//===========================================================================
function InitTrig_Set2 takes nothing returns nothing
set gg_trg_Set2 = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Set2, 2.00 )
call TriggerAddAction( gg_trg_Set2, function Trig_Set2_Actions )
endfunction
function Trig_RemoveUnused_Actions takes nothing returns nothing
local group removing = CreateGroup()
if IsTriggerEnabled(gg_trg_BeginningIntro) == false then
call GroupEnumUnitsInRect(removing, gg_rct_Remove, null)
call ForGroup(removing, function RemoveUnitX)
else
endif
call DestroyGroup(removing)
set removing = null
endfunction
//===========================================================================
function InitTrig_RemoveUnused takes nothing returns nothing
set gg_trg_RemoveUnused = CreateTrigger( )
call TriggerAddAction( gg_trg_RemoveUnused, function Trig_RemoveUnused_Actions )
endfunction
function Trig_DeathEffect_Func002C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'nvk2' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'nvlw' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'nvl2' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'nvil' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'zmar' ) ) then
return true
endif
return false
endfunction
function Trig_DeathEffect_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) != 'nvlk' ) ) then
return false
endif
if ( not Trig_DeathEffect_Func002C() ) then
return false
endif
return true
endfunction
function Trig_DeathEffect_Actions takes nothing returns nothing
local location argh = GetUnitLoc(GetTriggerUnit())
local effect ouchies
set ouchies = AddSpecialEffectLoc("Objects\\Spawnmodels\\Undead\\UndeadDissipate\\UndeadDissipate.mdl", argh)
call TriggerSleepAction( 1.00 )
call DestroyEffect(ouchies)
call RemoveLocation(argh)
set ouchies = null
set argh = null
endfunction
//===========================================================================
function InitTrig_DeathEffect takes nothing returns nothing
set gg_trg_DeathEffect = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_DeathEffect, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_DeathEffect, Condition( function Trig_DeathEffect_Conditions ) )
call TriggerAddAction( gg_trg_DeathEffect, function Trig_DeathEffect_Actions )
endfunction
function Trig_DE2_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'Udea' ) ) then
return false
endif
return true
endfunction
function Trig_DE2_Actions takes nothing returns nothing
local location deathlyhallow = GetUnitLoc(GetTriggerUnit())
local effect ffect = AddSpecialEffectLoc("Abilities\\Spells\\Human\\Resurrect\\ResurrectTarget.mdl", deathlyhallow)
call RemoveLocation(deathlyhallow)
call TriggerSleepAction(1.00)
call DestroyEffect(ffect)
set ffect = null
set deathlyhallow = null
endfunction
//===========================================================================
function InitTrig_DE2 takes nothing returns nothing
set gg_trg_DE2 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_DE2, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_DE2, Condition( function Trig_DE2_Conditions ) )
call TriggerAddAction( gg_trg_DE2, function Trig_DE2_Actions )
endfunction
function Trig_CreateEscaper_Actions takes nothing returns nothing
local location creation = GetRectCenter(gg_rct_Id)
if udg_AbleToRev[GetConvertedPlayerId(GetTriggerPlayer())] != true then
set udg_AbleToRev[GetConvertedPlayerId(GetTriggerPlayer())] = true
set udg_Escaper[GetConvertedPlayerId(GetTriggerPlayer())] = CreateUnitAtLoc(GetTriggerPlayer(), 'Hmkg', creation, 0.00)
call UnitAddItemById(udg_Escaper[GetConvertedPlayerId(GetTriggerPlayer())], 'azhr')
call AdjustPlayerStateBJ(1, GetTriggerPlayer(), PLAYER_STATE_RESOURCE_LUMBER)
call DisplayTextToForce(GetPlayersAll(), "|cff32cd32" + GetPlayerName(GetTriggerPlayer()) + ", good to have you here with us today!|r")
call GroupAddUnit(udg_defeat, udg_Escaper[GetConvertedPlayerId(GetTriggerPlayer())])
call DisplayTextToPlayer(GetTriggerPlayer(), 0, 0, "|cffffcc00You can buy items in the two shops on top left and right.(Honor points (+) required)|r")
else
call DisplayTextToPlayer(GetTriggerPlayer(), 0, 0, "|cffff0000You already have already entered the game..|r")
endif
call RemoveLocation(creation)
set creation = null
endfunction
//===========================================================================
function InitTrig_CreateEscaper takes nothing returns nothing
set gg_trg_CreateEscaper = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_CreateEscaper, Player(0), "-entergame", true )
call TriggerRegisterPlayerChatEvent( gg_trg_CreateEscaper, Player(1), "-entergame", true )
call TriggerRegisterPlayerChatEvent( gg_trg_CreateEscaper, Player(2), "-entergame", true )
call TriggerRegisterPlayerChatEvent( gg_trg_CreateEscaper, Player(3), "-entergame", true )
call TriggerRegisterPlayerChatEvent( gg_trg_CreateEscaper, Player(4), "-entergame", true )
call TriggerRegisterPlayerChatEvent( gg_trg_CreateEscaper, Player(5), "-entergame", true )
call TriggerRegisterPlayerChatEvent( gg_trg_CreateEscaper, Player(6), "-entergame", true )
call TriggerRegisterPlayerChatEvent( gg_trg_CreateEscaper, Player(7), "-entergame", true )
call TriggerRegisterPlayerChatEvent( gg_trg_CreateEscaper, Player(8), "-entergame", true )
call TriggerRegisterPlayerChatEvent( gg_trg_CreateEscaper, Player(9), "-entergame", true )
call TriggerAddAction( gg_trg_CreateEscaper, function Trig_CreateEscaper_Actions )
endfunction
function Trig_CreatingEscapers_Actions takes nothing returns nothing
set udg_Escaper[1] = gg_unit_Hmkg_0012
set udg_AbleToRev[1] = true
call AdjustPlayerStateBJ(1, Player(0), PLAYER_STATE_RESOURCE_LUMBER)
set udg_Escaper[2] = gg_unit_Hmkg_0013
call AdjustPlayerStateBJ(1, Player(1), PLAYER_STATE_RESOURCE_LUMBER)
set udg_AbleToRev[2] = true
endfunction
//===========================================================================
function InitTrig_CreatingEscapersInit takes nothing returns nothing
set gg_trg_CreatingEscapersInit = CreateTrigger( )
call TriggerAddAction( gg_trg_CreatingEscapersInit, function Trig_CreatingEscapers_Actions )
endfunction
function Trig_Lvl1_Actions takes nothing returns nothing
local location float = GetRectCenter(gg_rct_Text)
local group wisp = CreateGroup()
local real loopx
local real loopy
local unit looping
call GroupEnumUnitsInRect(wisp , gg_rct_Grouping, null)
loop
set looping = FirstOfGroup(wisp)
exitwhen looping == null
set loopx = PolarProjectionX(GetUnitX(looping), 900.00, 0.00)
set loopy = PolarProjectionY(GetUnitY(looping), 900.00, 0.00)
call IssuePointOrder(looping, "patrol", loopx, loopy)
call GroupRemoveUnit(wisp, looping)
endloop
call DestroyGroup(wisp)
call DisplayTextToForce(GetPlayersAll(), "|cffff0000TYPE -entergame TO BEGIN PLAYING NOW!")
call TimerStart(udg_ShootWTimer, 5.00, false, null)
call CreateTextTagLocBJ("|cff32cd32Type -entergame to begin.", float, 0.00, 10.00, 0.00, 100.00, 0.00, 0.00)
call RemoveLocation(float)
set float = GetRectCenter(gg_rct_TrainingAreaBL)
call CreateTextTagLocBJ("|cffffcc00Maze Training Area 1", float, 0.00, 10.00, 0.00, 100.00, 0.00, 0.00)
call RemoveLocation(float)
set float = GetRectCenter(gg_rct_TeleToGame)
call CreateTextTagLocBJ("|cffcd0000Teleport To The Game", float, 0.00, 10.00, 0.00, 100.00, 0.00, 0.00)
call RemoveLocation(float)
set float = GetRectCenter(gg_rct_HowToBack)
call CreateTextTagLocBJ("|cffffcc00Type -base to get back here.", float, 0.00, 10.00, 0.00, 100.00, 0.00, 0.00)
call RemoveLocation(float)
set float = GetRectCenter(gg_rct_ExplainAoeDamage)
call CreateTextTagLocBJ("|cffffcc00Use decoys to asplode mines, but mines do aoe dmg upon death.|r", float, 0.00, 10.00, 0.00, 100.00, 0.00, 0.00)
call RemoveLocation(float)
set udg_CurrentMine = gg_unit_u007_0019
set udg_Pod = gg_unit_u003_0156
call TriggerExecute(gg_trg_RemoveUnused)
call TriggerExecute(gg_trg_CreatingEscapersInit)
call TimerStart(udg_PodTimer, 2.00, false, null)
call TriggerExecute(gg_trg_Shots)
call TriggerExecute(gg_trg_PatrolBase)
call TriggerExecute(gg_trg_PatrolOther)
call QuestMessageBJ(GetPlayersAll(), bj_QUESTMESSAGE_ALWAYSHINT, "|cffffcc00WHILE DYING IN BASE CAMP YOU WONT LOSE CONTINUES(EVEN IN TRAINING MAZES).")
set float = null
set wisp = null
set looping = null
endfunction
//===========================================================================
function InitTrig_Lvl1 takes nothing returns nothing
set gg_trg_Lvl1 = CreateTrigger( )
call TriggerAddAction( gg_trg_Lvl1, function Trig_Lvl1_Actions )
endfunction
function Trig_Decoy_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A00K' ) ) then
return false
endif
return true
endfunction
function Trig_Decoy_Actions takes nothing returns nothing
local location apple = (GetUnitLoc(GetTriggerUnit()))
local location cheese = GetSpellTargetLoc()
local unit removed = CreateUnitAtLoc(Player(10), 'u006', apple, 270.00)
call TriggerRegisterUnitInRangeSimple(gg_trg_Explosives, 100.00, removed)
call IssuePointOrderLoc(removed, "move", cheese)
call RemoveLocation(apple)
call RemoveLocation(cheese)
set apple = null
set cheese = null
set removed = null
endfunction
//===========================================================================
function InitTrig_Decoy takes nothing returns nothing
set gg_trg_Decoy = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Decoy, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Decoy, Condition( function Trig_Decoy_Conditions ) )
call TriggerAddAction( gg_trg_Decoy, function Trig_Decoy_Actions )
endfunction
function Trig_MiniCheckPointspell_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A00L' ) ) then
return false
endif
return true
endfunction
function Trig_MiniCheckPointspell_Actions takes nothing returns nothing
if RectContainsUnit(gg_rct_Minicheckpoint1, GetTriggerUnit()) == true then
call PlaySoundBJ( gg_snd_ReviveOrc )
call DisplayTextToForce( GetPlayersAll(), ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + " has activated a mini-checkpoint!" ) )
call RemoveLocation(udg_revivespot)
set udg_revivespot = GetUnitLoc(gg_unit_n002_0177)
call UnitAddAbility(gg_unit_n002_0177, 'A00I')
else
if RectContainsUnit(gg_rct_MiniCheckPoint2, GetTriggerUnit()) == true then
call PlaySoundBJ( gg_snd_ReviveOrc )
call DisplayTextToForce( GetPlayersAll(), ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + " has activated a mini-checkpoint!" ) )
call RemoveLocation(udg_revivespot)
set udg_revivespot = GetUnitLoc(gg_unit_n002_0178)
call UnitAddAbility(gg_unit_n002_0178, 'A00I')
else
if RectContainsUnit(gg_rct_Minicheckpoint3, GetTriggerUnit()) == true then
call PlaySoundBJ( gg_snd_ReviveOrc )
call DisplayTextToForce( GetPlayersAll(), ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + " has activated a mini-checkpoint!" ) )
call RemoveLocation(udg_revivespot)
set udg_revivespot = GetUnitLoc(gg_unit_n002_0182)
call UnitAddAbility(gg_unit_n002_0182, 'A00I')
else
endif
endif
endif
endfunction
//===========================================================================
function InitTrig_MiniCheckPointspell takes nothing returns nothing
set gg_trg_MiniCheckPointspell = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_MiniCheckPointspell, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_MiniCheckPointspell, Condition( function Trig_MiniCheckPointspell_Conditions ) )
call TriggerAddAction( gg_trg_MiniCheckPointspell, function Trig_MiniCheckPointspell_Actions )
endfunction
function Trig_Explosives_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'u007' ) ) then
return false
endif
return true
endfunction
function Trig_Explosives_Actions takes nothing returns nothing
local location where = GetUnitLoc(GetTriggerUnit())
local unit bomb = CreateUnitAtLoc(Player(10), 'u004', where, 270.00)
call PlaySoundBJ(gg_snd_MortarImpact)
call KillUnit(bomb)
call UnitDamagePointLoc(gg_unit_Udea_0128, 0, 180, where, 15000, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_ENHANCED )
call RemoveLocation(where)
set where = null
set bomb = null
endfunction
//===========================================================================
function InitTrig_Explosives takes nothing returns nothing
set gg_trg_Explosives = CreateTrigger( )
call TriggerAddCondition( gg_trg_Explosives, Condition( function Trig_Explosives_Conditions ) )
call TriggerAddAction( gg_trg_Explosives, function Trig_Explosives_Actions )
endfunction
function Trig_Pods_Actions takes nothing returns nothing
local real xox
local real yoy
local location tfemp
local real i
local unit lc
local real xp = GetUnitX(udg_Pod)
local real yp = GetUnitY(udg_Pod)
local unit filter
if IsUnitDeadBJ(udg_Pod) != true then
call TimerStart(udg_PodTimer, 7.50, false, null)
set lc = CreateUnit(Player(11), 'n003', xp, yp, 270.00)
call SetUnitFlyHeight(lc, 0.00, 650.00)
call SetUnitUserData(lc, GetUnitUserData(udg_Pod))
call TriggerSleepAction(0.45)
call KillUnit(lc)
set tfemp = GetUnitLoc(lc)
call PlaySoundAtPointBJ(gg_snd_NightElfBuildingDeathLarge1, 100, tfemp, 0)
call RemoveLocation(tfemp)
set i = 1.00
set xp = GetUnitX(lc)
set yp = GetUnitY(lc)
loop
exitwhen i > 8.00
set xox = PolarProjectionX(xp, 1000.00, i * 45.00)
set yoy = PolarProjectionY(yp, 1000.00, i * 45.00)
set filter = CreateUnit(Player(11), 'u004', xp, yp, 270.00)
call IssuePointOrder(filter, "move", xox, yoy)
set i = i + 1.00
endloop
call TriggerSleepAction(0.50)
if udg_PTime == true then
call TriggerExecute(gg_trg_MovePod)
else
endif
else
endif
set lc = null
set filter = null
set tfemp = null
endfunction
//===========================================================================
function InitTrig_Pods takes nothing returns nothing
set gg_trg_Pods = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_Pods, udg_PodTimer )
call TriggerAddAction( gg_trg_Pods, function Trig_Pods_Actions )
endfunction
function Trig_MovePod_Actions takes nothing returns nothing
local location mp = GetRandomLocInRect(gg_rct_visibility6)
call IssuePointOrderLoc(udg_Pod, "move", mp)
call RemoveLocation(mp)
set mp = null
endfunction
//===========================================================================
function InitTrig_MovePod takes nothing returns nothing
set gg_trg_MovePod = CreateTrigger( )
call TriggerAddAction( gg_trg_MovePod, function Trig_MovePod_Actions )
endfunction
function Trig_LumberInform_Actions takes nothing returns nothing
call DisplayTextToPlayer(GetTriggerPlayer(), 0, 0, "|cff32cd32Use your honor points to buy items in base.|r")
endfunction
//===========================================================================
function InitTrig_LumberInform takes nothing returns nothing
set gg_trg_LumberInform = CreateTrigger( )
call TriggerRegisterPlayerStateEvent( gg_trg_LumberInform, Player(0), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN, 0.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_LumberInform, Player(1), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN, 0.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_LumberInform, Player(2), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN, 0.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_LumberInform, Player(3), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN, 0.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_LumberInform, Player(4), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN, 0.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_LumberInform, Player(5), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN, 0.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_LumberInform, Player(6), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN, 0.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_LumberInform, Player(7), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN, 0.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_LumberInform, Player(8), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN, 0.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_LumberInform, Player(9), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN, 0.00 )
call TriggerAddAction( gg_trg_LumberInform, function Trig_LumberInform_Actions )
endfunction
function Trig_Leaves_game_Actions takes nothing returns nothing
call DisplayTimedTextToForce(GetPlayersAll(), 20.00, ("|cffff0000" + GetPlayerName(GetTriggerPlayer()) + " has left the game...|r" ))
call LeaderboardSetPlayerItemLabelBJ( GetTriggerPlayer(), GetLastCreatedLeaderboard(), "TRIGSTR_417" )
call LeaderboardSetPlayerItemLabelColorBJ( GetTriggerPlayer(), GetLastCreatedLeaderboard(), 50.00, 50.00, 50.00, 20.00 )
if UnitHasItem(udg_Escaper[GetConvertedPlayerId(GetTriggerPlayer())], gg_item_kygh_0101) then
call UnitDropItemPoint(udg_Escaper[GetConvertedPlayerId(GetTriggerPlayer())], gg_item_kygh_0101, GetUnitX(udg_Escaper[GetConvertedPlayerId(GetTriggerPlayer())]), GetUnitY(udg_Escaper[GetConvertedPlayerId(GetTriggerPlayer())]))
else
endif
call TriggerSleepAction(1.00)
call KillUnit(udg_Escaper[GetConvertedPlayerId(GetTriggerPlayer())])
call TriggerSleepAction(0.01)
set udg_lives[GetConvertedPlayerId(GetTriggerPlayer())] = 0
call RemoveUnit(udg_Escaper[GetConvertedPlayerId(GetTriggerPlayer())])
endfunction
//===========================================================================
function InitTrig_Leaves_game takes nothing returns nothing
local integer i = 0
set gg_trg_Leaves_game = CreateTrigger( )
loop
exitwhen i > 9
call TriggerRegisterPlayerEventLeave( gg_trg_Leaves_game, Player(i) )
set i = i + 1
endloop
call TriggerAddAction( gg_trg_Leaves_game, function Trig_Leaves_game_Actions )
endfunction
function Trig_BackToGame_Actions takes nothing returns nothing
local location firstloc = GetUnitLoc(GetTriggerUnit())
local effect btg = AddSpecialEffectLoc("Abilities\\Spells\\Human\\MassTeleport\\MassTeleportCaster.mdl", firstloc)
local effect btgt
call RemoveLocation(firstloc)
call SetUnitPositionLoc(GetTriggerUnit(), udg_revivespot)
call PanCameraToTimedLocForPlayer(GetOwningPlayer(GetTriggerUnit()), udg_revivespot, 0)
set btgt = AddSpecialEffectLoc("Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTarget.mdl", udg_revivespot)
call DestroyEffect(btg)
call DestroyEffect(btgt)
set btg = null
set btgt = null
set firstloc = null
call PauseUnit(GetTriggerUnit(), true)
call TriggerSleepAction(1.00)
call PauseUnit(GetTriggerUnit(), false)
endfunction
//===========================================================================
function InitTrig_BackToGame takes nothing returns nothing
set gg_trg_BackToGame = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_BackToGame, gg_rct_BackInAction )
call TriggerAddAction( gg_trg_BackToGame, function Trig_BackToGame_Actions )
endfunction
function Trig_IntoTMA_Actions takes nothing returns nothing
local location itol = GetRectCenter(gg_rct_TMAENTRY)
call SetUnitPositionLoc(GetTriggerUnit(), itol)
call PanCameraToTimedLocForPlayer(GetOwningPlayer(GetTriggerUnit()), itol, 1)
call RemoveLocation(itol)
set itol = null
endfunction
//===========================================================================
function InitTrig_IntoTMA takes nothing returns nothing
set gg_trg_IntoTMA = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_IntoTMA, gg_rct_TMA )
call TriggerAddAction( gg_trg_IntoTMA, function Trig_IntoTMA_Actions )
endfunction
function Trig_TeleTMA_Actions takes nothing returns nothing
local location tol = GetRectCenter(gg_rct_Tele2)
call SetUnitPositionLoc(GetTriggerUnit(), tol)
call PanCameraToTimedLocForPlayer(GetOwningPlayer(GetTriggerUnit()), tol, 1)
call RemoveLocation(tol)
set tol = null
endfunction
//===========================================================================
function InitTrig_TeleTMA takes nothing returns nothing
set gg_trg_TeleTMA = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_TeleTMA, gg_rct_Tele1 )
call TriggerAddAction( gg_trg_TeleTMA, function Trig_TeleTMA_Actions )
endfunction
function Trig_TeleTMA1_Actions takes nothing returns nothing
local location tool = GetRectCenter(gg_rct_Tele4)
call SetUnitPositionLoc(GetTriggerUnit(), tool)
call PanCameraToTimedLocForPlayer(GetOwningPlayer(GetTriggerUnit()), tool, 1)
call RemoveLocation(tool)
set tool = null
endfunction
//===========================================================================
function InitTrig_TeleTMA1 takes nothing returns nothing
set gg_trg_TeleTMA1 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_TeleTMA1, gg_rct_Tele3 )
call TriggerAddAction( gg_trg_TeleTMA1, function Trig_TeleTMA1_Actions )
endfunction
function Trig_ReachesEnd1_Actions takes nothing returns nothing
local location endbeg = GetRectCenter(gg_rct_Reviving)
call DisplayTextToPlayer(GetOwningPlayer(GetTriggerUnit()), 0, 0, "|cff32cd32Congratulations, you have reached the end of Training Maze 1, soldier! Training Maze 2 activated.|r")
call SetUnitPositionLoc(GetTriggerUnit(), endbeg)
call PanCameraToTimedLocForPlayer(GetOwningPlayer(GetTriggerUnit()), endbeg, 1)
call RemoveLocation(endbeg)
set endbeg = null
endfunction
//===========================================================================
function InitTrig_ReachesEnd1 takes nothing returns nothing
set gg_trg_ReachesEnd1 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_ReachesEnd1, gg_rct_End1 )
call TriggerAddAction( gg_trg_ReachesEnd1, function Trig_ReachesEnd1_Actions )
endfunction
function Trig_walking_off_Actions takes nothing returns nothing
local integer ga = 1
call TimerStart(udg_pathtimer, 0.15, false, null)
loop
exitwhen ga > 10
if GetTerrainType(GetUnitX(udg_Escaper[ga]), GetUnitY(udg_Escaper[ga])) == 'cOc1' or GetTerrainType(GetUnitX(udg_Escaper[ga]), GetUnitY(udg_Escaper[ga])) == 'Oaby' then
call KillUnit(udg_Escaper[ga])
else
endif
set ga = ga + 1
endloop
endfunction
//===========================================================================
function InitTrig_walking_off takes nothing returns nothing
set gg_trg_walking_off = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_walking_off, udg_pathtimer )
call TriggerAddAction( gg_trg_walking_off, function Trig_walking_off_Actions )
endfunction
function Trig_Continues_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'Hmkg' ) ) then
return false
endif
if ( not ( udg_revive == false ) ) then
return false
endif
return true
endfunction
function Trig_Continues_Func003Func001Func004Func005002 takes nothing returns nothing
call CustomDefeatBJ(GetOwningPlayer(GetEnumUnit()), "TRIGSTR_413")
endfunction
function Trig_Continues_Actions takes nothing returns nothing
local integer c
local integer i = 1
local real revivalx
local real revivaly
local integer id = GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))
loop
exitwhen i > 7
if UnitHasItem(GetTriggerUnit(), udg_Mechanism[i]) == true then
call SetItemPosition(udg_Mechanism[i], udg_MechanismPointX[i], udg_MechanismPointY[i])
else
endif
set i = i + 1
endloop
if RectContainsUnit(gg_rct_BaseCamp, GetTriggerUnit()) then
else
set udg_lives[id] = udg_lives[id] - 1
endif
if udg_lives[id] == 0 then
call DisplayTextToForce(GetPlayersAll(), ("|cffff0000Player " + GetPlayerName(ConvertedPlayer(id))))
call DisplayTextToForce(GetPlayersAll(), "TRIGSTR_419")
set udg_AbleToRev[id] = false
else
endif
if udg_AbleToRev[id] == true then
call TriggerSleepAction(2.00)
set revivalx = GetRectCenterX(gg_rct_Reviving)
set revivaly = GetRectCenterY(gg_rct_Reviving)
call ReviveHero(GetTriggerUnit(), revivalx, revivaly, true)
call PanCameraToTimedForPlayer(GetOwningPlayer(GetTriggerUnit()), revivalx, revivaly, 0)
else
call RemoveUnit(GetTriggerUnit())
endif
set i = 0
loop
exitwhen i > 9
call LeaderboardSetPlayerItemValueBJ(Player(i), GetLastCreatedLeaderboard(), udg_lives[i + 1])
set i = i + 1
endloop
set i = 1
loop
exitwhen i > 10
if udg_AbleToRev[i] == false then
set c = c + 1
else
endif
set i = i + 1
endloop
if c >= 10 then
call PlayMusicBJ(gg_snd_SadMystery)
call CinematicFadeBJ(bj_CINEFADETYPE_FADEOUT, 5.00, "ReplaceableTextures\\CameraMasks\\Black_mask.blp", 0, 0, 0, 0)
call TriggerSleepAction(5.00)
call ForGroup(udg_defeat, function Trig_Continues_Func003Func001Func004Func005002)
else
endif
endfunction
//===========================================================================
function InitTrig_Continues takes nothing returns nothing
set gg_trg_Continues = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Continues, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Continues, Condition( function Trig_Continues_Conditions ) )
call TriggerAddAction( gg_trg_Continues, function Trig_Continues_Actions )
endfunction
function Trig_Showing_Continues_Func003Func001C takes integer temp returns boolean
if ( not ( GetPlayerSlotState(ConvertedPlayer(temp)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_Showing_Continues_Actions takes nothing returns nothing
local integer i
call CreateLeaderboardBJ( GetPlayersAll(), "TRIGSTR_410" )
call LeaderboardSetStyleBJ( GetLastCreatedLeaderboard(), true, true, true, true )
set i = 1
loop
exitwhen i > 10
if ( Trig_Showing_Continues_Func003Func001C(i) ) then
call LeaderboardAddItemBJ( ConvertedPlayer(i), GetLastCreatedLeaderboard(), GetPlayerName(ConvertedPlayer(i)), udg_lives[i] )
else
endif
set i = i + 1
endloop
call LeaderboardDisplayBJ( true, GetLastCreatedLeaderboard() )
endfunction
//===========================================================================
function InitTrig_Showing_Continues takes nothing returns nothing
set gg_trg_Showing_Continues = CreateTrigger( )
call TriggerAddAction( gg_trg_Showing_Continues, function Trig_Showing_Continues_Actions )
endfunction
function Trig_Removing_Corpse_Actions takes nothing returns nothing
call TriggerSleepAction(10.00)
call RemoveUnit(GetTriggerUnit())
endfunction
//===========================================================================
function InitTrig_Removing_Corpse takes nothing returns nothing
set gg_trg_Removing_Corpse = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Removing_Corpse, Player(10), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Removing_Corpse, Player(11), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddAction( gg_trg_Removing_Corpse, function Trig_Removing_Corpse_Actions )
endfunction
function Trig_PatrolBase_Actions takes nothing returns nothing
local location new = GetRectCenter(gg_rct_Complicated1)
call IssuePointOrderLoc(gg_unit_ugar_0020, "move", new)
call RemoveLocation(new)
set new = Location(GetRectCenterX(gg_rct_back1), GetRectCenterY(gg_rct_back1))
call IssuePointOrderLoc(gg_unit_uaco_0091, "patrol", new)
call RemoveLocation(new)
set new = GetRectCenter(gg_rct_SM)
call IssuePointOrderLoc(gg_unit_ucry_0049, "patrol", new)
call RemoveLocation(new)
set new = GetRectCenter(gg_rct_patrol5)
call IssuePointOrderLoc(gg_unit_ucry_0035, "patrol", new)
call RemoveLocation(new)
set new = GetRectCenter(gg_rct_patrol8)
call IssuePointOrderLoc(gg_unit_ucry_0039, "patrol", new)
call RemoveLocation(new)
set new = GetRectCenter(gg_rct_Region_107)
call IssuePointOrderLoc(gg_unit_ucry_0033, "patrol", new)
call RemoveLocation(new)
set new = GetRectCenter(gg_rct_Region_110)
call IssuePointOrderLoc(gg_unit_ucry_0034, "patrol", new)
call RemoveLocation(new)
set new = GetRectCenter(gg_rct_Region_111)
call IssuePointOrderLoc(gg_unit_ugar_0108, "patrol", new)
call RemoveLocation(new)
set new = GetRectCenter(gg_rct_Patrol)
call IssuePointOrderLoc(gg_unit_uaco_0022, "patrol", new)
call RemoveLocation(new)
set new = GetRectCenter(gg_rct_patrol6)
call IssuePointOrderLoc(gg_unit_ucry_0029, "patrol", new)
call RemoveLocation(new)
set new = GetRectCenter(gg_rct_patrol7)
call IssuePointOrderLoc(gg_unit_uaco_0036, "patrol", new)
call RemoveLocation(new)
set new = GetRectCenter(gg_rct_patrol9)
call IssuePointOrderLoc(gg_unit_ucry_0040, "patrol", new)
call RemoveLocation(new)
set new = GetRectCenter(gg_rct_patrol10)
call IssuePointOrderLoc(gg_unit_ucry_0041, "patrol", new)
call RemoveLocation(new)
set new = GetRectCenter(gg_rct_complicated2)
call IssuePointOrderLoc(gg_unit_ugar_0056, "move", new)
call RemoveLocation(new)
set new = GetRectCenter(gg_rct_complicated6)
call IssuePointOrderLoc(gg_unit_ugar_0055, "move", new)
call RemoveLocation(new)
set new = GetRectCenter(gg_rct_patrol11)
call IssuePointOrderLoc(gg_unit_uaco_0057, "patrol", new)
call RemoveLocation(new)
set new = GetRectCenter(gg_rct_patrol14)
call IssuePointOrderLoc(gg_unit_ucry_0058, "patrol", new)
call RemoveLocation(new)
set new = GetRectCenter(gg_rct_patrol13)
call IssuePointOrderLoc(gg_unit_ucry_0064, "patrol", new)
call RemoveLocation(new)
set new = GetRectCenter(gg_rct_patrol15)
call IssuePointOrderLoc(gg_unit_ugar_0059, "patrol", new)
call RemoveLocation(new)
set new = GetRectCenter(gg_rct_patrol16)
call IssuePointOrderLoc(gg_unit_ugar_0065, "patrol", new)
call RemoveLocation(new)
set new = GetRectCenter(gg_rct_patrol17)
call IssuePointOrderLoc(gg_unit_ucry_0060, "patrol", new)
call RemoveLocation(new)
set new = GetRectCenter(gg_rct_patrol20)
call IssuePointOrderLoc(gg_unit_ugar_0066, "patrol", new)
call RemoveLocation(new)
set new = GetRectCenter(gg_rct_patrol21)
call IssuePointOrderLoc(gg_unit_ugar_0067, "patrol", new)
call RemoveLocation(new)
set new = GetRectCenter(gg_rct_patrol22)
call IssuePointOrderLoc(gg_unit_ucry_0069, "patrol", new)
call RemoveLocation(new)
set new = GetRectCenter(gg_rct_patrol24)
call IssuePointOrderLoc(gg_unit_ucry_0070, "patrol", new)
call RemoveLocation(new)
set new = GetRectCenter(gg_rct_patrol23)
call IssuePointOrderLoc(gg_unit_ucry_0071, "patrol", new)
call RemoveLocation(new)
set new = GetRectCenter(gg_rct_patrol25)
call IssuePointOrderLoc(gg_unit_ugar_0072, "patrol", new)
call RemoveLocation(new)
set new = GetRectCenter(gg_rct_patrol26)
call IssuePointOrderLoc(gg_unit_ugar_0073, "patrol", new)
call RemoveLocation(new)
set new = null
endfunction
//===========================================================================
function InitTrig_PatrolBase takes nothing returns nothing
set gg_trg_PatrolBase = CreateTrigger( )
call TriggerAddAction( gg_trg_PatrolBase, function Trig_PatrolBase_Actions )
endfunction
function Trig_PatrolOther_Actions takes nothing returns nothing
local location pto = GetRectCenter(gg_rct_patrol)
call IssuePointOrderLoc(gg_unit_uaco_0061, "patrol", pto)
call RemoveLocation(pto)
set pto = GetRectCenter(gg_rct_patrol1)
call IssuePointOrderLoc(gg_unit_uaco_0048, "patrol", pto)
call RemoveLocation(pto)
set pto = null
endfunction
//===========================================================================
function InitTrig_PatrolOther takes nothing returns nothing
set gg_trg_PatrolOther = CreateTrigger( )
call TriggerAddAction( gg_trg_PatrolOther, function Trig_PatrolOther_Actions )
endfunction
function Trig_Untitled_Trigger_080_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'ugar' ) ) then
return false
endif
return true
endfunction
function Trig_Untitled_Trigger_080_Actions takes nothing returns nothing
local location t = GetRectCenter(gg_rct_shot8)
call IssuePointOrderLoc( GetTriggerUnit(), "move", t )
call RemoveLocation(t)
set t = null
endfunction
//===========================================================================
function InitTrig_Untitled_Trigger_080 takes nothing returns nothing
set gg_trg_Untitled_Trigger_080 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Untitled_Trigger_080, gg_rct_complicated6 )
call TriggerAddCondition( gg_trg_Untitled_Trigger_080, Condition( function Trig_Untitled_Trigger_080_Conditions ) )
call TriggerAddAction( gg_trg_Untitled_Trigger_080, function Trig_Untitled_Trigger_080_Actions )
endfunction
function Trig_Untitled_Trigger_081_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'ugar' ) ) then
return false
endif
return true
endfunction
function Trig_Untitled_Trigger_081_Actions takes nothing returns nothing
local location to = GetRectCenter(gg_rct_complicated5)
call IssuePointOrderLocBJ( GetTriggerUnit(), "move", to )
call RemoveLocation(to)
set to = null
endfunction
//===========================================================================
function InitTrig_Untitled_Trigger_081 takes nothing returns nothing
set gg_trg_Untitled_Trigger_081 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Untitled_Trigger_081, gg_rct_shot8 )
call TriggerAddCondition( gg_trg_Untitled_Trigger_081, Condition( function Trig_Untitled_Trigger_081_Conditions ) )
call TriggerAddAction( gg_trg_Untitled_Trigger_081, function Trig_Untitled_Trigger_081_Actions )
endfunction
function Trig_Untitled_Trigger_082_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'ugar' ) ) then
return false
endif
return true
endfunction
function Trig_Untitled_Trigger_082_Actions takes nothing returns nothing
local location tz = GetRectCenter(gg_rct_complicated6)
call IssuePointOrderLocBJ( GetTriggerUnit(), "move", tz )
call RemoveLocation(tz)
set tz = null
endfunction
//===========================================================================
function InitTrig_Untitled_Trigger_082 takes nothing returns nothing
set gg_trg_Untitled_Trigger_082 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Untitled_Trigger_082, gg_rct_complicated5 )
call TriggerAddCondition( gg_trg_Untitled_Trigger_082, Condition( function Trig_Untitled_Trigger_082_Conditions ) )
call TriggerAddAction( gg_trg_Untitled_Trigger_082, function Trig_Untitled_Trigger_082_Actions )
endfunction
function Trig_Untitled_Trigger_054_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'ugar' ) ) then
return false
endif
return true
endfunction
function Trig_Untitled_Trigger_054_Actions takes nothing returns nothing
local location y = GetRectCenter(gg_rct_complicated3)
call IssuePointOrderLocBJ( GetTriggerUnit(), "move", y )
call RemoveLocation(y)
set y = null
endfunction
//===========================================================================
function InitTrig_Untitled_Trigger_054 takes nothing returns nothing
set gg_trg_Untitled_Trigger_054 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Untitled_Trigger_054, gg_rct_complicated2 )
call TriggerAddCondition( gg_trg_Untitled_Trigger_054, Condition( function Trig_Untitled_Trigger_054_Conditions ) )
call TriggerAddAction( gg_trg_Untitled_Trigger_054, function Trig_Untitled_Trigger_054_Actions )
endfunction
function Trig_Untitled_Trigger_078_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'ugar' ) ) then
return false
endif
return true
endfunction
function Trig_Untitled_Trigger_078_Actions takes nothing returns nothing
local location x = GetRectCenter(gg_rct_complicated4)
call IssuePointOrderLocBJ( GetTriggerUnit(), "move", x )
call RemoveLocation(x)
set x = null
endfunction
//===========================================================================
function InitTrig_Untitled_Trigger_078 takes nothing returns nothing
set gg_trg_Untitled_Trigger_078 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Untitled_Trigger_078, gg_rct_complicated3 )
call TriggerAddCondition( gg_trg_Untitled_Trigger_078, Condition( function Trig_Untitled_Trigger_078_Conditions ) )
call TriggerAddAction( gg_trg_Untitled_Trigger_078, function Trig_Untitled_Trigger_078_Actions )
endfunction
function Trig_Untitled_Trigger_079_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'ugar' ) ) then
return false
endif
return true
endfunction
function Trig_Untitled_Trigger_079_Actions takes nothing returns nothing
local location h = GetRectCenter(gg_rct_complicated2)
call IssuePointOrderLocBJ( GetTriggerUnit(), "move", h )
call RemoveLocation(h)
set h = null
endfunction
//===========================================================================
function InitTrig_Untitled_Trigger_079 takes nothing returns nothing
set gg_trg_Untitled_Trigger_079 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Untitled_Trigger_079, gg_rct_complicated4 )
call TriggerAddCondition( gg_trg_Untitled_Trigger_079, Condition( function Trig_Untitled_Trigger_079_Conditions ) )
call TriggerAddAction( gg_trg_Untitled_Trigger_079, function Trig_Untitled_Trigger_079_Actions )
endfunction
function Trig_GetLv1StrangeMech_Conditions takes nothing returns boolean
if ( not ( GetManipulatedItem() == gg_item_I000_0081 ) ) then
return false
endif
return true
endfunction
function Trig_GetLv1StrangeMech_Actions takes nothing returns nothing
local location panning = Location(GetRectCenterX(gg_rct_Grouping), GetRectCenterY(gg_rct_Grouping))
call PanCameraToTimedLocForPlayer(GetOwningPlayer(GetTriggerUnit()), panning, 0.00)
call TriggerSleepAction(0.05)
call KillUnit(gg_unit_uobs_0099)
call RemoveLocation(panning)
endfunction
//===========================================================================
function InitTrig_GetLv1StrangeMech takes nothing returns nothing
set gg_trg_GetLv1StrangeMech = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_GetLv1StrangeMech, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_GetLv1StrangeMech, Condition( function Trig_GetLv1StrangeMech_Conditions ) )
call TriggerAddAction( gg_trg_GetLv1StrangeMech, function Trig_GetLv1StrangeMech_Actions )
endfunction
function Trig_ItemLv1_Conditions takes nothing returns boolean
if ( not ( GetManipulatedItem() == gg_item_I000_0081 ) ) then
return false
endif
return true
endfunction
function Trig_ItemLv1_Actions takes nothing returns nothing
local real terx = GetRectCenterX(gg_rct_TerrainAddLv1)
local real tery = GetRectCenterY(gg_rct_TerrainAddLv1)
call DestroyTrigger(GetTriggeringTrigger())
call SetTerrainType(terx, tery, 'Ysqd', -1, 1, 1)
endfunction
//===========================================================================
function InitTrig_ItemLv1 takes nothing returns nothing
set gg_trg_ItemLv1 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ItemLv1, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_ItemLv1, Condition( function Trig_ItemLv1_Conditions ) )
call TriggerAddAction( gg_trg_ItemLv1, function Trig_ItemLv1_Actions )
endfunction
function Trig_ShotsOfWisp_Actions takes nothing returns nothing
local real swlx = GetDestructableX(gg_dest_B001_0210)
local real swly = GetDestructableY(gg_dest_B001_0210)
local unit swu = CreateUnit(Player(11), 'ewsp', swlx, swly, 0.00)
call TimerStart(udg_ShootWTimer, 6.25, false, null)
set swlx = GetRectCenterX(gg_rct_SWMove)
set swly = GetRectCenterY(gg_rct_SWMove)
call IssuePointOrder(swu, "move", swlx, swly)
set swu = null
endfunction
//===========================================================================
function InitTrig_ShotsOfWisp takes nothing returns nothing
set gg_trg_ShotsOfWisp = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_ShotsOfWisp, udg_ShootWTimer )
call TriggerAddAction( gg_trg_ShotsOfWisp, function Trig_ShotsOfWisp_Actions )
endfunction
function Trig_WispComp1_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'ewsp' ) ) then
return false
endif
return true
endfunction
function Trig_WispComp1_Actions takes nothing returns nothing
local real swlxi = GetRectCenterX(gg_rct_WMove1)
local real swlyi = GetRectCenterY(gg_rct_WMove1)
call IssuePointOrder(GetTriggerUnit(), "move", swlxi, swlyi)
endfunction
//===========================================================================
function InitTrig_WispComp1 takes nothing returns nothing
set gg_trg_WispComp1 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_WispComp1, gg_rct_SWMove )
call TriggerAddCondition( gg_trg_WispComp1, Condition( function Trig_WispComp1_Conditions ) )
call TriggerAddAction( gg_trg_WispComp1, function Trig_WispComp1_Actions )
endfunction
function Trig_WispComp2_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'ewsp' ) ) then
return false
endif
return true
endfunction
function Trig_WispComp2_Actions takes nothing returns nothing
local real swlxii = GetRectCenterX(gg_rct_WMove2)
local real swlyii = GetRectCenterY(gg_rct_WMove2)
call IssuePointOrder(GetTriggerUnit(), "move", swlxii, swlyii)
endfunction
//===========================================================================
function InitTrig_WispComp2 takes nothing returns nothing
set gg_trg_WispComp2 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_WispComp2, gg_rct_WMove1 )
call TriggerAddCondition( gg_trg_WispComp2, Condition( function Trig_WispComp2_Conditions ) )
call TriggerAddAction( gg_trg_WispComp2, function Trig_WispComp2_Actions )
endfunction
function Trig_WispComp3_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'ewsp' ) ) then
return false
endif
return true
endfunction
function Trig_WispComp3_Actions takes nothing returns nothing
local real swlxiii = GetRectCenterX(gg_rct_WRemove)
local real swlyiii = GetRectCenterY(gg_rct_WRemove)
call IssuePointOrder(GetTriggerUnit(), "move", swlxiii, swlyiii)
endfunction
//===========================================================================
function InitTrig_WispComp3 takes nothing returns nothing
set gg_trg_WispComp3 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_WispComp3, gg_rct_WMove2 )
call TriggerAddCondition( gg_trg_WispComp3, Condition( function Trig_WispComp3_Conditions ) )
call TriggerAddAction( gg_trg_WispComp3, function Trig_WispComp3_Actions )
endfunction
function Trig_P1_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'ugar' ) ) then
return false
endif
return true
endfunction
function Trig_P1_Actions takes nothing returns nothing
local real ptcx = GetRectCenterX(gg_rct_Complicated2)
local real ptcy = GetRectCenterY(gg_rct_Complicated2)
call IssuePointOrder(gg_unit_ugar_0020, "move", ptcx, ptcy)
endfunction
//===========================================================================
function InitTrig_P1 takes nothing returns nothing
set gg_trg_P1 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_P1, gg_rct_Complicated1 )
call TriggerAddCondition(gg_trg_P1, Condition(function Trig_P1_Conditions))
call TriggerAddAction( gg_trg_P1, function Trig_P1_Actions )
endfunction
function Trig_P2_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'ugar' ) ) then
return false
endif
return true
endfunction
function Trig_P2_Actions takes nothing returns nothing
local real ptcxk = GetRectCenterX(gg_rct_Complicated3)
local real ptcyk = GetRectCenterY(gg_rct_Complicated3)
call IssuePointOrder(gg_unit_ugar_0020, "move", ptcxk, ptcyk)
endfunction
//===========================================================================
function InitTrig_P2 takes nothing returns nothing
set gg_trg_P2 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_P2, gg_rct_Complicated2 )
call TriggerAddCondition(gg_trg_P2, Condition(function Trig_P2_Conditions))
call TriggerAddAction( gg_trg_P2, function Trig_P2_Actions )
endfunction
function Trig_P3_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'ugar' ) ) then
return false
endif
return true
endfunction
function Trig_P3_Actions takes nothing returns nothing
local real ptcxkk = GetRectCenterX(gg_rct_Complicated4)
local real ptcykk = GetRectCenterY(gg_rct_Complicated4)
call IssuePointOrder(gg_unit_ugar_0020, "move", ptcxkk, ptcykk)
endfunction
//===========================================================================
function InitTrig_P3 takes nothing returns nothing
set gg_trg_P3 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_P3, gg_rct_Complicated3 )
call TriggerAddCondition(gg_trg_P3, Condition(function Trig_P3_Conditions))
call TriggerAddAction( gg_trg_P3, function Trig_P3_Actions )
endfunction
function Trig_P4_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'ugar' ) ) then
return false
endif
return true
endfunction
function Trig_P4_Actions takes nothing returns nothing
local real ptcxkkk = GetRectCenterX(gg_rct_Complicated1)
local real ptcykkk = GetRectCenterY(gg_rct_Complicated1)
call IssuePointOrder(gg_unit_ugar_0020, "move", ptcxkkk, ptcykkk)
endfunction
//===========================================================================
function InitTrig_P4 takes nothing returns nothing
set gg_trg_P4 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_P4, gg_rct_Complicated4 )
call TriggerAddCondition(gg_trg_P4, Condition(function Trig_P4_Conditions))
call TriggerAddAction( gg_trg_P4, function Trig_P4_Actions )
endfunction
function Trig_Tele_Actions takes nothing returns nothing
local real ttx = GetRectCenterX(gg_rct_back1)
local real tty = GetRectCenterY(gg_rct_back1)
call SetUnitPosition(GetTriggerUnit(), ttx, tty)
call PanCameraToTimedForPlayer(GetOwningPlayer(GetTriggerUnit()), ttx, tty, 0)
endfunction
//===========================================================================
function InitTrig_Tele takes nothing returns nothing
set gg_trg_Tele = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Tele, gg_rct_tele )
call TriggerAddAction( gg_trg_Tele, function Trig_Tele_Actions )
endfunction
function Trig_Sliding_Actions takes nothing returns nothing
local integer sa = 1
local real x
local real angle
local real y
local real xn
local real yn
call TimerStart(udg_SlideTimer, 0.04, false, null)
loop
exitwhen sa > 10
set x = GetUnitX(udg_Escaper[sa])
set y = GetUnitY(udg_Escaper[sa])
if GetTerrainType(x, y) == 'Idki' or GetTerrainType(x, y) == 'Iice' then
set angle = GetUnitFacing(udg_Escaper[sa])
set xn = PolarProjectionX(x, 15.00, angle)
set yn = PolarProjectionY(y, 15.00, angle)
call SetUnitPosition(udg_Escaper[sa], xn, yn)
else
endif
set sa = sa + 1
endloop
endfunction
//===========================================================================
function InitTrig_Sliding takes nothing returns nothing
set gg_trg_Sliding = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_Sliding, udg_SlideTimer )
call TriggerAddAction( gg_trg_Sliding, function Trig_Sliding_Actions )
endfunction
function Trig_NoTurningWhite_Actions takes nothing returns nothing
local real fp = GetUnitFacing(GetTriggerUnit())
local unit ntw = GetTriggerUnit()
local real xw = GetUnitX(ntw)
local real yx = GetUnitY(ntw)
if GetTerrainType(xw, yx) == 'Idki' then
call SetUnitFacing(ntw, fp)
endif
set ntw = null
endfunction
//===========================================================================
function InitTrig_NoTurningWhite takes nothing returns nothing
set gg_trg_NoTurningWhite = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_NoTurningWhite, EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerAddAction( gg_trg_NoTurningWhite, function Trig_NoTurningWhite_Actions )
endfunction
function Trig_TurningSquare_Actions takes nothing returns nothing
local unit tsh = GetTriggerUnit()
local real xyw = GetUnitX(tsh)
local real yyw = GetUnitY(tsh)
local real xx = GetOrderPointX()
local real yy = GetOrderPointY()
local real fface = Rad2Deg(Atan2(yy - yyw, xx - xyw))
if GetTerrainType(xyw, yyw) == 'Iice' then
call SetUnitFacing(tsh, fface)
endif
set tsh = null
endfunction
//===========================================================================
function InitTrig_TurningSquare takes nothing returns nothing
set gg_trg_TurningSquare = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_TurningSquare, EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerAddAction( gg_trg_TurningSquare, function Trig_TurningSquare_Actions )
endfunction
function Trig_Dutchman_Actions takes nothing returns nothing
local location dutch = GetRandomLocInRect(gg_rct_DutchmanShots)
call TimerStart(udg_DutchmanTimer, 2.00, false, null)
call IssuePointOrderLoc(gg_unit_uarb_0105, "attackground", dutch)
call RemoveLocation(dutch)
set dutch = null
endfunction
//===========================================================================
function InitTrig_Dutchman takes nothing returns nothing
set gg_trg_Dutchman = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_Dutchman, udg_DutchmanTimer )
call TriggerAddAction( gg_trg_Dutchman, function Trig_Dutchman_Actions )
endfunction
function Trig_Lv1Done_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'Hmkg' ) ) then
return false
endif
return true
endfunction
function Trig_Lv1Done_Func018002 takes nothing returns nothing
call CreateFogModifierRectBJ( true, GetEnumPlayer(), FOG_OF_WAR_VISIBLE, gg_rct_visibility1 )
endfunction
function Trig_Lv1Done_Func019002 takes nothing returns nothing
call CreateFogModifierRectBJ( true, GetEnumPlayer(), FOG_OF_WAR_VISIBLE, gg_rct_Lv2ExtraVisibility )
endfunction
function Trig_Lv1Done_Func021002 takes nothing returns nothing
call ReviveHeroLoc( GetEnumUnit(), udg_CheckPointPoint, false )
endfunction
function Trig_Lv1Done_Func023002 takes nothing returns nothing
call SetHeroLevelBJ( GetEnumUnit(), ( GetHeroLevel(GetEnumUnit()) + 1 ), false )
endfunction
function Trig_Lv1Done_Func024002 takes nothing returns nothing
call SetUnitMoveSpeed( GetEnumUnit(), ( GetUnitMoveSpeed(GetEnumUnit()) + I2R(udg_Lvlup) ) )
endfunction
function Trig_Lv1Done_Actions takes nothing returns nothing
local player playerttalk
local integer i = 0
local unit ooap
local group leaveout = CreateGroup()
local group checkpoint = CreateGroup()
local location checkp
call RemoveUnit(gg_unit_uobs_0099)
call RemoveUnit(gg_unit_uaco_0098)
call RemoveUnit(gg_unit_uaco_0097)
call RemoveUnit(gg_unit_uaco_0096)
call RemoveUnit(gg_unit_uaco_0095)
call TimerStart(udg_Spawning, 3.00, false, null)
call EnumDestructablesInRect(gg_rct_visibility, null, function RemoveDestructible)
call PauseTimer(udg_PodTimer)
call PauseTimer(udg_ShootWTimer)
call DestroyTrigger(GetTriggeringTrigger())
call AdjustPlayerStateBJ(1, GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_LUMBER)
set leaveout = GetUnitsOfTypeIdAll('Hmkg')
set udg_revivespot = GetRectCenter(gg_rct_Check)
call GroupEnumUnitsInRect(checkpoint, gg_rct_visibility, null)
call GroupRemoveGroup(leaveout, checkpoint)
call ForGroup(checkpoint, function RemoveUnitX)
call DestroyGroup(checkpoint)
loop
set ooap = FirstOfGroup(leaveout)
exitwhen ooap == null
set checkp = GetRandomLocInRect(gg_rct_Check)
call SetUnitPositionLoc(ooap, checkp)
call PanCameraToLocForPlayer(GetOwningPlayer(ooap), checkp)
call PauseUnit(ooap, true)
call RemoveLocation(checkp)
call GroupRemoveUnit(leaveout, ooap)
endloop
call TriggerSleepAction(0.75)
set leaveout = GetUnitsOfTypeIdAll('Hmkg')
loop
set ooap = FirstOfGroup(leaveout)
exitwhen ooap == null
call PauseUnit(ooap, false)
call GroupRemoveUnit(leaveout, ooap)
endloop
call DestroyGroup(leaveout)
call ForForce(GetPlayersAll(), function Trig_Lv1Done_Func018002)
call ForForce(GetPlayersAll(), function Trig_Lv1Done_Func019002)
set udg_CheckPointGroup = GetUnitsOfTypeIdAll('Hmkg')
call ForGroup(udg_CheckPointGroup, function Trig_Lv1Done_Func021002)
call RemoveLocation(udg_CheckPointPoint)
call ForGroup(udg_CheckPointGroup, function Trig_Lv1Done_Func023002)
call ForGroup(udg_CheckPointGroup, function Trig_Lv1Done_Func024002)
call DestroyGroup(udg_CheckPointGroup)
call EnableTrigger(gg_trg_Wispspawn)
loop
exitwhen i > 9
if GetPlayerSlotState(Player(i)) == PLAYER_SLOT_STATE_PLAYING and GetPlayerController(Player(i)) == MAP_CONTROL_USER then
set playerttalk = Player(i)
set i = i + 20
else
set i = i + 1
endif
endloop
call TransmissionFromUnitTypeWithNameBJ(GetPlayersAll(), playerttalk, 'Hmkg', GetPlayerName(playerttalk), null, null, "TRIGSTR_269", bj_TIMETYPE_ADD, 0, true )
call DisplayTimedTextToForce( GetPlayersAll(), 5.00, "TRIGSTR_270" )
call QuestMessageBJ(GetPlayersAll(), bj_QUESTMESSAGE_UPDATED, "TRIGSTR_271")
set ooap = null
set checkpoint = null
set leaveout = null
set checkp = null
set playerttalk = null
endfunction
//===========================================================================
function InitTrig_Lv1Done takes nothing returns nothing
set gg_trg_Lv1Done = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Lv1Done, gg_rct_Check )
call TriggerAddCondition( gg_trg_Lv1Done, Condition( function Trig_Lv1Done_Conditions ) )
call TriggerAddAction( gg_trg_Lv1Done, function Trig_Lv1Done_Actions )
endfunction
function Trig_Lv2Done_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'Hmkg' ) ) then
return false
endif
return true
endfunction
function Trig_Lv2Done_Func010002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Lv2Done_Func013002 takes nothing returns nothing
local real lvtwocheckx = GetRandomReal(GetRectMinX(gg_rct_check2), GetRectMaxX(gg_rct_check2))
local real lvtwochecky = GetRandomReal(GetRectMinY(gg_rct_check2), GetRectMaxY(gg_rct_check2))
call SetUnitPosition(GetEnumUnit(), lvtwocheckx, lvtwochecky)
endfunction
function Trig_Lv2Done_Func018002 takes nothing returns nothing
call CreateFogModifierRectBJ( true, GetEnumPlayer(), FOG_OF_WAR_VISIBLE, gg_rct_visibility2 )
endfunction
function Trig_Lv2Done_Func019002 takes nothing returns nothing
call CreateFogModifierRectBJ( true, GetEnumPlayer(), FOG_OF_WAR_VISIBLE, gg_rct_visibility3 )
endfunction
function Trig_Lv2Done_Func021A takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), udg_Point, 0 )
endfunction
function Trig_Lv2Done_Func025002 takes nothing returns nothing
call SetHeroLevelBJ( GetEnumUnit(), ( GetHeroLevel(GetEnumUnit()) + 1 ), false )
endfunction
function Trig_Lv2Done_Func026002 takes nothing returns nothing
call SetUnitMoveSpeed( GetEnumUnit(), ( GetUnitMoveSpeed(GetEnumUnit()) + I2R(udg_Lvlup) ) )
endfunction
function Trig_Lv2Done_Func041001001 takes nothing returns boolean
return ( udg_Skip == 1 )
endfunction
function Trig_Lv2Done_Func041001002 takes nothing returns boolean
return ( udg_Skip == 2 )
endfunction
function Trig_Lv2Done_Func041001 takes nothing returns boolean
return GetBooleanOr( Trig_Lv2Done_Func041001001(), Trig_Lv2Done_Func041001002() )
endfunction
function Trig_Lv2Done_Func061A takes nothing returns nothing
call SetUnitFacingToFaceUnitTimed( GetEnumUnit(), GetLastCreatedUnit(), 0 )
endfunction
function Trig_Lv2Done_Func103A takes nothing returns nothing
call AddSpecialEffectTargetUnitBJ( "origin", GetEnumUnit(), "Abilities\\Spells\\Items\\StaffOfSanctuary\\Staff_Sanctuary_Target.mdl" )
set udg_ArrivalEffect[GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))] = GetLastCreatedEffectBJ()
call UnitAddAbilityBJ( 'A003', GetEnumUnit() )
endfunction
function Trig_Lv2Done_Func107A takes nothing returns nothing
call AddSpecialEffectTargetUnitBJ( "origin", GetEnumUnit(), "Abilities\\Spells\\Orc\\HealingWave\\HealingWaveTarget.mdl" )
set udg_ArrivalEffect1[GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))] = GetLastCreatedEffectBJ()
call IssuePointOrderLocBJ( GetEnumUnit(), "clusterrockets", udg_Point )
endfunction
function Trig_Lv2Done_Func114A takes nothing returns nothing
call UnitRemoveAbilityBJ( 'A003', GetEnumUnit() )
endfunction
function Trig_Lv2Done_Actions takes nothing returns nothing
call PauseTimer(udg_SlideTimer)
call DestroyTrigger(GetTriggeringTrigger())
call AdjustPlayerStateBJ(1, GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_LUMBER)
set udg_revivespot = GetRectCenter(gg_rct_check2)
set udg_leaveout = GetUnitsOfTypeIdAll('Hmkg')
set udg_CheckPointGroup = GetUnitsInRectAll(gg_rct_visibility1)
call GroupRemoveGroup(udg_leaveout, udg_CheckPointGroup)
call ForGroup(udg_CheckPointGroup, function Trig_Lv2Done_Func010002)
call DestroyGroup(udg_CheckPointGroup)
call ForGroup(udg_leaveout, function Trig_Lv2Done_Func013002)
call DestroyGroup(udg_CheckPointGroup)
call DestroyGroup(udg_leaveout)
call TriggerSleepAction( 0.75 )
call ForForce(udg_players, function Trig_Lv2Done_Func018002)
call ForForce(udg_players, function Trig_Lv2Done_Func019002)
set udg_Point = GetRectCenter(gg_rct_check2)
call ForForce(GetPlayersAll(), function Trig_Lv2Done_Func021A)
set udg_CheckPointGroup = GetUnitsOfTypeIdAll('Hmkg')
call ForGroup(udg_CheckPointGroup, function Trig_Lv2Done_Func025002)
call ForGroup(udg_CheckPointGroup, function Trig_Lv2Done_Func026002)
call DestroyGroup (udg_CheckPointGroup)
set udg_revive = false
call TriggerExecute( gg_trg_Activate )
call EnableTrigger( gg_trg_Lv3Done )
call DestroyTrigger(gg_trg_Wispspawn)
call RemoveLocation(udg_Point)
call DialogDisplayBJ( true, udg_MovieDialog, Player(0) )
loop
exitwhen ( Trig_Lv2Done_Func041001() )
call TriggerSleepAction(RMaxBJ(bj_WAIT_FOR_COND_MIN_INTERVAL, 0.10))
endloop
if udg_Skip == 2 then
call CinematicModeBJ(true, GetPlayersAll())
call TriggerSleepAction( 3.00 )
call PlayMusicBJ( gg_snd_DarkAgents )
call TransmissionFromUnitTypeWithNameBJ( GetPlayersAll(), Player(0), 'Hmkg', GetPlayerName(Player(0)), udg_Point, null, "TRIGSTR_343", bj_TIMETYPE_ADD, 0, true )
call TriggerSleepAction( 0.15 )
call TransmissionFromUnitTypeWithNameBJ( GetPlayersAll(), Player(1), 'Hmkg', GetPlayerName(Player(1)), udg_Point, null, "TRIGSTR_344", bj_TIMETYPE_ADD, 0, true )
call PlaySoundBJ( gg_snd_SargerasLaugh )
call StopMusicBJ( false )
call TriggerSleepAction( 2.00 )
set udg_Point = GetRectCenter(gg_rct_SoulKeeperAppear)
call TransmissionFromUnitTypeWithNameBJ( GetPlayersAll(), Player(0), 'Hmkg', GetPlayerName(Player(0)), udg_Point, null, "TRIGSTR_249", bj_TIMETYPE_ADD, 0, true )
call TriggerSleepAction( 2.00 )
call PlayMusicBJ( gg_snd_Doom )
call AddSpecialEffectLocBJ( udg_Point, "Abilities\\Spells\\Demon\\DarkPortal\\DarkPortalTarget.mdl" )
call TriggerSleepAction( 2.00 )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
call CreateNUnitsAtLoc( 1, 'Udea', Player(11), udg_Point, bj_UNIT_FACING )
call AddSpecialEffectTargetUnitBJ( "chest", GetLastCreatedUnit(), "Abilities\\Spells\\Undead\\DarkRitual\\DarkRitualTarget.mdl" )
call SetUnitFacingToFaceUnitTimed( GetLastCreatedUnit(), gg_unit_Hmkg_0012, 0 )
call ForGroupBJ( udg_defeat, function Trig_Lv2Done_Func061A )
call TriggerSleepAction( 2 )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
call TransmissionFromUnitWithNameBJ( GetPlayersAll(), GetLastCreatedUnit(), "TRIGSTR_250", null, "TRIGSTR_251", bj_TIMETYPE_ADD, 0, true )
call ResetUnitAnimation( GetLastCreatedUnit() )
call TriggerSleepAction( 3.00 )
call TransmissionFromUnitTypeWithNameBJ( GetPlayersAll(), Player(0), 'Hmkg', GetPlayerName(Player(0)), GetPlayerStartLocationLoc(Player(0)), null, "TRIGSTR_252", bj_TIMETYPE_ADD, 0, true )
call TriggerSleepAction( 2 )
call SetUnitAnimation( GetLastCreatedUnit(), "attack" )
call TransmissionFromUnitWithNameBJ( GetPlayersAll(), GetLastCreatedUnit(), "TRIGSTR_253", null, "TRIGSTR_254", bj_TIMETYPE_ADD, 0, true )
call ResetUnitAnimation( GetLastCreatedUnit() )
call TriggerSleepAction( 3.00 )
call TransmissionFromUnitTypeWithNameBJ( GetPlayersAll(), Player(1), 'Hmkg', GetPlayerName(Player(1)), GetPlayerStartLocationLoc(Player(1)), null, "TRIGSTR_255", bj_TIMETYPE_ADD, 0, true )
call TriggerSleepAction( 3.00 )
call PlaySoundBJ( gg_snd_SargerasLaugh )
call TriggerSleepAction( 3.00 )
call PlaySoundBJ( gg_snd_HPitLordYes3 )
call TransmissionFromUnitWithNameBJ( GetPlayersAll(), GetLastCreatedUnit(), "TRIGSTR_256", null, "TRIGSTR_257", bj_TIMETYPE_ADD, 0, true )
call TriggerSleepAction( 4.00 )
call TransmissionFromUnitTypeWithNameBJ( GetPlayersAll(), Player(0), 'Hmkg', GetPlayerName(Player(0)), GetPlayerStartLocationLoc(Player(0)), null, "TRIGSTR_258", bj_TIMETYPE_ADD, 0, true )
call TriggerSleepAction( 2 )
call RemoveLocation(udg_Point)
set udg_Point = GetRectCenter(gg_rct_Region_202)
call AddSpecialEffectLocBJ( udg_Point, "Abilities\\Spells\\Human\\Resurrect\\ResurrectCaster.mdl" )
call RemoveLocation(udg_Point)
call TriggerSleepAction( 1.50 )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
set udg_Point = GetRectCenter(gg_rct_Region_201)
call AddSpecialEffectLocBJ( udg_Point, "Abilities\\Spells\\Human\\Resurrect\\ResurrectCaster.mdl" )
call RemoveLocation(udg_Point)
call TriggerSleepAction( 1.50 )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
set udg_Point = GetRectCenter(gg_rct_Region_204)
call AddSpecialEffectLocBJ( udg_Point, "Abilities\\Spells\\Human\\Resurrect\\ResurrectCaster.mdl" )
call RemoveLocation(udg_Point)
call TriggerSleepAction( 1.50 )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
set udg_Point = GetRectCenter(gg_rct_Region_203)
call AddSpecialEffectLocBJ( udg_Point, "Abilities\\Spells\\Human\\Resurrect\\ResurrectCaster.mdl" )
call RemoveLocation(udg_Point)
call TriggerSleepAction( 1.50 )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
call ForGroupBJ( udg_defeat, function Trig_Lv2Done_Func103A )
call TriggerSleepAction( 1.00 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 10
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call DestroyEffectBJ( udg_ArrivalEffect[GetForLoopIndexA()] )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set udg_Point = GetUnitLoc(GetLastCreatedUnit())
call ForGroupBJ( udg_defeat, function Trig_Lv2Done_Func107A )
call TriggerSleepAction( 0.50 )
call AddSpecialEffectLocBJ( udg_Point, "Abilities\\Spells\\Human\\Polymorph\\PolyMorphTarget.mdl" )
call RemoveUnit( GetLastCreatedUnit() )
call RemoveLocation(udg_Point)
call TriggerSleepAction( 3.00 )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
call ForGroupBJ( udg_defeat, function Trig_Lv2Done_Func114A )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 10
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call DestroyEffect(udg_ArrivalEffect1[GetForLoopIndexA()])
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call TransmissionFromUnitTypeWithNameBJ( GetPlayersAll(), Player(0), 'Hmkg', GetPlayerName(Player(0)), GetPlayerStartLocationLoc(Player(0)), null, "TRIGSTR_259", bj_TIMETYPE_ADD, 0.00, true )
call CinematicModeBJ(false, GetPlayersAll())
else
call DisplayTimedTextToForce( GetPlayersAll(), 5.00, "|cffff0000" + GetPlayerName(Player(0)) + " has skipped the following cutscene.|r" )
endif
call PlayMusicBJ( gg_snd_PH1 )
call TimerStart(udg_Timer, 3.00, false, null)
call TriggerSleepAction( 2 )
call DisplayTimedTextToForce( GetPlayersAll(), 5.00, "TRIGSTR_272" )
call QuestMessageBJ( GetPlayersAll(), bj_QUESTMESSAGE_UPDATED, "TRIGSTR_273" )
endfunction
//===========================================================================
function InitTrig_Lv2Done takes nothing returns nothing
set gg_trg_Lv2Done = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Lv2Done, gg_rct_check2 )
call TriggerAddCondition( gg_trg_Lv2Done, Condition( function Trig_Lv2Done_Conditions ) )
call TriggerAddAction( gg_trg_Lv2Done, function Trig_Lv2Done_Actions )
endfunction
function Trig_Spinningroundnround_Actions takes nothing returns nothing
local location peanuts = GetUnitLoc(udg_TempMage)
local location arghp = PolarProjectionBJ(peanuts, 3.00, 270.00)
call StartTimerBJ( udg_SpinTimer, false, 0.01 )
call SetUnitPositionLocFacingBJ( udg_TempMage, arghp, ( udg_lagangle + 180.00 ) )
call RemoveLocation(peanuts)
call RemoveLocation(arghp)
set udg_lagangle = ( udg_lagangle - 6.00 )
set peanuts = null
set arghp = null
endfunction
//===========================================================================
function InitTrig_Spinningroundnround takes nothing returns nothing
set gg_trg_Spinningroundnround = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_Spinningroundnround, udg_SpinTimer )
call TriggerAddAction( gg_trg_Spinningroundnround, function Trig_Spinningroundnround_Actions )
endfunction
function Trig_Wispspawn_Actions takes nothing returns nothing
local unit last
local location wr = Location(GetRectCenterX(gg_rct_Spawn2), GetRectCenterY(gg_rct_Spawn2))
local location hh = Location(GetRectCenterX(gg_rct_Remove2), GetRectCenterY(gg_rct_Remove2))
call TimerStart(udg_Spawning, 5.00, false, null)
call SpawnMove(wr, hh, 'ewsp')
call RemoveLocation(hh)
call RemoveLocation(wr)
call TriggerSleepAction(1.00)
set wr = Location(GetRectCenterX(gg_rct_Spawn1), GetRectCenterY(gg_rct_Spawn1))
set hh = Location(GetRectCenterX(gg_rct_Remove1), GetRectCenterY(gg_rct_Remove1))
call SpawnMove(wr, hh, 'ewsp')
call RemoveLocation(hh)
call RemoveLocation(wr)
set wr = Location(GetRectCenterX(gg_rct_Spawn3), GetRectCenterX(gg_rct_Spawn3))
set hh = Location(GetRectCenterX(gg_rct_Remove3), GetRectCenterY(gg_rct_Remove3))
call SpawnMove(wr, hh, 'ewsp')
call RemoveLocation(hh)
call RemoveLocation(wr)
set wr = Location(GetRectCenterX(gg_rct_Spawn4), GetRectCenterY(gg_rct_Spawn4))
set hh = Location(GetRectCenterX(gg_rct_Remove4), GetRectCenterY(gg_rct_Remove4))
call SpawnMove(wr, hh, 'ewsp')
call RemoveLocation(hh)
call RemoveLocation(wr)
set wr = Location(GetRectCenterX(gg_rct_SpawnSpec), GetRectCenterY(gg_rct_SpawnSpec))
set hh = Location(GetRectCenterX(gg_rct_Remove5), GetRectCenterY(gg_rct_Remove5))
set last = CreateUnitAtLoc(Player(11), 'ewsp', wr, 0.00)
call SetUnitMoveSpeed(last, 475)
call IssuePointOrderLoc(last, "move", hh)
call RemoveLocation(hh)
call RemoveLocation(wr)
set wr = null
set hh = null
set last = null
endfunction
//===========================================================================
function InitTrig_Wispspawn takes nothing returns nothing
set gg_trg_Wispspawn = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_Wispspawn, udg_Spawning )
call TriggerAddAction( gg_trg_Wispspawn, function Trig_Wispspawn_Actions )
endfunction
function Trig_RemoveWisp_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'ewsp' ) ) then
return false
endif
return true
endfunction
function Trig_RemoveWisp_Actions takes nothing returns nothing
call RemoveUnit(GetTriggerUnit())
endfunction
//===========================================================================
function InitTrig_RemoveWisp takes nothing returns nothing
set gg_trg_RemoveWisp = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_RemoveWisp, gg_rct_Remove1 )
call TriggerRegisterEnterRectSimple( gg_trg_RemoveWisp, gg_rct_Remove2 )
call TriggerRegisterEnterRectSimple( gg_trg_RemoveWisp, gg_rct_Remove3 )
call TriggerRegisterEnterRectSimple( gg_trg_RemoveWisp, gg_rct_Remove4 )
call TriggerRegisterEnterRectSimple( gg_trg_RemoveWisp, gg_rct_Remove5 )
call TriggerRegisterEnterRectSimple( gg_trg_RemoveWisp, gg_rct_WRemove )
call TriggerAddCondition( gg_trg_RemoveWisp, Condition( function Trig_RemoveWisp_Conditions ) )
call TriggerAddAction( gg_trg_RemoveWisp, function Trig_RemoveWisp_Actions )
endfunction
function Trig_Out_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'u008' ) ) then
return false
endif
return true
endfunction
function Trig_Out_Actions takes nothing returns nothing
local real backx = GetRectCenterX(gg_rct_Sidegone1)
local real backy = GetRectCenterY(gg_rct_Sidegone1)
call IssuePointOrder(GetTriggerUnit(), "move", backx, backy)
endfunction
//===========================================================================
function InitTrig_Out takes nothing returns nothing
set gg_trg_Out = CreateTrigger( )
call TriggerRegisterLeaveRectSimple( gg_trg_Out, gg_rct_Sidegone1 )
call TriggerAddCondition( gg_trg_Out, Condition( function Trig_Out_Conditions ) )
call TriggerAddAction( gg_trg_Out, function Trig_Out_Actions )
endfunction
function Trig_Secretpassage_Actions takes nothing returns nothing
local location stps = GetRectCenter(gg_rct_SM)
call KillDestructable(gg_dest_LTbx_0195)
call DestroyTrigger(GetTriggeringTrigger())
call PlaySoundBJ(gg_snd_Lever)
call EnableTrigger(gg_trg_Secretpassage1)
set udg_Effect = AddSpecialEffectLoc("Abilities\\Spells\\Items\\VampiricPotion\\VampPotionCaster.mdl", stps)
call RemoveLocation(stps)
set stps = null
endfunction
//===========================================================================
function InitTrig_Secretpassage takes nothing returns nothing
set gg_trg_Secretpassage = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Secretpassage, gg_rct_Lev1 )
call TriggerAddAction( gg_trg_Secretpassage, function Trig_Secretpassage_Actions )
endfunction
function Trig_Secretpassage1_Actions takes nothing returns nothing
if GetOwningPlayer(GetTriggerUnit()) != Player(11) then
call DestroyEffect(udg_Effect)
call DestroyTrigger(GetTriggeringTrigger())
set udg_SecretMachine = CreateItem('I000', GetRectCenterX(gg_rct_SM), GetRectCenterY(gg_rct_SM))
endif
endfunction
//===========================================================================
function InitTrig_Secretpassage1 takes nothing returns nothing
set gg_trg_Secretpassage1 = CreateTrigger( )
call DisableTrigger( gg_trg_Secretpassage1 )
call TriggerRegisterEnterRectSimple( gg_trg_Secretpassage1, gg_rct_SM )
call TriggerAddAction( gg_trg_Secretpassage1, function Trig_Secretpassage1_Actions )
endfunction
function Trig_Item_Conditions takes nothing returns boolean
if ( not ( GetManipulatedItem() == udg_SecretMachine ) ) then
return false
endif
return true
endfunction
function Trig_Item_Actions takes nothing returns nothing
local integer i = 1
call TriggerSleepAction(0.05)
call DestroyTrigger(GetTriggeringTrigger())
call RemoveItem(udg_SecretMachine)
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_388" )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_389" )
call PlaySoundBJ( gg_snd_ReviveNightElf )
loop
exitwhen i > 10
if GetPlayerSlotState(ConvertedPlayer(i)) == PLAYER_SLOT_STATE_PLAYING then
set udg_lives[i] = udg_lives[i] + 1
call LeaderboardSetPlayerItemValueBJ( ConvertedPlayer(i), GetLastCreatedLeaderboard(), udg_lives[i] )
else
endif
set i = i + 1
endloop
endfunction
//===========================================================================
function InitTrig_Item takes nothing returns nothing
set gg_trg_Item = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Item, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Item, Condition( function Trig_Item_Conditions ) )
call TriggerAddAction( gg_trg_Item, function Trig_Item_Actions )
endfunction
function Trig_Slide_again_Actions takes nothing returns nothing
call DestroyTrigger(GetTriggeringTrigger())
call TimerStart(udg_SlideTimer, 1.00, false, null)
endfunction
//===========================================================================
function InitTrig_Slide_again takes nothing returns nothing
set gg_trg_Slide_again = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Slide_again, gg_rct_Grassadd )
call TriggerAddAction( gg_trg_Slide_again, function Trig_Slide_again_Actions )
endfunction
function Trig_Open_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'Hmkg' ) ) then
return false
endif
return true
endfunction
function Trig_Open_Actions takes nothing returns nothing
call PauseTimer(udg_Spawning)
call DestroyTrigger(gg_trg_Wispspawn)
call KillDestructable(gg_dest_LTbx_0194)
call DestroyTrigger(GetTriggeringTrigger())
call PlaySoundBJ(gg_snd_Lever)
call KillUnit(gg_unit_uobs_0042)
endfunction
//===========================================================================
function InitTrig_Open takes nothing returns nothing
set gg_trg_Open = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Open, gg_rct_Open )
call TriggerAddCondition( gg_trg_Open, Condition( function Trig_Open_Conditions ) )
call TriggerAddAction( gg_trg_Open, function Trig_Open_Actions )
endfunction
function Trig_Open1_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'Hmkg' ) ) then
return false
endif
return true
endfunction
function Trig_Open1_Actions takes nothing returns nothing
local real groundx = GetRectCenterX(gg_rct_Grassadd)
local real groundy = GetRectCenterY(gg_rct_Grassadd)
call KillDestructable(gg_dest_LTbx_0196)
call DestroyTrigger(GetTriggeringTrigger())
call SetTerrainType(groundx, groundy, 'Ysqd', -1, 1, 1)
call PlaySoundBJ(gg_snd_NightElfBuildingLoop)
endfunction
//===========================================================================
function InitTrig_Open1 takes nothing returns nothing
set gg_trg_Open1 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Open1, gg_rct_Open1 )
call TriggerAddCondition( gg_trg_Open1, Condition( function Trig_Open1_Conditions ) )
call TriggerAddAction( gg_trg_Open1, function Trig_Open1_Actions )
endfunction
function Trig_Open2_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'Hmkg' ) ) then
return false
endif
return true
endfunction
function Trig_Open2_Actions takes nothing returns nothing
local real oyx = GetRectCenterX(gg_rct_Grassadd1)
local real oyy = GetRectCenterY(gg_rct_Grassadd1)
call KillDestructable(gg_dest_LTbx_0197)
call DestroyTrigger(GetTriggeringTrigger())
call SetTerrainType(oyx, oyy, 'Ysqd', -1, 1, 1)
call PlaySoundBJ(gg_snd_NightElfBuildingLoop)
endfunction
//===========================================================================
function InitTrig_Open2 takes nothing returns nothing
set gg_trg_Open2 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Open2, gg_rct_Open2 )
call TriggerAddCondition( gg_trg_Open2, Condition( function Trig_Open2_Conditions ) )
call TriggerAddAction( gg_trg_Open2, function Trig_Open2_Actions )
endfunction
function Trig_MoveShoot_Actions takes nothing returns nothing
local location movingshot = GetRectCenter(gg_rct_origin)
local location tempmove = PolarProjectionBJ(movingshot, (I2R(udg_MoveInt) * 290.00), 0)
call TimerStart(udg_Timer, 2.00, false, null)
call SetUnitPositionLoc( gg_unit_e000_0164, tempmove )
call RemoveLocation(tempmove)
call RemoveLocation(movingshot)
set udg_MoveInt = ( udg_MoveInt + 1 )
if udg_MoveInt == 3 then
set udg_MoveInt = 0
endif
set movingshot = null
set tempmove = null
endfunction
//===========================================================================
function InitTrig_MoveShoot takes nothing returns nothing
set gg_trg_MoveShoot = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_MoveShoot, udg_Timer )
call TriggerAddAction( gg_trg_MoveShoot, function Trig_MoveShoot_Actions )
endfunction
function Trig_Deceiver_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'Hmkg' ) ) then
return false
endif
return true
endfunction
function Trig_Deceiver_Func029A takes nothing returns nothing
call SetUnitPositionLoc( GetEnumUnit(), udg_CheckPointPoint )
endfunction
function Trig_Deceiver_Func045002 takes nothing returns nothing
call CreateFogModifierRectBJ( true, GetEnumPlayer(), FOG_OF_WAR_VISIBLE, gg_rct_View )
endfunction
function Trig_Deceiver_Func047002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), udg_CheckPointPoint, 0 )
endfunction
function Trig_Deceiver_Func050A takes nothing returns nothing
call UnitAddAbilityBJ( 'A00J', GetEnumUnit() )
call UnitAddAbilityBJ( 'A00E', GetEnumUnit() )
endfunction
function Trig_Deceiver_Actions takes nothing returns nothing
local integer i = 1
local integer r
call DestroyTrigger(GetTriggeringTrigger())
call TriggerSleepAction( 1.00 )
call ShowInterfaceForceOff( GetPlayersAll(), 2 )
call SetUnitLookAt( gg_unit_nmed_0068, "bone_head", GetTriggerUnit(), 0, 0, 90 )
call TransmissionFromUnitWithNameBJ( GetPlayersAll(), gg_unit_nmed_0068, "TRIGSTR_080", null, "TRIGSTR_081", bj_TIMETYPE_ADD, 0, true )
call TriggerSleepAction( 2.00 )
call TransmissionFromUnitWithNameBJ( GetPlayersAll(), gg_unit_nmed_0068, "TRIGSTR_097", null, "TRIGSTR_098", bj_TIMETYPE_ADD, 0, true )
call StopMusicBJ( false )
call PlayMusicBJ( gg_snd_Tension )
call PlaySoundBJ( gg_snd_HPitLordYes4 )
call TransmissionFromUnitTypeWithNameBJ( GetPlayersAll(), Player(11), 'Udea', "TRIGSTR_298", GetPlayerStartLocationLoc(Player(11)), null, "TRIGSTR_299", bj_TIMETYPE_ADD, 0, true )
call TransmissionFromUnitTypeWithNameBJ( GetPlayersAll(), Player(11), 'Udea', "TRIGSTR_300", GetPlayerStartLocationLoc(Player(11)), null, "TRIGSTR_301", bj_TIMETYPE_ADD, 0, true )
call TriggerSleepAction( 2 )
call TransmissionFromUnitTypeWithNameBJ( GetPlayersAll(), Player(11), 'Udea', "TRIGSTR_302", GetPlayerStartLocationLoc(Player(11)), null, "TRIGSTR_303", bj_TIMETYPE_ADD, 0, true )
call TriggerSleepAction( 2 )
call TransmissionFromUnitWithNameBJ( GetPlayersAll(), gg_unit_nmed_0068, "TRIGSTR_304", null, "TRIGSTR_305", bj_TIMETYPE_ADD, 0, true )
call TriggerSleepAction( 1.00 )
call StopMusicBJ( false )
call PlayMusicBJ( gg_snd_Credits )
call SetUnitFacingToFaceUnitTimed( gg_unit_nmed_0068, gg_unit_Hmkg_0012, 0 )
call SetUnitAnimationWithRarity( gg_unit_nmed_0068, "spell", RARITY_FREQUENT )
call AddSpecialEffectTargetUnitBJ( "origin", gg_unit_nmed_0068, "Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTo.mdl" )
call TriggerSleepAction( 2.00 )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
call AddSpecialEffectTargetUnitBJ( "origin", gg_unit_nmed_0068, "Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTarget.mdl" )
set udg_CheckPointGroup = GetUnitsInRectAll(gg_rct_Cinema)
set udg_CheckPointPoint = GetRectCenter(gg_rct_Fight)
call ForGroupBJ( udg_CheckPointGroup, function Trig_Deceiver_Func029A )
call DestroyGroup(udg_CheckPointGroup)
call RemoveLocation(udg_CheckPointPoint)
call ResetUnitAnimation( gg_unit_nmed_0068 )
set udg_Deceiver = ReplaceUnitBJ( gg_unit_nmed_0068, 'n000', bj_UNIT_STATE_METHOD_MAXIMUM )
call TriggerRegisterUnitInRangeSimple( gg_trg_Hitbymissle, 75.00, udg_Deceiver )
set udg_CheckPointPoint = GetRectCenter(gg_rct_Wheretomove)
call IssuePointOrderLocBJ( udg_Deceiver, "move", udg_CheckPointPoint )
call IssueImmediateOrderBJ( udg_Deceiver, "manashieldon" )
call RemoveLocation(udg_CheckPointPoint)
call StartTimerBJ( udg_MoveTimer, false, 4.00 )
call StartTimerBJ( udg_VCTimer, false, 3.00 )
call StartTimerBJ( udg_SBTimer, false, 10.00 )
call PauseTimerBJ( true, udg_pathtimer )
call ForForce( GetPlayersAll(), function Trig_Deceiver_Func045002 )
set udg_CheckPointPoint = GetRectCenter(gg_rct_Cam)
call ForForce( GetPlayersAll(), function Trig_Deceiver_Func047002 )
call RemoveLocation(udg_CheckPointPoint)
set udg_revivespot = GetRectCenter(gg_rct_Sp)
call ForGroup(udg_defeat, function Trig_Deceiver_Func050A)
call ShowInterfaceForceOn( GetPlayersAll(), 2 )
call TriggerSleepAction( 2 )
call TransmissionFromUnitWithNameBJ( GetPlayersAll(), udg_Deceiver, "TRIGSTR_307", null, "TRIGSTR_308", bj_TIMETYPE_ADD, 0, true )
call TriggerSleepAction( 1.00 )
call TransmissionFromUnitTypeWithNameBJ( GetPlayersAll(), Player(0), 'Hmkg', GetPlayerName(Player(0)), GetPlayerStartLocationLoc(Player(0)), null, "TRIGSTR_333", bj_TIMETYPE_ADD, 0, true )
call TransmissionFromUnitTypeWithNameBJ( GetPlayersAll(), Player(1), 'Hmkg', GetPlayerName(Player(1)), GetPlayerStartLocationLoc(Player(1)), null, "TRIGSTR_334", bj_TIMETYPE_ADD, 0, true )
call QuestMessageBJ( GetPlayersAll(), bj_QUESTMESSAGE_UPDATED, "TRIGSTR_430" )
set udg_BH[1] = gg_unit_nzom_0165
set udg_BH[2] = gg_unit_nzom_0154
set udg_BH[3] = gg_unit_nzom_0166
set udg_BH[4] = gg_unit_nzom_0170
set udg_BH[5] = gg_unit_nzom_0171
set udg_BH[6] = gg_unit_nzom_0174
set udg_BH[7] = gg_unit_nzom_0175
set udg_BH[8] = gg_unit_nzom_0176
set udg_BH[9] = gg_unit_nzom_0172
set udg_BH[10] = gg_unit_nzom_0173
endfunction
//===========================================================================
function InitTrig_Deceiver takes nothing returns nothing
set gg_trg_Deceiver = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Deceiver, gg_rct_intro_tele )
call TriggerAddCondition( gg_trg_Deceiver, Condition( function Trig_Deceiver_Conditions ) )
call TriggerAddAction( gg_trg_Deceiver, function Trig_Deceiver_Actions )
endfunction
function Trig_DefeatedDeceiver_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'n000' ) ) then
return false
endif
return true
endfunction
function Trig_DefeatedDeceiver_Func001Func011A takes nothing returns nothing
set udg_Point = GetUnitLoc(GetTriggerUnit())
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), udg_Point, 0 )
call RemoveLocation(udg_Point)
endfunction
function Trig_DefeatedDeceiver_Func001Func015002 takes nothing returns nothing
call SetUnitPositionLoc( GetEnumUnit(), udg_revivespot )
endfunction
function Trig_DefeatedDeceiver_Func001Func016002 takes nothing returns nothing
call ReviveHeroLoc( GetEnumUnit(), udg_revivespot, false )
endfunction
function Trig_DefeatedDeceiver_Func001Func017002 takes nothing returns nothing
call UnitRemoveAbilityBJ( 'A00J', GetEnumUnit() )
endfunction
function Trig_DefeatedDeceiver_Func001Func018002 takes nothing returns nothing
call UnitRemoveAbilityBJ( 'A00E', GetEnumUnit() )
endfunction
function Trig_DefeatedDeceiver_Func001Func021002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), udg_revivespot, 0 )
endfunction
function Trig_DefeatedDeceiver_Func001Func022002 takes nothing returns nothing
call CreateFogModifierRectBJ( true, GetEnumPlayer(), FOG_OF_WAR_VISIBLE, gg_rct_visibility4 )
endfunction
function Trig_DefeatedDeceiver_Func001Func027002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_DefeatedDeceiver_Actions takes nothing returns nothing
local integer i = 1
loop
exitwhen i > 10
call AdjustPlayerStateBJ(1, ConvertedPlayer(i), PLAYER_STATE_RESOURCE_LUMBER)
set i = i + 1
endloop
call DisableTrigger(gg_trg_GoesOut)
call DisplayTextToForce(GetPlayersAll(), "TRIGSTR_306")
call PlaySoundBJ(gg_snd_UtherReturns)
call ResumeTimer(udg_pathtimer)
call PauseTimer(udg_VCTimer)
call PauseTimer(udg_MoveTimer)
call PauseTimer(udg_SBTimer)
call TimerStart(udg_WheelTimer2, 5.00, false, null)
call TimerStart(udg_WheelTimer, 5.00, false, null)
call ForForce( GetPlayersAll(), function Trig_DefeatedDeceiver_Func001Func011A )
call TriggerSleepAction( 3.00 )
call RemoveLocation(udg_revivespot)
set udg_revivespot = GetRectCenter(gg_rct_LEVEL_FOUR)
call ForGroup( udg_defeat, function Trig_DefeatedDeceiver_Func001Func015002 )
call ForGroup( udg_defeat, function Trig_DefeatedDeceiver_Func001Func016002 )
call ForGroup( udg_defeat, function Trig_DefeatedDeceiver_Func001Func017002 )
call ForGroup( udg_defeat, function Trig_DefeatedDeceiver_Func001Func018002 )
call TriggerExecute( gg_trg_PatrolLvl4 )
call StartTimerBJ( udg_HoleTimer, false, 15.00 )
call ForForce( udg_players, function Trig_DefeatedDeceiver_Func001Func021002 )
call ForForce( udg_players, function Trig_DefeatedDeceiver_Func001Func022002 )
call StopMusicBJ( false )
call PlayMusicBJ( gg_snd_PH1 )
call TriggerSleepAction( 2 )
set udg_CheckPointGroup = GetUnitsOfTypeIdAll('u001')
call ForGroup( udg_CheckPointGroup, function Trig_DefeatedDeceiver_Func001Func027002 )
call DestroyGroup(udg_CheckPointGroup)
endfunction
//===========================================================================
function InitTrig_DefeatedDeceiver takes nothing returns nothing
set gg_trg_DefeatedDeceiver = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_DefeatedDeceiver, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_DefeatedDeceiver, Condition( function Trig_DefeatedDeceiver_Conditions ) )
call TriggerAddAction( gg_trg_DefeatedDeceiver, function Trig_DefeatedDeceiver_Actions )
endfunction
function Trig_VC_Actions takes nothing returns nothing
local real decx = GetUnitX(udg_Deceiver)
local real decy = GetUnitY(udg_Deceiver)
local real decxp = PolarProjectionX(decx, 256.00, 180.00)
local real decyp = PolarProjectionY(decy, 256.00, 180.00)
local unit caster = CreateUnit(Player(11), 'nech', decx, decy, 0.00)
call ShowUnitHide(caster)
call IssuePointOrder( caster, "stampede", decxp, decyp )
call UnitApplyTimedLifeBJ(32.00, 'BTLF', caster)
call PlaySoundBJ(gg_snd_SargerasLaugh02)
call TimerStart(udg_VCTimer, 61.00, false, null)
call TriggerSleepAction(1.00)
set caster = null
endfunction
//===========================================================================
function InitTrig_VC takes nothing returns nothing
set gg_trg_VC = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_VC, udg_VCTimer )
call TriggerAddAction( gg_trg_VC, function Trig_VC_Actions )
endfunction
function Trig_Usesb_Actions takes nothing returns nothing
local location sbl
local unit sbu
local unit sbc
call TimerStart(udg_SBTimer, 10.00, false, null)
if UnitHasBuffBJ(udg_Deceiver, 'B003') then
return
else
endif
set sbl = GetUnitLoc(udg_Deceiver)
set sbu = CreateUnitAtLoc(Player(11), 'n001', sbl, 0.00)
call SetUnitFlyHeightBJ(sbu, 1000.00, 700.00)
call TriggerSleepAction(0.75)
call RemoveUnit(sbu)
set sbc = CreateUnitAtLoc(Player(11), 'nalb', sbl, 0.00)
call UnitAddAbility(sbc, 'A009')
call SetUnitFlyHeightBJ(sbc, 900.00, 0.00)
call IssuePointOrderLoc( sbc, "clusterrockets", sbl )
call RemoveLocation(sbl)
call UnitApplyTimedLifeBJ(1.50, 'BTLF', sbc)
set sbl = null
set sbu = null
set sbc = null
endfunction
//===========================================================================
function InitTrig_Usesb takes nothing returns nothing
set gg_trg_Usesb = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_Usesb, udg_SBTimer )
call TriggerAddAction( gg_trg_Usesb, function Trig_Usesb_Actions )
endfunction
function Trig_Occasional_Moving_Along_Actions takes nothing returns nothing
local location moveto = GetRandomLocInRect(gg_rct_Fight)
call TimerStart(udg_MoveTimer, 8.00, false, null)
call IssuePointOrderLoc(udg_Deceiver, "move", moveto)
call RemoveLocation(moveto)
set moveto = null
endfunction
//===========================================================================
function InitTrig_Occasional_Moving_Along takes nothing returns nothing
set gg_trg_Occasional_Moving_Along = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_Occasional_Moving_Along, udg_MoveTimer )
call TriggerAddAction( gg_trg_Occasional_Moving_Along, function Trig_Occasional_Moving_Along_Actions )
endfunction
function Trig_Complications_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'nfgt' ) ) then
return false
endif
return true
endfunction
function Trig_Complications_Actions takes nothing returns nothing
local location complication = Location(GetRectCenterX(gg_rct_complicated7), GetRectCenterY(gg_rct_complicated7))
call IssuePointOrderLoc(GetTriggerUnit(), "move", complication)
call RemoveLocation(complication)
set complication = null
endfunction
//===========================================================================
function InitTrig_Complications takes nothing returns nothing
set gg_trg_Complications = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Complications, gg_rct_complicated8 )
call TriggerAddCondition( gg_trg_Complications, Condition( function Trig_Complications_Conditions ) )
call TriggerAddAction( gg_trg_Complications, function Trig_Complications_Actions )
endfunction
function Trig_Complicationss_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'nfgt' ) ) then
return false
endif
return true
endfunction
function Trig_Complicationss_Actions takes nothing returns nothing
local location complication = Location(GetRectCenterX(gg_rct_complicated9), GetRectCenterY(gg_rct_complicated9))
call IssuePointOrderLoc(GetTriggerUnit(), "move", complication)
call RemoveLocation(complication)
set complication = null
endfunction
//===========================================================================
function InitTrig_Complicationss takes nothing returns nothing
set gg_trg_Complicationss = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Complicationss, gg_rct_complicated7 )
call TriggerAddCondition( gg_trg_Complicationss, Condition( function Trig_Complicationss_Conditions ) )
call TriggerAddAction( gg_trg_Complicationss, function Trig_Complicationss_Actions )
endfunction
function Trig_Complicationsss_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'nfgt' ) ) then
return false
endif
return true
endfunction
function Trig_Complicationsss_Actions takes nothing returns nothing
local location complication = Location(GetRectCenterX(gg_rct_complicated8), GetRectCenterY(gg_rct_complicated8))
call IssuePointOrderLoc(GetTriggerUnit(), "move", complication)
call RemoveLocation(complication)
set complication = null
endfunction
//===========================================================================
function InitTrig_Complicationsss takes nothing returns nothing
set gg_trg_Complicationsss = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Complicationsss, gg_rct_complicated9 )
call TriggerAddCondition( gg_trg_Complicationsss, Condition( function Trig_Complicationsss_Conditions ) )
call TriggerAddAction( gg_trg_Complicationsss, function Trig_Complicationsss_Actions )
endfunction
function Trig_The_Key_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'Hmkg' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'kygh' ) ) then
return false
endif
return true
endfunction
function Trig_The_Key_Actions takes nothing returns nothing
local location keyp = GetRectCenter(gg_rct_GrassAddLvl4)
call DestroyTrigger(GetTriggeringTrigger())
set udg_lagsubtract = -4.00
set udg_KeyPlayer = GetOwningPlayer(GetTriggerUnit())
call SetTerrainTypeBJ(keyp, 'Yhdg', -1, 1, 1)
call RemoveLocation(keyp)
call DisplayTextToForce(GetPlayersAll(), ( GetPlayerName(GetOwningPlayer(GetManipulatingUnit())) + " has the key to the Canyon of Souls!!! Come on now.." ))
set keyp = null
endfunction
//===========================================================================
function InitTrig_The_Key takes nothing returns nothing
set gg_trg_The_Key = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_The_Key, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_The_Key, Condition( function Trig_The_Key_Conditions ) )
call TriggerAddAction( gg_trg_The_Key, function Trig_The_Key_Actions )
endfunction
function Trig_Spinning2_Actions takes nothing returns nothing
local real count
local integer i = 1
local real xx = GetUnitX(gg_unit_nzom_0152)
local real yy = GetUnitY(gg_unit_nzom_0152)
local real xo
local real yo
call TimerStart(udg_WheelTimer2, 0.06, false, null)
set count = 90.00
loop
exitwhen i > 2
set xo = PolarProjectionX(xx, count, udg_lagangle + 90.00)
set yo = PolarProjectionY(yy, count, udg_lagangle + 90.00)
call SetUnitPosition(udg_BH[i], xo, yo)
set count = count + 90.00
set i = i + 1
endloop
set count = 90.00
loop
exitwhen i > 5
set xo = PolarProjectionX(xx, count, udg_lagangle)
set yo = PolarProjectionY(yy, count, udg_lagangle)
call SetUnitPosition(udg_BH[i], xo, yo)
set count = count + 90.00
set i = i + 1
endloop
set count = 90.00
loop
exitwhen i > 8
set xo = PolarProjectionX(xx, count, udg_lagangle + 180.00)
set yo = PolarProjectionY(yy, count, udg_lagangle + 180.00)
call SetUnitPosition(udg_BH[i], xo, yo)
set count = count + 90.00
set i = i + 1
endloop
set count = 90.00
loop
exitwhen i > 10
set xo = PolarProjectionX(xx, count, udg_lagangle + 270.00)
set yo = PolarProjectionY(yy, count, udg_lagangle + 270.00)
call SetUnitPosition(udg_BH[i], xo, yo)
set count = count + 90.00
set i = i + 1
endloop
set udg_lagangle = udg_lagangle - 6.00
endfunction
//===========================================================================
function InitTrig_BlackHole1 takes nothing returns nothing
set gg_trg_BlackHole1 = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_BlackHole1, udg_WheelTimer2 )
call TriggerAddAction( gg_trg_BlackHole1, function Trig_Spinning2_Actions )
endfunction
function Trig_HoleWheel_Actions takes nothing returns nothing
local real xxl = GetUnitX(gg_unit_u00B_0090)
local real yyl = GetUnitY(gg_unit_u00B_0090)
local real xol
local real yol
call TimerStart(udg_WheelTimer, 0.07, false, null)
set xol = PolarProjectionX(xxl, 270.00, udg_laganglel + 90.00)
set yol = PolarProjectionY(yyl, 270.00, udg_laganglel + 90.00)
call SetUnitFacing(gg_unit_u00B_0090, udg_laganglel + 90.00)
call SetUnitPosition(gg_unit_nzom_0084, xol, yol)
set xol = PolarProjectionX(xxl, 270.00, udg_laganglel)
set yol = PolarProjectionY(yyl, 270.00, udg_laganglel)
call SetUnitPosition(gg_unit_nzom_0079, xol, yol)
set xol = PolarProjectionX(xxl, 270.00, udg_laganglel + 180.00)
set yol = PolarProjectionY(yyl, 270.00, udg_laganglel + 180.00)
call SetUnitPosition(gg_unit_nzom_0085, xol, yol)
set xol = PolarProjectionX(xxl, 270.00, udg_laganglel + 270.00)
set yol = PolarProjectionY(yyl, 270.00, udg_laganglel + 270.00)
call SetUnitPosition(gg_unit_nzom_0030, xol, yol)
set udg_laganglel = udg_laganglel + udg_lagsubtract
endfunction
//===========================================================================
function InitTrig_HoleWheel takes nothing returns nothing
set gg_trg_HoleWheel = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_HoleWheel, udg_WheelTimer )
call TriggerAddAction( gg_trg_HoleWheel, function Trig_HoleWheel_Actions )
endfunction
function Trig_MiniLvl4_1_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == udg_CurrentMine ) ) then
return false
endif
return true
endfunction
function Trig_MiniLvl4_1_Actions takes nothing returns nothing
local location createnew
local location trapl = Location(GetDestructableX(gg_dest_B001_0070), GetDestructableY(gg_dest_B001_0070))
local effect trape = AddSpecialEffectLoc("Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl", trapl)
local unit trapu = CreateUnitAtLoc(Player(11), 'u00A', trapl, 0.00)
call RemoveLocation(trapl)
set trapl = GetRectCenter(gg_rct_MoveTrapM)
call IssuePointOrderLoc(trapu, "move", trapl)
call RemoveLocation(trapl)
call DestroyEffect(trape)
set trapl = null
set trape = null
set trapu = null
call TriggerSleepAction(12.00)
set createnew = GetRectCenter(gg_rct_NewMine)
set udg_CurrentMine = CreateUnitAtLoc(Player(11), 'u007', createnew, 0.00)
call RemoveLocation(createnew)
set createnew = null
endfunction
//===========================================================================
function InitTrig_MiniLvl4_1 takes nothing returns nothing
set gg_trg_MiniLvl4_1 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_MiniLvl4_1, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_MiniLvl4_1, Condition( function Trig_MiniLvl4_1_Conditions ) )
call TriggerAddAction( gg_trg_MiniLvl4_1, function Trig_MiniLvl4_1_Actions )
endfunction
function Trig_MiniLvl4_2_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'Hmkg' ) ) then
return false
endif
return true
endfunction
function Trig_MiniLvl4_2_Actions takes nothing returns nothing
local location tral = Location(GetDestructableX(gg_dest_B001_0081), GetDestructableY(gg_dest_B001_0081))
local effect trae = AddSpecialEffectLoc("Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl", tral)
local unit trau = CreateUnitAtLoc(Player(11), 'u00A', tral, 0.00)
local unit trao = CreateUnitAtLoc(Player(11), 'u00A', tral, 0.00)
local unit trai = CreateUnitAtLoc(Player(11), 'u00A', tral, 0.00)
call TriggerSleepAction(1.00)
call RemoveLocation(tral)
set tral = GetRectCenter(gg_rct_MoveNorthOne)
call IssuePointOrderLoc(trau, "move", tral)
call RemoveLocation(tral)
set tral = GetRectCenter(gg_rct_MoveWestOne)
call IssuePointOrderLoc(trao, "move", tral)
call RemoveLocation(tral)
set tral = GetRectCenter(gg_rct_MoveEastOne)
call IssuePointOrderLoc(trai, "move", tral)
call RemoveLocation(tral)
call DestroyEffect(trae)
set tral = null
set trae = null
set trau = null
set trao = null
set trai = null
endfunction
//===========================================================================
function InitTrig_MiniLvl4_2 takes nothing returns nothing
set gg_trg_MiniLvl4_2 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_MiniLvl4_2, gg_rct_Part2 )
call TriggerAddCondition( gg_trg_MiniLvl4_2, Condition( function Trig_MiniLvl4_2_Conditions ) )
call TriggerAddAction( gg_trg_MiniLvl4_2, function Trig_MiniLvl4_2_Actions )
endfunction
function Trig_MiniLvl4_3_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'u00A' ) ) then
return false
endif
return true
endfunction
function Trig_MiniLvl4_3_Actions takes nothing returns nothing
local location taps = GetRectCenter(gg_rct_MoveEastEx)
call IssuePointOrderLoc(GetTriggerUnit(), "move", taps)
call RemoveLocation(taps)
set taps = null
endfunction
//===========================================================================
function InitTrig_MiniLvl4_3 takes nothing returns nothing
set gg_trg_MiniLvl4_3 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_MiniLvl4_3, gg_rct_MoveWestOne )
call TriggerAddCondition( gg_trg_MiniLvl4_3, Condition( function Trig_MiniLvl4_3_Conditions ) )
call TriggerAddAction( gg_trg_MiniLvl4_3, function Trig_MiniLvl4_3_Actions )
endfunction
function Trig_MiniLvl4_3Ex_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'u00A' ) ) then
return false
endif
return true
endfunction
function Trig_MiniLvl4_3Ex_Actions takes nothing returns nothing
local location tapsl = GetRectCenter(gg_rct_MoveEastExF)
call IssuePointOrderLoc(GetTriggerUnit(), "move", tapsl)
call RemoveLocation(tapsl)
set tapsl = null
endfunction
//===========================================================================
function InitTrig_MiniLvl4_3Ex takes nothing returns nothing
set gg_trg_MiniLvl4_3Ex = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_MiniLvl4_3Ex, gg_rct_MoveEastEx )
call TriggerAddCondition( gg_trg_MiniLvl4_3Ex, Condition( function Trig_MiniLvl4_3Ex_Conditions ) )
call TriggerAddAction( gg_trg_MiniLvl4_3Ex, function Trig_MiniLvl4_3Ex_Actions )
endfunction
function Trig_MiniLvl4_4_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'u00A' ) ) then
return false
endif
return true
endfunction
function Trig_MiniLvl4_4_Actions takes nothing returns nothing
call KillUnit(GetTriggerUnit())
endfunction
//===========================================================================
function InitTrig_MiniLvl4_4 takes nothing returns nothing
set gg_trg_MiniLvl4_4 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_MiniLvl4_4, gg_rct_MoveEastExF )
call TriggerRegisterEnterRectSimple( gg_trg_MiniLvl4_4, gg_rct_MoveEastOne )
call TriggerRegisterEnterRectSimple( gg_trg_MiniLvl4_4, gg_rct_KillInit )
call TriggerAddCondition( gg_trg_MiniLvl4_4, Condition( function Trig_MiniLvl4_4_Conditions ) )
call TriggerAddAction( gg_trg_MiniLvl4_4, function Trig_MiniLvl4_4_Actions )
endfunction
function Trig_Terrain_Actions takes nothing returns nothing
local effect s
local integer i = GetRandomInt(1,2)
local location n = GetRandomLocInRect(gg_rct_Fight)
call AddSpecialEffectLocBJ(n, "Abilities\\Spells\\Human\\FlameStrike\\FlameStrikeTarget.mdl" )
set s = (GetLastCreatedEffectBJ())
call TimerStart( udg_TerrainTimer, udg_Time, false, null )
call SetTerrainTypeBJ( n, 'Ywmb', -1, i, 1 )
call TriggerSleepAction( 1.75 )
call DestroyEffect(s)
call SetTerrainTypeBJ( n, 'Oaby', -1, i, 1 )
call TriggerSleepAction( 2.00 )
call SetTerrainTypeBJ( n, 'Ybtl', -1, i, 1 )
call RemoveLocation(n)
set n = null
set s = null
call TriggerExecute(gg_trg_TerrainSecond)
endfunction
//===========================================================================
function InitTrig_Terrain takes nothing returns nothing
set gg_trg_Terrain = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_Terrain, udg_TerrainTimer )
call TriggerAddAction( gg_trg_Terrain, function Trig_Terrain_Actions )
endfunction
function Trig_TerrainSecond_Actions takes nothing returns nothing
local integer ip = 2
local location np = GetRandomLocInRect(gg_rct_Fight)
call SetTerrainTypeBJ( np, 'Ywmb', -1, ip, 0 )
call TriggerSleepAction( 1.5 )
call SetTerrainTypeBJ( np, 'Oaby', -1, ip, 0 )
call TriggerSleepAction( 2.00 )
call SetTerrainTypeBJ( np, 'Ybtl', -1, ip, 0 )
call RemoveLocation(np)
set np = null
endfunction
//===========================================================================
function InitTrig_TerrainSecond takes nothing returns nothing
set gg_trg_TerrainSecond = CreateTrigger( )
call TriggerAddAction( gg_trg_TerrainSecond, function Trig_TerrainSecond_Actions )
endfunction
function Trig_Finished_Func001Func006002 takes nothing returns nothing
call CameraSetEQNoiseForPlayer( GetEnumPlayer(), 5.00 )
endfunction
function Trig_Finished_Func001Func025A takes nothing returns nothing
call CameraClearNoiseForPlayer( GetEnumPlayer() )
call CreateFogModifierRectBJ( true, GetEnumPlayer(), FOG_OF_WAR_VISIBLE, gg_rct_visibility6 )
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), udg_CheckPointPoint, 0 )
endfunction
function Trig_Finished_Func001Func026A takes nothing returns nothing
call ReviveHeroLoc( GetEnumUnit(), udg_CheckPointPoint, false )
endfunction
function Trig_Finished_Func001Func029002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Finished_Func001Func039A takes nothing returns nothing
set udg_CheckPointPoint = GetUnitLoc(gg_unit_Udea_0128)
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), udg_CheckPointPoint, 1.00 )
call RemoveLocation(udg_CheckPointPoint)
endfunction
function Trig_Finished_Func001Func059002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), udg_EffectPoint, 1.00 )
endfunction
function Trig_Finished_Func001C takes nothing returns boolean
return true
endfunction
function Trig_Finished_Actions takes nothing returns nothing
local integer i = 1
if ( Trig_Finished_Func001C() ) then
loop
exitwhen i > 10
call AdjustPlayerStateBJ(1, ConvertedPlayer(i), PLAYER_STATE_RESOURCE_LUMBER)
set i = i + 1
endloop
call PauseTimerBJ( false, udg_pathtimer )
call PauseTimerBJ( true, udg_SCTimer )
call PauseTimerBJ( true, udg_TerrainTimer )
call PauseTimerBJ( true, udg_SubTimer )
call DestroyTimerDialogBJ( GetLastCreatedTimerDialogBJ() )
call ForForce( GetPlayersAll(), function Trig_Finished_Func001Func006002 )
call TransmissionFromUnitWithNameBJ( GetPlayersAll(), udg_Lv5SoulKeep, "TRIGSTR_390", null, "TRIGSTR_391", bj_TIMETYPE_ADD, 0, true )
call SetUnitAnimation( udg_Lv5SoulKeep, "spell slam" )
call TriggerSleepAction( 1.00 )
call RemoveUnit( udg_Lv5SoulKeep )
call TriggerSleepAction( 3.00 )
set udg_EffectPoint = GetRectCenter(gg_rct_Cam)
call AddSpecialEffectLocBJ( udg_EffectPoint, "Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTo.mdl" )
call TriggerSleepAction( 1.00 )
call PlaySoundBJ( gg_snd_UtherReturns )
call EnableTrigger( gg_trg_Teleporting )
call DisableTrigger( gg_trg_GoesOut )
call EnableTrigger( gg_trg_Lv6Done )
call TriggerExecute( gg_trg_Untitled_Trigger_142 )
call RemoveLocation(udg_revivespot)
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_381" )
call TriggerSleepAction( 2 )
set udg_revivespot = GetRectCenter(gg_rct_Region_155)
set udg_CheckPointPoint = GetRectCenter(gg_rct_Region_155)
call ForForce( udg_players, function Trig_Finished_Func001Func025A )
call ForGroupBJ( udg_defeat, function Trig_Finished_Func001Func026A )
set udg_CheckPointGroup = GetUnitsInRectAll(gg_rct_Fight)
call GroupRemoveGroup( GetUnitsOfTypeIdAll('Hmkg'), udg_CheckPointGroup )
call ForGroupBJ( udg_CheckPointGroup, function Trig_Finished_Func001Func029002 )
call RemoveLocation(udg_CheckPointPoint)
call DestroyGroup(udg_CheckPointGroup)
call StartTimerBJ( udg_TerrainMoveTimer, false, 10.00 )
call StopMusicBJ( false )
call PlayMusicBJ( gg_snd_DarkAgents )
call TriggerSleepAction( 5.00 )
call CinematicModeBJ( true, GetPlayersAll() )
call TransmissionFromUnitTypeWithNameBJ( GetPlayersAll(), Player(0), 'Hmkg', GetPlayerName(Player(0)), GetPlayerStartLocationLoc(Player(0)), null, "TRIGSTR_439", bj_TIMETYPE_ADD, 0, true )
call TransmissionFromUnitTypeWithNameBJ( GetPlayersAll(), Player(11), 'Udea', "TRIGSTR_461", GetPlayerStartLocationLoc(Player(11)), null, "TRIGSTR_460", bj_TIMETYPE_ADD, 0, true )
call ForForce( udg_players, function Trig_Finished_Func001Func039A )
call TriggerSleepAction( 1.00 )
call TransmissionFromUnitTypeWithNameBJ( GetPlayersAll(), Player(0), 'Hmkg', GetPlayerName(Player(0)), GetPlayerStartLocationLoc(Player(0)), null, "TRIGSTR_462", bj_TIMETYPE_ADD, 0, true )
call TriggerSleepAction( 1.00 )
call TransmissionFromUnitTypeWithNameBJ( GetPlayersAll(), Player(11), 'Udea', "TRIGSTR_463", GetPlayerStartLocationLoc(Player(11)), null, "TRIGSTR_464", bj_TIMETYPE_ADD, 0, true )
call TriggerSleepAction( 1.00 )
call TransmissionFromUnitTypeWithNameBJ( GetPlayersAll(), Player(1), 'Hmkg', GetPlayerName(Player(1)), GetPlayerStartLocationLoc(Player(1)), null, "TRIGSTR_465", bj_TIMETYPE_ADD, 1.00, true )
call TransmissionFromUnitTypeWithNameBJ( GetPlayersAll(), Player(11), 'Udea', "TRIGSTR_466", GetPlayerStartLocationLoc(Player(11)), null, "TRIGSTR_467", bj_TIMETYPE_ADD, 2.00, true )
call TransmissionFromUnitTypeWithNameBJ( GetPlayersAll(), Player(11), 'Udea', "TRIGSTR_468", GetPlayerStartLocationLoc(Player(11)), null, "TRIGSTR_469", bj_TIMETYPE_ADD, 0, true )
call TransmissionFromUnitTypeWithNameBJ( GetPlayersAll(), Player(11), 'Udea', "TRIGSTR_470", GetPlayerStartLocationLoc(Player(11)), null, "TRIGSTR_471", bj_TIMETYPE_ADD, 2.00, true )
call PlaySoundBJ( gg_snd_GameFound )
call StopMusicBJ( false )
call PlayMusicBJ( gg_snd_Tension )
call TransmissionFromUnitTypeWithNameBJ( GetPlayersAll(), Player(11), 'nvl2', "TRIGSTR_472", GetPlayerStartLocationLoc(Player(11)), null, "TRIGSTR_473", bj_TIMETYPE_ADD, 1.00, true )
call TransmissionFromUnitTypeWithNameBJ( GetPlayersAll(), Player(11), 'nvl2', "TRIGSTR_474", GetPlayerStartLocationLoc(Player(11)), null, "TRIGSTR_475", bj_TIMETYPE_ADD, 1.00, true )
call TriggerSleepAction( 1.00 )
call TransmissionFromUnitWithNameBJ( GetPlayersAll(), GetEnumUnit(), "TRIGSTR_478", null, "TRIGSTR_479", bj_TIMETYPE_ADD, 0, true )
call TriggerSleepAction( 3.00 )
call TransmissionFromUnitTypeWithNameBJ( GetPlayersAll(), Player(11), 'Udea', "TRIGSTR_482", GetPlayerStartLocationLoc(Player(11)), null, "TRIGSTR_483", bj_TIMETYPE_ADD, 2.00, true )
set udg_EffectPoint = GetRectCenter(gg_rct_Region_233)
call ForForce( GetPlayersAll(), function Trig_Finished_Func001Func059002 )
call PlaySoundBJ( gg_snd_O04Mannoroth38 )
call CreateNUnitsAtLoc( 1, 'u003', Player(11), udg_EffectPoint, bj_UNIT_FACING )
set udg_Pod = GetLastCreatedUnit()
call SetUnitAnimation( GetLastCreatedUnit(), "birth" )
call SetUnitUserData( GetLastCreatedUnit(), 1 )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_PodGroup )
call RemoveLocation(udg_EffectPoint)
call StartTimerBJ( udg_PodTimer, false, 10.00 )
set udg_PTime = true
call TransmissionFromUnitTypeWithNameBJ( GetPlayersAll(), Player(1), 'Hmkg', GetPlayerName(Player(1)), GetPlayerStartLocationLoc(Player(1)), null, "TRIGSTR_480", bj_TIMETYPE_ADD, 1.00, true )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
call CinematicModeBJ( false, GetPlayersAll() )
call StopMusicBJ( false )
call PlayMusicBJ( gg_snd_PH1 )
else
endif
endfunction
//===========================================================================
function InitTrig_Finished takes nothing returns nothing
set gg_trg_Finished = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_Finished, udg_TimeTilTele )
call TriggerAddAction( gg_trg_Finished, function Trig_Finished_Actions )
endfunction
function Trig_Teleporting_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'Hmkg' ) ) then
return false
endif
return true
endfunction
function Trig_Teleporting_Actions takes nothing returns nothing
local effect e
local location tpp = GetRectCenter(gg_rct_Region_155)
call AddSpecialEffectTargetUnitBJ( "origin", GetTriggerUnit(), "Abilities\\Spells\\Human\\MassTeleport\\MassTeleportCaster.mdl" )
set e = (GetLastCreatedEffectBJ())
call SetUnitPositionLoc( GetTriggerUnit(), tpp )
call RemoveLocation(tpp)
call TriggerSleepAction( 1.00 )
call DestroyEffect(e)
set e = null
set tpp = null
endfunction
//===========================================================================
function InitTrig_Teleporting takes nothing returns nothing
set gg_trg_Teleporting = CreateTrigger( )
call DisableTrigger( gg_trg_Teleporting )
call TriggerRegisterEnterRectSimple( gg_trg_Teleporting, gg_rct_Cam )
call TriggerAddCondition( gg_trg_Teleporting, Condition( function Trig_Teleporting_Conditions ) )
call TriggerAddAction( gg_trg_Teleporting, function Trig_Teleporting_Actions )
endfunction
function Trig_Untitled_Trigger_120_Actions takes nothing returns nothing
call IssuePointOrderLocBJ( gg_unit_nfgt_0109, "patrol", GetRectCenter(gg_rct_Region_139) )
call IssuePointOrderLocBJ( gg_unit_hmtm_0115, "attackground", GetRectCenter(gg_rct_Region_132) )
call IssuePointOrderLocBJ( gg_unit_hmtm_0117, "attackground", GetRectCenter(gg_rct_Region_136) )
call IssuePointOrderLocBJ( gg_unit_hmtm_0114, "attackground", GetRectCenter(gg_rct_Region_137) )
call IssuePointOrderLocBJ( gg_unit_hmtm_0116, "attackground", GetRectCenter(gg_rct_Region_138) )
call IssuePointOrderLocBJ( gg_unit_hmtm_0111, "attackground", GetRectCenter(gg_rct_Region_143) )
call IssuePointOrderLocBJ( gg_unit_hmtm_0107, "attackground", GetRectCenter(gg_rct_Region_144) )
call IssuePointOrderLocBJ( gg_unit_hmtm_0106, "attackground", GetRectCenter(gg_rct_Region_141) )
call IssuePointOrderLocBJ( gg_unit_hmtm_0110, "attackground", GetRectCenter(gg_rct_Region_142) )
call IssuePointOrderLocBJ( gg_unit_hmtm_0113, "attackground", GetRectCenter(gg_rct_Region_140) )
call IssuePointOrderLocBJ( gg_unit_hmtm_0104, "attackground", GetRectCenter(gg_rct_Region_145) )
call IssuePointOrderLocBJ( gg_unit_hmtm_0112, "attackground", GetRectCenter(gg_rct_Region_146) )
endfunction
//===========================================================================
function InitTrig_Untitled_Trigger_120 takes nothing returns nothing
set gg_trg_Untitled_Trigger_120 = CreateTrigger( )
call TriggerAddAction( gg_trg_Untitled_Trigger_120, function Trig_Untitled_Trigger_120_Actions )
endfunction
function Trig_SSSpawn_Actions takes nothing returns nothing
local location arb = GetRectCenter(gg_rct_SpawnLv5)
local unit arbm = CreateUnitAtLoc(Player(11), 'nfgt', arb, 0.00)
call RemoveLocation(arb)
call TimerStart(udg_PatrolTimer, 3.00, false, null)
set arb = GetRectCenter(gg_rct_MoveLv5)
call IssuePointOrderLoc(arbm, "move", arb)
call RemoveLocation(arb)
set arb = null
set arbm = null
endfunction
//===========================================================================
function InitTrig_SSSpawn takes nothing returns nothing
set gg_trg_SSSpawn = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ(gg_trg_SSSpawn, udg_PatrolTimer)
call TriggerAddAction(gg_trg_SSSpawn, function Trig_SSSpawn_Actions)
endfunction
function Trig_KillObstacleLv5_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'Hmkg' ) ) then
return false
endif
return true
endfunction
function Trig_KillObstacleLv5_Actions takes nothing returns nothing
call KillDestructable(gg_dest_LTbx_0067)
call DestroyTrigger(GetTriggeringTrigger())
call PlaySoundBJ(gg_snd_Lever)
call KillUnit(gg_unit_uobs_0102)
call KillUnit(gg_unit_uarb_0105)
endfunction
//===========================================================================
function InitTrig_KillObstacleLv5 takes nothing returns nothing
set gg_trg_KillObstacleLv5 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_KillObstacleLv5, gg_rct_Region_135 )
call TriggerAddCondition( gg_trg_KillObstacleLv5, Condition( function Trig_KillObstacleLv5_Conditions ) )
call TriggerAddAction( gg_trg_KillObstacleLv5, function Trig_KillObstacleLv5_Actions )
endfunction
function Trig_TurningShooter_Actions takes nothing returns nothing
local real facing = GetUnitFacing(gg_unit_ebal_0118) + 20.00
call TimerStart(udg_FaceTimer, 0.65, false , null)
call SetUnitFacing(gg_unit_ebal_0118, facing)
endfunction
//===========================================================================
function InitTrig_TurningShooter takes nothing returns nothing
set gg_trg_TurningShooter = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_TurningShooter, udg_FaceTimer )
call TriggerAddAction( gg_trg_TurningShooter, function Trig_TurningShooter_Actions )
endfunction
function Trig_Launching_Actions takes nothing returns nothing
local real spitx = GetUnitX(GetTriggerUnit())
local real spity = GetUnitY(GetTriggerUnit())
local real newsx
local real newsy
call PauseTimer(udg_FaceTimer)
call DisableTrigger(GetTriggeringTrigger())
call PlaySoundBJ(gg_snd_Devour)
call ShowUnit(GetTriggerUnit(), false)
call TriggerSleepAction(2.00)
call PlaySoundBJ(gg_snd_KodoBeastPuke1)
call TriggerSleepAction(2.00)
call PauseUnit(gg_unit_ebal_0118, false)
set newsx = PolarProjectionX(spitx, 900.00, GetUnitFacing(gg_unit_ebal_0118))
set newsy = PolarProjectionY(spity, 900.00, GetUnitFacing(gg_unit_ebal_0118))
call IssuePointOrder(gg_unit_ebal_0118, "attackground", newsx, newsy)
call SetUnitAnimation(gg_unit_ebal_0118, "attack")
call TriggerSleepAction(1.75)
call ResetUnitAnimation(gg_unit_ebal_0118)
call IssueImmediateOrder(gg_unit_ebal_0118, "stop")
call SetUnitPosition(GetTriggerUnit(), newsx, newsy)
call ShowUnit(GetTriggerUnit(), true)
call ResumeTimer(udg_FaceTimer)
call PauseUnit(gg_unit_ebal_0118, true)
call EnableTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_Launching takes nothing returns nothing
set gg_trg_Launching = CreateTrigger( )
call TriggerRegisterUnitInRangeSimple( gg_trg_Launching, 100.00, gg_unit_ebal_0118 )
call TriggerAddAction( gg_trg_Launching, function Trig_Launching_Actions )
endfunction
function Trig_Untitled_Trigger_131_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'nfgt' ) ) then
return false
endif
return true
endfunction
function Trig_Untitled_Trigger_131_Actions takes nothing returns nothing
local location peanut = GetRectCenter(gg_rct_Region_175)
call IssuePointOrderLoc(GetTriggerUnit(), "move", peanut)
call RemoveLocation(peanut)
set peanut = null
endfunction
//===========================================================================
function InitTrig_Untitled_Trigger_131 takes nothing returns nothing
set gg_trg_Untitled_Trigger_131 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Untitled_Trigger_131, gg_rct_Region_174 )
call TriggerAddCondition( gg_trg_Untitled_Trigger_131, Condition( function Trig_Untitled_Trigger_131_Conditions ) )
call TriggerAddAction( gg_trg_Untitled_Trigger_131, function Trig_Untitled_Trigger_131_Actions )
endfunction
function Trig_Untitled_Trigger_144_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'nfgt' ) ) then
return false
endif
return true
endfunction
function Trig_Untitled_Trigger_144_Actions takes nothing returns nothing
local location tfr = GetRectCenter(gg_rct_Region_176)
call IssuePointOrderLoc( GetTriggerUnit(), "move", tfr )
call RemoveLocation(tfr)
set tfr = null
endfunction
//===========================================================================
function InitTrig_Untitled_Trigger_144 takes nothing returns nothing
set gg_trg_Untitled_Trigger_144 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Untitled_Trigger_144, gg_rct_Region_175 )
call TriggerAddCondition( gg_trg_Untitled_Trigger_144, Condition( function Trig_Untitled_Trigger_144_Conditions ) )
call TriggerAddAction( gg_trg_Untitled_Trigger_144, function Trig_Untitled_Trigger_144_Actions )
endfunction
function Trig_Untitled_Trigger_145_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'nfgt' ) ) then
return false
endif
return true
endfunction
function Trig_Untitled_Trigger_145_Actions takes nothing returns nothing
local location annihil = GetRectCenter(gg_rct_Region_174)
call IssuePointOrderLoc( GetTriggerUnit(), "move", annihil )
call RemoveLocation(annihil)
set annihil = null
endfunction
//===========================================================================
function InitTrig_Untitled_Trigger_145 takes nothing returns nothing
set gg_trg_Untitled_Trigger_145 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Untitled_Trigger_145, gg_rct_Region_176 )
call TriggerAddCondition( gg_trg_Untitled_Trigger_145, Condition( function Trig_Untitled_Trigger_145_Conditions ) )
call TriggerAddAction( gg_trg_Untitled_Trigger_145, function Trig_Untitled_Trigger_145_Actions )
endfunction
function Trig_StopShaking_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetTriggerUnit()) != Player(11) ) ) then
return false
endif
return true
endfunction
function Trig_StopShaking_Actions takes nothing returns nothing
call CameraClearNoiseForPlayer( GetOwningPlayer(GetTriggerUnit()) )
endfunction
//===========================================================================
function InitTrig_StopShaking takes nothing returns nothing
set gg_trg_StopShaking = CreateTrigger( )
call TriggerRegisterLeaveRectSimple( gg_trg_StopShaking, gg_rct_Shaking )
call TriggerAddCondition( gg_trg_StopShaking, Condition( function Trig_StopShaking_Conditions ) )
call TriggerAddAction( gg_trg_StopShaking, function Trig_StopShaking_Actions )
endfunction
function Trig_The_Trap_Conditions takes nothing returns boolean
if ( not ( GetManipulatedItem() == gg_item_I000_0044 ) ) then
return false
endif
return true
endfunction
function Trig_The_Trap_Actions takes nothing returns nothing
local location woom = GetRectCenter(gg_rct_Bam)
local location tripe = GetRectCenter(gg_rct_oompa)
call CameraSetEQNoiseForPlayer( GetOwningPlayer(GetTriggerUnit()), 360.00 )
call TriggerSleepAction( 2.50 )
call CameraClearNoiseForPlayer( GetOwningPlayer(GetTriggerUnit()) )
call PlaySoundBJ(gg_snd_MortarImpact)
call TerrainDeformationWaveBJ( 5.00, woom,tripe, 500.00, -2000.00, 0 )
call RemoveLocation(woom)
call RemoveLocation(tripe)
set woom = null
set tripe = null
endfunction
//===========================================================================
function InitTrig_The_Trap takes nothing returns nothing
set gg_trg_The_Trap = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_The_Trap, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_The_Trap, Condition( function Trig_The_Trap_Conditions ) )
call TriggerAddAction( gg_trg_The_Trap, function Trig_The_Trap_Actions )
endfunction
function Trig_suicide_Actions takes nothing returns nothing
call KillUnit(udg_Escaper[GetConvertedPlayerId(GetTriggerPlayer())])
endfunction
//===========================================================================
function InitTrig_suicide takes nothing returns nothing
set gg_trg_suicide = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_suicide, Player(0), "-suicide", true )
call TriggerRegisterPlayerChatEvent( gg_trg_suicide, Player(1), "-suicide", true )
call TriggerRegisterPlayerChatEvent( gg_trg_suicide, Player(2), "-suicide", true )
call TriggerRegisterPlayerChatEvent( gg_trg_suicide, Player(3), "-suicide", true )
call TriggerRegisterPlayerChatEvent( gg_trg_suicide, Player(4), "-suicide", true )
call TriggerRegisterPlayerChatEvent( gg_trg_suicide, Player(5), "-suicide", true )
call TriggerRegisterPlayerChatEvent( gg_trg_suicide, Player(6), "-suicide", true )
call TriggerRegisterPlayerChatEvent( gg_trg_suicide, Player(7), "-suicide", true )
call TriggerRegisterPlayerChatEvent( gg_trg_suicide, Player(8), "-suicide", true )
call TriggerRegisterPlayerChatEvent( gg_trg_suicide, Player(9), "-suicide", true )
call TriggerAddAction( gg_trg_suicide, function Trig_suicide_Actions )
endfunction
function Trig_Base_Actions takes nothing returns nothing
local location basetele = Location(GetRectCenterX(gg_rct_Id), GetRectCenterY(gg_rct_Id))
call SetUnitPositionLoc(udg_Escaper[GetConvertedPlayerId(GetTriggerPlayer())], basetele)
call PanCameraToTimedLocForPlayer(GetTriggerPlayer(), basetele, 0)
call RemoveLocation(basetele)
set basetele = null
endfunction
//===========================================================================
function InitTrig_Base takes nothing returns nothing
set gg_trg_Base = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Base, Player(0), "-base", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Base, Player(1), "-base", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Base, Player(2), "-base", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Base, Player(3), "-base", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Base, Player(4), "-base", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Base, Player(5), "-base", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Base, Player(6), "-base", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Base, Player(7), "-base", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Base, Player(8), "-base", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Base, Player(9), "-base", true )
call TriggerAddAction( gg_trg_Base, function Trig_Base_Actions )
endfunction
function Trig_KickSystem_Conditions takes nothing returns boolean
if ( not ( "-kick" == SubStringBJ(GetEventPlayerChatString(), 1, 5) ) ) then
return false
endif
return true
endfunction
function Trig_KickSystem_Func001Func001Func001C takes integer y returns boolean
if ( not ( I2S(y) == SubStringBJ(GetEventPlayerChatString(), 7, StringLength(GetEventPlayerChatString())) ) ) then
return false
endif
if ( not ( GetPlayerSlotState(Player(y)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_KickSystem_Func001Func001Func007002 takes nothing returns nothing
call KillUnit( GetEnumUnit() )
endfunction
function Trig_KickSystem_Func001Func001Func009002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_KickSystem_Func001Func001C takes integer f returns boolean
if ( not Trig_KickSystem_Func001Func001Func001C(f) ) then
return false
endif
return true
endfunction
function Trig_KickSystem_Actions takes nothing returns nothing
local group kick = CreateGroup()
local integer i = 1
loop
exitwhen i > 10
if ( Trig_KickSystem_Func001Func001C(i) ) then
set udg_lives[GetConvertedPlayerId(ConvertedPlayer(GetForLoopIndexA()))] = 1
call LeaderboardSetPlayerItemLabelBJ( ConvertedPlayer(i), GetLastCreatedLeaderboard(), "TRIGSTR_418" )
call LeaderboardSetPlayerItemLabelColorBJ( ConvertedPlayer(i), GetLastCreatedLeaderboard(), 50.00, 50.00, 50.00, 20.00 )
call CustomDefeatBJ( ConvertedPlayer(i), ( "|cffff0000You were kicked by " + GetPlayerName(Player(0)) ) )
set kick = GetUnitsOfPlayerAll(ConvertedPlayer(i))
call ForGroup(kick, function Trig_KickSystem_Func001Func001Func007002)
call TriggerSleepAction( 0.50 )
call ForGroup(kick, function Trig_KickSystem_Func001Func001Func009002)
call DestroyGroup(kick)
else
endif
set i = i + 1
endloop
set kick = null
endfunction
//===========================================================================
function InitTrig_KickSystem takes nothing returns nothing
set gg_trg_KickSystem = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_KickSystem, Player(0), "-kick", false )
call TriggerAddCondition( gg_trg_KickSystem, Condition( function Trig_KickSystem_Conditions ) )
call TriggerAddAction( gg_trg_KickSystem, function Trig_KickSystem_Actions )
endfunction
function Trig_Bazooka_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A00M' ) ) then
return false
endif
return true
endfunction
function Trig_Bazooka_Actions takes nothing returns nothing
local location target = GetSpellTargetLoc()
call BazookaExplosion(target)
call RemoveLocation(target)
set target = null
endfunction
//===========================================================================
function InitTrig_Bazooka takes nothing returns nothing
set gg_trg_Bazooka = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Bazooka, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Bazooka, Condition( function Trig_Bazooka_Conditions ) )
call TriggerAddAction( gg_trg_Bazooka, function Trig_Bazooka_Actions )
endfunction
function Trig_GrabMech_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I000' ) ) then
return false
endif
return true
endfunction
function Trig_GrabMech_Func002A takes nothing returns nothing
if GetDestructableTypeId(GetEnumDestructable()) == 'B000' then
call KillDestructable( GetEnumDestructable() )
endif
endfunction
function Trig_GrabMech_Actions takes nothing returns nothing
local location mechl = GetUnitLoc(GetTriggerUnit())
call EnumDestructablesInCircleBJ(256, mechl, function Trig_GrabMech_Func002A)
call RemoveLocation(mechl)
if GetItemUserData(GetManipulatedItem()) != 1 then
call SetItemUserData(GetManipulatedItem(), 1)
call QuestMessageBJ( GetPlayersAll(), bj_QUESTMESSAGE_UNITACQUIRED, "|cff00ff00" + GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + " has gotten the Strange Mechanism first! He will receive one continue!|r")
set udg_lives[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = udg_lives[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1
else
endif
call LeaderboardSetPlayerItemValueBJ(GetOwningPlayer(GetTriggerUnit()), GetLastCreatedLeaderboard(), udg_lives[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))])
call RemoveLocation(mechl)
set mechl = null
endfunction
//===========================================================================
function InitTrig_GrabMech takes nothing returns nothing
set gg_trg_GrabMech = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_GrabMech, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_GrabMech, Condition( function Trig_GrabMech_Conditions ) )
call TriggerAddAction( gg_trg_GrabMech, function Trig_GrabMech_Actions )
endfunction