Name | Type | is_array | initial_value |
farmer | integer | No | |
farmers | force | No | |
hunters | force | No | |
hunterswin | timer | No | |
kills | integer | Yes | |
Leaderboard | leaderboard | No | |
safezone | timer | No | |
Win | integer | No |
function Trig_Settings_Func004002 takes nothing returns nothing
call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, GetEnumPlayer() )
endfunction
function Trig_Settings_Func005002 takes nothing returns nothing
call SetPlayerStateBJ( GetEnumPlayer(), PLAYER_STATE_RESOURCE_GOLD, 36 )
endfunction
function Trig_Settings_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call ForceAddPlayerSimple( ConvertedPlayer(GetForLoopIndexA()), udg_farmers )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 7
set bj_forLoopAIndexEnd = 10
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call ForceAddPlayerSimple( ConvertedPlayer(GetForLoopIndexA()), udg_hunters )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 11
set bj_forLoopAIndexEnd = 12
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call ForceAddPlayerSimple( ConvertedPlayer(GetForLoopIndexA()), udg_farmers )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForForce( GetPlayersAll(), function Trig_Settings_Func004002 )
call ForForce( GetPlayersAll(), function Trig_Settings_Func005002 )
call SetTerrainFogExBJ( 0, 1000, 8000, 0.00, 50.00, 90.00, 60.00 )
call MeleeStartingHeroLimit( )
call MeleeStartingAI( )
call TriggerSleepAction( 2 )
call TimerDialogDisplayBJ( true, GetLastCreatedTimerDialogBJ() )
endfunction
//===========================================================================
function InitTrig_Settings takes nothing returns nothing
set gg_trg_Settings = CreateTrigger( )
call TriggerAddAction( gg_trg_Settings, function Trig_Settings_Actions )
endfunction
function Trig_Win_Func003002 takes nothing returns nothing
call CustomVictoryBJ( GetEnumPlayer(), true, true )
endfunction
function Trig_Win_Func004002 takes nothing returns nothing
call CustomDefeatBJ( GetEnumPlayer(), "TRIGSTR_034" )
endfunction
function Trig_Win_Actions takes nothing returns nothing
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_273" )
call TriggerSleepAction( 4.00 )
call ForForce( udg_hunters, function Trig_Win_Func003002 )
call ForForce( udg_farmers, function Trig_Win_Func004002 )
endfunction
//===========================================================================
function InitTrig_Win takes nothing returns nothing
set gg_trg_Win = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Win, 2200.00 )
call TriggerAddAction( gg_trg_Win, function Trig_Win_Actions )
endfunction
function Trig_Timer_Actions takes nothing returns nothing
set udg_hunterswin = GetLastCreatedTimerBJ()
call StartTimerBJ( GetLastCreatedTimerBJ(), false, 2200.00 )
call TriggerSleepAction( 2 )
call CreateTimerDialogBJ( GetLastCreatedTimerBJ(), "TRIGSTR_019" )
call TimerDialogSetTimeColorBJ( GetLastCreatedTimerDialogBJ(), 100.00, 100, 0.00, 20.00 )
call TimerDialogSetTitleColorBJ( GetLastCreatedTimerDialogBJ(), 100.00, 0.00, 0.00, 20.00 )
endfunction
//===========================================================================
function InitTrig_Timer takes nothing returns nothing
set gg_trg_Timer = CreateTrigger( )
call TriggerAddAction( gg_trg_Timer, function Trig_Timer_Actions )
endfunction
function Trig_Victory_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsOfTypeIdAll('U000')) == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Victory_Func004002 takes nothing returns nothing
call CustomVictoryBJ( GetEnumPlayer(), true, true )
endfunction
function Trig_Victory_Func005002 takes nothing returns nothing
call CustomDefeatBJ( GetEnumPlayer(), "TRIGSTR_036" )
endfunction
function Trig_Victory_Actions takes nothing returns nothing
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_035" )
call TriggerSleepAction( 4.00 )
call ForForce( udg_farmers, function Trig_Victory_Func004002 )
call ForForce( udg_hunters, function Trig_Victory_Func005002 )
endfunction
//===========================================================================
function InitTrig_Victory takes nothing returns nothing
set gg_trg_Victory = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Victory, 2 )
call TriggerAddCondition( gg_trg_Victory, Condition( function Trig_Victory_Conditions ) )
call TriggerAddAction( gg_trg_Victory, function Trig_Victory_Actions )
endfunction
function Trig_Hunters_Wood_Sheep_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'nshe' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetKillingUnitBJ()) == 'U000' ) ) then
return false
endif
return true
endfunction
function Trig_Hunters_Wood_Sheep_Actions takes nothing returns nothing
call AdjustPlayerStateBJ( 2, GetOwningPlayer(GetKillingUnitBJ()), PLAYER_STATE_RESOURCE_LUMBER )
endfunction
//===========================================================================
function InitTrig_Hunters_Wood_Sheep takes nothing returns nothing
set gg_trg_Hunters_Wood_Sheep = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hunters_Wood_Sheep, Player(0), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hunters_Wood_Sheep, Player(1), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hunters_Wood_Sheep, Player(2), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hunters_Wood_Sheep, Player(3), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hunters_Wood_Sheep, Player(4), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hunters_Wood_Sheep, Player(5), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hunters_Wood_Sheep, Player(10), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hunters_Wood_Sheep, Player(11), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Hunters_Wood_Sheep, Condition( function Trig_Hunters_Wood_Sheep_Conditions ) )
call TriggerAddAction( gg_trg_Hunters_Wood_Sheep, function Trig_Hunters_Wood_Sheep_Actions )
endfunction
function Trig_Hunters_Wood_Pig_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'npig' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetKillingUnitBJ()) == 'U000' ) ) then
return false
endif
return true
endfunction
function Trig_Hunters_Wood_Pig_Actions takes nothing returns nothing
call AdjustPlayerStateBJ( 2, GetOwningPlayer(GetKillingUnitBJ()), PLAYER_STATE_RESOURCE_LUMBER )
endfunction
//===========================================================================
function InitTrig_Hunters_Wood_Pig takes nothing returns nothing
set gg_trg_Hunters_Wood_Pig = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hunters_Wood_Pig, Player(0), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hunters_Wood_Pig, Player(1), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hunters_Wood_Pig, Player(2), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hunters_Wood_Pig, Player(3), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hunters_Wood_Pig, Player(4), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hunters_Wood_Pig, Player(5), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hunters_Wood_Pig, Player(10), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hunters_Wood_Pig, Player(11), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Hunters_Wood_Pig, Condition( function Trig_Hunters_Wood_Pig_Conditions ) )
call TriggerAddAction( gg_trg_Hunters_Wood_Pig, function Trig_Hunters_Wood_Pig_Actions )
endfunction
function Trig_Players_Spawn_Func002002 takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'h000', GetEnumPlayer(), GetRandomLocInRect(gg_rct_Farmer_Respawn), bj_UNIT_FACING )
endfunction
function Trig_Players_Spawn_Func003002 takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'U000', GetEnumPlayer(), GetRandomLocInRect(gg_rct_Skeleton_Spawn), bj_UNIT_FACING )
endfunction
function Trig_Players_Spawn_Func004002 takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'h00B', GetEnumPlayer(), GetRandomLocInRect(gg_rct_Skeleton_Spawn), bj_UNIT_FACING )
endfunction
function Trig_Players_Spawn_Actions takes nothing returns nothing
call ForForce( udg_farmers, function Trig_Players_Spawn_Func002002 )
call ForForce( udg_hunters, function Trig_Players_Spawn_Func003002 )
call ForForce( udg_hunters, function Trig_Players_Spawn_Func004002 )
call SetMapMusicRandomBJ( "music" )
endfunction
//===========================================================================
function InitTrig_Players_Spawn takes nothing returns nothing
set gg_trg_Players_Spawn = CreateTrigger( )
call TriggerAddAction( gg_trg_Players_Spawn, function Trig_Players_Spawn_Actions )
endfunction
function Trig_Animals_Spawn_Func001002 takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'nshe', GetOwningPlayer(GetEnumUnit()), GetUnitLoc(GetEnumUnit()), bj_UNIT_FACING )
endfunction
function Trig_Animals_Spawn_Func002002 takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'npig', GetOwningPlayer(GetEnumUnit()), GetUnitLoc(GetEnumUnit()), bj_UNIT_FACING )
endfunction
function Trig_Animals_Spawn_Func003002 takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'n00D', GetOwningPlayer(GetEnumUnit()), GetUnitLoc(GetEnumUnit()), bj_UNIT_FACING )
endfunction
function Trig_Animals_Spawn_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsOfTypeIdAll('h002'), function Trig_Animals_Spawn_Func001002 )
call ForGroupBJ( GetUnitsOfTypeIdAll('h001'), function Trig_Animals_Spawn_Func002002 )
call ForGroupBJ( GetUnitsOfTypeIdAll('n00C'), function Trig_Animals_Spawn_Func003002 )
endfunction
//===========================================================================
function InitTrig_Animals_Spawn takes nothing returns nothing
set gg_trg_Animals_Spawn = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Animals_Spawn, 60.00 )
call TriggerAddAction( gg_trg_Animals_Spawn, function Trig_Animals_Spawn_Actions )
endfunction
function Trig_Farmer_Respawn_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'h000' ) ) then
return false
endif
return true
endfunction
function Trig_Farmer_Respawn_Func001002 takes nothing returns nothing
call KillUnit( GetEnumUnit() )
endfunction
function Trig_Farmer_Respawn_Func003001 takes nothing returns boolean
return ( udg_farmer == 1 )
endfunction
function Trig_Farmer_Respawn_Func004001 takes nothing returns boolean
return ( udg_farmer == 2 )
endfunction
function Trig_Farmer_Respawn_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsOfPlayerAll(GetOwningPlayer(GetDyingUnit())), function Trig_Farmer_Respawn_Func001002 )
set udg_farmer = GetRandomInt(1, 2)
if ( Trig_Farmer_Respawn_Func003001() ) then
call CreateNUnitsAtLoc( 1, 'h000', GetOwningPlayer(GetDyingUnit()), GetRandomLocInRect(gg_rct_Forest_1), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_Farmer_Respawn_Func004001() ) then
call CreateNUnitsAtLoc( 1, 'h000', GetOwningPlayer(GetDyingUnit()), GetRandomLocInRect(gg_rct_Farmer_Respawn), bj_UNIT_FACING )
else
call DoNothing( )
endif
call TriggerSleepAction( 1.00 )
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetDyingUnit()), GetUnitLoc(GetLastCreatedUnit()), 1.00 )
endfunction
//===========================================================================
function InitTrig_Farmer_Respawn takes nothing returns nothing
set gg_trg_Farmer_Respawn = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Farmer_Respawn, Player(0), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Farmer_Respawn, Player(1), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Farmer_Respawn, Player(2), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Farmer_Respawn, Player(3), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Farmer_Respawn, Player(4), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Farmer_Respawn, Player(5), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Farmer_Respawn, Player(10), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Farmer_Respawn, Player(11), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Farmer_Respawn, Condition( function Trig_Farmer_Respawn_Conditions ) )
call TriggerAddAction( gg_trg_Farmer_Respawn, function Trig_Farmer_Respawn_Actions )
endfunction
function Trig_Hunter_Respawn_Func001002001 takes nothing returns boolean
return ( IsUnitDeadBJ(GetEnumUnit()) == true )
endfunction
function Trig_Hunter_Respawn_Func001002 takes nothing returns nothing
if ( Trig_Hunter_Respawn_Func001002001() ) then
call CreateNUnitsAtLoc( 1, 'nskg', GetOwningPlayer(GetEnumUnit()), GetRectCenter(gg_rct_Skeleton_Spawn), bj_UNIT_FACING )
else
call DoNothing( )
endif
endfunction
function Trig_Hunter_Respawn_Func002002001 takes nothing returns boolean
return ( IsUnitDeadBJ(GetEnumUnit()) == true )
endfunction
function Trig_Hunter_Respawn_Func002002 takes nothing returns nothing
if ( Trig_Hunter_Respawn_Func002002001() ) then
call RemoveUnit( GetEnumUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_Hunter_Respawn_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsOfTypeIdAll('U000'), function Trig_Hunter_Respawn_Func001002 )
call ForGroupBJ( GetUnitsOfTypeIdAll('U000'), function Trig_Hunter_Respawn_Func002002 )
endfunction
//===========================================================================
function InitTrig_Hunter_Respawn takes nothing returns nothing
set gg_trg_Hunter_Respawn = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Hunter_Respawn, 2.00 )
call TriggerAddAction( gg_trg_Hunter_Respawn, function Trig_Hunter_Respawn_Actions )
endfunction
function Trig_Skeleton_Respawn_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'nskg' ) ) then
return false
endif
return true
endfunction
function Trig_Skeleton_Respawn_Actions takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'nskg', GetOwningPlayer(GetDyingUnit()), GetRectCenter(gg_rct_Skeleton_Spawn), bj_UNIT_FACING )
endfunction
//===========================================================================
function InitTrig_Skeleton_Respawn takes nothing returns nothing
set gg_trg_Skeleton_Respawn = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Skeleton_Respawn, Player(6), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Skeleton_Respawn, Player(7), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Skeleton_Respawn, Player(8), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Skeleton_Respawn, Player(10), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Skeleton_Respawn, Player(11), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Skeleton_Respawn, Condition( function Trig_Skeleton_Respawn_Conditions ) )
call TriggerAddAction( gg_trg_Skeleton_Respawn, function Trig_Skeleton_Respawn_Actions )
endfunction
function Trig_Kill_Leaving_Func002001 takes nothing returns boolean
return ( GetPlayerSlotState(Player(0)) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Kill_Leaving_Func002003002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Kill_Leaving_Func003001 takes nothing returns boolean
return ( GetPlayerSlotState(Player(1)) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Kill_Leaving_Func003003002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Kill_Leaving_Func004001 takes nothing returns boolean
return ( GetPlayerSlotState(Player(2)) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Kill_Leaving_Func004003002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Kill_Leaving_Func005001 takes nothing returns boolean
return ( GetPlayerSlotState(Player(3)) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Kill_Leaving_Func005003002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Kill_Leaving_Func006001 takes nothing returns boolean
return ( GetPlayerSlotState(Player(4)) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Kill_Leaving_Func006003002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Kill_Leaving_Func007001 takes nothing returns boolean
return ( GetPlayerSlotState(Player(5)) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Kill_Leaving_Func007003002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Kill_Leaving_Func008001 takes nothing returns boolean
return ( GetPlayerSlotState(Player(6)) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Kill_Leaving_Func008003002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Kill_Leaving_Func009001 takes nothing returns boolean
return ( GetPlayerSlotState(Player(7)) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Kill_Leaving_Func009003002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Kill_Leaving_Func010001 takes nothing returns boolean
return ( GetPlayerSlotState(Player(8)) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Kill_Leaving_Func010003002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Kill_Leaving_Func011001 takes nothing returns boolean
return ( GetPlayerSlotState(Player(9)) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Kill_Leaving_Func011003002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Kill_Leaving_Func012001 takes nothing returns boolean
return ( GetPlayerSlotState(Player(10)) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Kill_Leaving_Func012003002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Kill_Leaving_Func013001 takes nothing returns boolean
return ( GetPlayerSlotState(Player(11)) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Kill_Leaving_Func013003002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Kill_Leaving_Actions takes nothing returns nothing
if ( Trig_Kill_Leaving_Func002001() ) then
call DoNothing( )
else
call ForGroupBJ( GetUnitsOfPlayerAll(Player(0)), function Trig_Kill_Leaving_Func002003002 )
endif
if ( Trig_Kill_Leaving_Func003001() ) then
call DoNothing( )
else
call ForGroupBJ( GetUnitsOfPlayerAll(Player(1)), function Trig_Kill_Leaving_Func003003002 )
endif
if ( Trig_Kill_Leaving_Func004001() ) then
call DoNothing( )
else
call ForGroupBJ( GetUnitsOfPlayerAll(Player(2)), function Trig_Kill_Leaving_Func004003002 )
endif
if ( Trig_Kill_Leaving_Func005001() ) then
call DoNothing( )
else
call ForGroupBJ( GetUnitsOfPlayerAll(Player(3)), function Trig_Kill_Leaving_Func005003002 )
endif
if ( Trig_Kill_Leaving_Func006001() ) then
call DoNothing( )
else
call ForGroupBJ( GetUnitsOfPlayerAll(Player(4)), function Trig_Kill_Leaving_Func006003002 )
endif
if ( Trig_Kill_Leaving_Func007001() ) then
call DoNothing( )
else
call ForGroupBJ( GetUnitsOfPlayerAll(Player(5)), function Trig_Kill_Leaving_Func007003002 )
endif
if ( Trig_Kill_Leaving_Func008001() ) then
call DoNothing( )
else
call ForGroupBJ( GetUnitsOfPlayerAll(Player(6)), function Trig_Kill_Leaving_Func008003002 )
endif
if ( Trig_Kill_Leaving_Func009001() ) then
call DoNothing( )
else
call ForGroupBJ( GetUnitsOfPlayerAll(Player(7)), function Trig_Kill_Leaving_Func009003002 )
endif
if ( Trig_Kill_Leaving_Func010001() ) then
call DoNothing( )
else
call ForGroupBJ( GetUnitsOfPlayerAll(Player(8)), function Trig_Kill_Leaving_Func010003002 )
endif
if ( Trig_Kill_Leaving_Func011001() ) then
call DoNothing( )
else
call ForGroupBJ( GetUnitsOfPlayerAll(Player(9)), function Trig_Kill_Leaving_Func011003002 )
endif
if ( Trig_Kill_Leaving_Func012001() ) then
call DoNothing( )
else
call ForGroupBJ( GetUnitsOfPlayerAll(Player(10)), function Trig_Kill_Leaving_Func012003002 )
endif
if ( Trig_Kill_Leaving_Func013001() ) then
call DoNothing( )
else
call ForGroupBJ( GetUnitsOfPlayerAll(Player(11)), function Trig_Kill_Leaving_Func013003002 )
endif
endfunction
//===========================================================================
function InitTrig_Kill_Leaving takes nothing returns nothing
set gg_trg_Kill_Leaving = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Kill_Leaving, 15.00 )
call TriggerAddAction( gg_trg_Kill_Leaving, function Trig_Kill_Leaving_Actions )
endfunction
function Trig_Info_Actions takes nothing returns nothing
call DisplayTimedTextToForce( GetPlayersAll(), 8.00, "TRIGSTR_151" )
call TriggerSleepAction( 3.00 )
call DisplayTimedTextToForce( GetPlayersAll(), 8.00, "TRIGSTR_152" )
call TriggerSleepAction( 3.00 )
call DisplayTimedTextToForce( GetPlayersAll(), 8.00, "TRIGSTR_154" )
endfunction
//===========================================================================
function InitTrig_Info takes nothing returns nothing
set gg_trg_Info = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Info, 20.00 )
call TriggerAddAction( gg_trg_Info, function Trig_Info_Actions )
endfunction
function Trig_More_Info_Actions takes nothing returns nothing
call DisplayTimedTextToForce( GetPlayersAll(), 15.00, "TRIGSTR_093" )
endfunction
//===========================================================================
function InitTrig_More_Info takes nothing returns nothing
set gg_trg_More_Info = CreateTrigger( )
call TriggerAddAction( gg_trg_More_Info, function Trig_More_Info_Actions )
endfunction
function Trig_Hints_Actions takes nothing returns nothing
call DisplayTimedTextToForce( udg_farmers, 10.00, "TRIGSTR_155" )
call DisplayTimedTextToForce( udg_hunters, 10.00, "TRIGSTR_156" )
call TriggerSleepAction( 200.00 )
call DisplayTimedTextToForce( udg_farmers, 10.00, "TRIGSTR_157" )
call DisplayTimedTextToForce( udg_hunters, 10.00, "TRIGSTR_158" )
call TriggerSleepAction( 200.00 )
call DisplayTimedTextToForce( udg_farmers, 10.00, "TRIGSTR_159" )
call DisplayTimedTextToForce( udg_hunters, 10.00, "TRIGSTR_160" )
call TriggerSleepAction( 200.00 )
call DisplayTimedTextToForce( udg_farmers, 10.00, "TRIGSTR_164" )
call DisplayTimedTextToForce( udg_hunters, 10.00, "TRIGSTR_165" )
call TriggerSleepAction( 200.00 )
call DisplayTimedTextToForce( udg_farmers, 10.00, "TRIGSTR_167" )
call DisplayTimedTextToForce( udg_hunters, 10.00, "TRIGSTR_168" )
call TriggerSleepAction( 200.00 )
call DisplayTimedTextToForce( udg_hunters, 10.00, "TRIGSTR_176" )
endfunction
//===========================================================================
function InitTrig_Hints takes nothing returns nothing
set gg_trg_Hints = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Hints, 60.00 )
call TriggerAddAction( gg_trg_Hints, function Trig_Hints_Actions )
endfunction
function Trig_Free_Gold_Func001002 takes nothing returns nothing
call AdjustPlayerStateBJ( 1, GetEnumPlayer(), PLAYER_STATE_RESOURCE_GOLD )
endfunction
function Trig_Free_Gold_Actions takes nothing returns nothing
call ForForce( GetPlayersAll(), function Trig_Free_Gold_Func001002 )
endfunction
//===========================================================================
function InitTrig_Free_Gold takes nothing returns nothing
set gg_trg_Free_Gold = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Free_Gold, 10.00 )
call TriggerAddAction( gg_trg_Free_Gold, function Trig_Free_Gold_Actions )
endfunction
function Trig_Farming_Gold_Func001002 takes nothing returns nothing
call AdjustPlayerStateBJ( 2, GetOwningPlayer(GetEnumUnit()), PLAYER_STATE_RESOURCE_GOLD )
endfunction
function Trig_Farming_Gold_Func002002 takes nothing returns nothing
call AdjustPlayerStateBJ( 4, GetOwningPlayer(GetEnumUnit()), PLAYER_STATE_RESOURCE_GOLD )
endfunction
function Trig_Farming_Gold_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsOfTypeIdAll('nshe'), function Trig_Farming_Gold_Func001002 )
call ForGroupBJ( GetUnitsOfTypeIdAll('npig'), function Trig_Farming_Gold_Func002002 )
endfunction
//===========================================================================
function InitTrig_Farming_Gold takes nothing returns nothing
set gg_trg_Farming_Gold = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Farming_Gold, 30.00 )
call TriggerAddAction( gg_trg_Farming_Gold, function Trig_Farming_Gold_Actions )
endfunction
function Trig_Hunters_Gold_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'h000' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetKillingUnitBJ()) == 'U000' ) ) then
return false
endif
return true
endfunction
function Trig_Hunters_Gold_Actions takes nothing returns nothing
call AdjustPlayerStateBJ( 20, GetOwningPlayer(GetKillingUnitBJ()), PLAYER_STATE_RESOURCE_GOLD )
endfunction
//===========================================================================
function InitTrig_Hunters_Gold takes nothing returns nothing
set gg_trg_Hunters_Gold = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hunters_Gold, Player(0), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hunters_Gold, Player(1), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hunters_Gold, Player(2), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hunters_Gold, Player(3), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hunters_Gold, Player(4), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hunters_Gold, Player(5), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hunters_Gold, Player(10), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hunters_Gold, Player(11), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Hunters_Gold, Condition( function Trig_Hunters_Gold_Conditions ) )
call TriggerAddAction( gg_trg_Hunters_Gold, function Trig_Hunters_Gold_Actions )
endfunction
function Trig_Setup_Leaderboard_Func002001001 takes nothing returns boolean
return ( GetPlayerSlotState(GetFilterPlayer()) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Setup_Leaderboard_Func002002 takes nothing returns nothing
call LeaderboardAddItemBJ( GetEnumPlayer(), GetLastCreatedLeaderboard(), GetPlayerName(GetEnumPlayer()), 0 )
endfunction
function Trig_Setup_Leaderboard_Actions takes nothing returns nothing
call CreateLeaderboardBJ( GetPlayersAll(), "TRIGSTR_229" )
call ForForce( GetPlayersMatching(Condition(function Trig_Setup_Leaderboard_Func002001001)), function Trig_Setup_Leaderboard_Func002002 )
call LeaderboardRemovePlayerItemBJ( Player(0), GetLastCreatedLeaderboard() )
call LeaderboardRemovePlayerItemBJ( Player(1), GetLastCreatedLeaderboard() )
call LeaderboardRemovePlayerItemBJ( Player(2), GetLastCreatedLeaderboard() )
call LeaderboardRemovePlayerItemBJ( Player(3), GetLastCreatedLeaderboard() )
call LeaderboardRemovePlayerItemBJ( Player(4), GetLastCreatedLeaderboard() )
call LeaderboardRemovePlayerItemBJ( Player(5), GetLastCreatedLeaderboard() )
call LeaderboardRemovePlayerItemBJ( Player(10), GetLastCreatedLeaderboard() )
call LeaderboardRemovePlayerItemBJ( Player(11), GetLastCreatedLeaderboard() )
call LeaderboardDisplayBJ( true, GetLastCreatedLeaderboard() )
endfunction
//===========================================================================
function InitTrig_Setup_Leaderboard takes nothing returns nothing
set gg_trg_Setup_Leaderboard = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Setup_Leaderboard, 2.00 )
call TriggerAddAction( gg_trg_Setup_Leaderboard, function Trig_Setup_Leaderboard_Actions )
endfunction
function Trig_Update_Scoreboard_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetTriggerUnit()) != GetOwningPlayer(GetKillingUnitBJ()) ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'h000' ) ) then
return false
endif
return true
endfunction
function Trig_Update_Scoreboard_Actions takes nothing returns nothing
set udg_kills[GetConvertedPlayerId(GetOwningPlayer(GetKillingUnitBJ()))] = ( udg_kills[GetConvertedPlayerId(GetOwningPlayer(GetKillingUnitBJ()))] + 1 )
call LeaderboardSetPlayerItemValueBJ( GetOwningPlayer(GetKillingUnitBJ()), GetLastCreatedLeaderboard(), udg_kills[GetConvertedPlayerId(GetOwningPlayer(GetKillingUnitBJ()))] )
call LeaderboardSortItemsBJ( udg_Leaderboard, bj_SORTTYPE_SORTBYVALUE, false )
endfunction
//===========================================================================
function InitTrig_Update_Scoreboard takes nothing returns nothing
set gg_trg_Update_Scoreboard = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Update_Scoreboard, Player(0), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Update_Scoreboard, Player(1), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Update_Scoreboard, Player(2), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Update_Scoreboard, Player(3), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Update_Scoreboard, Player(4), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Update_Scoreboard, Player(5), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Update_Scoreboard, Player(10), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Update_Scoreboard, Player(11), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Update_Scoreboard, Condition( function Trig_Update_Scoreboard_Conditions ) )
call TriggerAddAction( gg_trg_Update_Scoreboard, function Trig_Update_Scoreboard_Actions )
endfunction
function Trig_Daytime_Play_Actions takes nothing returns nothing
call SetAmbientDaySound( "LordaeronSummerDay" )
endfunction
//===========================================================================
function InitTrig_Daytime_Play takes nothing returns nothing
set gg_trg_Daytime_Play = CreateTrigger( )
call TriggerRegisterGameStateEventTimeOfDay( gg_trg_Daytime_Play, GREATER_THAN_OR_EQUAL, 6.00 )
call TriggerAddAction( gg_trg_Daytime_Play, function Trig_Daytime_Play_Actions )
endfunction
function Trig_Nighttime_Play_Actions takes nothing returns nothing
call SetAmbientNightSound( "LordaeronSummerNight" )
endfunction
//===========================================================================
function InitTrig_Nighttime_Play takes nothing returns nothing
set gg_trg_Nighttime_Play = CreateTrigger( )
call TriggerRegisterGameStateEventTimeOfDay( gg_trg_Nighttime_Play, GREATER_THAN_OR_EQUAL, 18.00 )
call TriggerAddAction( gg_trg_Nighttime_Play, function Trig_Nighttime_Play_Actions )
endfunction
function Trig_Wolfs_Cage_Func001002 takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "patrol", GetRandomLocInRect(gg_rct_Wolfs_Jail) )
endfunction
function Trig_Wolfs_Cage_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsInRectAll(gg_rct_Wolfs_Jail), function Trig_Wolfs_Cage_Func001002 )
endfunction
//===========================================================================
function InitTrig_Wolfs_Cage takes nothing returns nothing
set gg_trg_Wolfs_Cage = CreateTrigger( )
call TriggerAddAction( gg_trg_Wolfs_Cage, function Trig_Wolfs_Cage_Actions )
endfunction
function Trig_Show_Info_Actions takes nothing returns nothing
call DisplayTextToForce( GetPlayersAll(), "This map has been unprotected using: |c00808000unproteQtor|r v1.0" )
endfunction
function InitTrig_Show_Info takes nothing returns nothing
set gg_trg_Show_Info = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Show_Info, 1.00 )
call TriggerAddAction( gg_trg_Show_Info, function Trig_Show_Info_Actions )
endfunction