I just started it now and it says before I test on Warcraft (but doesnt play game).
c:\... \warcraft iii\maps\test\WorldEditTestMap.w3xTemp\war3map.j
1 compile error
Line 269: Expected a variable name
//===========================================================================
//
// War of Sacrifice (WoS)
//
// Warcraft III map script
// Generated by the Warcraft III World Editor
// Date: Sat Apr 23 16:44:46 2005
// Map Author: ImZaBiGn3wBi3
//
//===========================================================================
//***************************************************************************
//*
//* Global Variables
//*
//***************************************************************************
globals
// User-defined
unit array udg_Hero1
timer udg_CountdwnTimer = null
// Generated
rect gg_rct_Region_001 = null
rect gg_rct_Region_002 = null
rect gg_rct_Region_005 = null
rect gg_rct_Region_006 = null
rect gg_rct_Region_000 = null
rect gg_rct_Region_004 = null
sound gg_snd_PH1 = null
trigger gg_trg_Melee_Initialization = null
trigger gg_trg_Hero = null
trigger gg_trg_HeroDiesTeam1 = null
trigger gg_trg_HeroDiesTeam2 = null
trigger gg_trg_Destroy01 = null
trigger gg_trg_Destroy02 = null
trigger gg_trg_Destroy05 = null
trigger gg_trg_Destroy06 = null
trigger gg_trg_Footmen_Bounty = null
trigger gg_trg_Gold = null
trigger gg_trg_Region01 = null
trigger gg_trg_Region02 = null
trigger gg_trg_Attack01 = null
trigger gg_trg_Attack02 = null
trigger gg_trg_Region05 = null
trigger gg_trg_Region06 = null
trigger gg_trg_Attack05 = null
trigger gg_trg_Attack06 = null
unit gg_unit_nmgv_0028 = null
unit gg_unit_nmgv_0029 = null
unit gg_unit_nmgv_0031 = null
unit gg_unit_nmgv_0032 = null
trigger gg_trg_DefeatandVictory01 = null
unit gg_unit_haro_0002 = null
trigger gg_trg_DefeatandVictory02 = null
unit gg_unit_haro_0004 = null
endglobals
function InitGlobals takes nothing returns nothing
local integer i = 0
set udg_CountdwnTimer = CreateTimer()
endfunction
//***************************************************************************
//*
//* Sounds
//*
//***************************************************************************
function InitSounds takes nothing returns nothing
set gg_snd_PH1 = CreateSound( "Sound\\Music\\mp3Music\\PH1.mp3", false, false, false, 10, 10, "" )
call SetSoundParamsFromLabel( gg_snd_PH1, "PHMusic" )
call SetSoundDuration( gg_snd_PH1, 281582 )
endfunction
//***************************************************************************
//*
//* Unit Creation
//*
//***************************************************************************
//===========================================================================
function CreateUnitsForPlayer0 takes nothing returns nothing
local player p = Player(0)
local unit u
local integer unitID
local trigger t
local real life
set u = CreateUnit( p, 'hpea', -3015.1, -2239.1, 350.947 )
endfunction
//===========================================================================
function CreateUnitsForPlayer1 takes nothing returns nothing
local player p = Player(1)
local unit u
local integer unitID
local trigger t
local real life
set u = CreateUnit( p, 'hpea', -2969.8, -2156.0, 9.350 )
endfunction
//===========================================================================
function CreateUnitsForPlayer2 takes nothing returns nothing
local player p = Player(2)
local unit u
local integer unitID
local trigger t
local real life
set u = CreateUnit( p, 'hpea', -2976.8, -2044.2, 319.349 )
endfunction
//===========================================================================
function CreateUnitsForPlayer3 takes nothing returns nothing
local player p = Player(3)
local unit u
local integer unitID
local trigger t
local real life
set u = CreateUnit( p, 'hpea', -3139.0, -2249.8, 176.017 )
endfunction
//===========================================================================
function CreateBuildingsForPlayer4 takes nothing returns nothing
local player p = Player(4)
local unit u
local integer unitID
local trigger t
local real life
set u = CreateUnit( p, 'ntx2', -2112.0, -1792.0, 270.000 )
set u = CreateUnit( p, 'ntx2', -1536.0, -2368.0, 270.000 )
set gg_unit_haro_0002 = CreateUnit( p, 'haro', -3072.0, -3328.0, 270.000 )
set gg_unit_nmgv_0031 = CreateUnit( p, 'nmgv', -1856.0, -2880.0, 270.000 )
set gg_unit_nmgv_0032 = CreateUnit( p, 'nmgv', -2624.0, -2112.0, 270.000 )
endfunction
//===========================================================================
function CreateUnitsForPlayer5 takes nothing returns nothing
local player p = Player(5)
local unit u
local integer unitID
local trigger t
local real life
set u = CreateUnit( p, 'hpea', 3056.0, 1686.7, 162.745 )
endfunction
//===========================================================================
function CreateUnitsForPlayer6 takes nothing returns nothing
local player p = Player(6)
local unit u
local integer unitID
local trigger t
local real life
set u = CreateUnit( p, 'hpea', 2980.6, 1672.0, 88.476 )
endfunction
//===========================================================================
function CreateUnitsForPlayer7 takes nothing returns nothing
local player p = Player(7)
local unit u
local integer unitID
local trigger t
local real life
set u = CreateUnit( p, 'hpea', 2951.0, 1602.5, 174.842 )
endfunction
//===========================================================================
function CreateUnitsForPlayer8 takes nothing returns nothing
local player p = Player(8)
local unit u
local integer unitID
local trigger t
local real life
set u = CreateUnit( p, 'hpea', 2955.9, 1490.0, 72.886 )
endfunction
//===========================================================================
function CreateBuildingsForPlayer9 takes nothing returns nothing
local player p = Player(9)
local unit u
local integer unitID
local trigger t
local real life
set gg_unit_haro_0004 = CreateUnit( p, 'haro', 3008.0, 2816.0, 270.000 )
set u = CreateUnit( p, 'ntx2', 1984.0, 1280.0, 270.000 )
set u = CreateUnit( p, 'ntx2', 1536.0, 1984.0, 270.000 )
set gg_unit_nmgv_0028 = CreateUnit( p, 'nmgv', 1856.0, 2496.0, 270.000 )
set gg_unit_nmgv_0029 = CreateUnit( p, 'nmgv', 2432.0, 1600.0, 270.000 )
endfunction
//===========================================================================
function CreateNeutralPassiveBuildings takes nothing returns nothing
local player p = Player(PLAYER_NEUTRAL_PASSIVE)
local unit u
local integer unitID
local trigger t
local real life
set u = CreateUnit( p, 'ntav', -3136.0, -2048.0, 270.000 )
call SetUnitColor( u, ConvertPlayerColor(0) )
set u = CreateUnit( p, 'ntav', 3136.0, 1536.0, 270.000 )
call SetUnitColor( u, ConvertPlayerColor(0) )
set u = CreateUnit( p, 'nfnp', 1856.0, 2880.0, 270.000 )
set u = CreateUnit( p, 'nbfl', -1856.0, -3392.0, 270.000 )
endfunction
//===========================================================================
function CreateNeutralPassive takes nothing returns nothing
local player p = Player(PLAYER_NEUTRAL_PASSIVE)
local unit u
local integer unitID
local trigger t
local real life
set u = CreateUnit( p, 'Ekgg', -1311.2, 2057.8, 4.140 )
set u = CreateUnit( p, 'Ekgg', 1170.4, -2677.3, 180.000 )
endfunction
//===========================================================================
function CreatePlayerBuildings takes nothing returns nothing
call CreateBuildingsForPlayer4( )
call CreateBuildingsForPlayer9( )
endfunction
//===========================================================================
function CreatePlayerUnits takes nothing returns nothing
call CreateUnitsForPlayer0( )
call CreateUnitsForPlayer1( )
call CreateUnitsForPlayer2( )
call CreateUnitsForPlayer3( )
call CreateUnitsForPlayer5( )
call CreateUnitsForPlayer6( )
call CreateUnitsForPlayer7( )
call CreateUnitsForPlayer8( )
endfunction
//===========================================================================
function CreateAllUnits takes nothing returns nothing
call CreateNeutralPassiveBuildings( )
call CreatePlayerBuildings( )
call CreateNeutralPassive( )
call CreatePlayerUnits( )
endfunction
//***************************************************************************
//*
//* Regions
//*
//***************************************************************************
function CreateRegions takes nothing returns nothing
local weathereffect we
set gg_rct_Region_001 = Rect( -2464.0, -2336.0, -2080.0, -1984.0 )
set gg_rct_Region_002 = Rect( -2112.0, -2720.0, -1728.0, -2368.0 )
set gg_rct_Region_005 = Rect( 1664.0, 2016.0, 2048.0, 2368.0 )
set gg_rct_Region_006 = Rect( 1952.0, 1440.0, 2336.0, 1792.0 )
set gg_rct_Region_000 = Rect( -2592.0, -2976.0, -2560.0, -2944.0 )
set gg_rct_Region_004 = Rect( 2688.0, 2432.0, 2720.0, 2464.0 )
set gg_rct_Region_007 = Rect( -3328.0, -3584.0, -2880.0, -3200.0 )
endfunction
//***************************************************************************
//*
//* Triggers
//*
//***************************************************************************
//===========================================================================
// Trigger: Melee Initialization
//
// Default melee game initialization for all players
//===========================================================================
function Trig_Melee_Initialization_Func013A takes nothing returns nothing
call PlaySoundBJ( gg_snd_PH1 )
call SetPlayerStateBJ( GetEnumPlayer(), PLAYER_STATE_RESOURCE_LUMBER, 1 )
call SetPlayerStateBJ( GetEnumPlayer(), PLAYER_STATE_RESOURCE_GOLD, 2000 )
endfunction
function Trig_Melee_Initialization_Actions takes nothing returns nothing
call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, Player(0) )
call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, Player(1) )
call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, Player(2) )
call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, Player(3) )
call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, Player(4) )
call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, Player(5) )
call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, Player(6) )
call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, Player(7) )
call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, Player(8) )
call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, Player(9) )
call MeleeStartingAI( )
call MeleeClearExcessUnits( )
call ForForce( GetPlayersAll(), function Trig_Melee_Initialization_Func013A )
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
//===========================================================================
// Trigger: Hero
//===========================================================================
function Trig_Hero_Actions takes nothing returns nothing
call RemoveUnit( GetBuyingUnit() )
endfunction
//===========================================================================
function InitTrig_Hero takes nothing returns nothing
set gg_trg_Hero = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hero, Player(PLAYER_NEUTRAL_PASSIVE), EVENT_PLAYER_UNIT_SELL )
call TriggerAddAction( gg_trg_Hero, function Trig_Hero_Actions )
endfunction
//===========================================================================
// Trigger: HeroDiesTeam1
//===========================================================================
function Trig_HeroDiesTeam1_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetDyingUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_HeroDiesTeam1_Actions takes nothing returns nothing
call CreateTimerDialogBJ( udg_CountdwnTimer, GetPlayerName(GetTriggerPlayer()) )
call StartTimerBJ( udg_CountdwnTimer, false, 20.00 )
call TriggerSleepAction( 20.00 )
call ReviveHeroLoc( GetDyingUnit(), GetRectCenter(gg_rct_Region_000), true )
call DestroyTimerDialogBJ( GetLastCreatedTimerDialogBJ() )
endfunction
//===========================================================================
function InitTrig_HeroDiesTeam1 takes nothing returns nothing
set gg_trg_HeroDiesTeam1 = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_HeroDiesTeam1, Player(0), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_HeroDiesTeam1, Player(1), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_HeroDiesTeam1, Player(2), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_HeroDiesTeam1, Player(3), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_HeroDiesTeam1, Condition( function Trig_HeroDiesTeam1_Conditions ) )
call TriggerAddAction( gg_trg_HeroDiesTeam1, function Trig_HeroDiesTeam1_Actions )
endfunction
//===========================================================================
// Trigger: HeroDiesTeam2
//===========================================================================
function Trig_HeroDiesTeam2_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetDyingUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_HeroDiesTeam2_Actions takes nothing returns nothing
call CreateTimerDialogBJ( udg_CountdwnTimer, GetPlayerName(GetTriggerPlayer()) )
call StartTimerBJ( udg_CountdwnTimer, false, 20.00 )
call TriggerSleepAction( 20.00 )
call ReviveHeroLoc( GetDyingUnit(), GetRectCenter(gg_rct_Region_004), true )
endfunction
//===========================================================================
function InitTrig_HeroDiesTeam2 takes nothing returns nothing
set gg_trg_HeroDiesTeam2 = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_HeroDiesTeam2, Player(5), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_HeroDiesTeam2, Player(6), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_HeroDiesTeam2, Player(7), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_HeroDiesTeam2, Player(8), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_HeroDiesTeam2, Condition( function Trig_HeroDiesTeam2_Conditions ) )
call TriggerAddAction( gg_trg_HeroDiesTeam2, function Trig_HeroDiesTeam2_Actions )
endfunction
//===========================================================================
// Trigger: Destroy01
//===========================================================================
function Trig_Destroy01_Conditions takes nothing returns boolean
if ( not ( GetDyingUnit() == gg_unit_nmgv_0032 ) ) then
return false
endif
return true
endfunction
function Trig_Destroy01_Actions takes nothing returns nothing
call DisableTrigger( gg_trg_Region01 )
endfunction
//===========================================================================
function InitTrig_Destroy01 takes nothing returns nothing
set gg_trg_Destroy01 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Destroy01, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Destroy01, Condition( function Trig_Destroy01_Conditions ) )
call TriggerAddAction( gg_trg_Destroy01, function Trig_Destroy01_Actions )
endfunction
//===========================================================================
// Trigger: Destroy02
//===========================================================================
function Trig_Destroy02_Conditions takes nothing returns boolean
if ( not ( GetDyingUnit() == gg_unit_nmgv_0031 ) ) then
return false
endif
return true
endfunction
function Trig_Destroy02_Actions takes nothing returns nothing
call DisableTrigger( gg_trg_Region02 )
endfunction
//===========================================================================
function InitTrig_Destroy02 takes nothing returns nothing
set gg_trg_Destroy02 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Destroy02, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Destroy02, Condition( function Trig_Destroy02_Conditions ) )
call TriggerAddAction( gg_trg_Destroy02, function Trig_Destroy02_Actions )
endfunction
//===========================================================================
// Trigger: Destroy05
//===========================================================================
function Trig_Destroy05_Conditions takes nothing returns boolean
if ( not ( GetDyingUnit() == gg_unit_nmgv_0028 ) ) then
return false
endif
return true
endfunction
function Trig_Destroy05_Actions takes nothing returns nothing
call DisableTrigger( gg_trg_Region05 )
endfunction
//===========================================================================
function InitTrig_Destroy05 takes nothing returns nothing
set gg_trg_Destroy05 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Destroy05, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Destroy05, Condition( function Trig_Destroy05_Conditions ) )
call TriggerAddAction( gg_trg_Destroy05, function Trig_Destroy05_Actions )
endfunction
//===========================================================================
// Trigger: Destroy06
//===========================================================================
function Trig_Destroy06_Conditions takes nothing returns boolean
if ( not ( GetDyingUnit() == gg_unit_nmgv_0029 ) ) then
return false
endif
return true
endfunction
function Trig_Destroy06_Actions takes nothing returns nothing
call DisableTrigger( gg_trg_Region06 )
endfunction
//===========================================================================
function InitTrig_Destroy06 takes nothing returns nothing
set gg_trg_Destroy06 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Destroy06, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Destroy06, Condition( function Trig_Destroy06_Conditions ) )
call TriggerAddAction( gg_trg_Destroy06, function Trig_Destroy06_Actions )
endfunction
//===========================================================================
// Trigger: Footmen Bounty
//===========================================================================
function Trig_Footmen_Bounty_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetKillingUnitBJ()) == GetEnumPlayer() ) ) then
return false
endif
return true
endfunction
function Trig_Footmen_Bounty_Actions takes nothing returns nothing
call AdjustPlayerStateBJ( 200, GetEnumPlayer(), PLAYER_STATE_RESOURCE_GOLD )
endfunction
//===========================================================================
function InitTrig_Footmen_Bounty takes nothing returns nothing
set gg_trg_Footmen_Bounty = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Footmen_Bounty, Player(4), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Footmen_Bounty, Condition( function Trig_Footmen_Bounty_Conditions ) )
call TriggerAddAction( gg_trg_Footmen_Bounty, function Trig_Footmen_Bounty_Actions )
endfunction
//===========================================================================
// Trigger: Gold
//===========================================================================
function Trig_Gold_Func001002 takes nothing returns nothing
call AdjustPlayerStateBJ( 100, GetEnumPlayer(), PLAYER_STATE_RESOURCE_GOLD )
endfunction
function Trig_Gold_Actions takes nothing returns nothing
call ForForce( GetPlayersAll(), function Trig_Gold_Func001002 )
endfunction
//===========================================================================
function InitTrig_Gold takes nothing returns nothing
set gg_trg_Gold = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Gold, 9.00 )
call TriggerAddAction( gg_trg_Gold, function Trig_Gold_Actions )
endfunction
//===========================================================================
// Trigger: Region01
//===========================================================================
function Trig_Region01_Actions takes nothing returns nothing
call CreateNUnitsAtLoc( 4, 'hhes', Player(4), GetRectCenter(gg_rct_Region_001), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 3, 'nhea', Player(4), GetRectCenter(gg_rct_Region_001), bj_UNIT_FACING )
endfunction
//===========================================================================
function InitTrig_Region01 takes nothing returns nothing
set gg_trg_Region01 = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Region01, 18.00 )
call TriggerAddAction( gg_trg_Region01, function Trig_Region01_Actions )
endfunction
//===========================================================================
// Trigger: Region02
//===========================================================================
function Trig_Region02_Actions takes nothing returns nothing
call CreateNUnitsAtLoc( 4, 'hhes', Player(4), GetRectCenter(gg_rct_Region_002), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 3, 'nhea', Player(4), GetRectCenter(gg_rct_Region_002), bj_UNIT_FACING )
endfunction
//===========================================================================
function InitTrig_Region02 takes nothing returns nothing
set gg_trg_Region02 = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Region02, 18.00 )
call TriggerAddAction( gg_trg_Region02, function Trig_Region02_Actions )
endfunction
//===========================================================================
// Trigger: Attack01
//===========================================================================
function Trig_Attack01_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetEnteringUnit(), UNIT_TYPE_HERO) == false ) ) then
return false
endif
return true
endfunction
function Trig_Attack01_Actions takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnteringUnit(), "attack", GetUnitLoc(gg_unit_haro_0002) )
endfunction
//===========================================================================
function InitTrig_Attack01 takes nothing returns nothing
set gg_trg_Attack01 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Attack01, gg_rct_Region_001 )
call TriggerAddCondition( gg_trg_Attack01, Condition( function Trig_Attack01_Conditions ) )
call TriggerAddAction( gg_trg_Attack01, function Trig_Attack01_Actions )
endfunction
//===========================================================================
// Trigger: Attack02
//===========================================================================
function Trig_Attack02_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetEnteringUnit(), UNIT_TYPE_HERO) == false ) ) then
return false
endif
return true
endfunction
function Trig_Attack02_Actions takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnteringUnit(), "attack", GetUnitLoc(gg_unit_haro_0004) )
endfunction
//===========================================================================
function InitTrig_Attack02 takes nothing returns nothing
set gg_trg_Attack02 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Attack02, gg_rct_Region_002 )
call TriggerAddCondition( gg_trg_Attack02, Condition( function Trig_Attack02_Conditions ) )
call TriggerAddAction( gg_trg_Attack02, function Trig_Attack02_Actions )
endfunction
//===========================================================================
// Trigger: Region05
//===========================================================================
function Trig_Region05_Actions takes nothing returns nothing
call CreateNUnitsAtLoc( 4, 'hhes', Player(9), GetRectCenter(gg_rct_Region_005), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 3, 'nhea', Player(9), GetRectCenter(gg_rct_Region_005), bj_UNIT_FACING )
endfunction
//===========================================================================
function InitTrig_Region05 takes nothing returns nothing
set gg_trg_Region05 = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Region05, 18.00 )
call TriggerAddAction( gg_trg_Region05, function Trig_Region05_Actions )
endfunction
//===========================================================================
// Trigger: Region06
//===========================================================================
function Trig_Region06_Actions takes nothing returns nothing
call CreateNUnitsAtLoc( 4, 'hhes', Player(9), GetRectCenter(gg_rct_Region_006), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 3, 'nhea', Player(9), GetRectCenter(gg_rct_Region_005), bj_UNIT_FACING )
endfunction
//===========================================================================
function InitTrig_Region06 takes nothing returns nothing
set gg_trg_Region06 = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Region06, 18.00 )
call TriggerAddAction( gg_trg_Region06, function Trig_Region06_Actions )
endfunction
//===========================================================================
// Trigger: Attack05
//===========================================================================
function Trig_Attack05_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetEnteringUnit(), UNIT_TYPE_HERO) == false ) ) then
return false
endif
return true
endfunction
function Trig_Attack05_Actions takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnteringUnit(), "attack", GetUnitRallyPoint(gg_unit_haro_0002) )
endfunction
//===========================================================================
function InitTrig_Attack05 takes nothing returns nothing
set gg_trg_Attack05 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Attack05, gg_rct_Region_005 )
call TriggerAddCondition( gg_trg_Attack05, Condition( function Trig_Attack05_Conditions ) )
call TriggerAddAction( gg_trg_Attack05, function Trig_Attack05_Actions )
endfunction
//===========================================================================
// Trigger: Attack06
//===========================================================================
function Trig_Attack06_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetEnteringUnit(), UNIT_TYPE_HERO) == false ) ) then
return false
endif
return true
endfunction
function Trig_Attack06_Actions takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnteringUnit(), "attack", GetUnitRallyPoint(gg_unit_haro_0002) )
endfunction
//===========================================================================
function InitTrig_Attack06 takes nothing returns nothing
set gg_trg_Attack06 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Attack06, gg_rct_Region_006 )
call TriggerAddCondition( gg_trg_Attack06, Condition( function Trig_Attack06_Conditions ) )
call TriggerAddAction( gg_trg_Attack06, function Trig_Attack06_Actions )
endfunction
//===========================================================================
// Trigger: DefeatandVictory01
//===========================================================================
function Trig_DefeatandVictory01_Conditions takes nothing returns boolean
if ( not ( GetDyingUnit() == gg_unit_haro_0002 ) ) then
return false
endif
return true
endfunction
function Trig_DefeatandVictory01_Actions takes nothing returns nothing
call CustomDefeatBJ( Player(0), "TRIGSTR_022" )
call CustomDefeatBJ( Player(1), "TRIGSTR_023" )
call CustomDefeatBJ( Player(2), "TRIGSTR_024" )
call CustomDefeatBJ( Player(3), "TRIGSTR_025" )
endfunction
//===========================================================================
function InitTrig_DefeatandVictory01 takes nothing returns nothing
set gg_trg_DefeatandVictory01 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_DefeatandVictory01, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_DefeatandVictory01, Condition( function Trig_DefeatandVictory01_Conditions ) )
call TriggerAddAction( gg_trg_DefeatandVictory01, function Trig_DefeatandVictory01_Actions )
endfunction
//===========================================================================
// Trigger: DefeatandVictory02
//===========================================================================
function Trig_DefeatandVictory02_Conditions takes nothing returns boolean
if ( not ( GetDyingUnit() == gg_unit_haro_0004 ) ) then
return false
endif
return true
endfunction
function Trig_DefeatandVictory02_Actions takes nothing returns nothing
call CustomDefeatBJ( Player(5), "TRIGSTR_026" )
call CustomDefeatBJ( Player(6), "TRIGSTR_027" )
call CustomDefeatBJ( Player(7), "TRIGSTR_028" )
call CustomDefeatBJ( Player(8), "TRIGSTR_029" )
endfunction
//===========================================================================
function InitTrig_DefeatandVictory02 takes nothing returns nothing
set gg_trg_DefeatandVictory02 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_DefeatandVictory02, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_DefeatandVictory02, Condition( function Trig_DefeatandVictory02_Conditions ) )
call TriggerAddAction( gg_trg_DefeatandVictory02, function Trig_DefeatandVictory02_Actions )
endfunction
//===========================================================================
function InitCustomTriggers takes nothing returns nothing
call InitTrig_Melee_Initialization( )
call InitTrig_Hero( )
call InitTrig_HeroDiesTeam1( )
call InitTrig_HeroDiesTeam2( )
call InitTrig_Destroy01( )
call InitTrig_Destroy02( )
call InitTrig_Destroy05( )
call InitTrig_Destroy06( )
call InitTrig_Footmen_Bounty( )
call InitTrig_Gold( )
call InitTrig_Region01( )
call InitTrig_Region02( )
call InitTrig_Attack01( )
call InitTrig_Attack02( )
call InitTrig_Region05( )
call InitTrig_Region06( )
call InitTrig_Attack05( )
call InitTrig_Attack06( )
call InitTrig_DefeatandVictory01( )
call InitTrig_DefeatandVictory02( )
endfunction
//===========================================================================
function RunInitializationTriggers takes nothing returns nothing
call ConditionalTriggerExecute( gg_trg_Melee_Initialization )
endfunction
//***************************************************************************
//*
//* Players
//*
//***************************************************************************
function InitCustomPlayerSlots takes nothing returns nothing
// Player 0
call SetPlayerStartLocation( Player(0), 0 )
call ForcePlayerStartLocation( Player(0), 0 )
call SetPlayerColor( Player(0), ConvertPlayerColor(0) )
call SetPlayerRacePreference( Player(0), RACE_PREF_HUMAN )
call SetPlayerRaceSelectable( Player(0), false )
call SetPlayerController( Player(0), MAP_CONTROL_USER )
// Player 1
call SetPlayerStartLocation( Player(1), 1 )
call ForcePlayerStartLocation( Player(1), 1 )
call SetPlayerColor( Player(1), ConvertPlayerColor(1) )
call SetPlayerRacePreference( Player(1), RACE_PREF_HUMAN )
call SetPlayerRaceSelectable( Player(1), false )
call SetPlayerController( Player(1), MAP_CONTROL_USER )
// Player 2
call SetPlayerStartLocation( Player(2), 2 )
call ForcePlayerStartLocation( Player(2), 2 )
call SetPlayerColor( Player(2), ConvertPlayerColor(2) )
call SetPlayerRacePreference( Player(2), RACE_PREF_HUMAN )
call SetPlayerRaceSelectable( Player(2), false )
call SetPlayerController( Player(2), MAP_CONTROL_USER )
// Player 3
call SetPlayerStartLocation( Player(3), 3 )
call ForcePlayerStartLocation( Player(3), 3 )
call SetPlayerColor( Player(3), ConvertPlayerColor(3) )
call SetPlayerRacePreference( Player(3), RACE_PREF_HUMAN )
call SetPlayerRaceSelectable( Player(3), false )
call SetPlayerController( Player(3), MAP_CONTROL_USER )
// Player 4
call SetPlayerStartLocation( Player(4), 4 )
call ForcePlayerStartLocation( Player(4), 4 )
call SetPlayerColor( Player(4), ConvertPlayerColor(4) )
call SetPlayerRacePreference( Player(4), RACE_PREF_HUMAN )
call SetPlayerRaceSelectable( Player(4), false )
call SetPlayerController( Player(4), MAP_CONTROL_COMPUTER )
// Player 5
call SetPlayerStartLocation( Player(5), 5 )
call ForcePlayerStartLocation( Player(5), 5 )
call SetPlayerColor( Player(5), ConvertPlayerColor(5) )
call SetPlayerRacePreference( Player(5), RACE_PREF_HUMAN )
call SetPlayerRaceSelectable( Player(5), false )
call SetPlayerController( Player(5), MAP_CONTROL_USER )
// Player 6
call SetPlayerStartLocation( Player(6), 6 )
call ForcePlayerStartLocation( Player(6), 6 )
call SetPlayerColor( Player(6), ConvertPlayerColor(6) )
call SetPlayerRacePreference( Player(6), RACE_PREF_HUMAN )
call SetPlayerRaceSelectable( Player(6), false )
call SetPlayerController( Player(6), MAP_CONTROL_USER )
// Player 7
call SetPlayerStartLocation( Player(7), 7 )
call ForcePlayerStartLocation( Player(7), 7 )
call SetPlayerColor( Player(7), ConvertPlayerColor(7) )
call SetPlayerRacePreference( Player(7), RACE_PREF_HUMAN )
call SetPlayerRaceSelectable( Player(7), false )
call SetPlayerController( Player(7), MAP_CONTROL_USER )
// Player 8
call SetPlayerStartLocation( Player(8), 8 )
call ForcePlayerStartLocation( Player(8), 8 )
call SetPlayerColor( Player(8), ConvertPlayerColor(8) )
call SetPlayerRacePreference( Player(8), RACE_PREF_HUMAN )
call SetPlayerRaceSelectable( Player(8), false )
call SetPlayerController( Player(8), MAP_CONTROL_USER )
// Player 9
call SetPlayerStartLocation( Player(9), 9 )
call ForcePlayerStartLocation( Player(9), 9 )
call SetPlayerColor( Player(9), ConvertPlayerColor(9) )
call SetPlayerRacePreference( Player(9), RACE_PREF_HUMAN )
call SetPlayerRaceSelectable( Player(9), false )
call SetPlayerController( Player(9), MAP_CONTROL_COMPUTER )
endfunction
function InitCustomTeams takes nothing returns nothing
// Force: TRIGSTR_006
call SetPlayerTeam( Player(0), 0 )
call SetPlayerState( Player(0), PLAYER_STATE_ALLIED_VICTORY, 1 )
call SetPlayerTeam( Player(1), 0 )
call SetPlayerState( Player(1), PLAYER_STATE_ALLIED_VICTORY, 1 )
call SetPlayerTeam( Player(2), 0 )
call SetPlayerState( Player(2), PLAYER_STATE_ALLIED_VICTORY, 1 )
call SetPlayerTeam( Player(3), 0 )
call SetPlayerState( Player(3), PLAYER_STATE_ALLIED_VICTORY, 1 )
call SetPlayerTeam( Player(4), 0 )
call SetPlayerState( Player(4), PLAYER_STATE_ALLIED_VICTORY, 1 )
// Allied
call SetPlayerAllianceStateAllyBJ( Player(0), Player(1), true )
call SetPlayerAllianceStateAllyBJ( Player(0), Player(2), true )
call SetPlayerAllianceStateAllyBJ( Player(0), Player(3), true )
call SetPlayerAllianceStateAllyBJ( Player(0), Player(4), true )
call SetPlayerAllianceStateAllyBJ( Player(1), Player(0), true )
call SetPlayerAllianceStateAllyBJ( Player(1), Player(2), true )
call SetPlayerAllianceStateAllyBJ( Player(1), Player(3), true )
call SetPlayerAllianceStateAllyBJ( Player(1), Player(4), true )
call SetPlayerAllianceStateAllyBJ( Player(2), Player(0), true )
call SetPlayerAllianceStateAllyBJ( Player(2), Player(1), true )
call SetPlayerAllianceStateAllyBJ( Player(2), Player(3), true )
call SetPlayerAllianceStateAllyBJ( Player(2), Player(4), true )
call SetPlayerAllianceStateAllyBJ( Player(3), Player(0), true )
call SetPlayerAllianceStateAllyBJ( Player(3), Player(1), true )
call SetPlayerAllianceStateAllyBJ( Player(3), Player(2), true )
call SetPlayerAllianceStateAllyBJ( Player(3), Player(4), true )
call SetPlayerAllianceStateAllyBJ( Player(4), Player(0), true )
call SetPlayerAllianceStateAllyBJ( Player(4), Player(1), true )
call SetPlayerAllianceStateAllyBJ( Player(4), Player(2), true )
call SetPlayerAllianceStateAllyBJ( Player(4), Player(3), true )
// Shared Vision
call SetPlayerAllianceStateVisionBJ( Player(0), Player(1), true )
call SetPlayerAllianceStateVisionBJ( Player(0), Player(2), true )
call SetPlayerAllianceStateVisionBJ( Player(0), Player(3), true )
call SetPlayerAllianceStateVisionBJ( Player(0), Player(4), true )
call SetPlayerAllianceStateVisionBJ( Player(1), Player(0), true )
call SetPlayerAllianceStateVisionBJ( Player(1), Player(2), true )
call SetPlayerAllianceStateVisionBJ( Player(1), Player(3), true )
call SetPlayerAllianceStateVisionBJ( Player(1), Player(4), true )
call SetPlayerAllianceStateVisionBJ( Player(2), Player(0), true )
call SetPlayerAllianceStateVisionBJ( Player(2), Player(1), true )
call SetPlayerAllianceStateVisionBJ( Player(2), Player(3), true )
call SetPlayerAllianceStateVisionBJ( Player(2), Player(4), true )
call SetPlayerAllianceStateVisionBJ( Player(3), Player(0), true )
call SetPlayerAllianceStateVisionBJ( Player(3), Player(1), true )
call SetPlayerAllianceStateVisionBJ( Player(3), Player(2), true )
call SetPlayerAllianceStateVisionBJ( Player(3), Player(4), true )
call SetPlayerAllianceStateVisionBJ( Player(4), Player(0), true )
call SetPlayerAllianceStateVisionBJ( Player(4), Player(1), true )
call SetPlayerAllianceStateVisionBJ( Player(4), Player(2), true )
call SetPlayerAllianceStateVisionBJ( Player(4), Player(3), true )
// Force: TRIGSTR_019
call SetPlayerTeam( Player(5), 1 )
call SetPlayerTeam( Player(6), 1 )
call SetPlayerTeam( Player(7), 1 )
call SetPlayerTeam( Player(8), 1 )
call SetPlayerTeam( Player(9), 1 )
// Allied
call SetPlayerAllianceStateAllyBJ( Player(5), Player(6), true )
call SetPlayerAllianceStateAllyBJ( Player(5), Player(7), true )
call SetPlayerAllianceStateAllyBJ( Player(5), Player(8), true )
call SetPlayerAllianceStateAllyBJ( Player(5), Player(9), true )
call SetPlayerAllianceStateAllyBJ( Player(6), Player(5), true )
call SetPlayerAllianceStateAllyBJ( Player(6), Player(7), true )
call SetPlayerAllianceStateAllyBJ( Player(6), Player(8), true )
call SetPlayerAllianceStateAllyBJ( Player(6), Player(9), true )
call SetPlayerAllianceStateAllyBJ( Player(7), Player(5), true )
call SetPlayerAllianceStateAllyBJ( Player(7), Player(6), true )
call SetPlayerAllianceStateAllyBJ( Player(7), Player(8), true )
call SetPlayerAllianceStateAllyBJ( Player(7), Player(9), true )
call SetPlayerAllianceStateAllyBJ( Player(8), Player(5), true )
call SetPlayerAllianceStateAllyBJ( Player(8), Player(6), true )
call SetPlayerAllianceStateAllyBJ( Player(8), Player(7), true )
call SetPlayerAllianceStateAllyBJ( Player(8), Player(9), true )
call SetPlayerAllianceStateAllyBJ( Player(9), Player(5), true )
call SetPlayerAllianceStateAllyBJ( Player(9), Player(6), true )
call SetPlayerAllianceStateAllyBJ( Player(9), Player(7), true )
call SetPlayerAllianceStateAllyBJ( Player(9), Player(8), true )
// Shared Vision
call SetPlayerAllianceStateVisionBJ( Player(5), Player(6), true )
call SetPlayerAllianceStateVisionBJ( Player(5), Player(7), true )
call SetPlayerAllianceStateVisionBJ( Player(5), Player(8), true )
call SetPlayerAllianceStateVisionBJ( Player(5), Player(9), true )
call SetPlayerAllianceStateVisionBJ( Player(6), Player(5), true )
call SetPlayerAllianceStateVisionBJ( Player(6), Player(7), true )
call SetPlayerAllianceStateVisionBJ( Player(6), Player(8), true )
call SetPlayerAllianceStateVisionBJ( Player(6), Player(9), true )
call SetPlayerAllianceStateVisionBJ( Player(7), Player(5), true )
call SetPlayerAllianceStateVisionBJ( Player(7), Player(6), true )
call SetPlayerAllianceStateVisionBJ( Player(7), Player(8), true )
call SetPlayerAllianceStateVisionBJ( Player(7), Player(9), true )
call SetPlayerAllianceStateVisionBJ( Player(8), Player(5), true )
call SetPlayerAllianceStateVisionBJ( Player(8), Player(6), true )
call SetPlayerAllianceStateVisionBJ( Player(8), Player(7), true )
call SetPlayerAllianceStateVisionBJ( Player(8), Player(9), true )
call SetPlayerAllianceStateVisionBJ( Player(9), Player(5), true )
call SetPlayerAllianceStateVisionBJ( Player(9), Player(6), true )
call SetPlayerAllianceStateVisionBJ( Player(9), Player(7), true )
call SetPlayerAllianceStateVisionBJ( Player(9), Player(8), true )
endfunction
function InitAllyPriorities takes nothing returns nothing
call SetStartLocPrioCount( 0, 3 )
call SetStartLocPrio( 0, 0, 1, MAP_LOC_PRIO_HIGH )
call SetStartLocPrio( 0, 1, 2, MAP_LOC_PRIO_HIGH )
call SetStartLocPrio( 0, 2, 3, MAP_LOC_PRIO_HIGH )
call SetStartLocPrioCount( 1, 3 )
call SetStartLocPrio( 1, 0, 0, MAP_LOC_PRIO_HIGH )
call SetStartLocPrio( 1, 1, 2, MAP_LOC_PRIO_HIGH )
call SetStartLocPrio( 1, 2, 3, MAP_LOC_PRIO_HIGH )
call SetStartLocPrioCount( 2, 3 )
call SetStartLocPrio( 2, 0, 0, MAP_LOC_PRIO_HIGH )
call SetStartLocPrio( 2, 1, 1, MAP_LOC_PRIO_HIGH )
call SetStartLocPrio( 2, 2, 3, MAP_LOC_PRIO_HIGH )
call SetStartLocPrioCount( 3, 3 )
call SetStartLocPrio( 3, 0, 0, MAP_LOC_PRIO_HIGH )
call SetStartLocPrio( 3, 1, 1, MAP_LOC_PRIO_HIGH )
call SetStartLocPrio( 3, 2, 2, MAP_LOC_PRIO_HIGH )
call SetStartLocPrioCount( 5, 3 )
call SetStartLocPrio( 5, 0, 6, MAP_LOC_PRIO_HIGH )
call SetStartLocPrio( 5, 1, 7, MAP_LOC_PRIO_HIGH )
call SetStartLocPrio( 5, 2, 8, MAP_LOC_PRIO_HIGH )
call SetStartLocPrioCount( 6, 3 )
call SetStartLocPrio( 6, 0, 5, MAP_LOC_PRIO_HIGH )
call SetStartLocPrio( 6, 1, 7, MAP_LOC_PRIO_HIGH )
call SetStartLocPrio( 6, 2, 8, MAP_LOC_PRIO_HIGH )
call SetStartLocPrioCount( 7, 3 )
call SetStartLocPrio( 7, 0, 5, MAP_LOC_PRIO_HIGH )
call SetStartLocPrio( 7, 1, 6, MAP_LOC_PRIO_HIGH )
call SetStartLocPrio( 7, 2, 8, MAP_LOC_PRIO_HIGH )
call SetStartLocPrioCount( 8, 3 )
call SetStartLocPrio( 8, 0, 5, MAP_LOC_PRIO_HIGH )
call SetStartLocPrio( 8, 1, 6, MAP_LOC_PRIO_HIGH )
call SetStartLocPrio( 8, 2, 7, MAP_LOC_PRIO_HIGH )
endfunction
//***************************************************************************
//*
//* Main Initialization
//*
//***************************************************************************
//===========================================================================
function main takes nothing returns nothing
local weathereffect we
call SetCameraBounds( -3328.0 + GetCameraMargin(CAMERA_MARGIN_LEFT), -3584.0 + GetCameraMargin(CAMERA_MARGIN_BOTTOM), 3328.0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), 3072.0 - GetCameraMargin(CAMERA_MARGIN_TOP), -3328.0 + GetCameraMargin(CAMERA_MARGIN_LEFT), 3072.0 - GetCameraMargin(CAMERA_MARGIN_TOP), 3328.0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), -3584.0 + GetCameraMargin(CAMERA_MARGIN_BOTTOM) )
call SetDayNightModels( "Environment\\DNC\\DNCLordaeron\\DNCLordaeronTerrain\\DNCLordaeronTerrain.mdl", "Environment\\DNC\\DNCLordaeron\\DNCLordaeronUnit\\DNCLordaeronUnit.mdl" )
set we = AddWeatherEffect( Rect(-4096.0,-4096.0,4096.0,4096.0), 'SNbs' )
call EnableWeatherEffect( we, true )
call NewSoundEnvironment( "Default" )
call SetAmbientDaySound( "LordaeronWinterDay" )
call SetAmbientNightSound( "LordaeronWinterNight" )
call SetMapMusic( "Music", true, 0 )
call InitSounds( )
call CreateRegions( )
call CreateAllUnits( )
call InitBlizzard( )
call InitGlobals( )
call InitCustomTriggers( )
call RunInitializationTriggers( )
endfunction
//***************************************************************************
//*
//* Map Configuration
//*
//***************************************************************************
function config takes nothing returns nothing
call SetMapName( "TRIGSTR_008" )
call SetMapDescription( "" )
call SetPlayers( 10 )
call SetTeams( 10 )
call SetGamePlacement( MAP_PLACEMENT_TEAMS_TOGETHER )
call DefineStartLocation( 0, -3136.0, -2112.0 )
call DefineStartLocation( 1, -3136.0, -2112.0 )
call DefineStartLocation( 2, -3136.0, -2112.0 )
call DefineStartLocation( 3, -3136.0, -2112.0 )
call DefineStartLocation( 4, -3072.0, -3328.0 )
call DefineStartLocation( 5, 3136.0, 1536.0 )
call DefineStartLocation( 6, 3136.0, 1536.0 )
call DefineStartLocation( 7, 3136.0, 1536.0 )
call DefineStartLocation( 8, 3136.0, 1536.0 )
call DefineStartLocation( 9, 3008.0, 2816.0 )
// Player setup
call InitCustomPlayerSlots( )
call InitCustomTeams( )
call InitAllyPriorities( )
endfunction