globals // Generated trigger gg_trg_test = null unit gg_unit_Hpal_0000 = null unit gg_unit_hkni_0001 = null destructable gg_dest_BTrs_0000 = null endglobals //=========================================================================== // // 2. Testkarte // // Warcraft III map script // Generated by the Warcraft III World Editor // Date: Sun May 11 13:48:10 2008 // Map Author: Barade // //=========================================================================== //*************************************************************************** //* //* Global Variables //* //*************************************************************************** function InitGlobals takes nothing returns nothing endfunction //*************************************************************************** //* //* Destructable Objects //* //*************************************************************************** function CreateAllDestructables takes nothing returns nothing local destructable d local trigger t local real life set gg_dest_BTrs_0000 = CreateDestructable('BTrs' , - 576.0 , 960.0 , 270.000 , 1.000 , 0) 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 gg_unit_Hpal_0000 = CreateUnit(p , 'Hpal' , - 122.5 , - 94.4 , 78.250) call SetHeroLevel(gg_unit_Hpal_0000 , 10 , false) call SelectHeroSkill(gg_unit_Hpal_0000 , 'AHhb') call SelectHeroSkill(gg_unit_Hpal_0000 , 'AHhb') call SelectHeroSkill(gg_unit_Hpal_0000 , 'AHhb') call SelectHeroSkill(gg_unit_Hpal_0000 , 'AHds') call SelectHeroSkill(gg_unit_Hpal_0000 , 'AHds') call SelectHeroSkill(gg_unit_Hpal_0000 , 'AHds') call SelectHeroSkill(gg_unit_Hpal_0000 , 'AHad') call SelectHeroSkill(gg_unit_Hpal_0000 , 'AHad') call SelectHeroSkill(gg_unit_Hpal_0000 , 'AHad') call SelectHeroSkill(gg_unit_Hpal_0000 , 'AHre') set gg_unit_hkni_0001 = CreateUnit(p , 'hkni' , - 324.9 , 484.8 , 23.237) set u = CreateUnit(p , 'hkni' , 284.2 , 481.6 , 344.025) endfunction //=========================================================================== function CreatePlayerBuildings takes nothing returns nothing endfunction //=========================================================================== function CreatePlayerUnits takes nothing returns nothing call CreateUnitsForPlayer0() endfunction //=========================================================================== function CreateAllUnits takes nothing returns nothing call CreatePlayerBuildings() call CreatePlayerUnits() endfunction //*************************************************************************** //* //* Custom Script Code //* //*************************************************************************** ////! import "Import.j" //*************************************************************************** //* //* Triggers //* //*************************************************************************** //=========================================================================== // Trigger: test //=========================================================================== function Trig_test_Actions takes nothing returns nothing //call getCharacterDebug(GetTriggerPlayer() , gg_unit_Hpal_0000) endfunction //=========================================================================== function InitTrig_test takes nothing returns nothing set gg_trg_test = CreateTrigger() call TriggerRegisterPlayerChatEvent(gg_trg_test , Player(0) , "character" , true) call TriggerAddAction(gg_trg_test , function Trig_test_Actions) endfunction //=========================================================================== function InitCustomTriggers takes nothing returns nothing call InitTrig_test() endfunction //=========================================================================== function RunInitializationTriggers takes nothing returns nothing endfunction //*************************************************************************** //* //* Players //* //*************************************************************************** function InitCustomPlayerSlots takes nothing returns nothing // Player 0 call SetPlayerStartLocation(Player(0) , 0) call SetPlayerColor(Player(0) , ConvertPlayerColor(0)) call SetPlayerRacePreference(Player(0) , RACE_PREF_RANDOM) call SetPlayerRaceSelectable(Player(0) , true) call SetPlayerController(Player(0) , MAP_CONTROL_USER) // Player 1 call SetPlayerStartLocation(Player(1) , 1) call SetPlayerColor(Player(1) , ConvertPlayerColor(1)) call SetPlayerRacePreference(Player(1) , RACE_PREF_RANDOM) call SetPlayerRaceSelectable(Player(1) , true) call SetPlayerController(Player(1) , MAP_CONTROL_USER) // Player 2 call SetPlayerStartLocation(Player(2) , 2) call SetPlayerColor(Player(2) , ConvertPlayerColor(2)) call SetPlayerRacePreference(Player(2) , RACE_PREF_RANDOM) call SetPlayerRaceSelectable(Player(2) , true) call SetPlayerController(Player(2) , MAP_CONTROL_USER) // Player 3 call SetPlayerStartLocation(Player(3) , 3) call SetPlayerColor(Player(3) , ConvertPlayerColor(3)) call SetPlayerRacePreference(Player(3) , RACE_PREF_RANDOM) call SetPlayerRaceSelectable(Player(3) , true) call SetPlayerController(Player(3) , MAP_CONTROL_USER) // Player 4 call SetPlayerStartLocation(Player(4) , 4) call SetPlayerColor(Player(4) , ConvertPlayerColor(4)) call SetPlayerRacePreference(Player(4) , RACE_PREF_RANDOM) call SetPlayerRaceSelectable(Player(4) , true) call SetPlayerController(Player(4) , MAP_CONTROL_USER) // Player 5 call SetPlayerStartLocation(Player(5) , 5) call SetPlayerColor(Player(5) , ConvertPlayerColor(5)) call SetPlayerRacePreference(Player(5) , RACE_PREF_RANDOM) call SetPlayerRaceSelectable(Player(5) , true) call SetPlayerController(Player(5) , MAP_CONTROL_USER) // Player 6 call SetPlayerStartLocation(Player(6) , 6) call SetPlayerColor(Player(6) , ConvertPlayerColor(6)) call SetPlayerRacePreference(Player(6) , RACE_PREF_RANDOM) call SetPlayerRaceSelectable(Player(6) , true) call SetPlayerController(Player(6) , MAP_CONTROL_USER) // Player 7 call SetPlayerStartLocation(Player(7) , 7) call SetPlayerColor(Player(7) , ConvertPlayerColor(7)) call SetPlayerRacePreference(Player(7) , RACE_PREF_RANDOM) call SetPlayerRaceSelectable(Player(7) , true) call SetPlayerController(Player(7) , MAP_CONTROL_USER) // Player 8 call SetPlayerStartLocation(Player(8) , 8) call SetPlayerColor(Player(8) , ConvertPlayerColor(8)) call SetPlayerRacePreference(Player(8) , RACE_PREF_RANDOM) call SetPlayerRaceSelectable(Player(8) , true) call SetPlayerController(Player(8) , MAP_CONTROL_USER) // Player 9 call SetPlayerStartLocation(Player(9) , 9) call SetPlayerColor(Player(9) , ConvertPlayerColor(9)) call SetPlayerRacePreference(Player(9) , RACE_PREF_RANDOM) call SetPlayerRaceSelectable(Player(9) , true) call SetPlayerController(Player(9) , MAP_CONTROL_USER) // Player 10 call SetPlayerStartLocation(Player(10) , 10) call SetPlayerColor(Player(10) , ConvertPlayerColor(10)) call SetPlayerRacePreference(Player(10) , RACE_PREF_RANDOM) call SetPlayerRaceSelectable(Player(10) , true) call SetPlayerController(Player(10) , MAP_CONTROL_USER) // Player 11 call SetPlayerStartLocation(Player(11) , 11) call SetPlayerColor(Player(11) , ConvertPlayerColor(11)) call SetPlayerRacePreference(Player(11) , RACE_PREF_RANDOM) call SetPlayerRaceSelectable(Player(11) , true) call SetPlayerController(Player(11) , MAP_CONTROL_USER) endfunction function InitCustomTeams takes nothing returns nothing // Force: TRIGSTR_017 call SetPlayerTeam(Player(0) , 0) call SetPlayerTeam(Player(1) , 0) call SetPlayerTeam(Player(2) , 0) call SetPlayerTeam(Player(3) , 0) call SetPlayerTeam(Player(4) , 0) call SetPlayerTeam(Player(5) , 0) call SetPlayerTeam(Player(6) , 0) call SetPlayerTeam(Player(7) , 0) call SetPlayerTeam(Player(8) , 0) call SetPlayerTeam(Player(9) , 0) call SetPlayerTeam(Player(10) , 0) call SetPlayerTeam(Player(11) , 0) endfunction function InitAllyPriorities takes nothing returns nothing call SetStartLocPrioCount(0 , 3) call SetStartLocPrio(0 , 0 , 6 , MAP_LOC_PRIO_HIGH) call SetStartLocPrio(0 , 1 , 8 , MAP_LOC_PRIO_LOW) call SetStartLocPrio(0 , 2 , 9 , MAP_LOC_PRIO_HIGH) call SetStartLocPrioCount(1 , 1) call SetStartLocPrio(1 , 0 , 8 , MAP_LOC_PRIO_HIGH) call SetStartLocPrioCount(2 , 4) call SetStartLocPrio(2 , 0 , 5 , MAP_LOC_PRIO_LOW) call SetStartLocPrio(2 , 1 , 6 , MAP_LOC_PRIO_LOW) call SetStartLocPrio(2 , 2 , 9 , MAP_LOC_PRIO_LOW) call SetStartLocPrio(2 , 3 , 11 , MAP_LOC_PRIO_HIGH) call SetStartLocPrioCount(3 , 1) call SetStartLocPrio(3 , 0 , 7 , MAP_LOC_PRIO_HIGH) call SetStartLocPrioCount(4 , 1) call SetStartLocPrio(4 , 0 , 10 , MAP_LOC_PRIO_HIGH) call SetStartLocPrioCount(5 , 1) call SetStartLocPrio(5 , 0 , 6 , MAP_LOC_PRIO_HIGH) call SetStartLocPrioCount(6 , 3) call SetStartLocPrio(6 , 0 , 0 , MAP_LOC_PRIO_HIGH) call SetStartLocPrio(6 , 1 , 5 , MAP_LOC_PRIO_HIGH) call SetStartLocPrio(6 , 2 , 9 , MAP_LOC_PRIO_HIGH) call SetStartLocPrioCount(7 , 1) call SetStartLocPrio(7 , 0 , 3 , MAP_LOC_PRIO_HIGH) call SetStartLocPrioCount(8 , 2) call SetStartLocPrio(8 , 0 , 0 , MAP_LOC_PRIO_HIGH) call SetStartLocPrio(8 , 1 , 1 , MAP_LOC_PRIO_HIGH) call SetStartLocPrioCount(9 , 2) call SetStartLocPrio(9 , 0 , 0 , MAP_LOC_PRIO_HIGH) call SetStartLocPrio(9 , 1 , 6 , MAP_LOC_PRIO_HIGH) call SetStartLocPrioCount(10 , 2) call SetStartLocPrio(10 , 0 , 4 , MAP_LOC_PRIO_HIGH) call SetStartLocPrio(10 , 1 , 11 , MAP_LOC_PRIO_HIGH) call SetStartLocPrioCount(11 , 2) call SetStartLocPrio(11 , 0 , 2 , MAP_LOC_PRIO_HIGH) call SetStartLocPrio(11 , 1 , 10 , MAP_LOC_PRIO_HIGH) endfunction //*************************************************************************** //* //* Main Initialization //* //*************************************************************************** //=========================================================================== function main takes nothing returns nothing 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") call NewSoundEnvironment("Default") call SetAmbientDaySound("LordaeronSummerDay") call SetAmbientNightSound("LordaeronSummerNight") call SetMapMusic("Music" , true , 0) call CreateAllDestructables() call CreateAllUnits() call InitBlizzard() call InitGlobals() call InitCustomTriggers() call RunInitializationTriggers() endfunction //*************************************************************************** //* //* Map Configuration //* //*************************************************************************** function config takes nothing returns nothing call SetMapName("Test Map") call SetMapDescription("This is a description.") call SetPlayers(12) call SetTeams(12) call SetGamePlacement(MAP_PLACEMENT_TEAMS_TOGETHER) call DefineStartLocation(0 , 2752.0 , - 64.0) call DefineStartLocation(1 , 1856.0 , 2176.0) call DefineStartLocation(2 , 1344.0 , - 2176.0) call DefineStartLocation(3 , - 3008.0 , 2560.0) call DefineStartLocation(4 , - 2496.0 , - 3136.0) call DefineStartLocation(5 , 1024.0 , - 448.0) call DefineStartLocation(6 , 1984.0 , - 576.0) call DefineStartLocation(7 , - 1536.0 , 2176.0) call DefineStartLocation(8 , 2624.0 , 1216.0) call DefineStartLocation(9 , 2880.0 , - 1024.0) call DefineStartLocation(10 , - 1280.0 , - 2112.0) call DefineStartLocation(11 , 128.0 , - 2688.0) // Player setup call InitCustomPlayerSlots() call SetPlayerSlotAvailable(Player(0) , MAP_CONTROL_USER) call SetPlayerSlotAvailable(Player(1) , MAP_CONTROL_USER) call SetPlayerSlotAvailable(Player(2) , MAP_CONTROL_USER) call SetPlayerSlotAvailable(Player(3) , MAP_CONTROL_USER) call SetPlayerSlotAvailable(Player(4) , MAP_CONTROL_USER) call SetPlayerSlotAvailable(Player(5) , MAP_CONTROL_USER) call SetPlayerSlotAvailable(Player(6) , MAP_CONTROL_USER) call SetPlayerSlotAvailable(Player(7) , MAP_CONTROL_USER) call SetPlayerSlotAvailable(Player(8) , MAP_CONTROL_USER) call SetPlayerSlotAvailable(Player(9) , MAP_CONTROL_USER) call SetPlayerSlotAvailable(Player(10) , MAP_CONTROL_USER) call SetPlayerSlotAvailable(Player(11) , MAP_CONTROL_USER) call InitGenericPlayerSlots() call InitAllyPriorities() endfunction