• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

[JASS] Can anyone help me change a obfuscated JASS script into a world editor JASS script?

Status
Not open for further replies.
Level 14
Joined
Apr 20, 2009
Messages
1,543
I need someone with experience in obfuscated JASS script.
It's for a friend of mine who lost his map...

And now I have 1 big pile of obfuscated JASS script which I want to convert to eather jass triggers or gui for him... (preferrably gui if possible)

If there's anyone who can help:
please pm me.

+rep for each of the 2 maps that you can help me recreate the triggers of
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
I did the first one myself ;)

I changed it to this:
JASS:
globals
 rect gg_rct_Castle_1
 rect gg_rct_Castle_2
 rect gg_rct_Shops_no_air
 rect gg_rct_Shops_no_air_kick
 rect gg_rct_Shop_Labyrinth_Teleport
 rect gg_rct_Shop_Labyrinth_Teleport_2
 rect gg_rct_Shop_Labyrinth_Teleport_to
 rect gg_rct_Shop_Labyrinth_Teleport_2_to
 rect gg_rct_No_builder_in
 rect gg_rct_No_builder_in_2
 rect gg_rct_No_Units_Labyrinth
 rect gg_rct_No_Units_Labyrinth_2
 rect gg_rct_No_Units_Labyrinth_3
 trigger gg_trg_Starting=CreateTrigger()
 trigger gg_trg_level_1_killed=CreateTrigger()
 trigger gg_trg_level_2_killed=CreateTrigger()
 trigger gg_trg_mortar_killed=CreateTrigger()
 trigger gg_trg_air_killed=CreateTrigger()
 trigger gg_trg_general_killed=CreateTrigger()
 trigger gg_trg_Building_killed=CreateTrigger()
 trigger gg_trg_Altar_killed=CreateTrigger()
 trigger gg_trg_Builders_in_Castle_1=CreateTrigger()
 trigger gg_trg_Builders_in_Castle3=CreateTrigger()
 trigger gg_trg_Builders_in_Castle_2=CreateTrigger()
 trigger gg_trg_Builders_in_Castle4=CreateTrigger()
 trigger gg_trg_Food=CreateTrigger()
 trigger gg_trg_Food_2=CreateTrigger()
 trigger gg_trg_Regrow_Trees=CreateTrigger()
 trigger gg_trg_red_leaves=CreateTrigger()
 trigger gg_trg_blue_leaves=CreateTrigger()
 trigger gg_trg_teal_leaves=CreateTrigger()
 trigger gg_trg_purple_leaves=CreateTrigger()
 trigger gg_trg_yellow_leaves=CreateTrigger()
 trigger gg_trg_orange_leaves=CreateTrigger()
 trigger gg_trg_Red=CreateTrigger()
 trigger gg_trg_Blue=CreateTrigger()
 trigger gg_trg_Teal=CreateTrigger()
 trigger gg_trg_Purple=CreateTrigger()
 trigger gg_trg_Yellow=CreateTrigger()
 trigger gg_trg_Orange=CreateTrigger()
 trigger gg_trg_shops_only_general=CreateTrigger()
 trigger gg_trg_shops_only_general2=CreateTrigger()
 trigger gg_trg_shops_only_general3=CreateTrigger()
 trigger gg_trg_shops_only_general4=CreateTrigger()
 trigger gg_trg_Teleport=CreateTrigger()
 trigger gg_trg_Teleport_2=CreateTrigger()
 trigger gg_trg_kick_blue=CreateTrigger()
 trigger gg_trg_kick_teal=CreateTrigger()
 trigger gg_trg_kick_purple=CreateTrigger()
 trigger gg_trg_kick_yellow=CreateTrigger()
 trigger gg_trg_kick_orange=CreateTrigger()
 trigger gg_trg_StrategyMaster=CreateTrigger()
 trigger gg_trg_Normal_Mode=CreateTrigger()
 trigger gg_trg_Extreme_Mode=CreateTrigger()
 trigger gg_trg_Super_Units_Mode=CreateTrigger()
 trigger gg_trg_Thunder_Sword=CreateTrigger()
 trigger gg_trg_Extreme_Thunder_Sword=CreateTrigger()
 trigger gg_trg_Black_Magic=CreateTrigger()
 trigger gg_trg_Extreme_Black_Magic=CreateTrigger()
 trigger gg_trg_Super_Units=CreateTrigger()
  trigger gg_trg_Super_Units_Removal=CreateTrigger()
 unit gg_unit_h009_0027
 unit gg_unit_h009_0029
 unit gg_unit_h009_0024
 unit gg_unit_h009_0025
 unit gg_unit_h009_0028
 unit gg_unit_h009_0026
 trigger gg_trg_Labyrinth_reminder=CreateTrigger()
 trigger gg_trg_Gold_Reminder=CreateTrigger()
 trigger gg_trg_Dark_Magic_Tower=CreateTrigger()
endglobals 

function Trig_Starting_Func003002 takes nothing returns nothing
 call CreateFogModifierRectBJ(true,GetEnumPlayer(),FOG_OF_WAR_MASKED,bj_mapInitialPlayableArea)
endfunction

function Trig_Starting_Func004002 takes nothing returns nothing
 call SetPlayerStateBJ(GetEnumPlayer(),PLAYER_STATE_RESOURCE_GOLD,200)
endfunction

function Trig_Starting_Func005002 takes nothing returns nothing
 call SetPlayerStateBJ(GetEnumPlayer(),PLAYER_STATE_RESOURCE_FOOD_CAP,35)
endfunction

function Trig_Starting_Func006Func002002 takes nothing returns nothing
 call RemoveUnit(GetTriggerUnit())
endfunction

function Trig_Starting_Func006C takes nothing returns boolean
 return(GetPlayerSlotState(Player(0))==PLAYER_SLOT_STATE_EMPTY)
endfunction

function Trig_Starting_Func007Func002002 takes nothing returns nothing
 call RemoveUnit(GetTriggerUnit())
endfunction

function Trig_Starting_Func007C takes nothing returns boolean
 return(GetPlayerSlotState(Player(1))==PLAYER_SLOT_STATE_EMPTY)
endfunction

function Trig_Starting_Func008Func002002 takes nothing returns nothing
 call RemoveUnit(GetTriggerUnit())
endfunction

function Trig_Starting_Func008C takes nothing returns boolean
 return(GetPlayerSlotState(Player(2))==PLAYER_SLOT_STATE_EMPTY)
endfunction

function Trig_Starting_Func009Func002002 takes nothing returns nothing
 call RemoveUnit(GetTriggerUnit())
endfunction

function Trig_Starting_Func009C takes nothing returns boolean
 return(GetPlayerSlotState(Player(3))==PLAYER_SLOT_STATE_EMPTY)
endfunction

function Trig_Starting_Func010Func002002 takes nothing returns nothing
 call RemoveUnit(GetTriggerUnit())
endfunction

function Trig_Starting_Func010C takes nothing returns boolean
 return(GetPlayerSlotState(Player(4))==PLAYER_SLOT_STATE_EMPTY)
endfunction

function Trig_Starting_Func011Func002002 takes nothing returns nothing
 call RemoveUnit(GetTriggerUnit())
endfunction

function Trig_Starting_Func011C takes nothing returns boolean
 return(GetPlayerSlotState(Player(5))==PLAYER_SLOT_STATE_EMPTY)
endfunction

function Trig_Starting_Actions takes nothing returns nothing
 call PauseAllUnitsBJ(true)
 call ForForce(bj_FORCE_ALL_PLAYERS,function Trig_Starting_Func003002)
 call ForForce(bj_FORCE_ALL_PLAYERS,function Trig_Starting_Func004002)
 call ForForce(bj_FORCE_ALL_PLAYERS,function Trig_Starting_Func005002)
 if(Trig_Starting_Func006C())then
  call ForGroupBJ(GetUnitsOfPlayerAll(Player(0)),function Trig_Starting_Func006Func002002)
 endif
 if(Trig_Starting_Func007C())then
  call ForGroupBJ(GetUnitsOfPlayerAll(Player(1)),function Trig_Starting_Func007Func002002)
 endif
 if(Trig_Starting_Func008C())then
  call ForGroupBJ(GetUnitsOfPlayerAll(Player(2)),function Trig_Starting_Func008Func002002)
 endif
 if(Trig_Starting_Func009C())then
  call ForGroupBJ(GetUnitsOfPlayerAll(Player(3)),function Trig_Starting_Func009Func002002)
 endif
 if(Trig_Starting_Func010C())then
  call ForGroupBJ(GetUnitsOfPlayerAll(Player(4)),function Trig_Starting_Func010Func002002)
 endif
 if(Trig_Starting_Func011C())then
  call ForGroupBJ(GetUnitsOfPlayerAll(Player(5)),function Trig_Starting_Func011Func002002)
 endif
 call TriggerSleepAction(3.)
 call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,30.,"-|cff00FF00In order to achieve Victory you need to destroy the enemy Altars.|r")
 call TriggerSleepAction(3.)
 call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,27.,"-|cff00FF00When you have lots of gold, Go to the labyrinth and search for shops. Buying items for your hero might make you very powerfull.|r")
 call TriggerSleepAction(3.)
 call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,24.,"-|cff00FF00Send your worker to search for new places to build. You can create armies behind the enemy and destroy them.|r")
 call TriggerSleepAction(4.)
 call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,"-|cff808080This map was created By...|r")
 call TriggerSleepAction(2.)
 call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,18.,"|cffFF00FF!|r|cff989800S|r|cff969600t|r|cff949400r|r|cff929200a|r|cff909000t|r|cff888800e|r|cff868600g|r|cff848400y|r|cff828200M|r|cff808000a|r|cff787800s|r|cff767600t|r|cff747400e|r|cff727200r|r|cffFF00FF!|r")
 call TriggerSleepAction(10.)
 call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff000000-|r|cffFFFF00You can Download the latest version at www.hiveworkshop.com|r")
 call TriggerSleepAction(3.)
 call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,7.,"|cff000000-|r|cffFFFF00You can also check out my other maps...|r")
 call TriggerSleepAction(6.)
 call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,1.,"|cffFF00FFPLAY!!!|r")
 call TriggerSleepAction(1.3)
 call PauseAllUnitsBJ(false)
 call TriggerSleepAction(5.)
 call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,60.,"TRIGSTR_431")
endfunction

function Trig_level_1_killed_Func002C takes nothing returns boolean
 return(GetUnitTypeId(GetDyingUnit())=='h000')or(GetUnitTypeId(GetDyingUnit())=='h003')
endfunction

function Trig_level_1_killed_Conditions takes nothing returns boolean
 return(Trig_level_1_killed_Func002C())
endfunction

function Trig_level_1_killed_Actions takes nothing returns nothing
 call AdjustPlayerStateBJ(25,GetOwningPlayer(GetKillingUnit()),PLAYER_STATE_RESOURCE_GOLD)
endfunction

function Trig_level_2_killed_Func002C takes nothing returns boolean
 return(GetUnitTypeId(GetDyingUnit())=='h001')or(GetUnitTypeId(GetDyingUnit())=='h002')
endfunction

function Trig_level_2_killed_Conditions takes nothing returns boolean
 return(Trig_level_2_killed_Func002C())
endfunction

function Trig_level_2_killed_Actions takes nothing returns nothing
 call AdjustPlayerStateBJ(50,GetOwningPlayer(GetKillingUnit()),PLAYER_STATE_RESOURCE_GOLD)
endfunction

function Trig_mortar_killed_Conditions takes nothing returns boolean
 return(GetUnitTypeId(GetDyingUnit())=='h006')
endfunction

function Trig_mortar_killed_Actions takes nothing returns nothing
 call AdjustPlayerStateBJ(75,GetOwningPlayer(GetKillingUnit()),PLAYER_STATE_RESOURCE_GOLD)
endfunction

function Trig_air_killed_Conditions takes nothing returns boolean
 return(GetUnitTypeId(GetDyingUnit())=='h004')
endfunction

function Trig_air_killed_Actions takes nothing returns nothing
 call AdjustPlayerStateBJ(10,GetOwningPlayer(GetKillingUnit()),PLAYER_STATE_RESOURCE_GOLD)
endfunction

function Trig_general_killed_Conditions takes nothing returns boolean
 return(GetUnitTypeId(GetDyingUnit())=='H005')
endfunction

function Trig_general_killed_Actions takes nothing returns nothing
 call AdjustPlayerStateBJ('}',GetOwningPlayer(GetKillingUnit()),PLAYER_STATE_RESOURCE_GOLD)
endfunction

function Trig_Building_killed_Func001C takes nothing returns boolean
 return(GetUnitTypeId(GetDyingUnit())=='h007')or(GetUnitTypeId(GetDyingUnit())=='h00C')
endfunction

function Trig_Building_killed_Conditions takes nothing returns boolean
 return(Trig_Building_killed_Func001C())
endfunction

function Trig_Building_killed_Actions takes nothing returns nothing
 call AdjustPlayerStateBJ(250,GetOwningPlayer(GetKillingUnit()),PLAYER_STATE_RESOURCE_GOLD)
endfunction

function Trig_Altar_killed_Func001C takes nothing returns boolean
 return(GetUnitTypeId(GetDyingUnit())=='h009')
endfunction

function Trig_Altar_killed_Conditions takes nothing returns boolean
 return(Trig_Altar_killed_Func001C())
endfunction

function Trig_Altar_killed_Actions takes nothing returns nothing
 call AdjustPlayerStateBJ(500,GetOwningPlayer(GetKillingUnit()),PLAYER_STATE_RESOURCE_GOLD)
endfunction

function Trig_Builders_in_Castle_1_Func003C takes nothing returns boolean
 return(GetOwningPlayer(GetTriggerUnit())==Player(3))or(GetOwningPlayer(GetTriggerUnit())==Player(4))or(GetOwningPlayer(GetTriggerUnit())==Player(5))
endfunction

function Trig_Builders_in_Castle_1_Conditions takes nothing returns boolean
 return(GetUnitTypeId(GetTriggerUnit())=='h008')and(Trig_Builders_in_Castle_1_Func003C())
endfunction

function Trig_Builders_in_Castle_1_Actions takes nothing returns nothing
 call SetUnitPositionLoc(GetTriggerUnit(),GetRectCenter(gg_rct_No_builder_in_2))
endfunction

function Trig_Builders_in_Castle3_Func003C takes nothing returns boolean
 return(GetOwningPlayer(GetTriggerUnit())==Player(3))or(GetOwningPlayer(GetTriggerUnit())==Player(4))or(GetOwningPlayer(GetTriggerUnit())==Player(5))
endfunction

function Trig_Builders_in_Castle3_Conditions takes nothing returns boolean
 return(GetUnitTypeId(GetTriggerUnit())=='h008')and(Trig_Builders_in_Castle3_Func003C())
endfunction

function Trig_Builders_in_Castle3_Actions takes nothing returns nothing
 call SetUnitPositionLoc(GetTriggerUnit(),GetRectCenter(gg_rct_No_builder_in_2))
endfunction

function Trig_Builders_in_Castle_2_Func003C takes nothing returns boolean
 return(GetOwningPlayer(GetTriggerUnit())==Player(0))or(GetOwningPlayer(GetTriggerUnit())==Player(1))or(GetOwningPlayer(GetTriggerUnit())==Player(2))
endfunction

function Trig_Builders_in_Castle_2_Conditions takes nothing returns boolean
 return(GetUnitTypeId(GetTriggerUnit())=='h008')and(Trig_Builders_in_Castle_2_Func003C())
endfunction

function Trig_Builders_in_Castle_2_Actions takes nothing returns nothing
 call SetUnitPositionLoc(GetTriggerUnit(),GetRectCenter(gg_rct_No_builder_in))
endfunction

function Trig_Builders_in_Castle4_Func003C takes nothing returns boolean
 return(GetOwningPlayer(GetTriggerUnit())==Player(0))or(GetOwningPlayer(GetTriggerUnit())==Player(1))or(GetOwningPlayer(GetTriggerUnit())==Player(2))
endfunction

function Trig_Builders_in_Castle4_Conditions takes nothing returns boolean
 return(GetUnitTypeId(GetTriggerUnit())=='h008')and(Trig_Builders_in_Castle4_Func003C())
endfunction

function Trig_Builders_in_Castle4_Actions takes nothing returns nothing
 call SetUnitPositionLoc(GetTriggerUnit(),GetRectCenter(gg_rct_No_builder_in))
endfunction

function Trig_Food_Conditions takes nothing returns boolean
 return(GetResearched()=='R009')
endfunction

function Trig_Food_Actions takes nothing returns nothing
 call SetPlayerStateBJ(GetOwningPlayer(GetTriggerUnit()),PLAYER_STATE_RESOURCE_FOOD_CAP,45)
endfunction

function Trig_Food_2_Conditions takes nothing returns boolean
 return(GetResearched()=='R00A')
endfunction

function Trig_Food_2_Actions takes nothing returns nothing
 call SetPlayerStateBJ(GetOwningPlayer(GetTriggerUnit()),PLAYER_STATE_RESOURCE_FOOD_CAP,60)
endfunction

function Trig_Regrow_Trees_Func001002 takes nothing returns nothing
 call DestructableRestoreLife(GetEnumDestructable(),GetDestructableMaxLife(GetEnumDestructable()),true)
endfunction

function Trig_Regrow_Trees_Actions takes nothing returns nothing
 call EnumDestructablesInRectAll(bj_mapInitialPlayableArea,function Trig_Regrow_Trees_Func001002)
endfunction

function Trig_red_leaves_Actions takes nothing returns nothing
 call SetPlayerAllianceStateBJ(Player(0),Player(1),5)
 call SetPlayerAllianceStateBJ(Player(0),Player(2),5)
 call AdjustPlayerStateBJ(500,Player(1),PLAYER_STATE_RESOURCE_GOLD)
 call AdjustPlayerStateBJ(500,Player(2),PLAYER_STATE_RESOURCE_GOLD)
endfunction

function Trig_blue_leaves_Actions takes nothing returns nothing
 call SetPlayerAllianceStateBJ(Player(1),Player(0),5)
 call SetPlayerAllianceStateBJ(Player(1),Player(2),5)
 call AdjustPlayerStateBJ(500,Player(0),PLAYER_STATE_RESOURCE_GOLD)
 call AdjustPlayerStateBJ(500,Player(2),PLAYER_STATE_RESOURCE_GOLD)
endfunction

function Trig_teal_leaves_Actions takes nothing returns nothing
 call SetPlayerAllianceStateBJ(Player(2),Player(0),5)
 call SetPlayerAllianceStateBJ(Player(2),Player(1),5)
 call AdjustPlayerStateBJ(500,Player(0),PLAYER_STATE_RESOURCE_GOLD)
 call AdjustPlayerStateBJ(500,Player(1),PLAYER_STATE_RESOURCE_GOLD)
endfunction

function Trig_purple_leaves_Actions takes nothing returns nothing
 call SetPlayerAllianceStateBJ(Player(3),Player(4),5)
 call SetPlayerAllianceStateBJ(Player(3),Player(5),5)
 call AdjustPlayerStateBJ(500,Player(4),PLAYER_STATE_RESOURCE_GOLD)
 call AdjustPlayerStateBJ(500,Player(5),PLAYER_STATE_RESOURCE_GOLD)
endfunction

function Trig_yellow_leaves_Actions takes nothing returns nothing
 call SetPlayerAllianceStateBJ(Player(4),Player(3),5)
 call SetPlayerAllianceStateBJ(Player(4),Player(5),5)
 call AdjustPlayerStateBJ(500,Player(3),PLAYER_STATE_RESOURCE_GOLD)
 call AdjustPlayerStateBJ(500,Player(5),PLAYER_STATE_RESOURCE_GOLD)
endfunction

function Trig_orange_leaves_Actions takes nothing returns nothing
 call SetPlayerAllianceStateBJ(Player(5),Player(3),5)
 call SetPlayerAllianceStateBJ(Player(5),Player(4),5)
 call AdjustPlayerStateBJ(500,Player(3),PLAYER_STATE_RESOURCE_GOLD)
 call AdjustPlayerStateBJ(500,Player(4),PLAYER_STATE_RESOURCE_GOLD)
endfunction

function Trig_Red_Actions takes nothing returns nothing
 call CustomDefeatBJ(Player(0),"|cffFF0000Defeat!|r")
endfunction

function Trig_Blue_Actions takes nothing returns nothing
 call CustomDefeatBJ(Player(1),"|cffFF0000Defeat!|r")
endfunction

function Trig_Teal_Actions takes nothing returns nothing
 call CustomDefeatBJ(Player(2),"|cffFF0000Defeat!|r")
endfunction

function Trig_Purple_Actions takes nothing returns nothing
 call CustomDefeatBJ(Player(3),"|cffFF0000Defeat!|r")
endfunction

function Trig_Yellow_Actions takes nothing returns nothing
 call CustomDefeatBJ(Player(4),"|cffFF0000Defeat!|r")
endfunction

function Trig_Orange_Actions takes nothing returns nothing
 call CustomDefeatBJ(Player(5),"|cffFF0000Defeat!|r")
endfunction

function Trig_shops_only_general_Conditions takes nothing returns boolean
 return(GetUnitTypeId(GetTriggerUnit())!='H005')
endfunction

function Trig_shops_only_general_Actions takes nothing returns nothing
 call SetUnitPositionLoc(GetTriggerUnit(),GetRectCenter(gg_rct_Shops_no_air_kick))
endfunction

function Trig_shops_only_general2_Conditions takes nothing returns boolean
 return(GetUnitTypeId(GetTriggerUnit())!='H005')
endfunction

function Trig_shops_only_general2_Actions takes nothing returns nothing
 call SetUnitPositionLoc(GetTriggerUnit(),GetRectCenter(gg_rct_Shops_no_air_kick))
endfunction

function Trig_shops_only_general3_Conditions takes nothing returns boolean
 return(GetUnitTypeId(GetTriggerUnit())!='H005')
endfunction

function Trig_shops_only_general3_Actions takes nothing returns nothing
 call SetUnitPositionLoc(GetTriggerUnit(),GetRectCenter(gg_rct_Shops_no_air_kick))
endfunction

function Trig_shops_only_general4_Conditions takes nothing returns boolean
 return(GetUnitTypeId(GetTriggerUnit())!='H005')
endfunction

function Trig_shops_only_general4_Actions takes nothing returns nothing
 call SetUnitPositionLoc(GetTriggerUnit(),GetRectCenter(gg_rct_Shops_no_air_kick))
endfunction

function Trig_Teleport_Actions takes nothing returns nothing
 call SetUnitPositionLoc(GetTriggerUnit(),GetRectCenter(gg_rct_Shop_Labyrinth_Teleport_to))
endfunction

function Trig_Teleport_2_Actions takes nothing returns nothing
 call SetUnitPositionLoc(GetTriggerUnit(),GetRectCenter(gg_rct_Shop_Labyrinth_Teleport_2_to))
endfunction

function Trig_kick_blue_Actions takes nothing returns nothing
 call CustomDefeatBJ(Player(1),"You have been kicked!!!")
 call AdjustPlayerStateBJ(1000,Player(0),PLAYER_STATE_RESOURCE_GOLD)
 call AdjustPlayerStateBJ(1000,Player(2),PLAYER_STATE_RESOURCE_GOLD)
endfunction

function Trig_kick_teal_Actions takes nothing returns nothing
 call CustomDefeatBJ(Player(2),"You have been kicked!!!")
 call AdjustPlayerStateBJ(1000,Player(0),PLAYER_STATE_RESOURCE_GOLD)
 call AdjustPlayerStateBJ(1000,Player(1),PLAYER_STATE_RESOURCE_GOLD)
endfunction

function Trig_kick_purple_Actions takes nothing returns nothing
 call CustomDefeatBJ(Player(3),"You have been kicked!!!")
 call AdjustPlayerStateBJ(1000,Player(4),PLAYER_STATE_RESOURCE_GOLD)
 call AdjustPlayerStateBJ(1000,Player(5),PLAYER_STATE_RESOURCE_GOLD)
endfunction

function Trig_kick_yellow_Actions takes nothing returns nothing
 call CustomDefeatBJ(Player(4),"You have been kicked!!!")
 call AdjustPlayerStateBJ(1000,Player(3),PLAYER_STATE_RESOURCE_GOLD)
 call AdjustPlayerStateBJ(1000,Player(5),PLAYER_STATE_RESOURCE_GOLD)
endfunction

function Trig_kick_orange_Actions takes nothing returns nothing
 call CustomDefeatBJ(Player(5),"You have been kicked!!!")
 call AdjustPlayerStateBJ(1000,Player(3),PLAYER_STATE_RESOURCE_GOLD)
 call AdjustPlayerStateBJ(1000,Player(4),PLAYER_STATE_RESOURCE_GOLD)
endfunction

function Trig_StrategyMaster_Actions takes nothing returns nothing
 call DisplayTimedTextToForce(bj_FORCE_PLAYER[0],30,"TRIGSTR_444")
endfunction

function Trig_Normal_Mode_Actions takes nothing returns nothing
 call EnableTrigger(gg_trg_Thunder_Sword)
 call DisableTrigger(gg_trg_Extreme_Thunder_Sword)
 call EnableTrigger(gg_trg_Black_Magic)
 call DisableTrigger(gg_trg_Extreme_Black_Magic)
 call DisableTrigger(gg_trg_Super_Units)
 call DisableTrigger(gg_trg_Super_Units_Removal)
 call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cffFF0000Player 1 (Red)|r |cff000000Has reseted the mode|r")
endfunction 

function Trig_Extreme_Mode_Actions takes nothing returns nothing
 call DisableTrigger(gg_trg_Thunder_Sword)
 call EnableTrigger(gg_trg_Extreme_Thunder_Sword)
 call DisableTrigger(gg_trg_Black_Magic)
 call EnableTrigger(gg_trg_Extreme_Black_Magic)
 call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cffFF0000Player 1 (Red)|r |cff000000Has activated a new mode!|r")
endfunction

function Trig_Super_Units_Mode_Actions takes nothing returns nothing
 call EnableTrigger(gg_trg_Super_Units)
 call EnableTrigger(gg_trg_Super_Units_Removal)
 call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cffFF0000Player 1 (Red)|r |cff000000Has activated a new mode!|r")
endfunction

function Trig_Thunder_Sword_Conditions takes nothing returns boolean
 return(GetUnitTypeId(GetAttacker())=='H005')
endfunction

function Trig_Thunder_Sword_Func001C takes nothing returns boolean
 return(GetRandomInt(1,1000)==1)
endfunction

function Trig_Thunder_Sword_Actions takes nothing returns nothing
 if(Trig_Thunder_Sword_Func001C())then
  call CreateNUnitsAtLocFacingLocBJ(1,'u000',GetOwningPlayer(GetAttacker()),GetUnitLoc(GetAttacker()),GetUnitLoc(GetTriggerUnit()))
  call UnitAddAbility(bj_lastCreatedUnit,'A00E')
  call IssueTargetOrderById(bj_lastCreatedUnit,852119,GetTriggerUnit())
  call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,5.,"|cff0000FF---|r |cff3030FF!Chain Lightning!|r |cff0000FF---|r")
  call TriggerSleepAction(3.)
  call RemoveUnit(bj_lastCreatedUnit)
 endif
endfunction

function Trig_Extreme_Thunder_Sword_Conditions takes nothing returns boolean
 return(GetUnitTypeId(GetAttacker())=='H005')
endfunction

function Trig_Extreme_Thunder_Sword_Func001C takes nothing returns boolean
 return(GetRandomInt(1,10)==1)
endfunction

function Trig_Extreme_Thunder_Sword_Actions takes nothing returns nothing
 if(Trig_Extreme_Thunder_Sword_Func001C())then
  call CreateNUnitsAtLocFacingLocBJ(1,'u000',GetOwningPlayer(GetAttacker()),GetUnitLoc(GetAttacker()),GetUnitLoc(GetTriggerUnit()))
  call UnitAddAbility(bj_lastCreatedUnit,'A00E')
  call IssueTargetOrderById(bj_lastCreatedUnit,852119,GetTriggerUnit())
  call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,1.,"|cff0000FF---|r |cff3030FF!Chain Lightning!|r |cff0000FF---|r")
  call TriggerSleepAction(1.3)
  call RemoveUnit(bj_lastCreatedUnit)
 endif
endfunction

function Trig_Black_Magic_Conditions takes nothing returns boolean
 return(GetUnitTypeId(GetAttacker())=='H005')
endfunction

function Trig_Black_Magic_Func001C takes nothing returns boolean
 return(GetRandomInt(1,10000)==1)
endfunction

function Trig_Black_Magic_Actions takes nothing returns nothing
 if(Trig_Black_Magic_Func001C())then
  call CreateNUnitsAtLocFacingLocBJ(1,'u000',GetOwningPlayer(GetAttacker()),GetUnitLoc(GetAttacker()),GetUnitLoc(GetTriggerUnit()))
  call UnitAddAbility(bj_lastCreatedUnit,'A00C')
  call IssuePointOrderByIdLoc(bj_lastCreatedUnit,852218,GetUnitLoc(GetTriggerUnit()))
  call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,7.,"|cff000000---|r |cff606060!BLACK MAGIC!|r |cff000000---|r")
  call TriggerSleepAction(3.)
  call RemoveUnit(bj_lastCreatedUnit)
 endif
endfunction

function Trig_Extreme_Black_Magic_Conditions takes nothing returns boolean
 return(GetUnitTypeId(GetAttacker())=='H005')
endfunction

function Trig_Extreme_Black_Magic_Func001C takes nothing returns boolean
 return(GetRandomInt(1,20)==1)
endfunction

function Trig_Extreme_Black_Magic_Actions takes nothing returns nothing
 if(Trig_Extreme_Black_Magic_Func001C())then
  call CreateNUnitsAtLocFacingLocBJ(1,'u000',GetOwningPlayer(GetAttacker()),GetUnitLoc(GetAttacker()),GetUnitLoc(GetTriggerUnit()))
  call UnitAddAbility(bj_lastCreatedUnit,'A00C')
  call IssuePointOrderByIdLoc(bj_lastCreatedUnit,852218,GetUnitLoc(GetTriggerUnit()))
  call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,2.,"|cff000000---|r |cff606060!BLACK MAGIC!|r |cff000000---|r")
  call TriggerSleepAction(2.)
  call RemoveUnit(bj_lastCreatedUnit)
 endif
endfunction

function Trig_Super_Units_Conditions takes nothing returns boolean
 return(IsUnitIdType(GetUnitTypeId(GetAttacker()),UNIT_TYPE_HERO)==false)
endfunction

function Trig_Super_Units_Func001C takes nothing returns boolean
 return(GetRandomInt(1,50)==1)
endfunction

function Trig_Super_Units_Actions takes nothing returns nothing
 if(Trig_Super_Units_Func001C())then
  call CreateNUnitsAtLocFacingLocBJ(1,'u000',GetOwningPlayer(GetAttacker()),GetUnitLoc(GetAttacker()),GetUnitLoc(GetTriggerUnit()))
  call UnitAddAbility(bj_lastCreatedUnit,'A00E')
  call IssueTargetOrderById(bj_lastCreatedUnit,852119,GetTriggerUnit())
  call TriggerSleepAction(1.)
  call RemoveUnit(bj_lastCreatedUnit)
 endif
endfunction

function Trig_Super_Units_Removal_Func001002 takes nothing returns nothing
 call RemoveUnit(GetEnumUnit())
endfunction

function Trig_Super_Units_Removal_Actions takes nothing returns nothing
 call ForGroupBJ(GetUnitsOfTypeIdAll('u000'),function Trig_Super_Units_Removal_Func001002)
endfunction

function Trig_Labyrinth_reminder_Actions takes nothing returns nothing
 call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,GetRectCenter(gg_rct_Shops_no_air),30.,1,.0,80.,.0)
 call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,30,"Visit the labyrinth shown in the minimap to greatly increase your heroes strength.")
endfunction

function Trig_Gold_Reminder_Actions takes nothing returns nothing
 call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,60.,"TRIGSTR_447")
endfunction

function Trig_Dark_Magic_Tower_Conditions takes nothing returns boolean
 return(GetUnitTypeId(GetAttacker())=='h00D')
endfunction

function Trig_Dark_Magic_Tower_Func001C takes nothing returns boolean
 return(GetRandomInt(1,10000)==1)
endfunction

function Trig_Dark_Magic_Tower_Actions takes nothing returns nothing
 if(Trig_Dark_Magic_Tower_Func001C())then
  call CreateNUnitsAtLocFacingLocBJ(1,'u000',GetOwningPlayer(GetAttacker()),GetUnitLoc(GetAttacker()),GetUnitLoc(GetTriggerUnit()))
  call UnitAddAbility(bj_lastCreatedUnit,'Apos')
  call IssueTargetOrderById(bj_lastCreatedUnit,852196,GetTriggerUnit())
  call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,2.,"|cff000000---|r |cff707070!Dark Magic!|r |cff000000---|r")
 endif
endfunction

function InitCustomTeams takes nothing returns nothing
 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 SetPlayerAllianceStateAllyBJ(Player(0),Player(1),true)
 call SetPlayerAllianceStateAllyBJ(Player(0),Player(2),true)
 call SetPlayerAllianceStateAllyBJ(Player(1),Player(0),true)
 call SetPlayerAllianceStateAllyBJ(Player(1),Player(2),true)
 call SetPlayerAllianceStateAllyBJ(Player(2),Player(0),true)
 call SetPlayerAllianceStateAllyBJ(Player(2),Player(1),true)
 call SetPlayerAllianceStateVisionBJ(Player(0),Player(1),true)
 call SetPlayerAllianceStateVisionBJ(Player(0),Player(2),true)
 call SetPlayerAllianceStateVisionBJ(Player(1),Player(0),true)
 call SetPlayerAllianceStateVisionBJ(Player(1),Player(2),true)
 call SetPlayerAllianceStateVisionBJ(Player(2),Player(0),true)
 call SetPlayerAllianceStateVisionBJ(Player(2),Player(1),true)
 call SetPlayerTeam(Player(3),1)
 call SetPlayerState(Player(3),PLAYER_STATE_ALLIED_VICTORY,1)
 call SetPlayerTeam(Player(4),1)
 call SetPlayerState(Player(4),PLAYER_STATE_ALLIED_VICTORY,1)
 call SetPlayerTeam(Player(5),1)
 call SetPlayerState(Player(5),PLAYER_STATE_ALLIED_VICTORY,1)
 call SetPlayerAllianceStateAllyBJ(Player(3),Player(4),true)
 call SetPlayerAllianceStateAllyBJ(Player(3),Player(5),true)
 call SetPlayerAllianceStateAllyBJ(Player(4),Player(3),true)
 call SetPlayerAllianceStateAllyBJ(Player(4),Player(5),true)
 call SetPlayerAllianceStateAllyBJ(Player(5),Player(3),true)
 call SetPlayerAllianceStateAllyBJ(Player(5),Player(4),true)
 call SetPlayerAllianceStateVisionBJ(Player(3),Player(4),true)
 call SetPlayerAllianceStateVisionBJ(Player(3),Player(5),true)
 call SetPlayerAllianceStateVisionBJ(Player(4),Player(3),true)
 call SetPlayerAllianceStateVisionBJ(Player(4),Player(5),true)
 call SetPlayerAllianceStateVisionBJ(Player(5),Player(3),true)
 call SetPlayerAllianceStateVisionBJ(Player(5),Player(4),true)
endfunction

function main takes nothing returns nothing
 local weathereffect we
 local player p
 local unit u
 local integer unitID
 local trigger t
 local real life
 call SetCameraBounds(-7424.+GetCameraMargin(CAMERA_MARGIN_LEFT),-9728.+GetCameraMargin(CAMERA_MARGIN_BOTTOM),5504.-GetCameraMargin (CAMERA_MARGIN_RIGHT),9216.-GetCameraMargin(CAMERA_MARGIN_TOP),-7424.+GetCameraMargin(CAMERA_MARGIN_LEFT),9216.-GetCameraMargi n(CAMERA_MARGIN_TOP),5504.-GetCameraMargin(CAMERA_MARGIN_RIGHT),-9728.+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)
 set gg_rct_Castle_1=Rect(-6752.,5920.,2240.,9184.)
 set gg_rct_Castle_2=Rect(-6752.,-9696.,2240.,-6464.)
 set gg_rct_Shops_no_air=Rect(-4736.,-576.,-3840.,224.)
 set gg_rct_Shops_no_air_kick=Rect(-3680.,-288.,-3392.,.0)
 set gg_rct_Shop_Labyrinth_Teleport=Rect(-2816.,-5056.,-2624.,-4864.)
 set gg_rct_Shop_Labyrinth_Teleport_2=Rect(-6272.,-5248.,-6016.,-4992.)
 set gg_rct_Shop_Labyrinth_Teleport_to=Rect(-6400.,-5248.,-6304.,-4992.)
 set gg_rct_Shop_Labyrinth_Teleport_2_to=Rect(-2816.,-4832.,-2624.,-4736.)
 set gg_rct_No_builder_in=Rect(-2144.,5184.,-1184.,5888.)
 set we=AddWeatherEffect(gg_rct_No_builder_in,'FDwh')
 call EnableWeatherEffect(we,true)
 set gg_rct_No_builder_in_2=Rect(-2144.,-6432.,-1152.,-5760.)
 set we=AddWeatherEffect(gg_rct_No_builder_in_2,'FDwh')
 call EnableWeatherEffect(we,true)
 set gg_rct_No_Units_Labyrinth=Rect(-7360.,-6176.,-4000.,5824.)
 set we=AddWeatherEffect(gg_rct_No_Units_Labyrinth,'RAlr')
 call EnableWeatherEffect(we,true)
 set gg_rct_No_Units_Labyrinth_2=Rect(-4032.,-6240.,-2400.,-4128.)
 set we=AddWeatherEffect(gg_rct_No_Units_Labyrinth_2,'RAlr')
 call EnableWeatherEffect(we,true)
 set gg_rct_No_Units_Labyrinth_3=Rect(-4032.,3520.,-2336.,5792.)
 set we=AddWeatherEffect(gg_rct_No_Units_Labyrinth_3,'RAlr')
 call EnableWeatherEffect(we,true)
 set p=Player(15)
 set u=CreateUnit(p,'ncp2',-2720.,-4960.,270.)
 set u=CreateUnit(p,'ncp3',-6144.,-5120.,270.)
 set u=CreateUnit(p,'n001',-7040.,3008.,270.)
 set u=CreateUnit(p,'n000',-7104.,-2048.,270.)
 set p=Player(0)
 set u=CreateUnit(p,'h00A',-2112.,6016.,270.)
 set u=CreateUnit(p,'h00A',-1216.,6016.,270.)
 set u=CreateUnit(p,'h007',1344.,8960.,270.)
 set u=CreateUnit(p,'h007',1856.,8704.,270.)
 set gg_unit_h009_0024=CreateUnit(p,'h009',1696.,7456.,270.)
 set u=CreateUnit(p,'h00C',-6528.,8960.,270.)
 set p=Player(1)
 set u=CreateUnit(p,'h00A',-2112.,6272.,270.)
 set u=CreateUnit(p,'h00A',-1216.,6272.,270.)
 set u=CreateUnit(p,'h007',-768.,8896.,270.)
 set u=CreateUnit(p,'h007',-256.,8640.,270.)
 set gg_unit_h009_0025=CreateUnit(p,'h009',-416.,7456.,270.)
 set u=CreateUnit(p,'h00C',-6528.,7936.,270.)
 set p=Player(2)
 set u=CreateUnit(p,'h00A',-960.,6016.,270.)
 set u=CreateUnit(p,'h00A',-2368.,6016.,270.)
 set u=CreateUnit(p,'h007',-2752.,8832.,270.)
 set u=CreateUnit(p,'h007',-2240.,8576.,270.)
 set gg_unit_h009_0026=CreateUnit(p,'h009',-2400.,7456.,270.)
 set u=CreateUnit(p,'h00C',-6528.,6912.,270.)
 set p=Player(3)
 set u=CreateUnit(p,'h00A',-1216.,-6528.,270.)
 set u=CreateUnit(p,'h00A',-2112.,-6528.,270.)
 set u=CreateUnit(p,'h007',1984.,-9280.,270.)
 set u=CreateUnit(p,'h007',1472.,-9024.,270.)
 set gg_unit_h009_0027=CreateUnit(p,'h009',2080.,-7968.,270.)
 set u=CreateUnit(p,'h00C',-6528.,-9472.,270.)
 set p=Player(4)
 set u=CreateUnit(p,'h00A',-1216.,-6784.,270.)
 set u=CreateUnit(p,'h00A',-2112.,-6784.,270.)
 set u=CreateUnit(p,'h007',-192.,-9216.,270.)
 set u=CreateUnit(p,'h007',-704.,-8960.,270.)
 set gg_unit_h009_0028=CreateUnit(p,'h009',-96.,-7968.,270.)
 set u=CreateUnit(p,'h00C',-6528.,-8384.,270.)
 set p=Player(5)
 set u=CreateUnit(p,'h00A',-2368.,-6528.,270.)
 set u=CreateUnit(p,'h00A',-960.,-6528.,270.)
 set u=CreateUnit(p,'h007',-2048.,-9216.,270.)
 set u=CreateUnit(p,'h007',-2560.,-8960.,270.)
 set gg_unit_h009_0029=CreateUnit(p,'h009',-1952.,-7968.,270.)
 set u=CreateUnit(p,'h00C',-6528.,-7424.,270.)
 set p=Player(0)
 set u=CreateUnit(p,'h008',1344.9,8308.8,235.664)
 set u=CreateUnit(p,'H005',1545.5,7284.7,177.149)
 set p=Player(1)
 set u=CreateUnit(p,'h008',-729.3,8253.4,54.417)
 set u=CreateUnit(p,'H005',-542.4,7321.1,302.287)
 set p=Player(2)
 set u=CreateUnit(p,'h008',-2679.4,8251.4,186.993)
 set u=CreateUnit(p,'H005',-2595.4,7311.4,84.059)
 set p=Player(3)
 set u=CreateUnit(p,'h008',1200.6,-9557.6,329.929)
 set u=CreateUnit(p,'H005',1953.7,-8108.7,82.817)
 set p=Player(4)
 set u=CreateUnit(p,'h008',-960.5,-9528.1,188.509)
 set u=CreateUnit(p,'H005',-224.,-8103.7,71.358)
 set p=Player(5)
 set u=CreateUnit(p,'h008',-2802.3,-9547.1,140.377)
 set u=CreateUnit(p,'H005',-2073.9,-8118.6,108.372)
 call InitBlizzard()
 call TriggerRegisterTimerEventSingle(gg_trg_Starting,.3)
 call TriggerAddAction(gg_trg_Starting,function Trig_Starting_Actions)
 call TriggerRegisterAnyUnitEventBJ(gg_trg_level_1_killed,EVENT_PLAYER_UNIT_DEATH)
 call TriggerAddCondition(gg_trg_level_1_killed,Condition(function Trig_level_1_killed_Conditions))
 call TriggerAddAction(gg_trg_level_1_killed,function Trig_level_1_killed_Actions)
 call TriggerRegisterAnyUnitEventBJ(gg_trg_level_2_killed,EVENT_PLAYER_UNIT_DEATH)
 call TriggerAddCondition(gg_trg_level_2_killed,Condition(function Trig_level_2_killed_Conditions))
 call TriggerAddAction(gg_trg_level_2_killed,function Trig_level_2_killed_Actions)
 call TriggerRegisterAnyUnitEventBJ(gg_trg_mortar_killed,EVENT_PLAYER_UNIT_DEATH)
 call TriggerAddCondition(gg_trg_mortar_killed,Condition(function Trig_mortar_killed_Conditions))
 call TriggerAddAction(gg_trg_mortar_killed,function Trig_mortar_killed_Actions)
 call TriggerRegisterAnyUnitEventBJ(gg_trg_air_killed,EVENT_PLAYER_UNIT_DEATH)
 call TriggerAddCondition(gg_trg_air_killed,Condition(function Trig_air_killed_Conditions))
 call TriggerAddAction(gg_trg_air_killed,function Trig_air_killed_Actions)
 call TriggerRegisterAnyUnitEventBJ(gg_trg_general_killed,EVENT_PLAYER_UNIT_DEATH)
 call TriggerAddCondition(gg_trg_general_killed,Condition(function Trig_general_killed_Conditions))
 call TriggerAddAction(gg_trg_general_killed,function Trig_general_killed_Actions)
 call TriggerRegisterAnyUnitEventBJ(gg_trg_Building_killed,EVENT_PLAYER_UNIT_DEATH)
 call TriggerAddCondition(gg_trg_Building_killed,Condition(function Trig_Building_killed_Conditions))
 call TriggerAddAction(gg_trg_Building_killed,function Trig_Building_killed_Actions)
 call TriggerRegisterAnyUnitEventBJ(gg_trg_Altar_killed,EVENT_PLAYER_UNIT_DEATH) 
 call TriggerAddCondition(gg_trg_Altar_killed,Condition(function Trig_Altar_killed_Conditions))
 call TriggerAddAction(gg_trg_Altar_killed,function Trig_Altar_killed_Actions)
 call TriggerRegisterEnterRectSimple(gg_trg_Builders_in_Castle_1,gg_rct_No_builder_in)
 call TriggerAddCondition(gg_trg_Builders_in_Castle_1,Condition(function Trig_Builders_in_Castle_1_Conditions))
 call TriggerAddAction(gg_trg_Builders_in_Castle_1,function Trig_Builders_in_Castle_1_Actions)
 call TriggerRegisterEnterRectSimple(gg_trg_Builders_in_Castle3,gg_rct_Castle_1)
 call TriggerAddCondition(gg_trg_Builders_in_Castle3,Condition(function Trig_Builders_in_Castle3_Conditions))
 call TriggerAddAction(gg_trg_Builders_in_Castle3,function Trig_Builders_in_Castle3_Actions)
 call TriggerRegisterEnterRectSimple(gg_trg_Builders_in_Castle_2,gg_rct_No_builder_in_2)
 call TriggerAddCondition(gg_trg_Builders_in_Castle_2,Condition(function Trig_Builders_in_Castle_2_Conditions))
 call TriggerAddAction(gg_trg_Builders_in_Castle_2,function Trig_Builders_in_Castle_2_Actions)
 call TriggerRegisterEnterRectSimple(gg_trg_Builders_in_Castle4,gg_rct_Castle_2)
 call TriggerAddCondition(gg_trg_Builders_in_Castle4,Condition(function Trig_Builders_in_Castle4_Conditions))
 call TriggerAddAction(gg_trg_Builders_in_Castle4,function Trig_Builders_in_Castle4_Actions)
 call TriggerRegisterAnyUnitEventBJ(gg_trg_Food,EVENT_PLAYER_UNIT_RESEARCH_FINISH)
 call TriggerAddCondition(gg_trg_Food,Condition(function Trig_Food_Conditions))
 call TriggerAddAction(gg_trg_Food,function Trig_Food_Actions)
 call TriggerRegisterAnyUnitEventBJ(gg_trg_Food_2,EVENT_PLAYER_UNIT_RESEARCH_FINISH)
 call TriggerAddCondition(gg_trg_Food_2,Condition(function Trig_Food_2_Conditions))
 call TriggerAddAction(gg_trg_Food_2,function Trig_Food_2_Actions)
 call TriggerRegisterTimerEventPeriodic(gg_trg_Regrow_Trees,480.)
 call TriggerAddAction(gg_trg_Regrow_Trees,function Trig_Regrow_Trees_Actions)
 call TriggerRegisterPlayerEventLeave(gg_trg_red_leaves,Player(0))
 call TriggerAddAction(gg_trg_red_leaves,function Trig_red_leaves_Actions)
 call TriggerRegisterPlayerEventLeave(gg_trg_blue_leaves,Player(1)) 
 call TriggerAddAction(gg_trg_blue_leaves,function Trig_blue_leaves_Actions)
 call TriggerRegisterPlayerEventLeave(gg_trg_teal_leaves,Player(2))
 call TriggerAddAction(gg_trg_teal_leaves,function Trig_teal_leaves_Actions)
 call TriggerRegisterPlayerEventLeave(gg_trg_purple_leaves,Player(3))
 call TriggerAddAction(gg_trg_purple_leaves,function Trig_purple_leaves_Actions)
 call TriggerRegisterPlayerEventLeave(gg_trg_yellow_leaves,Player(4))
 call TriggerAddAction(gg_trg_yellow_leaves,function Trig_yellow_leaves_Actions)
 call TriggerRegisterPlayerEventLeave(gg_trg_orange_leaves,Player(5))
 call TriggerAddAction(gg_trg_orange_leaves,function Trig_orange_leaves_Actions)
 call TriggerRegisterUnitEvent(gg_trg_Red,gg_unit_h009_0024,EVENT_UNIT_DEATH)
 call TriggerAddAction(gg_trg_Red,function Trig_Red_Actions)
 call TriggerRegisterUnitEvent(gg_trg_Blue,gg_unit_h009_0025,EVENT_UNIT_DEATH)
 call TriggerAddAction(gg_trg_Blue,function Trig_Blue_Actions)
 call TriggerRegisterUnitEvent(gg_trg_Teal,gg_unit_h009_0026,EVENT_UNIT_DEATH)
 call TriggerAddAction(gg_trg_Teal,function Trig_Teal_Actions)
 call TriggerRegisterUnitEvent(gg_trg_Purple,gg_unit_h009_0027,EVENT_UNIT_DEATH)
 call TriggerAddAction(gg_trg_Purple,function Trig_Purple_Actions)
 call TriggerRegisterUnitEvent(gg_trg_Yellow,gg_unit_h009_0028,EVENT_UNIT_DEATH)
 call TriggerAddAction(gg_trg_Yellow,function Trig_Yellow_Actions)
 call TriggerRegisterUnitEvent(gg_trg_Orange,gg_unit_h009_0029,EVENT_UNIT_DEATH)
 call TriggerAddAction(gg_trg_Orange,function Trig_Orange_Actions)
 call TriggerRegisterEnterRectSimple(gg_trg_shops_only_general,gg_rct_Shops_no_air)
 call TriggerAddCondition(gg_trg_shops_only_general,Condition(function Trig_shops_only_general_Conditions))
 call TriggerAddAction(gg_trg_shops_only_general,function Trig_shops_only_general_Actions)
 call TriggerRegisterEnterRectSimple(gg_trg_shops_only_general2,gg_rct_No_Units_Labyrinth)
 call TriggerAddCondition(gg_trg_shops_only_general2,Condition(function Trig_shops_only_general2_Conditions))
 call TriggerAddAction(gg_trg_shops_only_general2,function Trig_shops_only_general2_Actions)
 call TriggerRegisterEnterRectSimple(gg_trg_shops_only_general3,gg_rct_No_Units_Labyrinth_2)
 call TriggerAddCondition(gg_trg_shops_only_general3,Condition(function Trig_shops_only_general3_Conditions))
 call TriggerAddAction(gg_trg_shops_only_general3,function Trig_shops_only_general3_Actions)
 call TriggerRegisterEnterRectSimple(gg_trg_shops_only_general4,gg_rct_No_Units_Labyrinth_3)
 call TriggerAddCondition(gg_trg_shops_only_general4,Condition(function Trig_shops_only_general4_Conditions))
 call TriggerAddAction(gg_trg_shops_only_general4,function Trig_shops_only_general4_Actions)
 call TriggerRegisterEnterRectSimple(gg_trg_Teleport,gg_rct_Shop_Labyrinth_Teleport)
 call TriggerAddAction(gg_trg_Teleport,function Trig_Teleport_Actions)
 call TriggerRegisterEnterRectSimple(gg_trg_Teleport_2,gg_rct_Shop_Labyrinth_Teleport_2)
 call TriggerAddAction(gg_trg_Teleport_2,function Trig_Teleport_2_Actions)
 call TriggerRegisterPlayerChatEvent(gg_trg_kick_blue,Player(0),"-kick blue",true)
 call TriggerAddAction(gg_trg_kick_blue,function Trig_kick_blue_Actions)
 call TriggerRegisterPlayerChatEvent(gg_trg_kick_teal,Player(0),"-kick teal",true)
 call TriggerAddAction(gg_trg_kick_teal,function Trig_kick_teal_Actions)
 call TriggerRegisterPlayerChatEvent(gg_trg_kick_purple,Player(0),"-kick purple",true)
 call TriggerAddAction(gg_trg_kick_purple,function Trig_kick_purple_Actions)
 call TriggerRegisterPlayerChatEvent(gg_trg_kick_yellow,Player(0),"-kick yellow",true)
 call TriggerAddAction(gg_trg_kick_yellow,function Trig_kick_yellow_Actions)
 call TriggerRegisterPlayerChatEvent(gg_trg_kick_orange,Player(0),"-kick orange",true)
 call TriggerAddAction(gg_trg_kick_orange,function Trig_kick_orange_Actions)
 call TriggerRegisterPlayerChatEvent(gg_trg_StrategyMaster,Player(0),"I am StrategyMaster",true)
 call TriggerAddAction(gg_trg_StrategyMaster,function Trig_StrategyMaster_Actions)
 call TriggerRegisterPlayerChatEvent(gg_trg_Normal_Mode,Player(0),"-normal mode",true)
 call TriggerAddAction(gg_trg_Normal_Mode,function Trig_Normal_Mode_Actions)
 call TriggerRegisterPlayerChatEvent(gg_trg_Extreme_Mode,Player(0),"-extreme mode on",true)
 call TriggerAddAction(gg_trg_Extreme_Mode,function Trig_Extreme_Mode_Actions)
 call TriggerRegisterPlayerChatEvent(gg_trg_Super_Units_Mode,Player(0),"-super units mode on",true)
 call TriggerAddAction(gg_trg_Super_Units_Mode,function Trig_Super_Units_Mode_Actions)
 call TriggerRegisterAnyUnitEventBJ(gg_trg_Thunder_Sword,EVENT_PLAYER_UNIT_ATTACKED)
 call TriggerAddCondition(gg_trg_Thunder_Sword,Condition(function Trig_Thunder_Sword_Conditions))
 call TriggerAddAction(gg_trg_Thunder_Sword,function Trig_Thunder_Sword_Actions)
 call DisableTrigger(gg_trg_Extreme_Thunder_Sword)
 call TriggerRegisterAnyUnitEventBJ(gg_trg_Extreme_Thunder_Sword,EVENT_PLAYER_UNIT_ATTACKED)
 call TriggerAddCondition(gg_trg_Extreme_Thunder_Sword,Condition(function Trig_Extreme_Thunder_Sword_Conditions))
 call TriggerAddAction(gg_trg_Extreme_Thunder_Sword,function Trig_Extreme_Thunder_Sword_Actions)
 call TriggerRegisterAnyUnitEventBJ(gg_trg_Black_Magic,EVENT_PLAYER_UNIT_ATTACKED)
 call TriggerAddCondition(gg_trg_Black_Magic,Condition(function Trig_Black_Magic_Conditions))
 call TriggerAddAction(gg_trg_Black_Magic,function Trig_Black_Magic_Actions)
 call DisableTrigger(gg_trg_Extreme_Black_Magic)
 call TriggerRegisterAnyUnitEventBJ(gg_trg_Extreme_Black_Magic,EVENT_PLAYER_UNIT_ATTACKED)
 call TriggerAddCondition(gg_trg_Extreme_Black_Magic,Condition(function Trig_Extreme_Black_Magic_Conditions))
 call TriggerAddAction(gg_trg_Extreme_Black_Magic,function Trig_Extreme_Black_Magic_Actions)
 call DisableTrigger(gg_trg_Super_Units)
 call TriggerRegisterAnyUnitEventBJ(gg_trg_Super_Units,EVENT_PLAYER_UNIT_ATTACKED)
 call TriggerAddCondition(gg_trg_Super_Units,Condition(function Trig_Super_Units_Conditions))
 call TriggerAddAction(gg_trg_Super_Units,function Trig_Super_Units_Actions)
 call DisableTrigger(gg_trg_Super_Units_Removal)
 call TriggerRegisterTimerEventPeriodic(gg_trg_Super_Units_Removal,120.)
 call TriggerAddAction(gg_trg_Super_Units_Removal,function Trig_Super_Units_Removal_Actions)
 call TriggerRegisterTimerEventPeriodic(gg_trg_Labyrinth_reminder,300.)
 call TriggerAddAction(gg_trg_Labyrinth_reminder,function Trig_Labyrinth_reminder_Actions)
 call TriggerRegisterPlayerChatEvent(gg_trg_Gold_Reminder,Player(0),"-gold",true)
 call TriggerAddAction(gg_trg_Gold_Reminder,function Trig_Gold_Reminder_Actions)
 call TriggerRegisterAnyUnitEventBJ(gg_trg_Dark_Magic_Tower,EVENT_PLAYER_UNIT_ATTACKED)
 call TriggerAddCondition(gg_trg_Dark_Magic_Tower,Condition(function Trig_Dark_Magic_Tower_Conditions))
 call TriggerAddAction(gg_trg_Dark_Magic_Tower,function Trig_Dark_Magic_Tower_Actions)
endfunction

function config takes nothing returns nothing
 call SetMapName("TRIGSTR_001")
 call SetMapDescription("TRIGSTR_003")
 call SetPlayers(6)
 call SetTeams(6)
 call SetGamePlacement(MAP_PLACEMENT_TEAMS_TOGETHER)
 call DefineStartLocation(0,1344.,8256.)
 call DefineStartLocation(1,-704.,8192.)
 call DefineStartLocation(2,-2688.,8192.)
 call DefineStartLocation(3,1216.,-9536.)
 call DefineStartLocation(4,-960.,-9536.)
 call DefineStartLocation(5,-2816.,-9536.)
 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)
 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)
 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)
 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)
 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_USER)
 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)
 call InitCustomTeams()
 call SetStartLocPrioCount(0,1)
 call SetStartLocPrio(0,0,1,MAP_LOC_PRIO_HIGH)
 call SetStartLocPrioCount(1,2)
 call SetStartLocPrio(1,0,0,MAP_LOC_PRIO_HIGH)
 call SetStartLocPrio(1,1,2,MAP_LOC_PRIO_HIGH)
 call SetStartLocPrioCount(2,1)
 call SetStartLocPrio(2,0,1,MAP_LOC_PRIO_HIGH)
 call SetStartLocPrioCount(3,1)
 call SetStartLocPrio(3,0,4,MAP_LOC_PRIO_HIGH)
 call SetStartLocPrioCount(4,2)
 call SetStartLocPrio(4,0,3,MAP_LOC_PRIO_HIGH)
 call SetStartLocPrio(4,1,5,MAP_LOC_PRIO_HIGH)
 call SetStartLocPrioCount(5,1)
 call SetStartLocPrio(5,0,4,MAP_LOC_PRIO_HIGH)
endfunction

if there's someone out there that can change this beast of a script into a lot of gui triggers then he/she is my hero :D
and deserves rep ofc
 
Last edited:
Level 14
Joined
Apr 20, 2009
Messages
1,543
lol I haven't worked with hidden tags before XD
what do I have to fill in when it asks for an option?
EDIT: nevermind, spoiler is a good option ;)

and: thank you verry much if you put efforts in it ;)
 
Level 19
Joined
Feb 25, 2009
Messages
2,004
I did the first one myself ;)

I changed it to this:
JASS:
globals
 rect gg_rct_Castle_1
 rect gg_rct_Castle_2
 rect gg_rct_Shops_no_air
 rect gg_rct_Shops_no_air_kick
 rect gg_rct_Shop_Labyrinth_Teleport
 rect gg_rct_Shop_Labyrinth_Teleport_2
 rect gg_rct_Shop_Labyrinth_Teleport_to
 rect gg_rct_Shop_Labyrinth_Teleport_2_to
 rect gg_rct_No_builder_in
 rect gg_rct_No_builder_in_2
 rect gg_rct_No_Units_Labyrinth
 rect gg_rct_No_Units_Labyrinth_2
 rect gg_rct_No_Units_Labyrinth_3
 trigger gg_trg_Starting=CreateTrigger()
 trigger gg_trg_level_1_killed=CreateTrigger()
 trigger gg_trg_level_2_killed=CreateTrigger()
 trigger gg_trg_mortar_killed=CreateTrigger()
 trigger gg_trg_air_killed=CreateTrigger()
 trigger gg_trg_general_killed=CreateTrigger()
 trigger gg_trg_Building_killed=CreateTrigger()
 trigger gg_trg_Altar_killed=CreateTrigger()
 trigger gg_trg_Builders_in_Castle_1=CreateTrigger()
 trigger gg_trg_Builders_in_Castle3=CreateTrigger()
 trigger gg_trg_Builders_in_Castle_2=CreateTrigger()
 trigger gg_trg_Builders_in_Castle4=CreateTrigger()
 trigger gg_trg_Food=CreateTrigger()
 trigger gg_trg_Food_2=CreateTrigger()
 trigger gg_trg_Regrow_Trees=CreateTrigger()
 trigger gg_trg_red_leaves=CreateTrigger()
 trigger gg_trg_blue_leaves=CreateTrigger()
 trigger gg_trg_teal_leaves=CreateTrigger()
 trigger gg_trg_purple_leaves=CreateTrigger()
 trigger gg_trg_yellow_leaves=CreateTrigger()
 trigger gg_trg_orange_leaves=CreateTrigger()
 trigger gg_trg_Red=CreateTrigger()
 trigger gg_trg_Blue=CreateTrigger()
 trigger gg_trg_Teal=CreateTrigger()
 trigger gg_trg_Purple=CreateTrigger()
 trigger gg_trg_Yellow=CreateTrigger()
 trigger gg_trg_Orange=CreateTrigger()
 trigger gg_trg_shops_only_general=CreateTrigger()
 trigger gg_trg_shops_only_general2=CreateTrigger()
 trigger gg_trg_shops_only_general3=CreateTrigger()
 trigger gg_trg_shops_only_general4=CreateTrigger()
 trigger gg_trg_Teleport=CreateTrigger()
 trigger gg_trg_Teleport_2=CreateTrigger()
 trigger gg_trg_kick_blue=CreateTrigger()
 trigger gg_trg_kick_teal=CreateTrigger()
 trigger gg_trg_kick_purple=CreateTrigger()
 trigger gg_trg_kick_yellow=CreateTrigger()
 trigger gg_trg_kick_orange=CreateTrigger()
 trigger gg_trg_StrategyMaster=CreateTrigger()
 trigger gg_trg_Normal_Mode=CreateTrigger()
 trigger gg_trg_Extreme_Mode=CreateTrigger()
 trigger gg_trg_Super_Units_Mode=CreateTrigger()
 trigger gg_trg_Thunder_Sword=CreateTrigger()
 trigger gg_trg_Extreme_Thunder_Sword=CreateTrigger()
 trigger gg_trg_Black_Magic=CreateTrigger()
 trigger gg_trg_Extreme_Black_Magic=CreateTrigger()
 trigger gg_trg_Super_Units=CreateTrigger()
  trigger gg_trg_Super_Units_Removal=CreateTrigger()
 unit gg_unit_h009_0027
 unit gg_unit_h009_0029
 unit gg_unit_h009_0024
 unit gg_unit_h009_0025
 unit gg_unit_h009_0028
 unit gg_unit_h009_0026
 trigger gg_trg_Labyrinth_reminder=CreateTrigger()
 trigger gg_trg_Gold_Reminder=CreateTrigger()
 trigger gg_trg_Dark_Magic_Tower=CreateTrigger()
endglobals 

function Trig_Starting_Func003002 takes nothing returns nothing
 call CreateFogModifierRectBJ(true,GetEnumPlayer(),FOG_OF_WAR_MASKED,bj_mapInitialPlayableArea)
endfunction

function Trig_Starting_Func004002 takes nothing returns nothing
 call SetPlayerStateBJ(GetEnumPlayer(),PLAYER_STATE_RESOURCE_GOLD,200)
endfunction

function Trig_Starting_Func005002 takes nothing returns nothing
 call SetPlayerStateBJ(GetEnumPlayer(),PLAYER_STATE_RESOURCE_FOOD_CAP,35)
endfunction

function Trig_Starting_Func006Func002002 takes nothing returns nothing
 call RemoveUnit(GetTriggerUnit())
endfunction

function Trig_Starting_Func006C takes nothing returns boolean
 return(GetPlayerSlotState(Player(0))==PLAYER_SLOT_STATE_EMPTY)
endfunction

function Trig_Starting_Func007Func002002 takes nothing returns nothing
 call RemoveUnit(GetTriggerUnit())
endfunction

function Trig_Starting_Func007C takes nothing returns boolean
 return(GetPlayerSlotState(Player(1))==PLAYER_SLOT_STATE_EMPTY)
endfunction

function Trig_Starting_Func008Func002002 takes nothing returns nothing
 call RemoveUnit(GetTriggerUnit())
endfunction

function Trig_Starting_Func008C takes nothing returns boolean
 return(GetPlayerSlotState(Player(2))==PLAYER_SLOT_STATE_EMPTY)
endfunction

function Trig_Starting_Func009Func002002 takes nothing returns nothing
 call RemoveUnit(GetTriggerUnit())
endfunction

function Trig_Starting_Func009C takes nothing returns boolean
 return(GetPlayerSlotState(Player(3))==PLAYER_SLOT_STATE_EMPTY)
endfunction

function Trig_Starting_Func010Func002002 takes nothing returns nothing
 call RemoveUnit(GetTriggerUnit())
endfunction

function Trig_Starting_Func010C takes nothing returns boolean
 return(GetPlayerSlotState(Player(4))==PLAYER_SLOT_STATE_EMPTY)
endfunction

function Trig_Starting_Func011Func002002 takes nothing returns nothing
 call RemoveUnit(GetTriggerUnit())
endfunction

function Trig_Starting_Func011C takes nothing returns boolean
 return(GetPlayerSlotState(Player(5))==PLAYER_SLOT_STATE_EMPTY)
endfunction

function Trig_Starting_Actions takes nothing returns nothing
 call PauseAllUnitsBJ(true)
 call ForForce(bj_FORCE_ALL_PLAYERS,function Trig_Starting_Func003002)
 call ForForce(bj_FORCE_ALL_PLAYERS,function Trig_Starting_Func004002)
 call ForForce(bj_FORCE_ALL_PLAYERS,function Trig_Starting_Func005002)
 if(Trig_Starting_Func006C())then
  call ForGroupBJ(GetUnitsOfPlayerAll(Player(0)),function Trig_Starting_Func006Func002002)
 endif
 if(Trig_Starting_Func007C())then
  call ForGroupBJ(GetUnitsOfPlayerAll(Player(1)),function Trig_Starting_Func007Func002002)
 endif
 if(Trig_Starting_Func008C())then
  call ForGroupBJ(GetUnitsOfPlayerAll(Player(2)),function Trig_Starting_Func008Func002002)
 endif
 if(Trig_Starting_Func009C())then
  call ForGroupBJ(GetUnitsOfPlayerAll(Player(3)),function Trig_Starting_Func009Func002002)
 endif
 if(Trig_Starting_Func010C())then
  call ForGroupBJ(GetUnitsOfPlayerAll(Player(4)),function Trig_Starting_Func010Func002002)
 endif
 if(Trig_Starting_Func011C())then
  call ForGroupBJ(GetUnitsOfPlayerAll(Player(5)),function Trig_Starting_Func011Func002002)
 endif
 call TriggerSleepAction(3.)
 call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,30.,"-|cff00FF00In order to achieve Victory you need to destroy the enemy Altars.|r")
 call TriggerSleepAction(3.)
 call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,27.,"-|cff00FF00When you have lots of gold, Go to the labyrinth and search for shops. Buying items for your hero might make you very powerfull.|r")
 call TriggerSleepAction(3.)
 call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,24.,"-|cff00FF00Send your worker to search for new places to build. You can create armies behind the enemy and destroy them.|r")
 call TriggerSleepAction(4.)
 call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,"-|cff808080This map was created By...|r")
 call TriggerSleepAction(2.)
 call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,18.,"|cffFF00FF!|r|cff989800S|r|cff969600t|r|cff949400r|r|cff929200a|r|cff909000t|r|cff888800e|r|cff868600g|r|cff848400y|r|cff828200M|r|cff808000a|r|cff787800s|r|cff767600t|r|cff747400e|r|cff727200r|r|cffFF00FF!|r")
 call TriggerSleepAction(10.)
 call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cff000000-|r|cffFFFF00You can Download the latest version at www.hiveworkshop.com|r")
 call TriggerSleepAction(3.)
 call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,7.,"|cff000000-|r|cffFFFF00You can also check out my other maps...|r")
 call TriggerSleepAction(6.)
 call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,1.,"|cffFF00FFPLAY!!!|r")
 call TriggerSleepAction(1.3)
 call PauseAllUnitsBJ(false)
 call TriggerSleepAction(5.)
 call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,60.,"TRIGSTR_431")
endfunction

function Trig_level_1_killed_Func002C takes nothing returns boolean
 return(GetUnitTypeId(GetDyingUnit())=='h000')or(GetUnitTypeId(GetDyingUnit())=='h003')
endfunction

function Trig_level_1_killed_Conditions takes nothing returns boolean
 return(Trig_level_1_killed_Func002C())
endfunction

function Trig_level_1_killed_Actions takes nothing returns nothing
 call AdjustPlayerStateBJ(25,GetOwningPlayer(GetKillingUnit()),PLAYER_STATE_RESOURCE_GOLD)
endfunction

function Trig_level_2_killed_Func002C takes nothing returns boolean
 return(GetUnitTypeId(GetDyingUnit())=='h001')or(GetUnitTypeId(GetDyingUnit())=='h002')
endfunction

function Trig_level_2_killed_Conditions takes nothing returns boolean
 return(Trig_level_2_killed_Func002C())
endfunction

function Trig_level_2_killed_Actions takes nothing returns nothing
 call AdjustPlayerStateBJ(50,GetOwningPlayer(GetKillingUnit()),PLAYER_STATE_RESOURCE_GOLD)
endfunction

function Trig_mortar_killed_Conditions takes nothing returns boolean
 return(GetUnitTypeId(GetDyingUnit())=='h006')
endfunction

function Trig_mortar_killed_Actions takes nothing returns nothing
 call AdjustPlayerStateBJ(75,GetOwningPlayer(GetKillingUnit()),PLAYER_STATE_RESOURCE_GOLD)
endfunction

function Trig_air_killed_Conditions takes nothing returns boolean
 return(GetUnitTypeId(GetDyingUnit())=='h004')
endfunction

function Trig_air_killed_Actions takes nothing returns nothing
 call AdjustPlayerStateBJ(10,GetOwningPlayer(GetKillingUnit()),PLAYER_STATE_RESOURCE_GOLD)
endfunction

function Trig_general_killed_Conditions takes nothing returns boolean
 return(GetUnitTypeId(GetDyingUnit())=='H005')
endfunction

function Trig_general_killed_Actions takes nothing returns nothing
 call AdjustPlayerStateBJ('}',GetOwningPlayer(GetKillingUnit()),PLAYER_STATE_RESOURCE_GOLD)
endfunction

function Trig_Building_killed_Func001C takes nothing returns boolean
 return(GetUnitTypeId(GetDyingUnit())=='h007')or(GetUnitTypeId(GetDyingUnit())=='h00C')
endfunction

function Trig_Building_killed_Conditions takes nothing returns boolean
 return(Trig_Building_killed_Func001C())
endfunction

function Trig_Building_killed_Actions takes nothing returns nothing
 call AdjustPlayerStateBJ(250,GetOwningPlayer(GetKillingUnit()),PLAYER_STATE_RESOURCE_GOLD)
endfunction

function Trig_Altar_killed_Func001C takes nothing returns boolean
 return(GetUnitTypeId(GetDyingUnit())=='h009')
endfunction

function Trig_Altar_killed_Conditions takes nothing returns boolean
 return(Trig_Altar_killed_Func001C())
endfunction

function Trig_Altar_killed_Actions takes nothing returns nothing
 call AdjustPlayerStateBJ(500,GetOwningPlayer(GetKillingUnit()),PLAYER_STATE_RESOURCE_GOLD)
endfunction

function Trig_Builders_in_Castle_1_Func003C takes nothing returns boolean
 return(GetOwningPlayer(GetTriggerUnit())==Player(3))or(GetOwningPlayer(GetTriggerUnit())==Player(4))or(GetOwningPlayer(GetTriggerUnit())==Player(5))
endfunction

function Trig_Builders_in_Castle_1_Conditions takes nothing returns boolean
 return(GetUnitTypeId(GetTriggerUnit())=='h008')and(Trig_Builders_in_Castle_1_Func003C())
endfunction

function Trig_Builders_in_Castle_1_Actions takes nothing returns nothing
 call SetUnitPositionLoc(GetTriggerUnit(),GetRectCenter(gg_rct_No_builder_in_2))
endfunction

function Trig_Builders_in_Castle3_Func003C takes nothing returns boolean
 return(GetOwningPlayer(GetTriggerUnit())==Player(3))or(GetOwningPlayer(GetTriggerUnit())==Player(4))or(GetOwningPlayer(GetTriggerUnit())==Player(5))
endfunction

function Trig_Builders_in_Castle3_Conditions takes nothing returns boolean
 return(GetUnitTypeId(GetTriggerUnit())=='h008')and(Trig_Builders_in_Castle3_Func003C())
endfunction

function Trig_Builders_in_Castle3_Actions takes nothing returns nothing
 call SetUnitPositionLoc(GetTriggerUnit(),GetRectCenter(gg_rct_No_builder_in_2))
endfunction

function Trig_Builders_in_Castle_2_Func003C takes nothing returns boolean
 return(GetOwningPlayer(GetTriggerUnit())==Player(0))or(GetOwningPlayer(GetTriggerUnit())==Player(1))or(GetOwningPlayer(GetTriggerUnit())==Player(2))
endfunction

function Trig_Builders_in_Castle_2_Conditions takes nothing returns boolean
 return(GetUnitTypeId(GetTriggerUnit())=='h008')and(Trig_Builders_in_Castle_2_Func003C())
endfunction

function Trig_Builders_in_Castle_2_Actions takes nothing returns nothing
 call SetUnitPositionLoc(GetTriggerUnit(),GetRectCenter(gg_rct_No_builder_in))
endfunction

function Trig_Builders_in_Castle4_Func003C takes nothing returns boolean
 return(GetOwningPlayer(GetTriggerUnit())==Player(0))or(GetOwningPlayer(GetTriggerUnit())==Player(1))or(GetOwningPlayer(GetTriggerUnit())==Player(2))
endfunction

function Trig_Builders_in_Castle4_Conditions takes nothing returns boolean
 return(GetUnitTypeId(GetTriggerUnit())=='h008')and(Trig_Builders_in_Castle4_Func003C())
endfunction

function Trig_Builders_in_Castle4_Actions takes nothing returns nothing
 call SetUnitPositionLoc(GetTriggerUnit(),GetRectCenter(gg_rct_No_builder_in))
endfunction

function Trig_Food_Conditions takes nothing returns boolean
 return(GetResearched()=='R009')
endfunction

function Trig_Food_Actions takes nothing returns nothing
 call SetPlayerStateBJ(GetOwningPlayer(GetTriggerUnit()),PLAYER_STATE_RESOURCE_FOOD_CAP,45)
endfunction

function Trig_Food_2_Conditions takes nothing returns boolean
 return(GetResearched()=='R00A')
endfunction

function Trig_Food_2_Actions takes nothing returns nothing
 call SetPlayerStateBJ(GetOwningPlayer(GetTriggerUnit()),PLAYER_STATE_RESOURCE_FOOD_CAP,60)
endfunction

function Trig_Regrow_Trees_Func001002 takes nothing returns nothing
 call DestructableRestoreLife(GetEnumDestructable(),GetDestructableMaxLife(GetEnumDestructable()),true)
endfunction

function Trig_Regrow_Trees_Actions takes nothing returns nothing
 call EnumDestructablesInRectAll(bj_mapInitialPlayableArea,function Trig_Regrow_Trees_Func001002)
endfunction

function Trig_red_leaves_Actions takes nothing returns nothing
 call SetPlayerAllianceStateBJ(Player(0),Player(1),5)
 call SetPlayerAllianceStateBJ(Player(0),Player(2),5)
 call AdjustPlayerStateBJ(500,Player(1),PLAYER_STATE_RESOURCE_GOLD)
 call AdjustPlayerStateBJ(500,Player(2),PLAYER_STATE_RESOURCE_GOLD)
endfunction

function Trig_blue_leaves_Actions takes nothing returns nothing
 call SetPlayerAllianceStateBJ(Player(1),Player(0),5)
 call SetPlayerAllianceStateBJ(Player(1),Player(2),5)
 call AdjustPlayerStateBJ(500,Player(0),PLAYER_STATE_RESOURCE_GOLD)
 call AdjustPlayerStateBJ(500,Player(2),PLAYER_STATE_RESOURCE_GOLD)
endfunction

function Trig_teal_leaves_Actions takes nothing returns nothing
 call SetPlayerAllianceStateBJ(Player(2),Player(0),5)
 call SetPlayerAllianceStateBJ(Player(2),Player(1),5)
 call AdjustPlayerStateBJ(500,Player(0),PLAYER_STATE_RESOURCE_GOLD)
 call AdjustPlayerStateBJ(500,Player(1),PLAYER_STATE_RESOURCE_GOLD)
endfunction

function Trig_purple_leaves_Actions takes nothing returns nothing
 call SetPlayerAllianceStateBJ(Player(3),Player(4),5)
 call SetPlayerAllianceStateBJ(Player(3),Player(5),5)
 call AdjustPlayerStateBJ(500,Player(4),PLAYER_STATE_RESOURCE_GOLD)
 call AdjustPlayerStateBJ(500,Player(5),PLAYER_STATE_RESOURCE_GOLD)
endfunction

function Trig_yellow_leaves_Actions takes nothing returns nothing
 call SetPlayerAllianceStateBJ(Player(4),Player(3),5)
 call SetPlayerAllianceStateBJ(Player(4),Player(5),5)
 call AdjustPlayerStateBJ(500,Player(3),PLAYER_STATE_RESOURCE_GOLD)
 call AdjustPlayerStateBJ(500,Player(5),PLAYER_STATE_RESOURCE_GOLD)
endfunction

function Trig_orange_leaves_Actions takes nothing returns nothing
 call SetPlayerAllianceStateBJ(Player(5),Player(3),5)
 call SetPlayerAllianceStateBJ(Player(5),Player(4),5)
 call AdjustPlayerStateBJ(500,Player(3),PLAYER_STATE_RESOURCE_GOLD)
 call AdjustPlayerStateBJ(500,Player(4),PLAYER_STATE_RESOURCE_GOLD)
endfunction

function Trig_Red_Actions takes nothing returns nothing
 call CustomDefeatBJ(Player(0),"|cffFF0000Defeat!|r")
endfunction

function Trig_Blue_Actions takes nothing returns nothing
 call CustomDefeatBJ(Player(1),"|cffFF0000Defeat!|r")
endfunction

function Trig_Teal_Actions takes nothing returns nothing
 call CustomDefeatBJ(Player(2),"|cffFF0000Defeat!|r")
endfunction

function Trig_Purple_Actions takes nothing returns nothing
 call CustomDefeatBJ(Player(3),"|cffFF0000Defeat!|r")
endfunction

function Trig_Yellow_Actions takes nothing returns nothing
 call CustomDefeatBJ(Player(4),"|cffFF0000Defeat!|r")
endfunction

function Trig_Orange_Actions takes nothing returns nothing
 call CustomDefeatBJ(Player(5),"|cffFF0000Defeat!|r")
endfunction

function Trig_shops_only_general_Conditions takes nothing returns boolean
 return(GetUnitTypeId(GetTriggerUnit())!='H005')
endfunction

function Trig_shops_only_general_Actions takes nothing returns nothing
 call SetUnitPositionLoc(GetTriggerUnit(),GetRectCenter(gg_rct_Shops_no_air_kick))
endfunction

function Trig_shops_only_general2_Conditions takes nothing returns boolean
 return(GetUnitTypeId(GetTriggerUnit())!='H005')
endfunction

function Trig_shops_only_general2_Actions takes nothing returns nothing
 call SetUnitPositionLoc(GetTriggerUnit(),GetRectCenter(gg_rct_Shops_no_air_kick))
endfunction

function Trig_shops_only_general3_Conditions takes nothing returns boolean
 return(GetUnitTypeId(GetTriggerUnit())!='H005')
endfunction

function Trig_shops_only_general3_Actions takes nothing returns nothing
 call SetUnitPositionLoc(GetTriggerUnit(),GetRectCenter(gg_rct_Shops_no_air_kick))
endfunction

function Trig_shops_only_general4_Conditions takes nothing returns boolean
 return(GetUnitTypeId(GetTriggerUnit())!='H005')
endfunction

function Trig_shops_only_general4_Actions takes nothing returns nothing
 call SetUnitPositionLoc(GetTriggerUnit(),GetRectCenter(gg_rct_Shops_no_air_kick))
endfunction

function Trig_Teleport_Actions takes nothing returns nothing
 call SetUnitPositionLoc(GetTriggerUnit(),GetRectCenter(gg_rct_Shop_Labyrinth_Teleport_to))
endfunction

function Trig_Teleport_2_Actions takes nothing returns nothing
 call SetUnitPositionLoc(GetTriggerUnit(),GetRectCenter(gg_rct_Shop_Labyrinth_Teleport_2_to))
endfunction

function Trig_kick_blue_Actions takes nothing returns nothing
 call CustomDefeatBJ(Player(1),"You have been kicked!!!")
 call AdjustPlayerStateBJ(1000,Player(0),PLAYER_STATE_RESOURCE_GOLD)
 call AdjustPlayerStateBJ(1000,Player(2),PLAYER_STATE_RESOURCE_GOLD)
endfunction

function Trig_kick_teal_Actions takes nothing returns nothing
 call CustomDefeatBJ(Player(2),"You have been kicked!!!")
 call AdjustPlayerStateBJ(1000,Player(0),PLAYER_STATE_RESOURCE_GOLD)
 call AdjustPlayerStateBJ(1000,Player(1),PLAYER_STATE_RESOURCE_GOLD)
endfunction

function Trig_kick_purple_Actions takes nothing returns nothing
 call CustomDefeatBJ(Player(3),"You have been kicked!!!")
 call AdjustPlayerStateBJ(1000,Player(4),PLAYER_STATE_RESOURCE_GOLD)
 call AdjustPlayerStateBJ(1000,Player(5),PLAYER_STATE_RESOURCE_GOLD)
endfunction

function Trig_kick_yellow_Actions takes nothing returns nothing
 call CustomDefeatBJ(Player(4),"You have been kicked!!!")
 call AdjustPlayerStateBJ(1000,Player(3),PLAYER_STATE_RESOURCE_GOLD)
 call AdjustPlayerStateBJ(1000,Player(5),PLAYER_STATE_RESOURCE_GOLD)
endfunction

function Trig_kick_orange_Actions takes nothing returns nothing
 call CustomDefeatBJ(Player(5),"You have been kicked!!!")
 call AdjustPlayerStateBJ(1000,Player(3),PLAYER_STATE_RESOURCE_GOLD)
 call AdjustPlayerStateBJ(1000,Player(4),PLAYER_STATE_RESOURCE_GOLD)
endfunction

function Trig_StrategyMaster_Actions takes nothing returns nothing
 call DisplayTimedTextToForce(bj_FORCE_PLAYER[0],30,"TRIGSTR_444")
endfunction

function Trig_Normal_Mode_Actions takes nothing returns nothing
 call EnableTrigger(gg_trg_Thunder_Sword)
 call DisableTrigger(gg_trg_Extreme_Thunder_Sword)
 call EnableTrigger(gg_trg_Black_Magic)
 call DisableTrigger(gg_trg_Extreme_Black_Magic)
 call DisableTrigger(gg_trg_Super_Units)
 call DisableTrigger(gg_trg_Super_Units_Removal)
 call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cffFF0000Player 1 (Red)|r |cff000000Has reseted the mode|r")
endfunction 

function Trig_Extreme_Mode_Actions takes nothing returns nothing
 call DisableTrigger(gg_trg_Thunder_Sword)
 call EnableTrigger(gg_trg_Extreme_Thunder_Sword)
 call DisableTrigger(gg_trg_Black_Magic)
 call EnableTrigger(gg_trg_Extreme_Black_Magic)
 call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cffFF0000Player 1 (Red)|r |cff000000Has activated a new mode!|r")
endfunction

function Trig_Super_Units_Mode_Actions takes nothing returns nothing
 call EnableTrigger(gg_trg_Super_Units)
 call EnableTrigger(gg_trg_Super_Units_Removal)
 call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"|cffFF0000Player 1 (Red)|r |cff000000Has activated a new mode!|r")
endfunction

function Trig_Thunder_Sword_Conditions takes nothing returns boolean
 return(GetUnitTypeId(GetAttacker())=='H005')
endfunction

function Trig_Thunder_Sword_Func001C takes nothing returns boolean
 return(GetRandomInt(1,1000)==1)
endfunction

function Trig_Thunder_Sword_Actions takes nothing returns nothing
 if(Trig_Thunder_Sword_Func001C())then
  call CreateNUnitsAtLocFacingLocBJ(1,'u000',GetOwningPlayer(GetAttacker()),GetUnitLoc(GetAttacker()),GetUnitLoc(GetTriggerUnit()))
  call UnitAddAbility(bj_lastCreatedUnit,'A00E')
  call IssueTargetOrderById(bj_lastCreatedUnit,852119,GetTriggerUnit())
  call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,5.,"|cff0000FF---|r |cff3030FF!Chain Lightning!|r |cff0000FF---|r")
  call TriggerSleepAction(3.)
  call RemoveUnit(bj_lastCreatedUnit)
 endif
endfunction

function Trig_Extreme_Thunder_Sword_Conditions takes nothing returns boolean
 return(GetUnitTypeId(GetAttacker())=='H005')
endfunction

function Trig_Extreme_Thunder_Sword_Func001C takes nothing returns boolean
 return(GetRandomInt(1,10)==1)
endfunction

function Trig_Extreme_Thunder_Sword_Actions takes nothing returns nothing
 if(Trig_Extreme_Thunder_Sword_Func001C())then
  call CreateNUnitsAtLocFacingLocBJ(1,'u000',GetOwningPlayer(GetAttacker()),GetUnitLoc(GetAttacker()),GetUnitLoc(GetTriggerUnit()))
  call UnitAddAbility(bj_lastCreatedUnit,'A00E')
  call IssueTargetOrderById(bj_lastCreatedUnit,852119,GetTriggerUnit())
  call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,1.,"|cff0000FF---|r |cff3030FF!Chain Lightning!|r |cff0000FF---|r")
  call TriggerSleepAction(1.3)
  call RemoveUnit(bj_lastCreatedUnit)
 endif
endfunction

function Trig_Black_Magic_Conditions takes nothing returns boolean
 return(GetUnitTypeId(GetAttacker())=='H005')
endfunction

function Trig_Black_Magic_Func001C takes nothing returns boolean
 return(GetRandomInt(1,10000)==1)
endfunction

function Trig_Black_Magic_Actions takes nothing returns nothing
 if(Trig_Black_Magic_Func001C())then
  call CreateNUnitsAtLocFacingLocBJ(1,'u000',GetOwningPlayer(GetAttacker()),GetUnitLoc(GetAttacker()),GetUnitLoc(GetTriggerUnit()))
  call UnitAddAbility(bj_lastCreatedUnit,'A00C')
  call IssuePointOrderByIdLoc(bj_lastCreatedUnit,852218,GetUnitLoc(GetTriggerUnit()))
  call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,7.,"|cff000000---|r |cff606060!BLACK MAGIC!|r |cff000000---|r")
  call TriggerSleepAction(3.)
  call RemoveUnit(bj_lastCreatedUnit)
 endif
endfunction

function Trig_Extreme_Black_Magic_Conditions takes nothing returns boolean
 return(GetUnitTypeId(GetAttacker())=='H005')
endfunction

function Trig_Extreme_Black_Magic_Func001C takes nothing returns boolean
 return(GetRandomInt(1,20)==1)
endfunction

function Trig_Extreme_Black_Magic_Actions takes nothing returns nothing
 if(Trig_Extreme_Black_Magic_Func001C())then
  call CreateNUnitsAtLocFacingLocBJ(1,'u000',GetOwningPlayer(GetAttacker()),GetUnitLoc(GetAttacker()),GetUnitLoc(GetTriggerUnit()))
  call UnitAddAbility(bj_lastCreatedUnit,'A00C')
  call IssuePointOrderByIdLoc(bj_lastCreatedUnit,852218,GetUnitLoc(GetTriggerUnit()))
  call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,2.,"|cff000000---|r |cff606060!BLACK MAGIC!|r |cff000000---|r")
  call TriggerSleepAction(2.)
  call RemoveUnit(bj_lastCreatedUnit)
 endif
endfunction

function Trig_Super_Units_Conditions takes nothing returns boolean
 return(IsUnitIdType(GetUnitTypeId(GetAttacker()),UNIT_TYPE_HERO)==false)
endfunction

function Trig_Super_Units_Func001C takes nothing returns boolean
 return(GetRandomInt(1,50)==1)
endfunction

function Trig_Super_Units_Actions takes nothing returns nothing
 if(Trig_Super_Units_Func001C())then
  call CreateNUnitsAtLocFacingLocBJ(1,'u000',GetOwningPlayer(GetAttacker()),GetUnitLoc(GetAttacker()),GetUnitLoc(GetTriggerUnit()))
  call UnitAddAbility(bj_lastCreatedUnit,'A00E')
  call IssueTargetOrderById(bj_lastCreatedUnit,852119,GetTriggerUnit())
  call TriggerSleepAction(1.)
  call RemoveUnit(bj_lastCreatedUnit)
 endif
endfunction

function Trig_Super_Units_Removal_Func001002 takes nothing returns nothing
 call RemoveUnit(GetEnumUnit())
endfunction

function Trig_Super_Units_Removal_Actions takes nothing returns nothing
 call ForGroupBJ(GetUnitsOfTypeIdAll('u000'),function Trig_Super_Units_Removal_Func001002)
endfunction

function Trig_Labyrinth_reminder_Actions takes nothing returns nothing
 call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,GetRectCenter(gg_rct_Shops_no_air),30.,1,.0,80.,.0)
 call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,30,"Visit the labyrinth shown in the minimap to greatly increase your heroes strength.")
endfunction

function Trig_Gold_Reminder_Actions takes nothing returns nothing
 call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,60.,"TRIGSTR_447")
endfunction

function Trig_Dark_Magic_Tower_Conditions takes nothing returns boolean
 return(GetUnitTypeId(GetAttacker())=='h00D')
endfunction

function Trig_Dark_Magic_Tower_Func001C takes nothing returns boolean
 return(GetRandomInt(1,10000)==1)
endfunction

function Trig_Dark_Magic_Tower_Actions takes nothing returns nothing
 if(Trig_Dark_Magic_Tower_Func001C())then
  call CreateNUnitsAtLocFacingLocBJ(1,'u000',GetOwningPlayer(GetAttacker()),GetUnitLoc(GetAttacker()),GetUnitLoc(GetTriggerUnit()))
  call UnitAddAbility(bj_lastCreatedUnit,'Apos')
  call IssueTargetOrderById(bj_lastCreatedUnit,852196,GetTriggerUnit())
  call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,2.,"|cff000000---|r |cff707070!Dark Magic!|r |cff000000---|r")
 endif
endfunction

function InitCustomTeams takes nothing returns nothing
 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 SetPlayerAllianceStateAllyBJ(Player(0),Player(1),true)
 call SetPlayerAllianceStateAllyBJ(Player(0),Player(2),true)
 call SetPlayerAllianceStateAllyBJ(Player(1),Player(0),true)
 call SetPlayerAllianceStateAllyBJ(Player(1),Player(2),true)
 call SetPlayerAllianceStateAllyBJ(Player(2),Player(0),true)
 call SetPlayerAllianceStateAllyBJ(Player(2),Player(1),true)
 call SetPlayerAllianceStateVisionBJ(Player(0),Player(1),true)
 call SetPlayerAllianceStateVisionBJ(Player(0),Player(2),true)
 call SetPlayerAllianceStateVisionBJ(Player(1),Player(0),true)
 call SetPlayerAllianceStateVisionBJ(Player(1),Player(2),true)
 call SetPlayerAllianceStateVisionBJ(Player(2),Player(0),true)
 call SetPlayerAllianceStateVisionBJ(Player(2),Player(1),true)
 call SetPlayerTeam(Player(3),1)
 call SetPlayerState(Player(3),PLAYER_STATE_ALLIED_VICTORY,1)
 call SetPlayerTeam(Player(4),1)
 call SetPlayerState(Player(4),PLAYER_STATE_ALLIED_VICTORY,1)
 call SetPlayerTeam(Player(5),1)
 call SetPlayerState(Player(5),PLAYER_STATE_ALLIED_VICTORY,1)
 call SetPlayerAllianceStateAllyBJ(Player(3),Player(4),true)
 call SetPlayerAllianceStateAllyBJ(Player(3),Player(5),true)
 call SetPlayerAllianceStateAllyBJ(Player(4),Player(3),true)
 call SetPlayerAllianceStateAllyBJ(Player(4),Player(5),true)
 call SetPlayerAllianceStateAllyBJ(Player(5),Player(3),true)
 call SetPlayerAllianceStateAllyBJ(Player(5),Player(4),true)
 call SetPlayerAllianceStateVisionBJ(Player(3),Player(4),true)
 call SetPlayerAllianceStateVisionBJ(Player(3),Player(5),true)
 call SetPlayerAllianceStateVisionBJ(Player(4),Player(3),true)
 call SetPlayerAllianceStateVisionBJ(Player(4),Player(5),true)
 call SetPlayerAllianceStateVisionBJ(Player(5),Player(3),true)
 call SetPlayerAllianceStateVisionBJ(Player(5),Player(4),true)
endfunction

function main takes nothing returns nothing
 local weathereffect we
 local player p
 local unit u
 local integer unitID
 local trigger t
 local real life
 call SetCameraBounds(-7424.+GetCameraMargin(CAMERA_MARGIN_LEFT),-9728.+GetCameraMargin(CAMERA_MARGIN_BOTTOM),5504.-GetCameraMargin (CAMERA_MARGIN_RIGHT),9216.-GetCameraMargin(CAMERA_MARGIN_TOP),-7424.+GetCameraMargin(CAMERA_MARGIN_LEFT),9216.-GetCameraMargi n(CAMERA_MARGIN_TOP),5504.-GetCameraMargin(CAMERA_MARGIN_RIGHT),-9728.+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)
 set gg_rct_Castle_1=Rect(-6752.,5920.,2240.,9184.)
 set gg_rct_Castle_2=Rect(-6752.,-9696.,2240.,-6464.)
 set gg_rct_Shops_no_air=Rect(-4736.,-576.,-3840.,224.)
 set gg_rct_Shops_no_air_kick=Rect(-3680.,-288.,-3392.,.0)
 set gg_rct_Shop_Labyrinth_Teleport=Rect(-2816.,-5056.,-2624.,-4864.)
 set gg_rct_Shop_Labyrinth_Teleport_2=Rect(-6272.,-5248.,-6016.,-4992.)
 set gg_rct_Shop_Labyrinth_Teleport_to=Rect(-6400.,-5248.,-6304.,-4992.)
 set gg_rct_Shop_Labyrinth_Teleport_2_to=Rect(-2816.,-4832.,-2624.,-4736.)
 set gg_rct_No_builder_in=Rect(-2144.,5184.,-1184.,5888.)
 set we=AddWeatherEffect(gg_rct_No_builder_in,'FDwh')
 call EnableWeatherEffect(we,true)
 set gg_rct_No_builder_in_2=Rect(-2144.,-6432.,-1152.,-5760.)
 set we=AddWeatherEffect(gg_rct_No_builder_in_2,'FDwh')
 call EnableWeatherEffect(we,true)
 set gg_rct_No_Units_Labyrinth=Rect(-7360.,-6176.,-4000.,5824.)
 set we=AddWeatherEffect(gg_rct_No_Units_Labyrinth,'RAlr')
 call EnableWeatherEffect(we,true)
 set gg_rct_No_Units_Labyrinth_2=Rect(-4032.,-6240.,-2400.,-4128.)
 set we=AddWeatherEffect(gg_rct_No_Units_Labyrinth_2,'RAlr')
 call EnableWeatherEffect(we,true)
 set gg_rct_No_Units_Labyrinth_3=Rect(-4032.,3520.,-2336.,5792.)
 set we=AddWeatherEffect(gg_rct_No_Units_Labyrinth_3,'RAlr')
 call EnableWeatherEffect(we,true)
 set p=Player(15)
 set u=CreateUnit(p,'ncp2',-2720.,-4960.,270.)
 set u=CreateUnit(p,'ncp3',-6144.,-5120.,270.)
 set u=CreateUnit(p,'n001',-7040.,3008.,270.)
 set u=CreateUnit(p,'n000',-7104.,-2048.,270.)
 set p=Player(0)
 set u=CreateUnit(p,'h00A',-2112.,6016.,270.)
 set u=CreateUnit(p,'h00A',-1216.,6016.,270.)
 set u=CreateUnit(p,'h007',1344.,8960.,270.)
 set u=CreateUnit(p,'h007',1856.,8704.,270.)
 set gg_unit_h009_0024=CreateUnit(p,'h009',1696.,7456.,270.)
 set u=CreateUnit(p,'h00C',-6528.,8960.,270.)
 set p=Player(1)
 set u=CreateUnit(p,'h00A',-2112.,6272.,270.)
 set u=CreateUnit(p,'h00A',-1216.,6272.,270.)
 set u=CreateUnit(p,'h007',-768.,8896.,270.)
 set u=CreateUnit(p,'h007',-256.,8640.,270.)
 set gg_unit_h009_0025=CreateUnit(p,'h009',-416.,7456.,270.)
 set u=CreateUnit(p,'h00C',-6528.,7936.,270.)
 set p=Player(2)
 set u=CreateUnit(p,'h00A',-960.,6016.,270.)
 set u=CreateUnit(p,'h00A',-2368.,6016.,270.)
 set u=CreateUnit(p,'h007',-2752.,8832.,270.)
 set u=CreateUnit(p,'h007',-2240.,8576.,270.)
 set gg_unit_h009_0026=CreateUnit(p,'h009',-2400.,7456.,270.)
 set u=CreateUnit(p,'h00C',-6528.,6912.,270.)
 set p=Player(3)
 set u=CreateUnit(p,'h00A',-1216.,-6528.,270.)
 set u=CreateUnit(p,'h00A',-2112.,-6528.,270.)
 set u=CreateUnit(p,'h007',1984.,-9280.,270.)
 set u=CreateUnit(p,'h007',1472.,-9024.,270.)
 set gg_unit_h009_0027=CreateUnit(p,'h009',2080.,-7968.,270.)
 set u=CreateUnit(p,'h00C',-6528.,-9472.,270.)
 set p=Player(4)
 set u=CreateUnit(p,'h00A',-1216.,-6784.,270.)
 set u=CreateUnit(p,'h00A',-2112.,-6784.,270.)
 set u=CreateUnit(p,'h007',-192.,-9216.,270.)
 set u=CreateUnit(p,'h007',-704.,-8960.,270.)
 set gg_unit_h009_0028=CreateUnit(p,'h009',-96.,-7968.,270.)
 set u=CreateUnit(p,'h00C',-6528.,-8384.,270.)
 set p=Player(5)
 set u=CreateUnit(p,'h00A',-2368.,-6528.,270.)
 set u=CreateUnit(p,'h00A',-960.,-6528.,270.)
 set u=CreateUnit(p,'h007',-2048.,-9216.,270.)
 set u=CreateUnit(p,'h007',-2560.,-8960.,270.)
 set gg_unit_h009_0029=CreateUnit(p,'h009',-1952.,-7968.,270.)
 set u=CreateUnit(p,'h00C',-6528.,-7424.,270.)
 set p=Player(0)
 set u=CreateUnit(p,'h008',1344.9,8308.8,235.664)
 set u=CreateUnit(p,'H005',1545.5,7284.7,177.149)
 set p=Player(1)
 set u=CreateUnit(p,'h008',-729.3,8253.4,54.417)
 set u=CreateUnit(p,'H005',-542.4,7321.1,302.287)
 set p=Player(2)
 set u=CreateUnit(p,'h008',-2679.4,8251.4,186.993)
 set u=CreateUnit(p,'H005',-2595.4,7311.4,84.059)
 set p=Player(3)
 set u=CreateUnit(p,'h008',1200.6,-9557.6,329.929)
 set u=CreateUnit(p,'H005',1953.7,-8108.7,82.817)
 set p=Player(4)
 set u=CreateUnit(p,'h008',-960.5,-9528.1,188.509)
 set u=CreateUnit(p,'H005',-224.,-8103.7,71.358)
 set p=Player(5)
 set u=CreateUnit(p,'h008',-2802.3,-9547.1,140.377)
 set u=CreateUnit(p,'H005',-2073.9,-8118.6,108.372)
 call InitBlizzard()
 call TriggerRegisterTimerEventSingle(gg_trg_Starting,.3)
 call TriggerAddAction(gg_trg_Starting,function Trig_Starting_Actions)
 call TriggerRegisterAnyUnitEventBJ(gg_trg_level_1_killed,EVENT_PLAYER_UNIT_DEATH)
 call TriggerAddCondition(gg_trg_level_1_killed,Condition(function Trig_level_1_killed_Conditions))
 call TriggerAddAction(gg_trg_level_1_killed,function Trig_level_1_killed_Actions)
 call TriggerRegisterAnyUnitEventBJ(gg_trg_level_2_killed,EVENT_PLAYER_UNIT_DEATH)
 call TriggerAddCondition(gg_trg_level_2_killed,Condition(function Trig_level_2_killed_Conditions))
 call TriggerAddAction(gg_trg_level_2_killed,function Trig_level_2_killed_Actions)
 call TriggerRegisterAnyUnitEventBJ(gg_trg_mortar_killed,EVENT_PLAYER_UNIT_DEATH)
 call TriggerAddCondition(gg_trg_mortar_killed,Condition(function Trig_mortar_killed_Conditions))
 call TriggerAddAction(gg_trg_mortar_killed,function Trig_mortar_killed_Actions)
 call TriggerRegisterAnyUnitEventBJ(gg_trg_air_killed,EVENT_PLAYER_UNIT_DEATH)
 call TriggerAddCondition(gg_trg_air_killed,Condition(function Trig_air_killed_Conditions))
 call TriggerAddAction(gg_trg_air_killed,function Trig_air_killed_Actions)
 call TriggerRegisterAnyUnitEventBJ(gg_trg_general_killed,EVENT_PLAYER_UNIT_DEATH)
 call TriggerAddCondition(gg_trg_general_killed,Condition(function Trig_general_killed_Conditions))
 call TriggerAddAction(gg_trg_general_killed,function Trig_general_killed_Actions)
 call TriggerRegisterAnyUnitEventBJ(gg_trg_Building_killed,EVENT_PLAYER_UNIT_DEATH)
 call TriggerAddCondition(gg_trg_Building_killed,Condition(function Trig_Building_killed_Conditions))
 call TriggerAddAction(gg_trg_Building_killed,function Trig_Building_killed_Actions)
 call TriggerRegisterAnyUnitEventBJ(gg_trg_Altar_killed,EVENT_PLAYER_UNIT_DEATH) 
 call TriggerAddCondition(gg_trg_Altar_killed,Condition(function Trig_Altar_killed_Conditions))
 call TriggerAddAction(gg_trg_Altar_killed,function Trig_Altar_killed_Actions)
 call TriggerRegisterEnterRectSimple(gg_trg_Builders_in_Castle_1,gg_rct_No_builder_in)
 call TriggerAddCondition(gg_trg_Builders_in_Castle_1,Condition(function Trig_Builders_in_Castle_1_Conditions))
 call TriggerAddAction(gg_trg_Builders_in_Castle_1,function Trig_Builders_in_Castle_1_Actions)
 call TriggerRegisterEnterRectSimple(gg_trg_Builders_in_Castle3,gg_rct_Castle_1)
 call TriggerAddCondition(gg_trg_Builders_in_Castle3,Condition(function Trig_Builders_in_Castle3_Conditions))
 call TriggerAddAction(gg_trg_Builders_in_Castle3,function Trig_Builders_in_Castle3_Actions)
 call TriggerRegisterEnterRectSimple(gg_trg_Builders_in_Castle_2,gg_rct_No_builder_in_2)
 call TriggerAddCondition(gg_trg_Builders_in_Castle_2,Condition(function Trig_Builders_in_Castle_2_Conditions))
 call TriggerAddAction(gg_trg_Builders_in_Castle_2,function Trig_Builders_in_Castle_2_Actions)
 call TriggerRegisterEnterRectSimple(gg_trg_Builders_in_Castle4,gg_rct_Castle_2)
 call TriggerAddCondition(gg_trg_Builders_in_Castle4,Condition(function Trig_Builders_in_Castle4_Conditions))
 call TriggerAddAction(gg_trg_Builders_in_Castle4,function Trig_Builders_in_Castle4_Actions)
 call TriggerRegisterAnyUnitEventBJ(gg_trg_Food,EVENT_PLAYER_UNIT_RESEARCH_FINISH)
 call TriggerAddCondition(gg_trg_Food,Condition(function Trig_Food_Conditions))
 call TriggerAddAction(gg_trg_Food,function Trig_Food_Actions)
 call TriggerRegisterAnyUnitEventBJ(gg_trg_Food_2,EVENT_PLAYER_UNIT_RESEARCH_FINISH)
 call TriggerAddCondition(gg_trg_Food_2,Condition(function Trig_Food_2_Conditions))
 call TriggerAddAction(gg_trg_Food_2,function Trig_Food_2_Actions)
 call TriggerRegisterTimerEventPeriodic(gg_trg_Regrow_Trees,480.)
 call TriggerAddAction(gg_trg_Regrow_Trees,function Trig_Regrow_Trees_Actions)
 call TriggerRegisterPlayerEventLeave(gg_trg_red_leaves,Player(0))
 call TriggerAddAction(gg_trg_red_leaves,function Trig_red_leaves_Actions)
 call TriggerRegisterPlayerEventLeave(gg_trg_blue_leaves,Player(1)) 
 call TriggerAddAction(gg_trg_blue_leaves,function Trig_blue_leaves_Actions)
 call TriggerRegisterPlayerEventLeave(gg_trg_teal_leaves,Player(2))
 call TriggerAddAction(gg_trg_teal_leaves,function Trig_teal_leaves_Actions)
 call TriggerRegisterPlayerEventLeave(gg_trg_purple_leaves,Player(3))
 call TriggerAddAction(gg_trg_purple_leaves,function Trig_purple_leaves_Actions)
 call TriggerRegisterPlayerEventLeave(gg_trg_yellow_leaves,Player(4))
 call TriggerAddAction(gg_trg_yellow_leaves,function Trig_yellow_leaves_Actions)
 call TriggerRegisterPlayerEventLeave(gg_trg_orange_leaves,Player(5))
 call TriggerAddAction(gg_trg_orange_leaves,function Trig_orange_leaves_Actions)
 call TriggerRegisterUnitEvent(gg_trg_Red,gg_unit_h009_0024,EVENT_UNIT_DEATH)
 call TriggerAddAction(gg_trg_Red,function Trig_Red_Actions)
 call TriggerRegisterUnitEvent(gg_trg_Blue,gg_unit_h009_0025,EVENT_UNIT_DEATH)
 call TriggerAddAction(gg_trg_Blue,function Trig_Blue_Actions)
 call TriggerRegisterUnitEvent(gg_trg_Teal,gg_unit_h009_0026,EVENT_UNIT_DEATH)
 call TriggerAddAction(gg_trg_Teal,function Trig_Teal_Actions)
 call TriggerRegisterUnitEvent(gg_trg_Purple,gg_unit_h009_0027,EVENT_UNIT_DEATH)
 call TriggerAddAction(gg_trg_Purple,function Trig_Purple_Actions)
 call TriggerRegisterUnitEvent(gg_trg_Yellow,gg_unit_h009_0028,EVENT_UNIT_DEATH)
 call TriggerAddAction(gg_trg_Yellow,function Trig_Yellow_Actions)
 call TriggerRegisterUnitEvent(gg_trg_Orange,gg_unit_h009_0029,EVENT_UNIT_DEATH)
 call TriggerAddAction(gg_trg_Orange,function Trig_Orange_Actions)
 call TriggerRegisterEnterRectSimple(gg_trg_shops_only_general,gg_rct_Shops_no_air)
 call TriggerAddCondition(gg_trg_shops_only_general,Condition(function Trig_shops_only_general_Conditions))
 call TriggerAddAction(gg_trg_shops_only_general,function Trig_shops_only_general_Actions)
 call TriggerRegisterEnterRectSimple(gg_trg_shops_only_general2,gg_rct_No_Units_Labyrinth)
 call TriggerAddCondition(gg_trg_shops_only_general2,Condition(function Trig_shops_only_general2_Conditions))
 call TriggerAddAction(gg_trg_shops_only_general2,function Trig_shops_only_general2_Actions)
 call TriggerRegisterEnterRectSimple(gg_trg_shops_only_general3,gg_rct_No_Units_Labyrinth_2)
 call TriggerAddCondition(gg_trg_shops_only_general3,Condition(function Trig_shops_only_general3_Conditions))
 call TriggerAddAction(gg_trg_shops_only_general3,function Trig_shops_only_general3_Actions)
 call TriggerRegisterEnterRectSimple(gg_trg_shops_only_general4,gg_rct_No_Units_Labyrinth_3)
 call TriggerAddCondition(gg_trg_shops_only_general4,Condition(function Trig_shops_only_general4_Conditions))
 call TriggerAddAction(gg_trg_shops_only_general4,function Trig_shops_only_general4_Actions)
 call TriggerRegisterEnterRectSimple(gg_trg_Teleport,gg_rct_Shop_Labyrinth_Teleport)
 call TriggerAddAction(gg_trg_Teleport,function Trig_Teleport_Actions)
 call TriggerRegisterEnterRectSimple(gg_trg_Teleport_2,gg_rct_Shop_Labyrinth_Teleport_2)
 call TriggerAddAction(gg_trg_Teleport_2,function Trig_Teleport_2_Actions)
 call TriggerRegisterPlayerChatEvent(gg_trg_kick_blue,Player(0),"-kick blue",true)
 call TriggerAddAction(gg_trg_kick_blue,function Trig_kick_blue_Actions)
 call TriggerRegisterPlayerChatEvent(gg_trg_kick_teal,Player(0),"-kick teal",true)
 call TriggerAddAction(gg_trg_kick_teal,function Trig_kick_teal_Actions)
 call TriggerRegisterPlayerChatEvent(gg_trg_kick_purple,Player(0),"-kick purple",true)
 call TriggerAddAction(gg_trg_kick_purple,function Trig_kick_purple_Actions)
 call TriggerRegisterPlayerChatEvent(gg_trg_kick_yellow,Player(0),"-kick yellow",true)
 call TriggerAddAction(gg_trg_kick_yellow,function Trig_kick_yellow_Actions)
 call TriggerRegisterPlayerChatEvent(gg_trg_kick_orange,Player(0),"-kick orange",true)
 call TriggerAddAction(gg_trg_kick_orange,function Trig_kick_orange_Actions)
 call TriggerRegisterPlayerChatEvent(gg_trg_StrategyMaster,Player(0),"I am StrategyMaster",true)
 call TriggerAddAction(gg_trg_StrategyMaster,function Trig_StrategyMaster_Actions)
 call TriggerRegisterPlayerChatEvent(gg_trg_Normal_Mode,Player(0),"-normal mode",true)
 call TriggerAddAction(gg_trg_Normal_Mode,function Trig_Normal_Mode_Actions)
 call TriggerRegisterPlayerChatEvent(gg_trg_Extreme_Mode,Player(0),"-extreme mode on",true)
 call TriggerAddAction(gg_trg_Extreme_Mode,function Trig_Extreme_Mode_Actions)
 call TriggerRegisterPlayerChatEvent(gg_trg_Super_Units_Mode,Player(0),"-super units mode on",true)
 call TriggerAddAction(gg_trg_Super_Units_Mode,function Trig_Super_Units_Mode_Actions)
 call TriggerRegisterAnyUnitEventBJ(gg_trg_Thunder_Sword,EVENT_PLAYER_UNIT_ATTACKED)
 call TriggerAddCondition(gg_trg_Thunder_Sword,Condition(function Trig_Thunder_Sword_Conditions))
 call TriggerAddAction(gg_trg_Thunder_Sword,function Trig_Thunder_Sword_Actions)
 call DisableTrigger(gg_trg_Extreme_Thunder_Sword)
 call TriggerRegisterAnyUnitEventBJ(gg_trg_Extreme_Thunder_Sword,EVENT_PLAYER_UNIT_ATTACKED)
 call TriggerAddCondition(gg_trg_Extreme_Thunder_Sword,Condition(function Trig_Extreme_Thunder_Sword_Conditions))
 call TriggerAddAction(gg_trg_Extreme_Thunder_Sword,function Trig_Extreme_Thunder_Sword_Actions)
 call TriggerRegisterAnyUnitEventBJ(gg_trg_Black_Magic,EVENT_PLAYER_UNIT_ATTACKED)
 call TriggerAddCondition(gg_trg_Black_Magic,Condition(function Trig_Black_Magic_Conditions))
 call TriggerAddAction(gg_trg_Black_Magic,function Trig_Black_Magic_Actions)
 call DisableTrigger(gg_trg_Extreme_Black_Magic)
 call TriggerRegisterAnyUnitEventBJ(gg_trg_Extreme_Black_Magic,EVENT_PLAYER_UNIT_ATTACKED)
 call TriggerAddCondition(gg_trg_Extreme_Black_Magic,Condition(function Trig_Extreme_Black_Magic_Conditions))
 call TriggerAddAction(gg_trg_Extreme_Black_Magic,function Trig_Extreme_Black_Magic_Actions)
 call DisableTrigger(gg_trg_Super_Units)
 call TriggerRegisterAnyUnitEventBJ(gg_trg_Super_Units,EVENT_PLAYER_UNIT_ATTACKED)
 call TriggerAddCondition(gg_trg_Super_Units,Condition(function Trig_Super_Units_Conditions))
 call TriggerAddAction(gg_trg_Super_Units,function Trig_Super_Units_Actions)
 call DisableTrigger(gg_trg_Super_Units_Removal)
 call TriggerRegisterTimerEventPeriodic(gg_trg_Super_Units_Removal,120.)
 call TriggerAddAction(gg_trg_Super_Units_Removal,function Trig_Super_Units_Removal_Actions)
 call TriggerRegisterTimerEventPeriodic(gg_trg_Labyrinth_reminder,300.)
 call TriggerAddAction(gg_trg_Labyrinth_reminder,function Trig_Labyrinth_reminder_Actions)
 call TriggerRegisterPlayerChatEvent(gg_trg_Gold_Reminder,Player(0),"-gold",true)
 call TriggerAddAction(gg_trg_Gold_Reminder,function Trig_Gold_Reminder_Actions)
 call TriggerRegisterAnyUnitEventBJ(gg_trg_Dark_Magic_Tower,EVENT_PLAYER_UNIT_ATTACKED)
 call TriggerAddCondition(gg_trg_Dark_Magic_Tower,Condition(function Trig_Dark_Magic_Tower_Conditions))
 call TriggerAddAction(gg_trg_Dark_Magic_Tower,function Trig_Dark_Magic_Tower_Actions)
endfunction

function config takes nothing returns nothing
 call SetMapName("TRIGSTR_001")
 call SetMapDescription("TRIGSTR_003")
 call SetPlayers(6)
 call SetTeams(6)
 call SetGamePlacement(MAP_PLACEMENT_TEAMS_TOGETHER)
 call DefineStartLocation(0,1344.,8256.)
 call DefineStartLocation(1,-704.,8192.)
 call DefineStartLocation(2,-2688.,8192.)
 call DefineStartLocation(3,1216.,-9536.)
 call DefineStartLocation(4,-960.,-9536.)
 call DefineStartLocation(5,-2816.,-9536.)
 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)
 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)
 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)
 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)
 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_USER)
 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)
 call InitCustomTeams()
 call SetStartLocPrioCount(0,1)
 call SetStartLocPrio(0,0,1,MAP_LOC_PRIO_HIGH)
 call SetStartLocPrioCount(1,2)
 call SetStartLocPrio(1,0,0,MAP_LOC_PRIO_HIGH)
 call SetStartLocPrio(1,1,2,MAP_LOC_PRIO_HIGH)
 call SetStartLocPrioCount(2,1)
 call SetStartLocPrio(2,0,1,MAP_LOC_PRIO_HIGH)
 call SetStartLocPrioCount(3,1)
 call SetStartLocPrio(3,0,4,MAP_LOC_PRIO_HIGH)
 call SetStartLocPrioCount(4,2)
 call SetStartLocPrio(4,0,3,MAP_LOC_PRIO_HIGH)
 call SetStartLocPrio(4,1,5,MAP_LOC_PRIO_HIGH)
 call SetStartLocPrioCount(5,1)
 call SetStartLocPrio(5,0,4,MAP_LOC_PRIO_HIGH)
endfunction

if there's someone out there that can change this beast of a script into a lot of gui triggers then he/she is my hero :D
and deserves rep ofc

Dude, no offense, but nobody will take this challenge, unless you pay him/her realy good.
You can't just say "ok I give you rep, make my day" ...
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
Dude, no offense, but nobody will take this challenge, unless you pay him/her realy good.
You can't just say "ok I give you rep, make my day" ...

It's not what I meant to say...

and I know this is a big challenge... But when someone is bored and like to help somone else out (in this case VergilThazaar) It's just to help your fellow ppl ;)

It's not about the rep, its about doing a good deed for your fellow man ;)

but your right there's probably no one going to help me change this into a few jass triggers or even in gui when they only get a few rep points. But if you like challenges and your bored, there might be some people being interested ;)

I don't have much to offer but there are some people that LIKE to help other people... Instead of people only helping each other for the rep (which is actually quite f***** useless)

How can rep make you feel happy :S?
You can have as much rep as you want, but what does that give you? More power? Suddenly you become superman?
who cares if you have much rep or not? At least I don't ;)

It's not like: WOW! you have some big fancy gem, your much better then me ;) Get my point?

Can someone b.t.w. tell me how to disable reputation?
I'd like to do that ;)
 
Level 12
Joined
Dec 10, 2008
Messages
850
You can't GUI this becuase its the compiled version of your GUI triggers. So, this is an epic waste of time for anybody. You also can't just start ripping this aprat and putting it in empty JASS triggers, becuase chances are you'll lose refrance or throw them out of order, which means GG for your map

BTW, you forgot the "Main" function.
 
Dude, no offense, but nobody will take this challenge, unless you pay him/her realy good.
You can't just say "ok I give you rep, make my day" ...
QTF.

And also, it looks really awful coded, the far I can see.
And again, if you code it a second time, you will get better and see some stuff you didn't on the first time.
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
QTF.

And also, it looks really awful coded, the far I can see.
And again, if you code it a second time, you will get better and see some stuff you didn't on the first time.

please don't blame me, It's not my map :D I didn't code it...
That's probably the best thing to do for vergil... He has the terrains and stuff back, maybe it's better for him to remake it with the same terrain :D
 
Level 9
Joined
Oct 22, 2006
Messages
599
If this were my problem, I'd probably find it easier to play the game and recreate the triggers to what I see happening in the game, lol. And if you don't know how to recreate something that you saw, well... that's what this forum is for!

That's what I would be doing if I had some time... but well wasting another's time to save mine isn't that good either!:grin: Best solution 'till now is this though...
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
A wise man's words...

By the way,making the triggers by yourself is way better than having some one else make them for you,cause you understand them better...

are you saying that you can't understand someone elses triggers ^^? Sorry, stupid comment XD
 
Status
Not open for further replies.
Top