Name | Type | is_array | initial_value |
AgentsKilled | integer | No | |
BuildersKilled | integer | No | |
Continue | dialog | No | |
Continue_builder | button | No | |
Continue_vampire | button | No | |
Dialog_Player | player | No | |
Timer | timer | No |
function Trig_Melee_initialization_Func005002 takes nothing returns nothing
call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, GetEnumPlayer() )
endfunction
function Trig_Melee_initialization_Actions takes nothing returns nothing
call MeleeStartingVisibility( )
call MeleeStartingHeroLimit( )
call MeleeStartingAI( )
call ForForce( GetPlayersAll(), function Trig_Melee_initialization_Func005002 )
endfunction
//===========================================================================
function InitTrig_Melee_initialization takes nothing returns nothing
set gg_trg_Melee_initialization = CreateTrigger( )
call TriggerAddAction( gg_trg_Melee_initialization, function Trig_Melee_initialization_Actions )
endfunction
function Trig_Agents_Created_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetTrainedUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Agents_Created_Func001001 takes nothing returns boolean
return ( GetOwningPlayer(GetTrainedUnit()) == Player(8) )
endfunction
function Trig_Agents_Created_Actions takes nothing returns nothing
if ( Trig_Agents_Created_Func001001() ) then
call KillUnit( gg_unit_uaod_0020 )
else
call KillUnit( gg_unit_uaod_0021 )
endif
call DisplayTextToForce( GetPlayersAll(), ( GetPlayerName(GetOwningPlayer(GetTrainedUnit())) + " |cffff0000His Agent has just arrived!|r" ) )
call PlaySoundBJ( gg_snd_CreepAggroWhat1 )
endfunction
//===========================================================================
function InitTrig_Agents_Created takes nothing returns nothing
set gg_trg_Agents_Created = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Agents_Created, Player(8), EVENT_PLAYER_UNIT_TRAIN_FINISH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Agents_Created, Player(9), EVENT_PLAYER_UNIT_TRAIN_FINISH )
call TriggerAddCondition( gg_trg_Agents_Created, Condition( function Trig_Agents_Created_Conditions ) )
call TriggerAddAction( gg_trg_Agents_Created, function Trig_Agents_Created_Actions )
endfunction
function Trig_Kill_NotPlaying_Players_Func001001 takes nothing returns boolean
return ( GetPlayerSlotState(Player(8)) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Kill_NotPlaying_Players_Func002001 takes nothing returns boolean
return ( GetPlayerSlotState(Player(9)) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Kill_NotPlaying_Players_Actions takes nothing returns nothing
if ( Trig_Kill_NotPlaying_Players_Func001001() ) then
call DoNothing( )
else
set udg_AgentsKilled = ( udg_AgentsKilled + 1 )
endif
if ( Trig_Kill_NotPlaying_Players_Func002001() ) then
call DoNothing( )
else
set udg_AgentsKilled = ( udg_AgentsKilled + 1 )
endif
call ConditionalTriggerExecute( gg_trg_V )
call ConditionalTriggerExecute( gg_trg_B )
endfunction
//===========================================================================
function InitTrig_Kill_NotPlaying_Players takes nothing returns nothing
set gg_trg_Kill_NotPlaying_Players = CreateTrigger( )
call TriggerAddAction( gg_trg_Kill_NotPlaying_Players, function Trig_Kill_NotPlaying_Players_Actions )
endfunction
function Trig_Defeat_B_Actions takes nothing returns nothing
call CustomDefeatBJ( Player(0), "TRIGSTR_263" )
call CustomDefeatBJ( Player(1), "TRIGSTR_270" )
call CustomDefeatBJ( Player(2), "TRIGSTR_269" )
call CustomDefeatBJ( Player(3), "TRIGSTR_268" )
call CustomDefeatBJ( Player(4), "TRIGSTR_264" )
call CustomDefeatBJ( Player(5), "TRIGSTR_265" )
call CustomDefeatBJ( Player(6), "TRIGSTR_266" )
call CustomDefeatBJ( Player(7), "TRIGSTR_267" )
call CustomVictoryBJ( Player(8), true, true )
call CustomVictoryBJ( Player(9), true, true )
endfunction
//===========================================================================
function InitTrig_Defeat_B takes nothing returns nothing
set gg_trg_Defeat_B = CreateTrigger( )
call TriggerAddAction( gg_trg_Defeat_B, function Trig_Defeat_B_Actions )
endfunction
function Trig_Defeat_V_Actions takes nothing returns nothing
call CustomDefeatBJ( Player(8), "TRIGSTR_271" )
call CustomDefeatBJ( Player(9), "TRIGSTR_272" )
call CustomVictoryBJ( Player(0), true, true )
call CustomVictoryBJ( Player(1), true, true )
call CustomVictoryBJ( Player(2), true, true )
call CustomVictoryBJ( Player(3), true, true )
call CustomVictoryBJ( Player(4), true, true )
call CustomVictoryBJ( Player(5), true, true )
call CustomVictoryBJ( Player(6), true, true )
call CustomVictoryBJ( Player(7), true, true )
endfunction
//===========================================================================
function InitTrig_Defeat_V takes nothing returns nothing
set gg_trg_Defeat_V = CreateTrigger( )
call TriggerAddAction( gg_trg_Defeat_V, function Trig_Defeat_V_Actions )
endfunction
function Trig_Starting_lumber_Func002002 takes nothing returns nothing
call SetPlayerStateBJ( GetEnumPlayer(), PLAYER_STATE_RESOURCE_LUMBER, 1 )
endfunction
function Trig_Starting_lumber_Actions takes nothing returns nothing
call ForForce( GetPlayersEnemies(Player(0)), function Trig_Starting_lumber_Func002002 )
call PlaySoundBJ( gg_snd_WarlordYesAttack1 )
call SetUnitInvulnerable( gg_unit_uaod_0020, true )
call SetUnitInvulnerable( gg_unit_uaod_0021, true )
endfunction
//===========================================================================
function InitTrig_Starting_lumber takes nothing returns nothing
set gg_trg_Starting_lumber = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Starting_lumber, 1.00 )
call TriggerAddAction( gg_trg_Starting_lumber, function Trig_Starting_lumber_Actions )
endfunction
function Trig_Leavers_B_V_Func001001 takes nothing returns boolean
return ( GetPlayerSlotState(Player(0)) == PLAYER_SLOT_STATE_LEFT )
endfunction
function Trig_Leavers_B_V_Func001002002 takes nothing returns nothing
call KillUnit( GetEnumUnit() )
endfunction
function Trig_Leavers_B_V_Func002001 takes nothing returns boolean
return ( GetPlayerSlotState(Player(1)) == PLAYER_SLOT_STATE_LEFT )
endfunction
function Trig_Leavers_B_V_Func002002002 takes nothing returns nothing
call KillUnit( GetEnumUnit() )
endfunction
function Trig_Leavers_B_V_Func003001 takes nothing returns boolean
return ( GetPlayerSlotState(Player(2)) == PLAYER_SLOT_STATE_LEFT )
endfunction
function Trig_Leavers_B_V_Func003002002 takes nothing returns nothing
call KillUnit( GetEnumUnit() )
endfunction
function Trig_Leavers_B_V_Func004001 takes nothing returns boolean
return ( GetPlayerSlotState(Player(3)) == PLAYER_SLOT_STATE_LEFT )
endfunction
function Trig_Leavers_B_V_Func004002002 takes nothing returns nothing
call KillUnit( GetEnumUnit() )
endfunction
function Trig_Leavers_B_V_Func005001 takes nothing returns boolean
return ( GetPlayerSlotState(Player(4)) == PLAYER_SLOT_STATE_LEFT )
endfunction
function Trig_Leavers_B_V_Func005002002 takes nothing returns nothing
call KillUnit( GetEnumUnit() )
endfunction
function Trig_Leavers_B_V_Func006001 takes nothing returns boolean
return ( GetPlayerSlotState(Player(5)) == PLAYER_SLOT_STATE_LEFT )
endfunction
function Trig_Leavers_B_V_Func006002002 takes nothing returns nothing
call KillUnit( GetEnumUnit() )
endfunction
function Trig_Leavers_B_V_Func007001 takes nothing returns boolean
return ( GetPlayerSlotState(Player(6)) == PLAYER_SLOT_STATE_LEFT )
endfunction
function Trig_Leavers_B_V_Func007002002 takes nothing returns nothing
call KillUnit( GetEnumUnit() )
endfunction
function Trig_Leavers_B_V_Func008001 takes nothing returns boolean
return ( GetPlayerSlotState(Player(7)) == PLAYER_SLOT_STATE_LEFT )
endfunction
function Trig_Leavers_B_V_Func008002002 takes nothing returns nothing
call KillUnit( GetEnumUnit() )
endfunction
function Trig_Leavers_B_V_Func009001 takes nothing returns boolean
return ( GetPlayerSlotState(Player(8)) == PLAYER_SLOT_STATE_LEFT )
endfunction
function Trig_Leavers_B_V_Func009002002 takes nothing returns nothing
call KillUnit( GetEnumUnit() )
endfunction
function Trig_Leavers_B_V_Func010001 takes nothing returns boolean
return ( GetPlayerSlotState(Player(9)) == PLAYER_SLOT_STATE_LEFT )
endfunction
function Trig_Leavers_B_V_Func010002002 takes nothing returns nothing
call KillUnit( GetEnumUnit() )
endfunction
function Trig_Leavers_B_V_Actions takes nothing returns nothing
if ( Trig_Leavers_B_V_Func001001() ) then
call ForGroupBJ( GetUnitsOfPlayerAll(Player(0)), function Trig_Leavers_B_V_Func001002002 )
else
call DoNothing( )
endif
if ( Trig_Leavers_B_V_Func002001() ) then
call ForGroupBJ( GetUnitsOfPlayerAll(Player(1)), function Trig_Leavers_B_V_Func002002002 )
else
call DoNothing( )
endif
if ( Trig_Leavers_B_V_Func003001() ) then
call ForGroupBJ( GetUnitsOfPlayerAll(Player(2)), function Trig_Leavers_B_V_Func003002002 )
else
call DoNothing( )
endif
if ( Trig_Leavers_B_V_Func004001() ) then
call ForGroupBJ( GetUnitsOfPlayerAll(Player(3)), function Trig_Leavers_B_V_Func004002002 )
else
call DoNothing( )
endif
if ( Trig_Leavers_B_V_Func005001() ) then
call ForGroupBJ( GetUnitsOfPlayerAll(Player(4)), function Trig_Leavers_B_V_Func005002002 )
else
call DoNothing( )
endif
if ( Trig_Leavers_B_V_Func006001() ) then
call ForGroupBJ( GetUnitsOfPlayerAll(Player(5)), function Trig_Leavers_B_V_Func006002002 )
else
call DoNothing( )
endif
if ( Trig_Leavers_B_V_Func007001() ) then
call ForGroupBJ( GetUnitsOfPlayerAll(Player(6)), function Trig_Leavers_B_V_Func007002002 )
else
call DoNothing( )
endif
if ( Trig_Leavers_B_V_Func008001() ) then
call ForGroupBJ( GetUnitsOfPlayerAll(Player(7)), function Trig_Leavers_B_V_Func008002002 )
else
call DoNothing( )
endif
if ( Trig_Leavers_B_V_Func009001() ) then
call ForGroupBJ( GetUnitsOfPlayerAll(Player(8)), function Trig_Leavers_B_V_Func009002002 )
else
call DoNothing( )
endif
if ( Trig_Leavers_B_V_Func010001() ) then
call ForGroupBJ( GetUnitsOfPlayerAll(Player(9)), function Trig_Leavers_B_V_Func010002002 )
else
call DoNothing( )
endif
call ConditionalTriggerExecute( gg_trg_B )
call ConditionalTriggerExecute( gg_trg_V )
endfunction
//===========================================================================
function InitTrig_Leavers_B_V takes nothing returns nothing
set gg_trg_Leavers_B_V = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Leavers_B_V, 5.00 )
call TriggerAddAction( gg_trg_Leavers_B_V, function Trig_Leavers_B_V_Actions )
endfunction
function Trig_V_Func001001 takes nothing returns boolean
return ( udg_BuildersKilled == 8 )
endfunction
function Trig_V_Actions takes nothing returns nothing
if ( Trig_V_Func001001() ) then
call ConditionalTriggerExecute( gg_trg_Defeat_B )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_V takes nothing returns nothing
set gg_trg_V = CreateTrigger( )
call TriggerAddAction( gg_trg_V, function Trig_V_Actions )
endfunction
function Trig_B_Func001001 takes nothing returns boolean
return ( udg_AgentsKilled == 2 )
endfunction
function Trig_B_Actions takes nothing returns nothing
if ( Trig_B_Func001001() ) then
call ConditionalTriggerExecute( gg_trg_Defeat_V )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_B takes nothing returns nothing
set gg_trg_B = CreateTrigger( )
call TriggerAddAction( gg_trg_B, function Trig_B_Actions )
endfunction
function Trig_Vampire_Income_Func001001 takes nothing returns boolean
return ( GetPlayerSlotState(Player(9)) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Vampire_Income_Func002001 takes nothing returns boolean
return ( GetPlayerSlotState(Player(8)) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Vampire_Income_Actions takes nothing returns nothing
if ( Trig_Vampire_Income_Func001001() ) then
call AdjustPlayerStateBJ( 20, Player(9), PLAYER_STATE_RESOURCE_GOLD )
else
call AdjustPlayerStateBJ( 15, Player(8), PLAYER_STATE_RESOURCE_GOLD )
endif
if ( Trig_Vampire_Income_Func002001() ) then
call AdjustPlayerStateBJ( 20, Player(8), PLAYER_STATE_RESOURCE_GOLD )
else
call AdjustPlayerStateBJ( 15, Player(9), PLAYER_STATE_RESOURCE_GOLD )
endif
endfunction
//===========================================================================
function InitTrig_Vampire_Income takes nothing returns nothing
set gg_trg_Vampire_Income = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Vampire_Income, 50.00 )
call TriggerAddAction( gg_trg_Vampire_Income, function Trig_Vampire_Income_Actions )
endfunction
function Trig_Starting_message_Actions takes nothing returns nothing
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_252" )
call TriggerSleepAction( 10.00 )
call PlaySoundBJ( gg_snd_Hint )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_394" )
call TriggerSleepAction( 10.00 )
call PlaySoundBJ( gg_snd_Hint )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_395" )
endfunction
//===========================================================================
function InitTrig_Starting_message takes nothing returns nothing
set gg_trg_Starting_message = CreateTrigger( )
call TriggerAddAction( gg_trg_Starting_message, function Trig_Starting_message_Actions )
endfunction
function Trig_Hint_1_Actions takes nothing returns nothing
call PlaySoundBJ( gg_snd_Hint )
call DisplayTextToForce( GetPlayersEnemies(Player(8)), "TRIGSTR_359" )
call DisplayTextToForce( GetPlayersEnemies(Player(0)), "TRIGSTR_360" )
call TriggerSleepAction( 2 )
call PlaySoundBJ( gg_snd_OgrePissed2 )
call DisplayTextToForce( GetPlayersEnemies(Player(8)), "TRIGSTR_420" )
endfunction
//===========================================================================
function InitTrig_Hint_1 takes nothing returns nothing
set gg_trg_Hint_1 = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Hint_1, 20.00 )
call TriggerAddAction( gg_trg_Hint_1, function Trig_Hint_1_Actions )
endfunction
function Trig_Hint_2_Actions takes nothing returns nothing
call DisplayTextToForce( GetPlayersAllies(Player(0)), "TRIGSTR_358" )
call PlaySoundBJ( gg_snd_Hint )
endfunction
//===========================================================================
function InitTrig_Hint_2 takes nothing returns nothing
set gg_trg_Hint_2 = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Hint_2, 200.00 )
call TriggerAddAction( gg_trg_Hint_2, function Trig_Hint_2_Actions )
endfunction
function Trig_Hint_3_Actions takes nothing returns nothing
call DisplayTextToForce( GetPlayersAllies(Player(0)), "TRIGSTR_356" )
call DisplayTextToForce( GetPlayersEnemies(Player(0)), "TRIGSTR_357" )
call PlaySoundBJ( gg_snd_Hint )
endfunction
//===========================================================================
function InitTrig_Hint_3 takes nothing returns nothing
set gg_trg_Hint_3 = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Hint_3, 300.00 )
call TriggerAddAction( gg_trg_Hint_3, function Trig_Hint_3_Actions )
endfunction
function Trig_Hint_4_Actions takes nothing returns nothing
call DisplayTextToForce( GetPlayersAllies(Player(0)), "TRIGSTR_354" )
call DisplayTextToForce( GetPlayersEnemies(Player(0)), "TRIGSTR_355" )
call PlaySoundBJ( gg_snd_Hint )
endfunction
//===========================================================================
function InitTrig_Hint_4 takes nothing returns nothing
set gg_trg_Hint_4 = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Hint_4, 500.00 )
call TriggerAddAction( gg_trg_Hint_4, function Trig_Hint_4_Actions )
endfunction
function Trig_Hint_5_Actions takes nothing returns nothing
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_382" )
call PlaySoundBJ( gg_snd_Hint )
endfunction
//===========================================================================
function InitTrig_Hint_5 takes nothing returns nothing
set gg_trg_Hint_5 = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Hint_5, 700.00 )
call TriggerAddAction( gg_trg_Hint_5, function Trig_Hint_5_Actions )
endfunction
function Trig_Builders_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'hpea' ) ) then
return false
endif
return true
endfunction
function Trig_Builders_Func002002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Builders_Func004001001 takes nothing returns boolean
return ( GetOwningPlayer(GetKillingUnitBJ()) == Player(8) )
endfunction
function Trig_Builders_Func004001002 takes nothing returns boolean
return ( GetOwningPlayer(GetKillingUnitBJ()) == Player(9) )
endfunction
function Trig_Builders_Func004001 takes nothing returns boolean
return GetBooleanOr( Trig_Builders_Func004001001(), Trig_Builders_Func004001002() )
endfunction
function Trig_Builders_Actions takes nothing returns nothing
set udg_BuildersKilled = ( udg_BuildersKilled + 1 )
call ForGroupBJ( GetUnitsOfPlayerAll(GetOwningPlayer(GetDyingUnit())), function Trig_Builders_Func002002 )
call ConditionalTriggerExecute( gg_trg_V )
if ( Trig_Builders_Func004001() ) then
call DoNothing( )
else
return
endif
call DisplayTextToForce( GetPlayersAll(), ( "A Builder has been killed! " + ( GetPlayerName(GetOwningPlayer(GetKillingUnitBJ())) + ( " will recive 150 gold as a reward! " + ( GetPlayerName(GetOwningPlayer(GetDyingUnit())) + ", may now spectate on the game. ( and maybe give his wood to someone...)" ) ) ) ) )
call PlaySoundBJ( gg_snd_SorceressPissed2 )
endfunction
//===========================================================================
function InitTrig_Builders takes nothing returns nothing
set gg_trg_Builders = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Builders, Player(0), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Builders, Player(1), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Builders, Player(2), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Builders, Player(3), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Builders, Player(4), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Builders, Player(5), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Builders, Player(6), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Builders, Player(7), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Builders, Condition( function Trig_Builders_Conditions ) )
call TriggerAddAction( gg_trg_Builders, function Trig_Builders_Actions )
endfunction
function Trig_Agents_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetDyingUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Agents_Func004001001 takes nothing returns boolean
return ( GetOwningPlayer(GetKillingUnitBJ()) == Player(0) )
endfunction
function Trig_Agents_Func004001002001 takes nothing returns boolean
return ( GetOwningPlayer(GetKillingUnitBJ()) == Player(1) )
endfunction
function Trig_Agents_Func004001002002001 takes nothing returns boolean
return ( GetOwningPlayer(GetKillingUnitBJ()) == Player(2) )
endfunction
function Trig_Agents_Func004001002002002001 takes nothing returns boolean
return ( GetOwningPlayer(GetKillingUnitBJ()) == Player(3) )
endfunction
function Trig_Agents_Func004001002002002002001 takes nothing returns boolean
return ( GetOwningPlayer(GetKillingUnitBJ()) == Player(4) )
endfunction
function Trig_Agents_Func004001002002002002002001 takes nothing returns boolean
return ( GetOwningPlayer(GetKillingUnitBJ()) == Player(5) )
endfunction
function Trig_Agents_Func004001002002002002002002001 takes nothing returns boolean
return ( GetOwningPlayer(GetKillingUnitBJ()) == Player(6) )
endfunction
function Trig_Agents_Func004001002002002002002002002 takes nothing returns boolean
return ( GetOwningPlayer(GetKillingUnitBJ()) == Player(7) )
endfunction
function Trig_Agents_Func004001002002002002002002 takes nothing returns boolean
return GetBooleanOr( Trig_Agents_Func004001002002002002002002001(), Trig_Agents_Func004001002002002002002002002() )
endfunction
function Trig_Agents_Func004001002002002002002 takes nothing returns boolean
return GetBooleanOr( Trig_Agents_Func004001002002002002002001(), Trig_Agents_Func004001002002002002002002() )
endfunction
function Trig_Agents_Func004001002002002002 takes nothing returns boolean
return GetBooleanOr( Trig_Agents_Func004001002002002002001(), Trig_Agents_Func004001002002002002002() )
endfunction
function Trig_Agents_Func004001002002002 takes nothing returns boolean
return GetBooleanOr( Trig_Agents_Func004001002002002001(), Trig_Agents_Func004001002002002002() )
endfunction
function Trig_Agents_Func004001002002 takes nothing returns boolean
return GetBooleanOr( Trig_Agents_Func004001002002001(), Trig_Agents_Func004001002002002() )
endfunction
function Trig_Agents_Func004001002 takes nothing returns boolean
return GetBooleanOr( Trig_Agents_Func004001002001(), Trig_Agents_Func004001002002() )
endfunction
function Trig_Agents_Func004001 takes nothing returns boolean
return GetBooleanOr( Trig_Agents_Func004001001(), Trig_Agents_Func004001002() )
endfunction
function Trig_Agents_Actions takes nothing returns nothing
set udg_AgentsKilled = ( udg_AgentsKilled + 1 )
call AdjustPlayerStateBJ( 2500, GetOwningPlayer(GetKillingUnitBJ()), PLAYER_STATE_RESOURCE_LUMBER )
call ConditionalTriggerExecute( gg_trg_B )
if ( Trig_Agents_Func004001() ) then
call DoNothing( )
else
return
endif
call DisplayTextToForce( GetPlayersAll(), ( "A Agent has been killed! " + ( GetPlayerName(GetOwningPlayer(GetKillingUnitBJ())) + " will recive 2500 lumber as a reward! " ) ) )
call PlaySoundBJ( gg_snd_ShamanPissed7 )
call TriggerSleepAction( 4.00 )
call SetSoundVolumeBJ( gg_snd_U05ATichondrius01, 100 )
call TriggerSleepAction( 1.00 )
call PlaySoundBJ( gg_snd_U05ATichondrius01 )
endfunction
//===========================================================================
function InitTrig_Agents takes nothing returns nothing
set gg_trg_Agents = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Agents, Player(8), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Agents, Player(9), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Agents, Condition( function Trig_Agents_Conditions ) )
call TriggerAddAction( gg_trg_Agents, function Trig_Agents_Actions )
endfunction