Name | Type | is_array | initial_value |
Boss_Demon_Killed | boolean | No | false |
Boss_FX | effect | Yes | |
Custom_Group_1 | unitcode | Yes | |
Custom_Group_2 | unitcode | Yes | |
Door1_Open | boolean | No | false |
Drop_Item_Chance_Table | integer | Yes | |
Drop_Item_Max_Level_Table | integer | Yes | |
Drop_Item_Min_Level_Table | integer | Yes | |
Elite_Hero_Base_Agi | integer | Yes | |
Elite_Hero_Base_Int | integer | Yes | |
Elite_Hero_Base_Str | integer | Yes | |
Elite_Hero_Table | unitcode | Yes | |
Enemy_Acquisition_Range | real | No | |
Enemy_Group_1 | unitcode | Yes | |
Enemy_Group_2 | unitcode | Yes | |
Enemy_Group_Num_1 | integer | No | 0 |
Enemy_Group_Num_2 | integer | No | |
Enemy_Level | integer | No | |
Enemy_Num_Max | integer | No | |
Enemy_Num_Min | integer | No | |
Enemy_Regen_Timer | timer | No | |
Enemy_Region_Flag_1 | boolean | Yes | |
Enemy_Region_Flag_2 | boolean | Yes | |
Enemy_Region_Num_1 | integer | No | |
Enemy_Region_Num_2 | integer | No | |
Enemy_Region_Param | rect | No | |
Enemy_Region_Table_1 | rect | Yes | |
Enemy_Region_Table_2 | rect | Yes | |
Find_Hero_Player | player | No | |
ft_Caption | texttag | Yes | |
ft_Speech | texttag | Yes | |
ft_Text_Delay | real | No | 4.00 |
gr_AssassultTeam | group | No | |
gr_BLSupport_1 | group | No | |
gr_BLSupport_2 | group | No | |
gr_BLSupport_3 | group | No | |
gr_DragonSummon | group | No | |
gr_DruidMinion | group | No | |
gr_NPC_Merchant | group | No | |
gr_Orc_PL_Army_1 | group | No | |
gr_Orc_PL_Army_2 | group | No | |
gr_Orc_PL_Army_3 | group | No | |
gr_Reinforce | group | No | |
gr_Villager | group | No | |
gr_Villager_Ruin | group | No | |
gr_Watchguard | group | No | |
Guard_1_Come | boolean | No | |
Guard_2_Come | boolean | No | false |
Hero_Agi_Inc | integer | Yes | |
Hero_Int_Inc | integer | Yes | |
Hero_Player_User | force | No | |
Hero_Str_Inc | integer | Yes | |
Hero_Type_Table | integer | Yes | |
m_fItemValue | real | No | |
m_fMoneyStore | real | No | |
m_iCheat | boolean | Yes | |
m_iMoneyStore | integer | No | |
MnQst_DullSword | integer | No | |
MnQst_LostSon | integer | No | |
MnQst_Spd | integer | No | |
MnQst_SplBook1 | integer | No | |
MnQst_WpnShp | integer | No | |
PlayerCamAngle | real | No | |
Quest_Eliminate_Bandits | quest | No | |
Quest_Hunt_Hunter | quest | No | |
Quest_Lich_King | quest | No | |
Quest_Rescue_Watchguard | quest | No | |
Quest_Secret_Way | quest | No | |
sfx_ExchangeFX | effect | Yes | |
Skeleton_Unit_Table | unitcode | Yes | |
Summon_Monster_Level | integer | No | |
Summon_Unit_Table | unitcode | Yes | |
Talktome_1 | effect | No | |
Talktome_2 | effect | No | |
Talktome_3 | effect | No | |
Talktome_4 | effect | No | |
Temp_Unit_Death_Type | integer | No | |
Temp_Unit_Life_Time | integer | No | |
Temporary_Unit_Max_Num | integer | No | 1 |
Temporary_Unit_Table | unit | Yes | |
Temporary_Unit_Timer | timer | No | |
u_Bandit_Child | unit | No | |
u_Current_Town | unit | No | |
u_Find_Hero_NPC_Result | unit | No | |
u_Find_Hero_Result | unit | No | |
u_Hero_Unit | unit | No | |
u_Temp_Unit | unit | No | |
Unit_Death_Type | integer | Yes | |
Unit_Life_Time | integer | Yes | |
VariablePos | integer | No | |
WeatherFX | weathereffect | No |
function Trig_Selection_Fin_Func005Func009C takes nothing returns boolean
if ( not ( udg_Hero_Type_Table[GetConvertedPlayerId(GetOwningPlayer(GetLastCreatedUnit()))] == 3 ) ) then
return false
endif
return true
endfunction
function Trig_Selection_Fin_Func005Func010C takes nothing returns boolean
if ( not ( udg_Hero_Type_Table[GetConvertedPlayerId(GetOwningPlayer(GetLastCreatedUnit()))] == 4 ) ) then
return false
endif
return true
endfunction
function Trig_Selection_Fin_Func005Func011C takes nothing returns boolean
if ( not ( udg_Hero_Type_Table[GetConvertedPlayerId(GetOwningPlayer(GetLastCreatedUnit()))] == 2 ) ) then
return false
endif
return true
endfunction
function Trig_Selection_Fin_Func005Func012C takes nothing returns boolean
if ( not ( udg_Hero_Type_Table[GetConvertedPlayerId(GetOwningPlayer(GetLastCreatedUnit()))] == 5 ) ) then
return false
endif
return true
endfunction
function Trig_Selection_Fin_Func005C takes nothing returns boolean
if ( not ( udg_Hero_Type_Table[GetConvertedPlayerId(GetOwningPlayer(GetLastCreatedUnit()))] == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Selection_Fin_Actions takes nothing returns nothing
set udg_Find_Hero_Player = GetOwningPlayer(GetLastCreatedUnit())
call TriggerExecute( gg_trg_Find_Hero )
call UnitAddItemByIdSwapped( 'stwp', GetLastCreatedUnit() )
call SetUnitUserData( GetLastCreatedUnit(), 99 )
if ( Trig_Selection_Fin_Func005C() ) then
call SetPlayerTechMaxAllowedSwap( 'hhou', 6, GetOwningPlayer(GetLastCreatedUnit()) )
call SetPlayerTechMaxAllowedSwap( 'hlum', 2, GetOwningPlayer(GetLastCreatedUnit()) )
call SetPlayerTechMaxAllowedSwap( 'hwtw', 6, GetOwningPlayer(GetLastCreatedUnit()) )
call SetPlayerTechMaxAllowedSwap( 'hgtw', 6, GetOwningPlayer(GetLastCreatedUnit()) )
call CreateNUnitsAtLoc( 1, 'hrdh', GetOwningPlayer(GetLastCreatedUnit()), GetRandomLocInRect(gg_rct_PlayerStartLocation), GetUnitFacing(GetTriggerUnit()) )
call CreateNUnitsAtLoc( 2, 'hhou', GetOwningPlayer(GetLastCreatedUnit()), GetRandomLocInRect(gg_rct_HousePlayer), bj_UNIT_FACING )
else
call SetPlayerTechMaxAllowedSwap( 'hlum', 1, GetOwningPlayer(GetLastCreatedUnit()) )
call SetPlayerTechMaxAllowedSwap( 'hwtw', 3, GetOwningPlayer(GetLastCreatedUnit()) )
call SetPlayerTechMaxAllowedSwap( 'hgtw', 3, GetOwningPlayer(GetLastCreatedUnit()) )
call SetPlayerTechMaxAllowedSwap( 'hhou', 4, GetOwningPlayer(GetLastCreatedUnit()) )
if ( Trig_Selection_Fin_Func005Func009C() ) then
call SetPlayerTechResearchedSwap( 'Rhme', 5, GetOwningPlayer(GetLastCreatedUnit()) )
call SetPlayerTechResearchedSwap( 'Rhar', 5, GetOwningPlayer(GetLastCreatedUnit()) )
call SetPlayerTechResearchedSwap( 'Rhla', 5, GetOwningPlayer(GetLastCreatedUnit()) )
call SetPlayerTechResearchedSwap( 'Rhpt', 5, GetOwningPlayer(GetLastCreatedUnit()) )
call SetPlayerTechResearchedSwap( 'Rhac', 5, GetOwningPlayer(GetLastCreatedUnit()) )
call SetPlayerTechResearchedSwap( 'Rhst', 5, GetOwningPlayer(GetLastCreatedUnit()) )
else
endif
if ( Trig_Selection_Fin_Func005Func010C() ) then
call UnitAddItemByIdSwapped( 'tmsc', GetLastCreatedUnit() )
else
endif
if ( Trig_Selection_Fin_Func005Func011C() ) then
call UnitAddItemByIdSwapped( 'lnrn', GetLastCreatedUnit() )
else
endif
if ( Trig_Selection_Fin_Func005Func012C() ) then
call UnitAddItemByIdSwapped( 'ssil', GetLastCreatedUnit() )
else
endif
call CreateNUnitsAtLoc( 1, 'hhou', GetOwningPlayer(GetLastCreatedUnit()), GetRandomLocInRect(gg_rct_HousePlayer), bj_UNIT_FACING )
endif
call TriggerSleepAction( 0.20 )
call TriggerExecute( gg_trg_Lock_Camera_to_Heroes )
endfunction
//===========================================================================
function InitTrig_Selection_Fin takes nothing returns nothing
set gg_trg_Selection_Fin = CreateTrigger( )
call TriggerAddAction( gg_trg_Selection_Fin, function Trig_Selection_Fin_Actions )
endfunction
function Trig_Merchant_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'ewsp' ) ) then
return false
endif
return true
endfunction
function Trig_Merchant_Actions takes nothing returns nothing
call RemoveUnit( GetTriggerUnit() )
call CreateNUnitsAtLoc( 1, 'EC17', GetOwningPlayer(GetTriggerUnit()), GetRandomLocInRect(gg_rct_PlayerStartLocation), bj_UNIT_FACING )
set udg_Hero_Type_Table[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 0
call TriggerExecute( gg_trg_Selection_Fin )
endfunction
//===========================================================================
function InitTrig_Merchant takes nothing returns nothing
set gg_trg_Merchant = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Merchant, gg_rct_Hero_00 )
call TriggerAddCondition( gg_trg_Merchant, Condition( function Trig_Merchant_Conditions ) )
call TriggerAddAction( gg_trg_Merchant, function Trig_Merchant_Actions )
endfunction
function Trig_Druid_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'ewsp' ) ) then
return false
endif
return true
endfunction
function Trig_Druid_Actions takes nothing returns nothing
call RemoveUnit( GetTriggerUnit() )
call CreateNUnitsAtLoc( 1, 'HC07', GetOwningPlayer(GetTriggerUnit()), GetRandomLocInRect(gg_rct_PlayerStartLocation), bj_UNIT_FACING )
set udg_Hero_Type_Table[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 1
call TriggerExecute( gg_trg_Selection_Fin )
endfunction
//===========================================================================
function InitTrig_Druid takes nothing returns nothing
set gg_trg_Druid = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Druid, gg_rct_Hero_01 )
call TriggerAddCondition( gg_trg_Druid, Condition( function Trig_Druid_Conditions ) )
call TriggerAddAction( gg_trg_Druid, function Trig_Druid_Actions )
endfunction
function Trig_Knight_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'ewsp' ) ) then
return false
endif
return true
endfunction
function Trig_Knight_Actions takes nothing returns nothing
call RemoveUnit( GetTriggerUnit() )
call CreateNUnitsAtLoc( 1, 'OC08', GetOwningPlayer(GetTriggerUnit()), GetRandomLocInRect(gg_rct_PlayerStartLocation), bj_UNIT_FACING )
set udg_Hero_Type_Table[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 2
call TriggerExecute( gg_trg_Selection_Fin )
endfunction
//===========================================================================
function InitTrig_Knight takes nothing returns nothing
set gg_trg_Knight = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Knight, gg_rct_Hero_02 )
call TriggerAddCondition( gg_trg_Knight, Condition( function Trig_Knight_Conditions ) )
call TriggerAddAction( gg_trg_Knight, function Trig_Knight_Actions )
endfunction
function Trig_Swordman_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'ewsp' ) ) then
return false
endif
return true
endfunction
function Trig_Swordman_Actions takes nothing returns nothing
call RemoveUnit( GetTriggerUnit() )
call CreateNUnitsAtLoc( 1, 'O000', GetOwningPlayer(GetTriggerUnit()), GetRandomLocInRect(gg_rct_PlayerStartLocation), bj_UNIT_FACING )
set udg_Hero_Type_Table[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 3
call TriggerExecute( gg_trg_Selection_Fin )
endfunction
//===========================================================================
function InitTrig_Swordman takes nothing returns nothing
set gg_trg_Swordman = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Swordman, gg_rct_Hero_03 )
call TriggerAddCondition( gg_trg_Swordman, Condition( function Trig_Swordman_Conditions ) )
call TriggerAddAction( gg_trg_Swordman, function Trig_Swordman_Actions )
endfunction
function Trig_Shaman_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'ewsp' ) ) then
return false
endif
return true
endfunction
function Trig_Shaman_Actions takes nothing returns nothing
call RemoveUnit( GetTriggerUnit() )
call CreateNUnitsAtLoc( 1, 'UC29', GetOwningPlayer(GetTriggerUnit()), GetRandomLocInRect(gg_rct_PlayerStartLocation), bj_UNIT_FACING )
set udg_Hero_Type_Table[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 4
call TriggerExecute( gg_trg_Selection_Fin )
endfunction
//===========================================================================
function InitTrig_Shaman takes nothing returns nothing
set gg_trg_Shaman = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Shaman, gg_rct_Hero_04 )
call TriggerAddCondition( gg_trg_Shaman, Condition( function Trig_Shaman_Conditions ) )
call TriggerAddAction( gg_trg_Shaman, function Trig_Shaman_Actions )
endfunction
function Trig_Priest_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'ewsp' ) ) then
return false
endif
return true
endfunction
function Trig_Priest_Actions takes nothing returns nothing
call RemoveUnit( GetTriggerUnit() )
call CreateNUnitsAtLoc( 1, 'HC13', GetOwningPlayer(GetTriggerUnit()), GetRandomLocInRect(gg_rct_PlayerStartLocation), bj_UNIT_FACING )
set udg_Hero_Type_Table[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 5
call TriggerExecute( gg_trg_Selection_Fin )
endfunction
//===========================================================================
function InitTrig_Priest takes nothing returns nothing
set gg_trg_Priest = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Priest, gg_rct_Hero_05 )
call TriggerAddCondition( gg_trg_Priest, Condition( function Trig_Priest_Conditions ) )
call TriggerAddAction( gg_trg_Priest, function Trig_Priest_Actions )
endfunction
function Trig_Caption_Merchant_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call CreateTextTagUnitBJ( "TRIGSTR_052", gg_unit_EC17_0084, 8.00, 10.00, 100.00, 100.00, 100.00, 0 )
set udg_ft_Caption[6] = GetLastCreatedTextTag()
call TriggerSleepAction( ( udg_ft_Text_Delay + 1.00 ) )
call DestroyTextTagBJ( udg_ft_Caption[6] )
call TriggerSleepAction( 1.00 )
call EnableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Caption_Merchant takes nothing returns nothing
set gg_trg_Caption_Merchant = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Caption_Merchant, gg_rct_SelectMerchant )
call TriggerAddAction( gg_trg_Caption_Merchant, function Trig_Caption_Merchant_Actions )
endfunction
function Trig_Caption_Knight_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call CreateTextTagUnitBJ( "TRIGSTR_056", gg_unit_OC08_0081, 8.00, 10.00, 100.00, 100.00, 100.00, 0 )
set udg_ft_Caption[5] = GetLastCreatedTextTag()
call TriggerSleepAction( ( udg_ft_Text_Delay + 1.00 ) )
call DestroyTextTagBJ( udg_ft_Caption[5] )
call TriggerSleepAction( 1.00 )
call EnableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Caption_Knight takes nothing returns nothing
set gg_trg_Caption_Knight = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Caption_Knight, gg_rct_SelectKnight )
call TriggerAddAction( gg_trg_Caption_Knight, function Trig_Caption_Knight_Actions )
endfunction
function Trig_Caption_Shaman_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call CreateTextTagUnitBJ( "TRIGSTR_061", gg_unit_UC29_0083, 8.00, 10.00, 100.00, 100.00, 100.00, 0 )
set udg_ft_Caption[4] = GetLastCreatedTextTag()
call TriggerSleepAction( ( udg_ft_Text_Delay + 1.00 ) )
call DestroyTextTagBJ( udg_ft_Caption[4] )
call TriggerSleepAction( 1.00 )
call EnableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Caption_Shaman takes nothing returns nothing
set gg_trg_Caption_Shaman = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Caption_Shaman, gg_rct_SelectShaman )
call TriggerAddAction( gg_trg_Caption_Shaman, function Trig_Caption_Shaman_Actions )
endfunction
function Trig_Caption_Priest_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call CreateTextTagUnitBJ( "TRIGSTR_065", gg_unit_HC13_0080, 8.00, 10.00, 100.00, 100.00, 100.00, 0 )
set udg_ft_Caption[3] = GetLastCreatedTextTag()
call TriggerSleepAction( ( udg_ft_Text_Delay + 1.00 ) )
call DestroyTextTagBJ( udg_ft_Caption[3] )
call TriggerSleepAction( 1.00 )
call EnableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Caption_Priest takes nothing returns nothing
set gg_trg_Caption_Priest = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Caption_Priest, gg_rct_SelectPriest )
call TriggerAddAction( gg_trg_Caption_Priest, function Trig_Caption_Priest_Actions )
endfunction
function Trig_Caption_Swordman_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call CreateTextTagUnitBJ( "TRIGSTR_068", gg_unit_O000_0082, 8.00, 10.00, 100.00, 100.00, 100.00, 0 )
set udg_ft_Caption[2] = GetLastCreatedTextTag()
call TriggerSleepAction( ( udg_ft_Text_Delay + 1.00 ) )
call DestroyTextTagBJ( udg_ft_Caption[2] )
call TriggerSleepAction( 1.00 )
call EnableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Caption_Swordman takes nothing returns nothing
set gg_trg_Caption_Swordman = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Caption_Swordman, gg_rct_SelectSwordman )
call TriggerAddAction( gg_trg_Caption_Swordman, function Trig_Caption_Swordman_Actions )
endfunction
function Trig_Caption_Druid_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call CreateTextTagUnitBJ( "TRIGSTR_069", gg_unit_HC07_0079, 8.00, 10.00, 100.00, 100.00, 100.00, 0 )
set udg_ft_Caption[1] = GetLastCreatedTextTag()
call TriggerSleepAction( ( udg_ft_Text_Delay + 1.00 ) )
call DestroyTextTagBJ( udg_ft_Caption[1] )
call TriggerSleepAction( 1.00 )
call EnableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Caption_Druid takes nothing returns nothing
set gg_trg_Caption_Druid = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Caption_Druid, gg_rct_SelectDruid )
call TriggerAddAction( gg_trg_Caption_Druid, function Trig_Caption_Druid_Actions )
endfunction
function Trig_Hero_Level_Up_CheckLV10 takes nothing returns boolean
if ( not ( GetHeroLevel(GetTriggerUnit()) == 10 ) ) then
return false
endif
if ( not ( GetUnitUserData(GetTriggerUnit()) == 99 ) ) then
return false
endif
if ( not ( udg_Hero_Type_Table[GetConvertedPlayerId(GetTriggerPlayer())] < 6 ) ) then
return false
endif
return true
endfunction
function Trig_Hero_Level_Up_LV10 takes nothing returns boolean
if ( not Trig_Hero_Level_Up_CheckLV10() ) then
return false
endif
return true
endfunction
function Trig_Hero_Level_Up_CheckLV15 takes nothing returns boolean
if ( not ( GetHeroLevel(GetTriggerUnit()) == 15 ) ) then
return false
endif
if ( not ( GetUnitUserData(GetTriggerUnit()) == 99 ) ) then
return false
endif
if ( not ( udg_Hero_Type_Table[GetConvertedPlayerId(GetTriggerPlayer())] < 6 ) ) then
return false
endif
return true
endfunction
function Trig_Hero_Level_Up_LV15 takes nothing returns boolean
if ( not Trig_Hero_Level_Up_CheckLV15() ) then
return false
endif
return true
endfunction
function Trig_Hero_Level_Up_Actions takes nothing returns nothing
if ( Trig_Hero_Level_Up_LV10()) then
call TriggerExecute( gg_trg_Reset_User_Group )
call SetPlayerHandicapXPBJ( GetTriggerPlayer(), 25.00 + ( 4.00 * I2R(CountPlayersInForceBJ(udg_Hero_Player_User)) ) )
endif
if ( Trig_Hero_Level_Up_LV10()) then
if ( udg_Hero_Type_Table[GetConvertedPlayerId(GetTriggerPlayer())] == 5 ) then
call SetPlayerTechResearchedSwap( 'Recb', 1, GetTriggerPlayer() )
endif
call CreateNUnitsAtLoc( 1, udg_Elite_Hero_Table[udg_Hero_Type_Table[GetConvertedPlayerId(GetTriggerPlayer())]], GetTriggerPlayer(), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING )
call SetHeroStr( GetLastCreatedUnit(), udg_Elite_Hero_Base_Str[udg_Hero_Type_Table[GetConvertedPlayerId(GetTriggerPlayer())]] + udg_Hero_Str_Inc[GetConvertedPlayerId(GetTriggerPlayer())], true )
call SetHeroAgi( GetLastCreatedUnit(), udg_Elite_Hero_Base_Agi[udg_Hero_Type_Table[GetConvertedPlayerId(GetTriggerPlayer())]] + udg_Hero_Agi_Inc[GetConvertedPlayerId(GetTriggerPlayer())], true )
call SetHeroInt( GetLastCreatedUnit(), udg_Elite_Hero_Base_Int[udg_Hero_Type_Table[GetConvertedPlayerId(GetTriggerPlayer())]] + udg_Hero_Int_Inc[GetConvertedPlayerId(GetTriggerPlayer())], true )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call UnitAddItemSwapped( UnitItemInSlotBJ(GetTriggerUnit(), bj_forLoopAIndex), bj_lastCreatedUnit )
call UnitAddItemSwapped( UnitItemInSlotBJ(GetTriggerUnit(), bj_forLoopAIndex), bj_lastReplacedUnit )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call RemoveUnit( GetTriggerUnit() )
call SetUnitUserData( GetLastCreatedUnit(), 99 )
call AddSpecialEffectTargetUnitBJ( "overhead", GetLastCreatedUnit(), "Abilities\\Spells\\Other\\Levelup\\Levelupcaster.mdl" )
set udg_Hero_Type_Table[GetConvertedPlayerId(GetTriggerPlayer())] = ( udg_Hero_Type_Table[GetConvertedPlayerId(GetTriggerPlayer())] + 6 )
call TriggerExecute( gg_trg_Reset_User_Group )
call SetPlayerHandicapXPBJ( GetTriggerPlayer(), 8.00 + 2.00 * I2R(CountPlayersInForceBJ(udg_Hero_Player_User)) )
call SetCameraTargetControllerNoZForPlayer( GetTriggerPlayer(), GetLastCreatedUnit(), 0, 0, false )
endif
endfunction
//===========================================================================
function InitTrig_Hero_Level_Up takes nothing returns nothing
set gg_trg_Hero_Level_Up = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hero_Level_Up, Player(0), EVENT_PLAYER_HERO_LEVEL )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hero_Level_Up, Player(1), EVENT_PLAYER_HERO_LEVEL )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hero_Level_Up, Player(2), EVENT_PLAYER_HERO_LEVEL )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hero_Level_Up, Player(3), EVENT_PLAYER_HERO_LEVEL )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hero_Level_Up, Player(4), EVENT_PLAYER_HERO_LEVEL )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hero_Level_Up, Player(5), EVENT_PLAYER_HERO_LEVEL )
call TriggerAddAction( gg_trg_Hero_Level_Up, function Trig_Hero_Level_Up_Actions )
endfunction
function Trig_Use_Strength_Tome_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'tstr' ) ) then
return false
endif
return true
endfunction
function Trig_Use_Strength_Tome_Actions takes nothing returns nothing
set udg_Hero_Str_Inc[GetConvertedPlayerId(GetTriggerPlayer())] = ( udg_Hero_Str_Inc[GetConvertedPlayerId(GetTriggerPlayer())] + 1 )
endfunction
//===========================================================================
function InitTrig_Use_Strength_Tome takes nothing returns nothing
set gg_trg_Use_Strength_Tome = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Use_Strength_Tome, Player(0), EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Use_Strength_Tome, Player(1), EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Use_Strength_Tome, Player(2), EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Use_Strength_Tome, Player(3), EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Use_Strength_Tome, Player(4), EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Use_Strength_Tome, Player(5), EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_Use_Strength_Tome, Condition( function Trig_Use_Strength_Tome_Conditions ) )
call TriggerAddAction( gg_trg_Use_Strength_Tome, function Trig_Use_Strength_Tome_Actions )
endfunction
function Trig_Use_Strength_Tome_2_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'tst2' ) ) then
return false
endif
return true
endfunction
function Trig_Use_Strength_Tome_2_Actions takes nothing returns nothing
set udg_Hero_Str_Inc[GetConvertedPlayerId(GetTriggerPlayer())] = ( udg_Hero_Str_Inc[GetConvertedPlayerId(GetTriggerPlayer())] + 2 )
endfunction
//===========================================================================
function InitTrig_Use_Strength_Tome_2 takes nothing returns nothing
set gg_trg_Use_Strength_Tome_2 = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Use_Strength_Tome_2, Player(0), EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Use_Strength_Tome_2, Player(1), EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Use_Strength_Tome_2, Player(2), EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Use_Strength_Tome_2, Player(3), EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Use_Strength_Tome_2, Player(4), EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Use_Strength_Tome_2, Player(5), EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_Use_Strength_Tome_2, Condition( function Trig_Use_Strength_Tome_2_Conditions ) )
call TriggerAddAction( gg_trg_Use_Strength_Tome_2, function Trig_Use_Strength_Tome_2_Actions )
endfunction
function Trig_Use_Intelligence_Tome_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'tint' ) ) then
return false
endif
return true
endfunction
function Trig_Use_Intelligence_Tome_Actions takes nothing returns nothing
set udg_Hero_Int_Inc[GetConvertedPlayerId(GetTriggerPlayer())] = ( udg_Hero_Int_Inc[GetConvertedPlayerId(GetTriggerPlayer())] + 1 )
endfunction
//===========================================================================
function InitTrig_Use_Intelligence_Tome takes nothing returns nothing
set gg_trg_Use_Intelligence_Tome = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Use_Intelligence_Tome, Player(0), EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Use_Intelligence_Tome, Player(1), EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Use_Intelligence_Tome, Player(2), EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Use_Intelligence_Tome, Player(3), EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Use_Intelligence_Tome, Player(4), EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Use_Intelligence_Tome, Player(5), EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_Use_Intelligence_Tome, Condition( function Trig_Use_Intelligence_Tome_Conditions ) )
call TriggerAddAction( gg_trg_Use_Intelligence_Tome, function Trig_Use_Intelligence_Tome_Actions )
endfunction
function Trig_Use_Intelligence_Tome_2_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'tin2' ) ) then
return false
endif
return true
endfunction
function Trig_Use_Intelligence_Tome_2_Actions takes nothing returns nothing
set udg_Hero_Int_Inc[GetConvertedPlayerId(GetTriggerPlayer())] = ( udg_Hero_Int_Inc[GetConvertedPlayerId(GetTriggerPlayer())] + 2 )
endfunction
//===========================================================================
function InitTrig_Use_Intelligence_Tome_2 takes nothing returns nothing
set gg_trg_Use_Intelligence_Tome_2 = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Use_Intelligence_Tome_2, Player(0), EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Use_Intelligence_Tome_2, Player(1), EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Use_Intelligence_Tome_2, Player(2), EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Use_Intelligence_Tome_2, Player(3), EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Use_Intelligence_Tome_2, Player(4), EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Use_Intelligence_Tome_2, Player(5), EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_Use_Intelligence_Tome_2, Condition( function Trig_Use_Intelligence_Tome_2_Conditions ) )
call TriggerAddAction( gg_trg_Use_Intelligence_Tome_2, function Trig_Use_Intelligence_Tome_2_Actions )
endfunction
function Trig_Use_Knowledge_Tome_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'tpow' ) ) then
return false
endif
return true
endfunction
function Trig_Use_Knowledge_Tome_Actions takes nothing returns nothing
set udg_Hero_Int_Inc[GetConvertedPlayerId(GetTriggerPlayer())] = ( udg_Hero_Int_Inc[GetConvertedPlayerId(GetTriggerPlayer())] + 1 )
set udg_Hero_Str_Inc[GetConvertedPlayerId(GetTriggerPlayer())] = ( udg_Hero_Str_Inc[GetConvertedPlayerId(GetTriggerPlayer())] + 1 )
set udg_Hero_Agi_Inc[GetConvertedPlayerId(GetTriggerPlayer())] = ( udg_Hero_Agi_Inc[GetConvertedPlayerId(GetTriggerPlayer())] + 1 )
endfunction
//===========================================================================
function InitTrig_Use_Knowledge_Tome takes nothing returns nothing
set gg_trg_Use_Knowledge_Tome = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Use_Knowledge_Tome, Player(0), EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Use_Knowledge_Tome, Player(1), EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Use_Knowledge_Tome, Player(2), EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Use_Knowledge_Tome, Player(3), EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Use_Knowledge_Tome, Player(4), EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Use_Knowledge_Tome, Player(5), EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_Use_Knowledge_Tome, Condition( function Trig_Use_Knowledge_Tome_Conditions ) )
call TriggerAddAction( gg_trg_Use_Knowledge_Tome, function Trig_Use_Knowledge_Tome_Actions )
endfunction
function Trig_Use_Aglity_Tome_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'tdex' ) ) then
return false
endif
return true
endfunction
function Trig_Use_Aglity_Tome_Actions takes nothing returns nothing
set udg_Hero_Agi_Inc[GetConvertedPlayerId(GetTriggerPlayer())] = ( udg_Hero_Agi_Inc[GetConvertedPlayerId(GetTriggerPlayer())] + 1 )
endfunction
//===========================================================================
function InitTrig_Use_Aglity_Tome takes nothing returns nothing
set gg_trg_Use_Aglity_Tome = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Use_Aglity_Tome, Player(0), EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Use_Aglity_Tome, Player(1), EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Use_Aglity_Tome, Player(2), EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Use_Aglity_Tome, Player(3), EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Use_Aglity_Tome, Player(4), EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Use_Aglity_Tome, Player(5), EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_Use_Aglity_Tome, Condition( function Trig_Use_Aglity_Tome_Conditions ) )
call TriggerAddAction( gg_trg_Use_Aglity_Tome, function Trig_Use_Aglity_Tome_Actions )
endfunction
function Trig_Use_Aglity_Tome_2_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'tdx2' ) ) then
return false
endif
return true
endfunction
function Trig_Use_Aglity_Tome_2_Actions takes nothing returns nothing
set udg_Hero_Agi_Inc[GetConvertedPlayerId(GetTriggerPlayer())] = ( udg_Hero_Agi_Inc[GetConvertedPlayerId(GetTriggerPlayer())] + 2 )
endfunction
//===========================================================================
function InitTrig_Use_Aglity_Tome_2 takes nothing returns nothing
set gg_trg_Use_Aglity_Tome_2 = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Use_Aglity_Tome_2, Player(0), EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Use_Aglity_Tome_2, Player(1), EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Use_Aglity_Tome_2, Player(2), EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Use_Aglity_Tome_2, Player(3), EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Use_Aglity_Tome_2, Player(4), EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Use_Aglity_Tome_2, Player(5), EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_Use_Aglity_Tome_2, Condition( function Trig_Use_Aglity_Tome_2_Conditions ) )
call TriggerAddAction( gg_trg_Use_Aglity_Tome_2, function Trig_Use_Aglity_Tome_2_Actions )
endfunction
function Trig_HS_Initialize_Actions takes nothing returns nothing
set udg_Elite_Hero_Base_Str[0] = 30
set udg_Elite_Hero_Base_Str[1] = 30
set udg_Elite_Hero_Base_Str[2] = 50
set udg_Elite_Hero_Base_Str[3] = 60
set udg_Elite_Hero_Base_Str[4] = 20
set udg_Elite_Hero_Base_Str[5] = 35
set udg_Elite_Hero_Base_Agi[0] = 40
set udg_Elite_Hero_Base_Agi[1] = 30
set udg_Elite_Hero_Base_Agi[2] = 25
set udg_Elite_Hero_Base_Agi[3] = 25
set udg_Elite_Hero_Base_Agi[4] = 50
set udg_Elite_Hero_Base_Agi[5] = 15
set udg_Elite_Hero_Base_Int[0] = 30
set udg_Elite_Hero_Base_Int[1] = 40
set udg_Elite_Hero_Base_Int[2] = 25
set udg_Elite_Hero_Base_Int[3] = 15
set udg_Elite_Hero_Base_Int[4] = 30
set udg_Elite_Hero_Base_Int[5] = 45
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set udg_Hero_Agi_Inc[GetForLoopIndexA()] = 0
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set udg_Hero_Int_Inc[GetForLoopIndexA()] = 0
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set udg_Hero_Int_Inc[GetForLoopIndexA()] = 0
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set udg_Elite_Hero_Table[0] = 'EC16'
set udg_Elite_Hero_Table[1] = 'HC04'
set udg_Elite_Hero_Table[2] = 'OC09'
set udg_Elite_Hero_Table[3] = 'OC10'
set udg_Elite_Hero_Table[4] = 'UC28'
set udg_Elite_Hero_Table[5] = 'HC12'
endfunction
//===========================================================================
function InitTrig_HS_Initialize takes nothing returns nothing
set gg_trg_HS_Initialize = CreateTrigger( )
call TriggerAddAction( gg_trg_HS_Initialize, function Trig_HS_Initialize_Actions )
endfunction
function Trig_Hero_NPC_Gain_level_Func001C takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( GetUnitUserData(GetTriggerUnit()) == 99 ) ) then
return false
endif
return true
endfunction
function Trig_Hero_NPC_Gain_level_Conditions takes nothing returns boolean
if ( not Trig_Hero_NPC_Gain_level_Func001C() ) then
return false
endif
return true
endfunction
function Trig_Hero_NPC_Gain_level_Func008001002001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Hero_NPC_Gain_level_Func008001002002 takes nothing returns boolean
return ( GetUnitUserData(GetFilterUnit()) != 99 )
endfunction
function Trig_Hero_NPC_Gain_level_Func008001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Hero_NPC_Gain_level_Func008001002001(), Trig_Hero_NPC_Gain_level_Func008001002002() )
endfunction
function Trig_Hero_NPC_Gain_level_Func008Func001C takes nothing returns boolean
if ( not ( GetHeroLevel(GetTriggerUnit()) > 10 ) ) then
return false
endif
return true
endfunction
function Trig_Hero_NPC_Gain_level_Func008A takes nothing returns nothing
if ( Trig_Hero_NPC_Gain_level_Func008Func001C() ) then
call AddHeroXPSwapped( 500, GetEnumUnit(), true )
else
call AddHeroXPSwapped( 250, GetEnumUnit(), true )
endif
endfunction
function Trig_Hero_NPC_Gain_level_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsOfPlayerMatching(GetOwningPlayer(GetTriggerUnit()), Condition(function Trig_Hero_NPC_Gain_level_Func008001002)), function Trig_Hero_NPC_Gain_level_Func008A )
endfunction
//===========================================================================
function InitTrig_Hero_NPC_Gain_level takes nothing returns nothing
set gg_trg_Hero_NPC_Gain_level = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hero_NPC_Gain_level, Player(0), EVENT_PLAYER_HERO_LEVEL )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hero_NPC_Gain_level, Player(1), EVENT_PLAYER_HERO_LEVEL )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hero_NPC_Gain_level, Player(2), EVENT_PLAYER_HERO_LEVEL )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hero_NPC_Gain_level, Player(3), EVENT_PLAYER_HERO_LEVEL )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hero_NPC_Gain_level, Player(4), EVENT_PLAYER_HERO_LEVEL )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hero_NPC_Gain_level, Player(5), EVENT_PLAYER_HERO_LEVEL )
call TriggerAddCondition( gg_trg_Hero_NPC_Gain_level, Condition( function Trig_Hero_NPC_Gain_level_Conditions ) )
call TriggerAddAction( gg_trg_Hero_NPC_Gain_level, function Trig_Hero_NPC_Gain_level_Actions )
endfunction
function Trig_Hero_Auto_Revieve_Func003C takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( GetUnitUserData(GetTriggerUnit()) == 99 ) ) then
return false
endif
return true
endfunction
function Trig_Hero_Auto_Revieve_Conditions takes nothing returns boolean
if ( not Trig_Hero_Auto_Revieve_Func003C() ) then
return false
endif
return true
endfunction
function Trig_Hero_Auto_Revieve_Actions takes nothing returns nothing
call TriggerSleepAction( GetRandomReal(7.00, 30.00) )
call ReviveHeroLoc( GetTriggerUnit(), GetRandomLocInRect(RectFromCenterSizeBJ(GetUnitLoc(udg_u_Current_Town), 32.00, 32.00)), true )
endfunction
//===========================================================================
function InitTrig_Hero_Auto_Revieve takes nothing returns nothing
set gg_trg_Hero_Auto_Revieve = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hero_Auto_Revieve, Player(0), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hero_Auto_Revieve, Player(1), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hero_Auto_Revieve, Player(2), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hero_Auto_Revieve, Player(3), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hero_Auto_Revieve, Player(4), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hero_Auto_Revieve, Player(5), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Hero_Auto_Revieve, Condition( function Trig_Hero_Auto_Revieve_Conditions ) )
call TriggerAddAction( gg_trg_Hero_Auto_Revieve, function Trig_Hero_Auto_Revieve_Actions )
endfunction
function Trig_Hero_NPC_Die_Func003C takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( GetUnitUserData(GetTriggerUnit()) != 99 ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'ankh') != true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I00F') != true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I002') != true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I00G') != true ) ) then
return false
endif
return true
endfunction
function Trig_Hero_NPC_Die_Conditions takes nothing returns boolean
if ( not Trig_Hero_NPC_Die_Func003C() ) then
return false
endif
return true
endfunction
function Trig_Hero_NPC_Die_Actions takes nothing returns nothing
call TriggerSleepAction( 2 )
call RemoveUnit( GetTriggerUnit() )
endfunction
//===========================================================================
function InitTrig_Hero_NPC_Die takes nothing returns nothing
set gg_trg_Hero_NPC_Die = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Hero_NPC_Die, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Hero_NPC_Die, Condition( function Trig_Hero_NPC_Die_Conditions ) )
call TriggerAddAction( gg_trg_Hero_NPC_Die, function Trig_Hero_NPC_Die_Actions )
endfunction
function Trig_Hero_Dies_Func001C takes nothing returns boolean
if ( not ( IsUnitType(GetDyingUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( GetUnitUserData(GetDyingUnit()) == 99 ) ) then
return false
endif
return true
endfunction
function Trig_Hero_Dies_Conditions takes nothing returns boolean
if ( not Trig_Hero_Dies_Func001C() ) then
return false
endif
return true
endfunction
function Trig_Hero_Dies_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call UnitRemoveItemFromSlotSwapped( GetForLoopIndexA(), GetDyingUnit() )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call UnitSuspendDecayBJ( true, GetDyingUnit() )
endfunction
//===========================================================================
function InitTrig_Hero_Dies takes nothing returns nothing
set gg_trg_Hero_Dies = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hero_Dies, Player(0), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hero_Dies, Player(1), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hero_Dies, Player(2), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hero_Dies, Player(3), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hero_Dies, Player(4), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hero_Dies, Player(5), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Hero_Dies, Condition( function Trig_Hero_Dies_Conditions ) )
call TriggerAddAction( gg_trg_Hero_Dies, function Trig_Hero_Dies_Actions )
endfunction
function Trig_Hero_Equip_Item_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetManipulatingUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( GetItemLevel(GetManipulatedItem()) > GetHeroLevel(GetManipulatingUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Hero_Equip_Item_Func001001001 takes nothing returns boolean
return ( GetFilterPlayer() == GetOwningPlayer(GetManipulatingUnit()) )
endfunction
function Trig_Hero_Equip_Item_Func002C takes nothing returns boolean
if ( not ( GetUnitMoveSpeed(GetManipulatingUnit()) > 0.00 ) ) then
return false
endif
return true
endfunction
function Trig_Hero_Equip_Item_Actions takes nothing returns nothing
call DisplayTextToForce( GetPlayersMatching(Condition(function Trig_Hero_Equip_Item_Func001001001)), ( "|cffFFC840You cannot equip this item, because your level is less than |r" + ( ( "|cffFF0000" + I2S(GetItemLevel(GetManipulatedItem())) ) + "|r" ) ) )
if ( Trig_Hero_Equip_Item_Func002C() ) then
call CreateItemLoc( GetItemTypeId(GetManipulatedItem()), GetUnitLoc(GetManipulatingUnit()) )
else
call CreateItemLoc( GetItemTypeId(GetManipulatedItem()), GetItemLoc(GetManipulatedItem()) )
endif
call RemoveItem( GetManipulatedItem() )
endfunction
//===========================================================================
function InitTrig_Hero_Equip_Item takes nothing returns nothing
set gg_trg_Hero_Equip_Item = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hero_Equip_Item, Player(0), EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hero_Equip_Item, Player(1), EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hero_Equip_Item, Player(2), EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hero_Equip_Item, Player(3), EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hero_Equip_Item, Player(4), EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Hero_Equip_Item, Player(5), EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Hero_Equip_Item, Condition( function Trig_Hero_Equip_Item_Conditions ) )
call TriggerAddAction( gg_trg_Hero_Equip_Item, function Trig_Hero_Equip_Item_Actions )
endfunction
function Trig_Merchant_Buy_Unit_Func008C takes nothing returns boolean
if ( ( GetUnitTypeId(GetBuyingUnit()) == 'EC16' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetBuyingUnit()) == 'EC17' ) ) then
return true
endif
return false
endfunction
function Trig_Merchant_Buy_Unit_Conditions takes nothing returns boolean
if ( not Trig_Merchant_Buy_Unit_Func008C() ) then
return false
endif
return true
endfunction
function Trig_Merchant_Buy_Unit_Func004001001 takes nothing returns boolean
return ( GetFilterPlayer() == GetOwningPlayer(GetBuyingUnit()) )
endfunction
function Trig_Merchant_Buy_Unit_Actions takes nothing returns nothing
set udg_m_fMoneyStore = ( I2R(GetUnitPointValue(GetSoldUnit())) * ( 22.00 / 100.00 ) )
call AdjustPlayerStateBJ( R2I(udg_m_fMoneyStore), GetOwningPlayer(GetBuyingUnit()), PLAYER_STATE_RESOURCE_GOLD )
call AddSpecialEffectTargetUnitBJ( "overhead", GetBuyingUnit(), "UI\\Feedback\\GoldCredit\\GoldCredit.mdl" )
call DisplayTextToForce( GetPlayersMatching(Condition(function Trig_Merchant_Buy_Unit_Func004001001)), ( ( ( "|cff0080C0" + GetPlayerName(GetOwningPlayer(GetBuyingUnit())) ) + " |r has received profit: " ) + ( "|cffFFFF00+" + ( I2S(R2I(udg_m_fMoneyStore)) + " gold|r" ) ) ) )
call PlaySoundOnUnitBJ( gg_snd_ReceiveGold, 100, GetBuyingUnit() )
call TriggerSleepAction( 1.00 )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
endfunction
//===========================================================================
function InitTrig_Merchant_Buy_Unit takes nothing returns nothing
set gg_trg_Merchant_Buy_Unit = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Merchant_Buy_Unit, Player(6), EVENT_PLAYER_UNIT_SELL )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Merchant_Buy_Unit, Player(PLAYER_NEUTRAL_PASSIVE), EVENT_PLAYER_UNIT_SELL )
call TriggerAddCondition( gg_trg_Merchant_Buy_Unit, Condition( function Trig_Merchant_Buy_Unit_Conditions ) )
call TriggerAddAction( gg_trg_Merchant_Buy_Unit, function Trig_Merchant_Buy_Unit_Actions )
endfunction
function Trig_Merchant_Buy_Item_Func008C takes nothing returns boolean
if ( ( GetUnitTypeId(GetBuyingUnit()) == 'EC16' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetBuyingUnit()) == 'EC17' ) ) then
return true
endif
return false
endfunction
function Trig_Merchant_Buy_Item_Conditions takes nothing returns boolean
if ( not Trig_Merchant_Buy_Item_Func008C() ) then
return false
endif
return true
endfunction
function Trig_Merchant_Buy_Item_Func004001001 takes nothing returns boolean
return ( GetFilterPlayer() == GetOwningPlayer(GetBuyingUnit()) )
endfunction
function Trig_Merchant_Buy_Item_Actions takes nothing returns nothing
set udg_m_fMoneyStore = ( GetItemLifeBJ(GetSoldItem()) * ( 22.00 / 100.00 ) )
call AdjustPlayerStateBJ( R2I(udg_m_fMoneyStore), GetOwningPlayer(GetBuyingUnit()), PLAYER_STATE_RESOURCE_GOLD )
call AddSpecialEffectTargetUnitBJ( "overhead", GetBuyingUnit(), "UI\\Feedback\\GoldCredit\\GoldCredit.mdl" )
call DisplayTextToForce( GetPlayersMatching(Condition(function Trig_Merchant_Buy_Item_Func004001001)), ( ( ( "|cff0080C0" + GetPlayerName(GetOwningPlayer(GetBuyingUnit())) ) + " |r has received profit: " ) + ( "|cffFFFF00+" + ( I2S(R2I(udg_m_fMoneyStore)) + " gold|r" ) ) ) )
call PlaySoundOnUnitBJ( gg_snd_ReceiveGold, 100, GetBuyingUnit() )
call TriggerSleepAction( 1.00 )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
endfunction
//===========================================================================
function InitTrig_Merchant_Buy_Item takes nothing returns nothing
set gg_trg_Merchant_Buy_Item = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Merchant_Buy_Item, Player(6), EVENT_PLAYER_UNIT_SELL_ITEM )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Merchant_Buy_Item, Player(PLAYER_NEUTRAL_PASSIVE), EVENT_PLAYER_UNIT_SELL_ITEM )
call TriggerAddCondition( gg_trg_Merchant_Buy_Item, Condition( function Trig_Merchant_Buy_Item_Conditions ) )
call TriggerAddAction( gg_trg_Merchant_Buy_Item, function Trig_Merchant_Buy_Item_Actions )
endfunction
function Trig_Merchant_Sell_Item_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSellingUnit()) == 'oC06' ) ) then
return false
endif
return true
endfunction
function Trig_Merchant_Sell_Item_Func005001001 takes nothing returns boolean
return ( GetFilterPlayer() == GetOwningPlayer(GetSellingUnit()) )
endfunction
function Trig_Merchant_Sell_Item_Actions takes nothing returns nothing
set udg_m_fMoneyStore = GetItemLifeBJ(GetSoldItem())
call AdjustPlayerStateBJ( R2I(( udg_m_fMoneyStore * ( 42.00 / 100.00 ) )), GetOwningPlayer(GetSellingUnit()), PLAYER_STATE_RESOURCE_GOLD )
call AddSpecialEffectTargetUnitBJ( "overhead", GetSellingUnit(), "UI\\Feedback\\GoldCredit\\GoldCredit.mdl" )
call DisplayTextToForce( GetPlayersMatching(Condition(function Trig_Merchant_Sell_Item_Func005001001)), ( ( ( "|cff0080C0" + GetPlayerName(GetOwningPlayer(GetSellingUnit())) ) + " |r has received profit: " ) + ( "|cffFFFF00+" + ( I2S(R2I(udg_m_fMoneyStore)) + " gold|r" ) ) ) )
call PlaySoundOnUnitBJ( gg_snd_ReceiveGold, 100, GetSellingUnit() )
call TriggerSleepAction( 1.00 )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
endfunction
//===========================================================================
function InitTrig_Merchant_Sell_Item takes nothing returns nothing
set gg_trg_Merchant_Sell_Item = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Merchant_Sell_Item, EVENT_PLAYER_UNIT_SELL_ITEM )
call TriggerAddCondition( gg_trg_Merchant_Sell_Item, Condition( function Trig_Merchant_Sell_Item_Conditions ) )
call TriggerAddAction( gg_trg_Merchant_Sell_Item, function Trig_Merchant_Sell_Item_Actions )
endfunction
function Trig_Building_had_been_Sold_Func001Func002C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'hhou' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'hlum' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'hwtw' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'hgtw' ) ) then
return true
endif
return false
endfunction
function Trig_Building_had_been_Sold_Func001C takes nothing returns boolean
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("stomp") ) ) then
return false
endif
if ( not Trig_Building_had_been_Sold_Func001Func002C() ) then
return false
endif
return true
endfunction
function Trig_Building_had_been_Sold_Conditions takes nothing returns boolean
if ( not Trig_Building_had_been_Sold_Func001C() ) then
return false
endif
return true
endfunction
function Trig_Building_had_been_Sold_Func008C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'hhou' ) ) then
return false
endif
return true
endfunction
function Trig_Building_had_been_Sold_Func009C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'hlum' ) ) then
return false
endif
return true
endfunction
function Trig_Building_had_been_Sold_Func010C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'hwtw' ) ) then
return false
endif
return true
endfunction
function Trig_Building_had_been_Sold_Func011C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'hgtw' ) ) then
return false
endif
return true
endfunction
function Trig_Building_had_been_Sold_Actions takes nothing returns nothing
if ( Trig_Building_had_been_Sold_Func008C() ) then
call AdjustPlayerStateBJ( 1000, GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 200, GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_LUMBER )
else
endif
if ( Trig_Building_had_been_Sold_Func009C() ) then
call AdjustPlayerStateBJ( 100, GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_GOLD )
else
endif
if ( Trig_Building_had_been_Sold_Func010C() ) then
call AdjustPlayerStateBJ( 20, GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 15, GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_LUMBER )
else
endif
if ( Trig_Building_had_been_Sold_Func011C() ) then
call AdjustPlayerStateBJ( 65, GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 45, GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_LUMBER )
else
endif
call SetUnitExplodedBJ( GetTriggerUnit(), true )
call KillUnit( GetTriggerUnit() )
endfunction
//===========================================================================
function InitTrig_Building_had_been_Sold takes nothing returns nothing
set gg_trg_Building_had_been_Sold = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Building_had_been_Sold, Player(0), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Building_had_been_Sold, Player(1), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Building_had_been_Sold, Player(2), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Building_had_been_Sold, Player(3), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Building_had_been_Sold, Player(4), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Building_had_been_Sold, Player(5), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerAddCondition( gg_trg_Building_had_been_Sold, Condition( function Trig_Building_had_been_Sold_Conditions ) )
call TriggerAddAction( gg_trg_Building_had_been_Sold, function Trig_Building_had_been_Sold_Actions )
endfunction
function Trig_Drop_Item_Func002001 takes nothing returns boolean
return ( udg_Enemy_Level == 100 )
endfunction
function Trig_Drop_Item_Func003001 takes nothing returns boolean
return ( GetRandomInt(1, 100) <= udg_Drop_Item_Chance_Table[udg_Enemy_Level] )
endfunction
function Trig_Drop_Item_Actions takes nothing returns nothing
set udg_Enemy_Level = GetUnitPointValue(GetTriggerUnit())
if ( Trig_Drop_Item_Func002001() ) then
return
else
call DoNothing( )
endif
if ( Trig_Drop_Item_Func003001() ) then
call CreateItemLoc( ChooseRandomItemBJ(GetRandomInt(udg_Drop_Item_Min_Level_Table[udg_Enemy_Level], udg_Drop_Item_Max_Level_Table[udg_Enemy_Level])), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Drop_Item takes nothing returns nothing
set gg_trg_Drop_Item = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Drop_Item, Player(8), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddAction( gg_trg_Drop_Item, function Trig_Drop_Item_Actions )
endfunction
function Trig_ES_Initialize_Actions takes nothing returns nothing
call TriggerExecute( gg_trg_Set_NW_Enemy )
call StartTimerBJ( udg_Enemy_Regen_Timer, true, 60.00 )
set udg_Drop_Item_Min_Level_Table[1] = 1
set udg_Drop_Item_Max_Level_Table[1] = 2
set udg_Drop_Item_Chance_Table[1] = 15
set udg_Drop_Item_Min_Level_Table[2] = 1
set udg_Drop_Item_Max_Level_Table[2] = 3
set udg_Drop_Item_Chance_Table[2] = 16
set udg_Drop_Item_Min_Level_Table[3] = 1
set udg_Drop_Item_Max_Level_Table[3] = 4
set udg_Drop_Item_Chance_Table[3] = 15
set udg_Drop_Item_Min_Level_Table[4] = 2
set udg_Drop_Item_Max_Level_Table[4] = 6
set udg_Drop_Item_Chance_Table[4] = 15
set udg_Drop_Item_Min_Level_Table[5] = 3
set udg_Drop_Item_Max_Level_Table[5] = 7
set udg_Drop_Item_Chance_Table[5] = 14
set udg_Drop_Item_Min_Level_Table[6] = 4
set udg_Drop_Item_Max_Level_Table[6] = 8
set udg_Drop_Item_Chance_Table[6] = 14
endfunction
//===========================================================================
function InitTrig_ES_Initialize takes nothing returns nothing
set gg_trg_ES_Initialize = CreateTrigger( )
call TriggerAddAction( gg_trg_ES_Initialize, function Trig_ES_Initialize_Actions )
endfunction
function Trig_Enemy_Regeneration_Timer_Func001001 takes nothing returns boolean
return ( udg_Enemy_Group_Num_1 == 0 )
endfunction
function Trig_Enemy_Regeneration_Timer_Func003003001001 takes nothing returns boolean
return ( udg_Enemy_Region_Flag_1[GetForLoopIndexA()] == false )
endfunction
function Trig_Enemy_Regeneration_Timer_Func003003001002 takes nothing returns boolean
return ( CountUnitsInGroup(GetUnitsInRectAll(udg_Enemy_Region_Table_1[GetForLoopIndexA()])) == 0 )
endfunction
function Trig_Enemy_Regeneration_Timer_Func003003001 takes nothing returns boolean
return GetBooleanAnd( Trig_Enemy_Regeneration_Timer_Func003003001001(), Trig_Enemy_Regeneration_Timer_Func003003001002() )
endfunction
function Trig_Enemy_Regeneration_Timer_Func004001 takes nothing returns boolean
return ( udg_Enemy_Group_Num_2 == 0 )
endfunction
function Trig_Enemy_Regeneration_Timer_Func006003001001 takes nothing returns boolean
return ( udg_Enemy_Region_Flag_2[GetForLoopIndexA()] == false )
endfunction
function Trig_Enemy_Regeneration_Timer_Func006003001002 takes nothing returns boolean
return ( CountUnitsInGroup(GetUnitsInRectAll(udg_Enemy_Region_Table_2[GetForLoopIndexA()])) == 0 )
endfunction
function Trig_Enemy_Regeneration_Timer_Func006003001 takes nothing returns boolean
return GetBooleanAnd( Trig_Enemy_Regeneration_Timer_Func006003001001(), Trig_Enemy_Regeneration_Timer_Func006003001002() )
endfunction
function Trig_Enemy_Regeneration_Timer_Actions takes nothing returns nothing
if ( Trig_Enemy_Regeneration_Timer_Func001001() ) then
return
else
call DoNothing( )
endif
call TriggerExecute( gg_trg_Reset_All_Enemies_1 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = udg_Enemy_Group_Num_1
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Enemy_Regeneration_Timer_Func003003001() ) then
set udg_Enemy_Region_Flag_1[GetForLoopIndexA()] = true
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
if ( Trig_Enemy_Regeneration_Timer_Func004001() ) then
return
else
call DoNothing( )
endif
call TriggerExecute( gg_trg_Reset_All_Enemies_2 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = udg_Enemy_Group_Num_2
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Enemy_Regeneration_Timer_Func006003001() ) then
set udg_Enemy_Region_Flag_2[GetForLoopIndexA()] = true
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Enemy_Regeneration_Timer takes nothing returns nothing
set gg_trg_Enemy_Regeneration_Timer = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_Enemy_Regeneration_Timer, udg_Enemy_Regen_Timer )
call TriggerAddAction( gg_trg_Enemy_Regeneration_Timer, function Trig_Enemy_Regeneration_Timer_Actions )
endfunction
function Trig_Reset_All_Enemies_1_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = udg_Enemy_Region_Num_1
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( udg_Enemy_Region_Flag_1[GetForLoopIndexA()] == true ) then
set udg_Enemy_Region_Param = udg_Enemy_Region_Table_1[GetForLoopIndexA()]
call TriggerExecute( gg_trg_Create_Enemies_1_In_Region )
set udg_Enemy_Region_Flag_1[GetForLoopIndexA()] = false
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Reset_All_Enemies_1 takes nothing returns nothing
set gg_trg_Reset_All_Enemies_1 = CreateTrigger( )
call TriggerAddAction( gg_trg_Reset_All_Enemies_1, function Trig_Reset_All_Enemies_1_Actions )
endfunction
function Trig_Reset_All_Enemies_2_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = udg_Enemy_Region_Num_2
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( udg_Enemy_Region_Flag_2[GetForLoopIndexA()] == true ) then
set udg_Enemy_Region_Param = udg_Enemy_Region_Table_2[GetForLoopIndexA()]
call TriggerExecute( gg_trg_Create_Enemies_2_In_Region )
set udg_Enemy_Region_Flag_2[GetForLoopIndexA()] = false
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Reset_All_Enemies_2 takes nothing returns nothing
set gg_trg_Reset_All_Enemies_2 = CreateTrigger( )
call TriggerAddAction( gg_trg_Reset_All_Enemies_2, function Trig_Reset_All_Enemies_2_Actions )
endfunction
function Trig_Set_NW_Enemy_Actions takes nothing returns nothing
set udg_Enemy_Group_1[1] = 'nban'
set udg_Enemy_Group_1[2] = 'nbrg'
set udg_Enemy_Group_1[3] = 'nrog'
set udg_Enemy_Group_1[4] = 'nass'
set udg_Enemy_Group_1[5] = 'nenf'
set udg_Enemy_Group_1[6] = 'nhdc'
set udg_Enemy_Group_1[7] = 'nwiz'
set udg_Enemy_Group_1[8] = 'nwzr'
set udg_Enemy_Group_1[9] = 'nwzg'
set udg_Enemy_Group_1[10] = 'owar'
set udg_Enemy_Group_1[11] = 'njks'
call TriggerExecute( gg_trg_Set_NW_Enemy_Region )
set udg_Enemy_Group_Num_1 = 11
set udg_Enemy_Num_Min = 3
set udg_Enemy_Num_Max = 6
set udg_Enemy_Region_Num_1 = 16
set udg_Enemy_Group_Num_2 = 0
set udg_Enemy_Acquisition_Range = 400.00
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = udg_Enemy_Region_Num_1
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set udg_Enemy_Region_Flag_1[GetForLoopIndexA()] = true
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call TriggerExecute( gg_trg_Reset_All_Enemies_1 )
endfunction
//===========================================================================
function InitTrig_Set_NW_Enemy takes nothing returns nothing
set gg_trg_Set_NW_Enemy = CreateTrigger( )
call TriggerAddAction( gg_trg_Set_NW_Enemy, function Trig_Set_NW_Enemy_Actions )
endfunction
function Trig_Set_NW_Enemy_Region_Actions takes nothing returns nothing
set udg_Enemy_Region_Table_1[1] = gg_rct_Monster1_01
set udg_Enemy_Region_Table_1[2] = gg_rct_Monster1_02
set udg_Enemy_Region_Table_1[3] = gg_rct_Monster1_03
set udg_Enemy_Region_Table_1[4] = gg_rct_Monster1_04
set udg_Enemy_Region_Table_1[5] = gg_rct_Monster1_05
set udg_Enemy_Region_Table_1[6] = gg_rct_Monster1_06
set udg_Enemy_Region_Table_1[7] = gg_rct_Monster1_07
set udg_Enemy_Region_Table_1[8] = gg_rct_Monster1_08
set udg_Enemy_Region_Table_1[9] = gg_rct_Monster1_09
set udg_Enemy_Region_Table_1[10] = gg_rct_Monster1_10
set udg_Enemy_Region_Table_1[11] = gg_rct_Monster1_11
set udg_Enemy_Region_Table_1[12] = gg_rct_Monster1_12
set udg_Enemy_Region_Table_1[13] = gg_rct_Monster1_13
set udg_Enemy_Region_Table_1[14] = gg_rct_Monster1_14
set udg_Enemy_Region_Table_1[15] = gg_rct_Monster1_15
set udg_Enemy_Region_Table_1[16] = gg_rct_Region_168
endfunction
//===========================================================================
function InitTrig_Set_NW_Enemy_Region takes nothing returns nothing
set gg_trg_Set_NW_Enemy_Region = CreateTrigger( )
call TriggerAddAction( gg_trg_Set_NW_Enemy_Region, function Trig_Set_NW_Enemy_Region_Actions )
endfunction
function Trig_Set_BL_Enemy_Actions takes nothing returns nothing
set udg_Enemy_Group_1[1] = 'ncea'
set udg_Enemy_Group_1[2] = 'ncer'
set udg_Enemy_Group_1[3] = 'ncim'
set udg_Enemy_Group_1[4] = 'ncen'
set udg_Enemy_Group_1[5] = 'ncks'
set udg_Enemy_Group_1[6] = 'ncnk'
set udg_Enemy_Group_1[7] = 'nitw'
set udg_Enemy_Group_1[8] = 'nftk'
set udg_Enemy_Group_1[9] = 'ndtw'
set udg_Enemy_Group_1[10] = 'nstl'
set udg_Enemy_Group_1[11] = 'nsbm'
set udg_Enemy_Group_1[12] = 'nfrg'
set udg_Enemy_Group_1[13] = 'ohun'
set udg_Enemy_Group_1[14] = 'okod'
set udg_Enemy_Group_1[15] = 'odoc'
set udg_Enemy_Group_1[16] = 'oshm'
set udg_Enemy_Group_1[17] = 'ospw'
set udg_Enemy_Group_1[18] = 'uabo'
set udg_Enemy_Group_1[19] = 'ucry'
set udg_Enemy_Group_1[20] = 'ugar'
set udg_Enemy_Group_1[21] = 'uban'
set udg_Enemy_Group_1[22] = 'unec'
set udg_Enemy_Group_1[23] = 'nw2w'
set udg_Enemy_Group_1[24] = 'nchw'
set udg_Enemy_Group_2[1] = 'ndrf'
set udg_Enemy_Group_2[2] = 'ndrm'
set udg_Enemy_Group_2[3] = 'ndrp'
set udg_Enemy_Group_2[4] = 'ndrw'
set udg_Enemy_Group_2[5] = 'ndrd'
set udg_Enemy_Group_2[6] = 'ndrs'
set udg_Enemy_Group_2[7] = 'hfoo'
set udg_Enemy_Group_2[8] = 'nfov'
set udg_Enemy_Group_2[9] = 'nnwq'
set udg_Enemy_Group_2[10] = 'nogl'
set udg_Enemy_Group_2[11] = 'nahy'
set udg_Enemy_Group_2[12] = 'hkni'
set udg_Enemy_Group_2[13] = 'njks'
set udg_Enemy_Group_2[14] = 'nhym'
set udg_Enemy_Group_2[15] = 'h00F'
set udg_Enemy_Group_2[16] = 'nbld'
set udg_Enemy_Group_2[17] = 'nwzd'
call TriggerExecute( gg_trg_Set_BL_Enemy_Region )
set udg_Enemy_Group_Num_1 = 24
set udg_Enemy_Region_Num_1 = 26
set udg_Enemy_Group_Num_2 = 17
set udg_Enemy_Region_Num_2 = 17
set udg_Enemy_Num_Min = 4
set udg_Enemy_Num_Max = 6
set udg_Enemy_Acquisition_Range = 400.00
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = udg_Enemy_Region_Num_1
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set udg_Enemy_Region_Flag_1[GetForLoopIndexA()] = true
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call TriggerExecute( gg_trg_Reset_All_Enemies_1 )
call TriggerSleepAction( 5.00 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = udg_Enemy_Region_Num_2
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set udg_Enemy_Region_Flag_2[GetForLoopIndexA()] = true
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call TriggerExecute( gg_trg_Reset_All_Enemies_2 )
endfunction
//===========================================================================
function InitTrig_Set_BL_Enemy takes nothing returns nothing
set gg_trg_Set_BL_Enemy = CreateTrigger( )
call TriggerAddAction( gg_trg_Set_BL_Enemy, function Trig_Set_BL_Enemy_Actions )
endfunction
function Trig_Set_BL_Enemy_Region_Actions takes nothing returns nothing
set udg_Enemy_Region_Table_1[1] = gg_rct_Monster2_01
set udg_Enemy_Region_Table_1[2] = gg_rct_Monster2_02
set udg_Enemy_Region_Table_1[3] = gg_rct_Monster2_03
set udg_Enemy_Region_Table_1[4] = gg_rct_Monster2_04
set udg_Enemy_Region_Table_1[5] = gg_rct_Monster2_05
set udg_Enemy_Region_Table_1[6] = gg_rct_Monster2_06
set udg_Enemy_Region_Table_1[7] = gg_rct_Monster2_07
set udg_Enemy_Region_Table_1[8] = gg_rct_Monster2_08
set udg_Enemy_Region_Table_1[9] = gg_rct_Monster2_09
set udg_Enemy_Region_Table_1[10] = gg_rct_Monster2_10
set udg_Enemy_Region_Table_1[11] = gg_rct_Monster2_11
set udg_Enemy_Region_Table_1[12] = gg_rct_Monster2_12
set udg_Enemy_Region_Table_1[13] = gg_rct_Monster2_13
set udg_Enemy_Region_Table_1[14] = gg_rct_Monster2_14
set udg_Enemy_Region_Table_1[15] = gg_rct_Monster2_15
set udg_Enemy_Region_Table_1[16] = gg_rct_Monster2_16
set udg_Enemy_Region_Table_1[17] = gg_rct_Monster2_17
set udg_Enemy_Region_Table_1[18] = gg_rct_Monster2_18
set udg_Enemy_Region_Table_1[19] = gg_rct_Monster2_19
set udg_Enemy_Region_Table_1[20] = gg_rct_Monster2_20
set udg_Enemy_Region_Table_1[21] = gg_rct_Monster2_21
set udg_Enemy_Region_Table_1[22] = gg_rct_Monster2_22
set udg_Enemy_Region_Table_1[23] = gg_rct_Monster2_23
set udg_Enemy_Region_Table_1[24] = gg_rct_Monster2_24
set udg_Enemy_Region_Table_1[25] = gg_rct_Region_135
set udg_Enemy_Region_Table_1[26] = gg_rct_Region_137
set udg_Enemy_Region_Table_2[1] = gg_rct_Monster3_01
set udg_Enemy_Region_Table_2[2] = gg_rct_Monster3_02
set udg_Enemy_Region_Table_2[3] = gg_rct_Monster3_03
set udg_Enemy_Region_Table_2[4] = gg_rct_Monster3_04
set udg_Enemy_Region_Table_2[5] = gg_rct_Monster3_05
set udg_Enemy_Region_Table_2[6] = gg_rct_Monster3_06
set udg_Enemy_Region_Table_2[7] = gg_rct_Monster3_07
set udg_Enemy_Region_Table_2[8] = gg_rct_Monster3_08
set udg_Enemy_Region_Table_2[9] = gg_rct_Monster3_09
set udg_Enemy_Region_Table_2[10] = gg_rct_Monster3_10
set udg_Enemy_Region_Table_2[11] = gg_rct_Monster3_11
set udg_Enemy_Region_Table_2[12] = gg_rct_Monster3_12
set udg_Enemy_Region_Table_2[13] = gg_rct_Monster3_13
set udg_Enemy_Region_Table_2[14] = gg_rct_Monster3_14
set udg_Enemy_Region_Table_2[15] = gg_rct_Monster3_15
set udg_Enemy_Region_Table_2[16] = gg_rct_Monster3_16
set udg_Enemy_Region_Table_2[17] = gg_rct_Monster3_17
endfunction
//===========================================================================
function InitTrig_Set_BL_Enemy_Region takes nothing returns nothing
set gg_trg_Set_BL_Enemy_Region = CreateTrigger( )
call TriggerAddAction( gg_trg_Set_BL_Enemy_Region, function Trig_Set_BL_Enemy_Region_Actions )
endfunction
function Trig_Set_DM_Enemy_Actions takes nothing returns nothing
set udg_Enemy_Group_1[1] = 'ntrd'
set udg_Enemy_Group_1[2] = 'otbr'
set udg_Enemy_Group_1[3] = 'nsth'
set udg_Enemy_Group_1[4] = 'njgb'
set udg_Enemy_Group_1[5] = 'nsgg'
set udg_Enemy_Group_1[6] = 'nsqa'
set udg_Enemy_Group_1[7] = 'nnrg'
set udg_Enemy_Group_2[1] = 'uC36'
set udg_Enemy_Group_2[2] = 'nsog'
set udg_Enemy_Group_2[3] = 'nsoc'
set udg_Enemy_Group_2[4] = 'nsrn'
set udg_Enemy_Group_2[5] = 'nsrw'
call TriggerExecute( gg_trg_Set_DM_Enemy_Region )
set udg_Enemy_Group_Num_1 = 7
set udg_Enemy_Region_Num_1 = 15
set udg_Enemy_Group_Num_2 = 5
set udg_Enemy_Region_Num_2 = 21
set udg_Enemy_Num_Min = 4
set udg_Enemy_Num_Max = 7
set udg_Enemy_Acquisition_Range = 300.00
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = udg_Enemy_Region_Num_1
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set udg_Enemy_Region_Flag_1[GetForLoopIndexA()] = true
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call TriggerExecute( gg_trg_Reset_All_Enemies_1 )
call TriggerSleepAction( 5.00 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = udg_Enemy_Region_Num_2
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set udg_Enemy_Region_Flag_2[GetForLoopIndexA()] = true
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call TriggerExecute( gg_trg_Reset_All_Enemies_2 )
endfunction
//===========================================================================
function InitTrig_Set_DM_Enemy takes nothing returns nothing
set gg_trg_Set_DM_Enemy = CreateTrigger( )
call TriggerAddAction( gg_trg_Set_DM_Enemy, function Trig_Set_DM_Enemy_Actions )
endfunction
function Trig_Set_DM_Enemy_Region_Actions takes nothing returns nothing
set udg_Enemy_Region_Table_1[1] = gg_rct_Monster4_01
set udg_Enemy_Region_Table_1[2] = gg_rct_Monster4_02
set udg_Enemy_Region_Table_1[3] = gg_rct_Monster4_03
set udg_Enemy_Region_Table_1[4] = gg_rct_Monster4_04
set udg_Enemy_Region_Table_1[5] = gg_rct_Monster4_05
set udg_Enemy_Region_Table_1[6] = gg_rct_Monster4_06
set udg_Enemy_Region_Table_1[7] = gg_rct_Monster4_07
set udg_Enemy_Region_Table_1[8] = gg_rct_Monster4_08
set udg_Enemy_Region_Table_1[9] = gg_rct_Monster4_09
set udg_Enemy_Region_Table_1[10] = gg_rct_Monster4_10
set udg_Enemy_Region_Table_1[11] = gg_rct_Monster4_11
set udg_Enemy_Region_Table_1[12] = gg_rct_Monster4_12
set udg_Enemy_Region_Table_1[13] = gg_rct_Monster4_13
set udg_Enemy_Region_Table_1[14] = gg_rct_Monster4_14
// set udg_Enemy_Region_Table_1[15] = gg_rct_Region_151
set udg_Enemy_Region_Table_2[1] = gg_rct_Monster5_01
set udg_Enemy_Region_Table_2[2] = gg_rct_Monster5_02
set udg_Enemy_Region_Table_2[3] = gg_rct_Monster5_03
set udg_Enemy_Region_Table_2[4] = gg_rct_Monster5_04
set udg_Enemy_Region_Table_2[5] = gg_rct_Monster5_05
set udg_Enemy_Region_Table_2[6] = gg_rct_Monster5_06
set udg_Enemy_Region_Table_2[7] = gg_rct_Monster5_07
set udg_Enemy_Region_Table_2[8] = gg_rct_Monster5_08
set udg_Enemy_Region_Table_2[9] = gg_rct_Monster5_09
set udg_Enemy_Region_Table_2[10] = gg_rct_Monster5_10
set udg_Enemy_Region_Table_2[11] = gg_rct_Monster5_11
set udg_Enemy_Region_Table_2[12] = gg_rct_Monster5_12
set udg_Enemy_Region_Table_2[13] = gg_rct_Monster5_13
set udg_Enemy_Region_Table_2[14] = gg_rct_Monster5_14
set udg_Enemy_Region_Table_2[15] = gg_rct_Monster5_15
set udg_Enemy_Region_Table_2[16] = gg_rct_Monster5_16
set udg_Enemy_Region_Table_2[17] = gg_rct_Monster5_17
set udg_Enemy_Region_Table_2[18] = gg_rct_Monster5_18
set udg_Enemy_Region_Table_2[19] = gg_rct_Region_169
set udg_Enemy_Region_Table_2[20] = gg_rct_Region_170
set udg_Enemy_Region_Table_2[21] = gg_rct_Region_171
endfunction
//===========================================================================
function InitTrig_Set_DM_Enemy_Region takes nothing returns nothing
set gg_trg_Set_DM_Enemy_Region = CreateTrigger( )
call TriggerAddAction( gg_trg_Set_DM_Enemy_Region, function Trig_Set_DM_Enemy_Region_Actions )
endfunction
function Trig_Set_COD_Enemy_Actions takes nothing returns nothing
set udg_Enemy_Group_1[1] = 'nbwm'
set udg_Enemy_Group_1[2] = 'nC42'
set udg_Enemy_Group_1[3] = 'nC41'
set udg_Enemy_Group_1[4] = 'nfod'
set udg_Enemy_Group_1[5] = 'nndr'
set udg_Enemy_Group_1[6] = 'nsth'
set udg_Enemy_Group_1[7] = 'nsln'
set udg_Enemy_Group_1[8] = 'nvde'
set udg_Enemy_Group_1[9] = 'ndqs'
set udg_Enemy_Group_2[1] = 'n00E'
set udg_Enemy_Group_2[2] = 'nC41'
set udg_Enemy_Group_2[3] = 'nC42'
set udg_Enemy_Group_2[4] = 'nC39'
set udg_Enemy_Group_2[5] = 'nC38'
set udg_Enemy_Group_2[6] = 'uC37'
set udg_Enemy_Group_2[7] = 'nrvd'
set udg_Enemy_Group_2[8] = 'njgb'
set udg_Enemy_Group_2[9] = 'nfod'
set udg_Enemy_Group_2[10] = 'nmdr'
set udg_Enemy_Group_2[11] = 'nbdo'
call TriggerExecute( gg_trg_Set_COD_Enemy_Region )
set udg_Enemy_Group_Num_1 = 9
set udg_Enemy_Region_Num_1 = 21
set udg_Enemy_Group_Num_2 = 11
set udg_Enemy_Region_Num_2 = 16
set udg_Enemy_Num_Min = 5
set udg_Enemy_Num_Max = 10
set udg_Enemy_Acquisition_Range = 500.00
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = udg_Enemy_Region_Num_1
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set udg_Enemy_Region_Flag_1[GetForLoopIndexA()] = true
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call TriggerExecute( gg_trg_Reset_All_Enemies_1 )
endfunction
//===========================================================================
function InitTrig_Set_COD_Enemy takes nothing returns nothing
set gg_trg_Set_COD_Enemy = CreateTrigger( )
call TriggerAddAction( gg_trg_Set_COD_Enemy, function Trig_Set_COD_Enemy_Actions )
endfunction
function Trig_Set_COD_Enemy_Region_Actions takes nothing returns nothing
set udg_Enemy_Region_Table_1[1] = gg_rct_Monster6_01
set udg_Enemy_Region_Table_1[2] = gg_rct_Monster6_02
set udg_Enemy_Region_Table_1[3] = gg_rct_Monster6_03
set udg_Enemy_Region_Table_1[4] = gg_rct_Monster6_04
set udg_Enemy_Region_Table_1[5] = gg_rct_Monster6_05
set udg_Enemy_Region_Table_1[6] = gg_rct_Monster6_06
set udg_Enemy_Region_Table_1[7] = gg_rct_Monster6_07
set udg_Enemy_Region_Table_1[8] = gg_rct_Monster6_08
set udg_Enemy_Region_Table_1[9] = gg_rct_Monster6_09
set udg_Enemy_Region_Table_1[10] = gg_rct_Monster6_10
set udg_Enemy_Region_Table_1[11] = gg_rct_Monster6_11
set udg_Enemy_Region_Table_1[12] = gg_rct_Monster6_12
set udg_Enemy_Region_Table_1[13] = gg_rct_Monster6_13
set udg_Enemy_Region_Table_1[14] = gg_rct_Monster6_14
set udg_Enemy_Region_Table_1[15] = gg_rct_Monster6_15
set udg_Enemy_Region_Table_1[16] = gg_rct_Monster6_16
set udg_Enemy_Region_Table_1[17] = gg_rct_Monster6_17
set udg_Enemy_Region_Table_1[18] = gg_rct_Monster6_18
set udg_Enemy_Region_Table_1[19] = gg_rct_Monster6_19
set udg_Enemy_Region_Table_1[20] = gg_rct_Monster6_20
set udg_Enemy_Region_Table_1[21] = gg_rct_Monster6_21
set udg_Enemy_Region_Table_2[1] = gg_rct_Monster6_22
set udg_Enemy_Region_Table_2[2] = gg_rct_Monster6_23
set udg_Enemy_Region_Table_2[3] = gg_rct_Monster6_24
set udg_Enemy_Region_Table_2[4] = gg_rct_Monster6_25
set udg_Enemy_Region_Table_2[5] = gg_rct_Monster6_26
set udg_Enemy_Region_Table_2[6] = gg_rct_Region_172
set udg_Enemy_Region_Table_2[7] = gg_rct_Region_173
set udg_Enemy_Region_Table_2[8] = gg_rct_Region_174
set udg_Enemy_Region_Table_2[9] = gg_rct_Region_175
set udg_Enemy_Region_Table_2[10] = gg_rct_Region_176
set udg_Enemy_Region_Table_2[11] = gg_rct_Region_177
set udg_Enemy_Region_Table_2[12] = gg_rct_Region_178
set udg_Enemy_Region_Table_2[13] = gg_rct_Region_179
set udg_Enemy_Region_Table_2[14] = gg_rct_Region_180
set udg_Enemy_Region_Table_2[15] = gg_rct_Region_181
set udg_Enemy_Region_Table_2[16] = gg_rct_Region_182
endfunction
//===========================================================================
function InitTrig_Set_COD_Enemy_Region takes nothing returns nothing
set gg_trg_Set_COD_Enemy_Region = CreateTrigger( )
call TriggerAddAction( gg_trg_Set_COD_Enemy_Region, function Trig_Set_COD_Enemy_Region_Actions )
endfunction
function Trig_Set_Enemies_1_In_Region_Actions takes nothing returns nothing
if ( CountUnitsInGroup(GetUnitsInRectAll(udg_Enemy_Region_Param)) == 0 ) then
set bj_forLoopBIndex = 1
set bj_forLoopBIndexEnd = GetRandomInt(udg_Enemy_Num_Min, udg_Enemy_Num_Max)
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
call CreateNUnitsAtLoc( 1, udg_Enemy_Group_1[GetRandomInt(1, udg_Enemy_Group_Num_1)], Player(8), GetRandomLocInRect(udg_Enemy_Region_Param), bj_UNIT_FACING )
call SetUnitAcquireRangeBJ( GetLastCreatedUnit(), udg_Enemy_Acquisition_Range )
call UnitAddAbilityBJ( 'Awan', GetLastCreatedUnit() )
call UnitSetCanSleepBJ( GetLastCreatedUnit(), true )
// call UnitAddTypeBJ( UNIT_TYPE_UNDEAD, GetLastCreatedUnit() )
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
endif
endfunction
//===========================================================================
function InitTrig_Create_Enemies_1_In_Region takes nothing returns nothing
set gg_trg_Create_Enemies_1_In_Region = CreateTrigger( )
call TriggerAddAction( gg_trg_Create_Enemies_1_In_Region, function Trig_Set_Enemies_1_In_Region_Actions )
endfunction
function Trig_Set_Enemies_2_In_Region_Actions takes nothing returns nothing
if ( CountUnitsInGroup(GetUnitsInRectAll(udg_Enemy_Region_Param)) == 0 ) then
set bj_forLoopBIndex = 1
set bj_forLoopBIndexEnd = GetRandomInt(udg_Enemy_Num_Min, udg_Enemy_Num_Max)
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
call CreateNUnitsAtLoc( 1, udg_Enemy_Group_2[GetRandomInt(1, udg_Enemy_Group_Num_2)], Player(8), GetRandomLocInRect(udg_Enemy_Region_Param), bj_UNIT_FACING )
call SetUnitAcquireRangeBJ( GetLastCreatedUnit(), udg_Enemy_Acquisition_Range )
call UnitAddAbilityBJ( 'Awan', GetLastCreatedUnit() )
call UnitSetCanSleepBJ( GetLastCreatedUnit(), true )
// call UnitAddTypeBJ( UNIT_TYPE_UNDEAD, GetLastCreatedUnit() )
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
endif
endfunction
//===========================================================================
function InitTrig_Create_Enemies_2_In_Region takes nothing returns nothing
set gg_trg_Create_Enemies_2_In_Region = CreateTrigger( )
call TriggerAddAction( gg_trg_Create_Enemies_2_In_Region, function Trig_Set_Enemies_2_In_Region_Actions )
endfunction
function Trig_Cast_Pack_to_Horse_Conditions takes nothing returns boolean
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("stomp") ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'oC06' ) ) then
return false
endif
return true
endfunction
function Trig_Cast_Pack_to_Horse_Func002002 takes nothing returns nothing
call PauseUnitBJ( false, GetEnumUnit() )
endfunction
function Trig_Cast_Pack_to_Horse_Func003002 takes nothing returns nothing
call ShowUnitShow( GetEnumUnit() )
endfunction
function Trig_Cast_Pack_to_Horse_Actions takes nothing returns nothing
call TriggerSleepAction( 1.00 )
call ForGroupBJ( GetUnitsOfPlayerAndTypeId(GetOwningPlayer(GetTriggerUnit()), 'hrdh'), function Trig_Cast_Pack_to_Horse_Func002002 )
call ForGroupBJ( GetUnitsOfPlayerAndTypeId(GetOwningPlayer(GetTriggerUnit()), 'hrdh'), function Trig_Cast_Pack_to_Horse_Func003002 )
call RemoveUnit( GetTriggerUnit() )
call TriggerSleepAction( 1.00 )
call GroupTargetOrderBJ( GetUnitsOfPlayerAndTypeId(GetOwningPlayer(GetTriggerUnit()), 'hrdh'), "move", GetTriggerUnit() )
endfunction
//===========================================================================
function InitTrig_Cast_Pack_to_Horse takes nothing returns nothing
set gg_trg_Cast_Pack_to_Horse = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Pack_to_Horse, Player(0), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Pack_to_Horse, Player(1), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Pack_to_Horse, Player(2), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Pack_to_Horse, Player(3), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Pack_to_Horse, Player(4), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Pack_to_Horse, Player(5), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerAddCondition( gg_trg_Cast_Pack_to_Horse, Condition( function Trig_Cast_Pack_to_Horse_Conditions ) )
call TriggerAddAction( gg_trg_Cast_Pack_to_Horse, function Trig_Cast_Pack_to_Horse_Actions )
endfunction
function Trig_Cast_Unpack_to_Tent_Conditions takes nothing returns boolean
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("stomp") ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'hrdh' ) ) then
return false
endif
return true
endfunction
function Trig_Cast_Unpack_to_Tent_Func002002 takes nothing returns nothing
call PauseUnitBJ( true, GetEnumUnit() )
endfunction
function Trig_Cast_Unpack_to_Tent_Func003002 takes nothing returns nothing
call ShowUnitHide( GetEnumUnit() )
endfunction
function Trig_Cast_Unpack_to_Tent_Actions takes nothing returns nothing
call TriggerSleepAction( 1.00 )
call ForGroupBJ( GetUnitsOfPlayerAndTypeId(GetOwningPlayer(GetTriggerUnit()), 'hrdh'), function Trig_Cast_Unpack_to_Tent_Func002002 )
call ForGroupBJ( GetUnitsOfPlayerAndTypeId(GetOwningPlayer(GetTriggerUnit()), 'hrdh'), function Trig_Cast_Unpack_to_Tent_Func003002 )
call CreateNUnitsAtLoc( 1, 'oC06', GetOwningPlayer(GetTriggerUnit()), GetRectCenter(RectFromCenterSizeBJ(GetUnitLoc(GetTriggerUnit()), 100.00, 100.00)), bj_UNIT_FACING )
call SetItemTypeSlots( GetLastCreatedUnit(), 11 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call AddItemToStockBJ( ChooseRandomItemBJ(GetRandomInt(1, 8)), GetLastCreatedUnit(), 3, 5 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Cast_Unpack_to_Tent takes nothing returns nothing
set gg_trg_Cast_Unpack_to_Tent = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Unpack_to_Tent, Player(0), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Unpack_to_Tent, Player(1), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Unpack_to_Tent, Player(2), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Unpack_to_Tent, Player(3), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Unpack_to_Tent, Player(4), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Unpack_to_Tent, Player(5), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerAddCondition( gg_trg_Cast_Unpack_to_Tent, Condition( function Trig_Cast_Unpack_to_Tent_Conditions ) )
call TriggerAddAction( gg_trg_Cast_Unpack_to_Tent, function Trig_Cast_Unpack_to_Tent_Actions )
endfunction
function Trig_Horse_Follow_Event_Func002C takes nothing returns boolean
if ( ( GetUnitTypeId(GetOrderedUnit()) == 'EC17' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetOrderedUnit()) == 'EC16' ) ) then
return true
endif
return false
endfunction
function Trig_Horse_Follow_Event_Conditions takes nothing returns boolean
if ( not Trig_Horse_Follow_Event_Func002C() ) then
return false
endif
return true
endfunction
function Trig_Horse_Follow_Event_Actions takes nothing returns nothing
call TriggerExecute( gg_trg_Horse_Follow )
endfunction
//===========================================================================
function InitTrig_Horse_Follow_Event takes nothing returns nothing
set gg_trg_Horse_Follow_Event = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Horse_Follow_Event, Player(0), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Horse_Follow_Event, Player(1), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Horse_Follow_Event, Player(2), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Horse_Follow_Event, Player(3), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Horse_Follow_Event, Player(4), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Horse_Follow_Event, Player(5), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerAddCondition( gg_trg_Horse_Follow_Event, Condition( function Trig_Horse_Follow_Event_Conditions ) )
call TriggerAddAction( gg_trg_Horse_Follow_Event, function Trig_Horse_Follow_Event_Actions )
endfunction
function Trig_Horse_Follow_Actions takes nothing returns nothing
call GroupTargetOrderBJ( GetUnitsOfPlayerAndTypeId(GetOwningPlayer(GetTriggerUnit()), 'hrdh'), "move", GetTriggerUnit() )
endfunction
//===========================================================================
function InitTrig_Horse_Follow takes nothing returns nothing
set gg_trg_Horse_Follow = CreateTrigger( )
call TriggerAddAction( gg_trg_Horse_Follow, function Trig_Horse_Follow_Actions )
endfunction
function Trig_Cast_Land_Mine_Spell_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'nglm' ) ) then
return false
endif
return true
endfunction
function Trig_Cast_Land_Mine_Spell_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 3
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call CreateNUnitsAtLoc( 1, 'n006', GetTriggerPlayer(), GetRandomLocInRect(RectFromCenterSizeBJ(GetUnitLoc(GetTriggerUnit()), 100.00, 100.00)), bj_UNIT_FACING )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call RemoveUnit( GetTriggerUnit() )
endfunction
//===========================================================================
function InitTrig_Cast_Land_Mine_Spell takes nothing returns nothing
set gg_trg_Cast_Land_Mine_Spell = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Land_Mine_Spell, Player(0), EVENT_PLAYER_UNIT_SUMMON )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Land_Mine_Spell, Player(1), EVENT_PLAYER_UNIT_SUMMON )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Land_Mine_Spell, Player(2), EVENT_PLAYER_UNIT_SUMMON )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Land_Mine_Spell, Player(3), EVENT_PLAYER_UNIT_SUMMON )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Land_Mine_Spell, Player(4), EVENT_PLAYER_UNIT_SUMMON )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Land_Mine_Spell, Player(5), EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Cast_Land_Mine_Spell, Condition( function Trig_Cast_Land_Mine_Spell_Conditions ) )
call TriggerAddAction( gg_trg_Cast_Land_Mine_Spell, function Trig_Cast_Land_Mine_Spell_Actions )
endfunction
function Trig_Cast_Land_Mine_1_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'nowl' ) ) then
return false
endif
return true
endfunction
function Trig_Cast_Land_Mine_1_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 2
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call CreateNUnitsAtLoc( 1, 'n006', GetTriggerPlayer(), GetRandomLocInRect(RectFromCenterSizeBJ(GetUnitLoc(GetTriggerUnit()), 300.00, 300.00)), bj_UNIT_FACING )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call RemoveUnit( GetTriggerUnit() )
endfunction
//===========================================================================
function InitTrig_Cast_Land_Mine_1 takes nothing returns nothing
set gg_trg_Cast_Land_Mine_1 = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Land_Mine_1, Player(0), EVENT_PLAYER_UNIT_SUMMON )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Land_Mine_1, Player(1), EVENT_PLAYER_UNIT_SUMMON )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Land_Mine_1, Player(2), EVENT_PLAYER_UNIT_SUMMON )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Land_Mine_1, Player(3), EVENT_PLAYER_UNIT_SUMMON )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Land_Mine_1, Player(4), EVENT_PLAYER_UNIT_SUMMON )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Land_Mine_1, Player(5), EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Cast_Land_Mine_1, Condition( function Trig_Cast_Land_Mine_1_Conditions ) )
call TriggerAddAction( gg_trg_Cast_Land_Mine_1, function Trig_Cast_Land_Mine_1_Actions )
endfunction
function Trig_Cast_Land_Mine_2_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'now2' ) ) then
return false
endif
return true
endfunction
function Trig_Cast_Land_Mine_2_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 3
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call CreateNUnitsAtLoc( 1, 'n006', GetTriggerPlayer(), GetRandomLocInRect(RectFromCenterSizeBJ(GetUnitLoc(GetTriggerUnit()), 300.00, 300.00)), bj_UNIT_FACING )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call RemoveUnit( GetTriggerUnit() )
endfunction
//===========================================================================
function InitTrig_Cast_Land_Mine_2 takes nothing returns nothing
set gg_trg_Cast_Land_Mine_2 = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Land_Mine_2, Player(0), EVENT_PLAYER_UNIT_SUMMON )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Land_Mine_2, Player(1), EVENT_PLAYER_UNIT_SUMMON )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Land_Mine_2, Player(2), EVENT_PLAYER_UNIT_SUMMON )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Land_Mine_2, Player(3), EVENT_PLAYER_UNIT_SUMMON )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Land_Mine_2, Player(4), EVENT_PLAYER_UNIT_SUMMON )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Land_Mine_2, Player(5), EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Cast_Land_Mine_2, Condition( function Trig_Cast_Land_Mine_2_Conditions ) )
call TriggerAddAction( gg_trg_Cast_Land_Mine_2, function Trig_Cast_Land_Mine_2_Actions )
endfunction
function Trig_Cast_Land_Mine_3_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'now3' ) ) then
return false
endif
return true
endfunction
function Trig_Cast_Land_Mine_3_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 4
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call CreateNUnitsAtLoc( 1, 'n006', GetTriggerPlayer(), GetRandomLocInRect(RectFromCenterSizeBJ(GetUnitLoc(GetTriggerUnit()), 300.00, 300.00)), bj_UNIT_FACING )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call RemoveUnit( GetTriggerUnit() )
endfunction
//===========================================================================
function InitTrig_Cast_Land_Mine_3 takes nothing returns nothing
set gg_trg_Cast_Land_Mine_3 = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Land_Mine_3, Player(0), EVENT_PLAYER_UNIT_SUMMON )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Land_Mine_3, Player(1), EVENT_PLAYER_UNIT_SUMMON )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Land_Mine_3, Player(2), EVENT_PLAYER_UNIT_SUMMON )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Land_Mine_3, Player(3), EVENT_PLAYER_UNIT_SUMMON )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Land_Mine_3, Player(4), EVENT_PLAYER_UNIT_SUMMON )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Land_Mine_3, Player(5), EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Cast_Land_Mine_3, Condition( function Trig_Cast_Land_Mine_3_Conditions ) )
call TriggerAddAction( gg_trg_Cast_Land_Mine_3, function Trig_Cast_Land_Mine_3_Actions )
endfunction
function Trig_Cast_Land_Mine_1_Upgrade_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'hwat' ) ) then
return false
endif
return true
endfunction
function Trig_Cast_Land_Mine_1_Upgrade_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 5
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call CreateNUnitsAtLoc( 1, 'n006', GetTriggerPlayer(), GetRandomLocInRect(RectFromCenterSizeBJ(GetUnitLoc(GetTriggerUnit()), 300.00, 300.00)), bj_UNIT_FACING )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call RemoveUnit( GetTriggerUnit() )
endfunction
//===========================================================================
function InitTrig_Cast_Land_Mine_1_Upgrade takes nothing returns nothing
set gg_trg_Cast_Land_Mine_1_Upgrade = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Land_Mine_1_Upgrade, Player(0), EVENT_PLAYER_UNIT_SUMMON )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Land_Mine_1_Upgrade, Player(1), EVENT_PLAYER_UNIT_SUMMON )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Land_Mine_1_Upgrade, Player(2), EVENT_PLAYER_UNIT_SUMMON )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Land_Mine_1_Upgrade, Player(3), EVENT_PLAYER_UNIT_SUMMON )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Land_Mine_1_Upgrade, Player(4), EVENT_PLAYER_UNIT_SUMMON )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Land_Mine_1_Upgrade, Player(5), EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Cast_Land_Mine_1_Upgrade, Condition( function Trig_Cast_Land_Mine_1_Upgrade_Conditions ) )
call TriggerAddAction( gg_trg_Cast_Land_Mine_1_Upgrade, function Trig_Cast_Land_Mine_1_Upgrade_Actions )
endfunction
function Trig_Cast_Land_Mine_2_Upgrade_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'hwt2' ) ) then
return false
endif
return true
endfunction
function Trig_Cast_Land_Mine_2_Upgrade_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call CreateNUnitsAtLoc( 1, 'n006', GetTriggerPlayer(), GetRandomLocInRect(RectFromCenterSizeBJ(GetUnitLoc(GetTriggerUnit()), 300.00, 300.00)), bj_UNIT_FACING )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call RemoveUnit( GetTriggerUnit() )
endfunction
//===========================================================================
function InitTrig_Cast_Land_Mine_2_Upgrade takes nothing returns nothing
set gg_trg_Cast_Land_Mine_2_Upgrade = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Land_Mine_2_Upgrade, Player(0), EVENT_PLAYER_UNIT_SUMMON )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Land_Mine_2_Upgrade, Player(1), EVENT_PLAYER_UNIT_SUMMON )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Land_Mine_2_Upgrade, Player(2), EVENT_PLAYER_UNIT_SUMMON )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Land_Mine_2_Upgrade, Player(3), EVENT_PLAYER_UNIT_SUMMON )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Land_Mine_2_Upgrade, Player(4), EVENT_PLAYER_UNIT_SUMMON )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Land_Mine_2_Upgrade, Player(5), EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Cast_Land_Mine_2_Upgrade, Condition( function Trig_Cast_Land_Mine_2_Upgrade_Conditions ) )
call TriggerAddAction( gg_trg_Cast_Land_Mine_2_Upgrade, function Trig_Cast_Land_Mine_2_Upgrade_Actions )
endfunction
function Trig_Cast_Land_Mine_3_Upgrade_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'hwt3' ) ) then
return false
endif
return true
endfunction
function Trig_Cast_Land_Mine_3_Upgrade_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 7
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call CreateNUnitsAtLoc( 1, 'n006', GetTriggerPlayer(), GetRandomLocInRect(RectFromCenterSizeBJ(GetUnitLoc(GetTriggerUnit()), 300.00, 300.00)), bj_UNIT_FACING )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call RemoveUnit( GetTriggerUnit() )
endfunction
//===========================================================================
function InitTrig_Cast_Land_Mine_3_Upgrade takes nothing returns nothing
set gg_trg_Cast_Land_Mine_3_Upgrade = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Land_Mine_3_Upgrade, Player(0), EVENT_PLAYER_UNIT_SUMMON )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Land_Mine_3_Upgrade, Player(1), EVENT_PLAYER_UNIT_SUMMON )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Land_Mine_3_Upgrade, Player(2), EVENT_PLAYER_UNIT_SUMMON )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Land_Mine_3_Upgrade, Player(3), EVENT_PLAYER_UNIT_SUMMON )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Land_Mine_3_Upgrade, Player(4), EVENT_PLAYER_UNIT_SUMMON )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Land_Mine_3_Upgrade, Player(5), EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Cast_Land_Mine_3_Upgrade, Condition( function Trig_Cast_Land_Mine_3_Upgrade_Conditions ) )
call TriggerAddAction( gg_trg_Cast_Land_Mine_3_Upgrade, function Trig_Cast_Land_Mine_3_Upgrade_Actions )
endfunction
function Trig_Cast_Flame_Shield_Guard_On_Func002001001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'OC10' )
endfunction
function Trig_Cast_Flame_Shield_Guard_On_Func002001002 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'O000' )
endfunction
function Trig_Cast_Flame_Shield_Guard_On_Func002001 takes nothing returns boolean
return GetBooleanOr( Trig_Cast_Flame_Shield_Guard_On_Func002001001(), Trig_Cast_Flame_Shield_Guard_On_Func002001002() )
endfunction
function Trig_Cast_Flame_Shield_Guard_On_Func002002 takes nothing returns boolean
return ( GetIssuedOrderIdBJ() == String2OrderIdBJ("defend") )
endfunction
function Trig_Cast_Flame_Shield_Guard_On_Conditions takes nothing returns boolean
if ( not GetBooleanAnd( Trig_Cast_Flame_Shield_Guard_On_Func002001(), Trig_Cast_Flame_Shield_Guard_On_Func002002() ) ) then
return false
endif
return true
endfunction
function Trig_Cast_Flame_Shield_Guard_On_Actions takes nothing returns nothing
call UnitAddAbilityBJ( 'AIcf', GetTriggerUnit() )
endfunction
//===========================================================================
function InitTrig_Cast_Flame_Shield_Guard_On takes nothing returns nothing
set gg_trg_Cast_Flame_Shield_Guard_On = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Flame_Shield_Guard_On, Player(0), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Flame_Shield_Guard_On, Player(1), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Flame_Shield_Guard_On, Player(2), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Flame_Shield_Guard_On, Player(3), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Flame_Shield_Guard_On, Player(4), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Flame_Shield_Guard_On, Player(5), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerAddCondition( gg_trg_Cast_Flame_Shield_Guard_On, Condition( function Trig_Cast_Flame_Shield_Guard_On_Conditions ) )
call TriggerAddAction( gg_trg_Cast_Flame_Shield_Guard_On, function Trig_Cast_Flame_Shield_Guard_On_Actions )
endfunction
function Trig_Cast_Flame_Shield_Guard_Off_Func002001001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'OC10' )
endfunction
function Trig_Cast_Flame_Shield_Guard_Off_Func002001002 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'O000' )
endfunction
function Trig_Cast_Flame_Shield_Guard_Off_Func002001 takes nothing returns boolean
return GetBooleanOr( Trig_Cast_Flame_Shield_Guard_Off_Func002001001(), Trig_Cast_Flame_Shield_Guard_Off_Func002001002() )
endfunction
function Trig_Cast_Flame_Shield_Guard_Off_Func002002 takes nothing returns boolean
return ( GetIssuedOrderIdBJ() == String2OrderIdBJ("undefend") )
endfunction
function Trig_Cast_Flame_Shield_Guard_Off_Conditions takes nothing returns boolean
if ( not GetBooleanAnd( Trig_Cast_Flame_Shield_Guard_Off_Func002001(), Trig_Cast_Flame_Shield_Guard_Off_Func002002() ) ) then
return false
endif
return true
endfunction
function Trig_Cast_Flame_Shield_Guard_Off_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'AIcf', GetTriggerUnit() )
endfunction
//===========================================================================
function InitTrig_Cast_Flame_Shield_Guard_Off takes nothing returns nothing
set gg_trg_Cast_Flame_Shield_Guard_Off = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Flame_Shield_Guard_Off, Player(0), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Flame_Shield_Guard_Off, Player(1), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Flame_Shield_Guard_Off, Player(2), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Flame_Shield_Guard_Off, Player(3), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Flame_Shield_Guard_Off, Player(4), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Flame_Shield_Guard_Off, Player(5), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerAddCondition( gg_trg_Cast_Flame_Shield_Guard_Off, Condition( function Trig_Cast_Flame_Shield_Guard_Off_Conditions ) )
call TriggerAddAction( gg_trg_Cast_Flame_Shield_Guard_Off, function Trig_Cast_Flame_Shield_Guard_Off_Actions )
endfunction
function Trig_Cast_Terra_Shockwave_Area_Func001001001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'OC10' )
endfunction
function Trig_Cast_Terra_Shockwave_Area_Func001001002 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'O000' )
endfunction
function Trig_Cast_Terra_Shockwave_Area_Func001001 takes nothing returns boolean
return GetBooleanOr( Trig_Cast_Terra_Shockwave_Area_Func001001001(), Trig_Cast_Terra_Shockwave_Area_Func001001002() )
endfunction
function Trig_Cast_Terra_Shockwave_Area_Func001002 takes nothing returns boolean
return ( GetIssuedOrderIdBJ() == String2OrderIdBJ("shockwave") )
endfunction
function Trig_Cast_Terra_Shockwave_Area_Conditions takes nothing returns boolean
if ( not GetBooleanAnd( Trig_Cast_Terra_Shockwave_Area_Func001001(), Trig_Cast_Terra_Shockwave_Area_Func001002() ) ) then
return false
endif
return true
endfunction
function Trig_Cast_Terra_Shockwave_Area_Func002Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'O000' ) ) then
return false
endif
return true
endfunction
function Trig_Cast_Terra_Shockwave_Area_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 3
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Cast_Terra_Shockwave_Area_Func002Func001C() ) then
call CreateNUnitsAtLoc( 1, 'oC19', GetTriggerPlayer(), GetUnitLoc(GetTriggerUnit()), GetUnitFacing(GetTriggerUnit()) )
else
call CreateNUnitsAtLoc( 1, 'hC23', GetTriggerPlayer(), GetUnitLoc(GetTriggerUnit()), GetUnitFacing(GetTriggerUnit()) )
endif
call ShowUnitHide( GetLastCreatedUnit() )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "carrionswarm", GetOrderPointLoc() )
set udg_u_Temp_Unit = GetLastCreatedUnit()
set udg_Temp_Unit_Life_Time = 2
set udg_Temp_Unit_Death_Type = 2
call TriggerExecute( gg_trg_Set_Unit_Life_Time )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Cast_Terra_Shockwave_Area takes nothing returns nothing
set gg_trg_Cast_Terra_Shockwave_Area = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Terra_Shockwave_Area, Player(0), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Terra_Shockwave_Area, Player(1), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Terra_Shockwave_Area, Player(2), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Terra_Shockwave_Area, Player(3), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Terra_Shockwave_Area, Player(4), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Terra_Shockwave_Area, Player(5), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerAddCondition( gg_trg_Cast_Terra_Shockwave_Area, Condition( function Trig_Cast_Terra_Shockwave_Area_Conditions ) )
call TriggerAddAction( gg_trg_Cast_Terra_Shockwave_Area, function Trig_Cast_Terra_Shockwave_Area_Actions )
endfunction
function Trig_Cast_Terra_Shockwave_Object_Func001001001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'OC10' )
endfunction
function Trig_Cast_Terra_Shockwave_Object_Func001001002 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'O000' )
endfunction
function Trig_Cast_Terra_Shockwave_Object_Func001001 takes nothing returns boolean
return GetBooleanOr( Trig_Cast_Terra_Shockwave_Object_Func001001001(), Trig_Cast_Terra_Shockwave_Object_Func001001002() )
endfunction
function Trig_Cast_Terra_Shockwave_Object_Func001002 takes nothing returns boolean
return ( GetIssuedOrderIdBJ() == String2OrderIdBJ("shockwave") )
endfunction
function Trig_Cast_Terra_Shockwave_Object_Conditions takes nothing returns boolean
if ( not GetBooleanAnd( Trig_Cast_Terra_Shockwave_Object_Func001001(), Trig_Cast_Terra_Shockwave_Object_Func001002() ) ) then
return false
endif
return true
endfunction
function Trig_Cast_Terra_Shockwave_Object_Func002Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'O000' ) ) then
return false
endif
return true
endfunction
function Trig_Cast_Terra_Shockwave_Object_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 3
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Cast_Terra_Shockwave_Object_Func002Func001C() ) then
call CreateNUnitsAtLoc( 1, 'oC19', GetTriggerPlayer(), GetUnitLoc(GetTriggerUnit()), GetUnitFacing(GetTriggerUnit()) )
else
call CreateNUnitsAtLoc( 1, 'hC23', GetTriggerPlayer(), GetUnitLoc(GetTriggerUnit()), GetUnitFacing(GetTriggerUnit()) )
endif
call ShowUnitHide( GetLastCreatedUnit() )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "carrionswarm", GetUnitLoc(GetOrderTargetUnit()) )
set udg_u_Temp_Unit = GetLastCreatedUnit()
set udg_Temp_Unit_Life_Time = 2
set udg_Temp_Unit_Death_Type = 2
call TriggerExecute( gg_trg_Set_Unit_Life_Time )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Cast_Terra_Shockwave_Object takes nothing returns nothing
set gg_trg_Cast_Terra_Shockwave_Object = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Terra_Shockwave_Object, Player(0), EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Terra_Shockwave_Object, Player(1), EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Terra_Shockwave_Object, Player(2), EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Terra_Shockwave_Object, Player(3), EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Terra_Shockwave_Object, Player(4), EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Terra_Shockwave_Object, Player(5), EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER )
call TriggerAddCondition( gg_trg_Cast_Terra_Shockwave_Object, Condition( function Trig_Cast_Terra_Shockwave_Object_Conditions ) )
call TriggerAddAction( gg_trg_Cast_Terra_Shockwave_Object, function Trig_Cast_Terra_Shockwave_Object_Actions )
endfunction
function Trig_Cast_Mega_Shockwave_Area_Func001001001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'OC10' )
endfunction
function Trig_Cast_Mega_Shockwave_Area_Func001001002 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'O000' )
endfunction
function Trig_Cast_Mega_Shockwave_Area_Func001001 takes nothing returns boolean
return GetBooleanOr( Trig_Cast_Mega_Shockwave_Area_Func001001001(), Trig_Cast_Mega_Shockwave_Area_Func001001002() )
endfunction
function Trig_Cast_Mega_Shockwave_Area_Func001002 takes nothing returns boolean
return ( GetIssuedOrderIdBJ() == String2OrderIdBJ("shockwave") )
endfunction
function Trig_Cast_Mega_Shockwave_Area_Conditions takes nothing returns boolean
if ( not GetBooleanAnd( Trig_Cast_Mega_Shockwave_Area_Func001001(), Trig_Cast_Mega_Shockwave_Area_Func001002() ) ) then
return false
endif
return true
endfunction
function Trig_Cast_Mega_Shockwave_Area_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 3
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call CreateNUnitsAtLoc( 1, 'o002', GetTriggerPlayer(), GetUnitLoc(GetTriggerUnit()), GetUnitFacing(GetTriggerUnit()) )
call ShowUnitHide( GetLastCreatedUnit() )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "shockwave", GetOrderPointLoc() )
set udg_u_Temp_Unit = GetLastCreatedUnit()
set udg_Temp_Unit_Life_Time = 2
set udg_Temp_Unit_Death_Type = 2
call TriggerExecute( gg_trg_Set_Unit_Life_Time )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Cast_Mega_Shockwave_Area takes nothing returns nothing
set gg_trg_Cast_Mega_Shockwave_Area = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Mega_Shockwave_Area, Player(0), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Mega_Shockwave_Area, Player(1), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Mega_Shockwave_Area, Player(2), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Mega_Shockwave_Area, Player(3), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Mega_Shockwave_Area, Player(4), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Mega_Shockwave_Area, Player(5), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerAddCondition( gg_trg_Cast_Mega_Shockwave_Area, Condition( function Trig_Cast_Mega_Shockwave_Area_Conditions ) )
call TriggerAddAction( gg_trg_Cast_Mega_Shockwave_Area, function Trig_Cast_Mega_Shockwave_Area_Actions )
endfunction
function Trig_Cast_Mega_Shockwave_Object_Func001001001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'OC10' )
endfunction
function Trig_Cast_Mega_Shockwave_Object_Func001001002 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'O000' )
endfunction
function Trig_Cast_Mega_Shockwave_Object_Func001001 takes nothing returns boolean
return GetBooleanOr( Trig_Cast_Mega_Shockwave_Object_Func001001001(), Trig_Cast_Mega_Shockwave_Object_Func001001002() )
endfunction
function Trig_Cast_Mega_Shockwave_Object_Func001002 takes nothing returns boolean
return ( GetIssuedOrderIdBJ() == String2OrderIdBJ("shockwave") )
endfunction
function Trig_Cast_Mega_Shockwave_Object_Conditions takes nothing returns boolean
if ( not GetBooleanAnd( Trig_Cast_Mega_Shockwave_Object_Func001001(), Trig_Cast_Mega_Shockwave_Object_Func001002() ) ) then
return false
endif
return true
endfunction
function Trig_Cast_Mega_Shockwave_Object_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 3
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call CreateNUnitsAtLoc( 1, 'o002', GetTriggerPlayer(), GetUnitLoc(GetTriggerUnit()), GetUnitFacing(GetTriggerUnit()) )
call ShowUnitHide( GetLastCreatedUnit() )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "shockwave", GetUnitLoc(GetOrderTargetUnit()) )
set udg_u_Temp_Unit = GetLastCreatedUnit()
set udg_Temp_Unit_Life_Time = 2
set udg_Temp_Unit_Death_Type = 2
call TriggerExecute( gg_trg_Set_Unit_Life_Time )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Cast_Mega_Shockwave_Object takes nothing returns nothing
set gg_trg_Cast_Mega_Shockwave_Object = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Mega_Shockwave_Object, Player(0), EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Mega_Shockwave_Object, Player(1), EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Mega_Shockwave_Object, Player(2), EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Mega_Shockwave_Object, Player(3), EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Mega_Shockwave_Object, Player(4), EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Mega_Shockwave_Object, Player(5), EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER )
call TriggerAddCondition( gg_trg_Cast_Mega_Shockwave_Object, Condition( function Trig_Cast_Mega_Shockwave_Object_Conditions ) )
call TriggerAddAction( gg_trg_Cast_Mega_Shockwave_Object, function Trig_Cast_Mega_Shockwave_Object_Actions )
endfunction
function Trig_Cast_Mega_Starfall_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'HC12' ) ) then
return false
endif
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("starfall") ) ) then
return false
endif
return true
endfunction
function Trig_Cast_Mega_Starfall_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 7
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call CreateNUnitsAtLoc( 1, 'hC23', GetTriggerPlayer(), GetUnitLoc(GetTriggerUnit()), GetUnitFacing(GetTriggerUnit()) )
call ShowUnitHide( GetLastCreatedUnit() )
call IssueImmediateOrderBJ( GetLastCreatedUnit(), "starfall" )
set udg_u_Temp_Unit = GetLastCreatedUnit()
set udg_Temp_Unit_Life_Time = 30
set udg_Temp_Unit_Death_Type = 2
call TriggerExecute( gg_trg_Set_Unit_Life_Time )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Cast_Mega_Starfall takes nothing returns nothing
set gg_trg_Cast_Mega_Starfall = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Mega_Starfall, Player(0), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Mega_Starfall, Player(1), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Mega_Starfall, Player(2), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Mega_Starfall, Player(3), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Mega_Starfall, Player(4), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Mega_Starfall, Player(5), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerAddCondition( gg_trg_Cast_Mega_Starfall, Condition( function Trig_Cast_Mega_Starfall_Conditions ) )
call TriggerAddAction( gg_trg_Cast_Mega_Starfall, function Trig_Cast_Mega_Starfall_Actions )
endfunction
function Trig_God_Bless_Shield_Func001001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'HC12' )
endfunction
function Trig_God_Bless_Shield_Func001002 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'HC13' )
endfunction
function Trig_God_Bless_Shield_Conditions takes nothing returns boolean
if ( not GetBooleanOr( Trig_God_Bless_Shield_Func001001(), Trig_God_Bless_Shield_Func001002() ) ) then
return false
endif
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("roar") ) ) then
return false
endif
return true
endfunction
function Trig_God_Bless_Shield_Actions takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'hC23', GetTriggerPlayer(), GetUnitLoc(GetTriggerUnit()), GetUnitFacing(GetTriggerUnit()) )
call ShowUnitHide( GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "antimagicshell", GetTriggerUnit() )
call TriggerSleepAction( 1.00 )
call RemoveUnit( GetLastCreatedUnit() )
endfunction
//===========================================================================
function InitTrig_God_Bless_Shield takes nothing returns nothing
set gg_trg_God_Bless_Shield = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_God_Bless_Shield, Player(0), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_God_Bless_Shield, Player(1), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_God_Bless_Shield, Player(2), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_God_Bless_Shield, Player(3), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_God_Bless_Shield, Player(4), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_God_Bless_Shield, Player(5), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerAddCondition( gg_trg_God_Bless_Shield, Condition( function Trig_God_Bless_Shield_Conditions ) )
call TriggerAddAction( gg_trg_God_Bless_Shield, function Trig_God_Bless_Shield_Actions )
endfunction
function Trig_Cast_Gold_Coin_1_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'ucs1' ) ) then
return false
endif
return true
endfunction
function Trig_Cast_Gold_Coin_1_Actions takes nothing returns nothing
call CreateItemLoc( 'gold', GetRandomLocInRect(RectFromCenterSizeBJ(GetUnitLoc(GetTriggerUnit()), 200.00, 200.00)) )
call RemoveUnit( GetTriggerUnit() )
endfunction
//===========================================================================
function InitTrig_Cast_Gold_Coin_1 takes nothing returns nothing
set gg_trg_Cast_Gold_Coin_1 = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Gold_Coin_1, Player(0), EVENT_PLAYER_UNIT_SUMMON )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Gold_Coin_1, Player(1), EVENT_PLAYER_UNIT_SUMMON )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Gold_Coin_1, Player(2), EVENT_PLAYER_UNIT_SUMMON )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Gold_Coin_1, Player(3), EVENT_PLAYER_UNIT_SUMMON )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Gold_Coin_1, Player(4), EVENT_PLAYER_UNIT_SUMMON )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Gold_Coin_1, Player(5), EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Cast_Gold_Coin_1, Condition( function Trig_Cast_Gold_Coin_1_Conditions ) )
call TriggerAddAction( gg_trg_Cast_Gold_Coin_1, function Trig_Cast_Gold_Coin_1_Actions )
endfunction
function Trig_Cast_Gold_Coin_2_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'ucs2' ) ) then
return false
endif
return true
endfunction
function Trig_Cast_Gold_Coin_2_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 2
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call CreateItemLoc( 'gold', GetRandomLocInRect(RectFromCenterSizeBJ(GetUnitLoc(GetTriggerUnit()), 300.00, 300.00)) )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call RemoveUnit( GetTriggerUnit() )
endfunction
//===========================================================================
function InitTrig_Cast_Gold_Coin_2 takes nothing returns nothing
set gg_trg_Cast_Gold_Coin_2 = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Gold_Coin_2, Player(0), EVENT_PLAYER_UNIT_SUMMON )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Gold_Coin_2, Player(1), EVENT_PLAYER_UNIT_SUMMON )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Gold_Coin_2, Player(2), EVENT_PLAYER_UNIT_SUMMON )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Gold_Coin_2, Player(3), EVENT_PLAYER_UNIT_SUMMON )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Gold_Coin_2, Player(4), EVENT_PLAYER_UNIT_SUMMON )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Gold_Coin_2, Player(5), EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Cast_Gold_Coin_2, Condition( function Trig_Cast_Gold_Coin_2_Conditions ) )
call TriggerAddAction( gg_trg_Cast_Gold_Coin_2, function Trig_Cast_Gold_Coin_2_Actions )
endfunction
function Trig_Cast_Gold_Coin_3_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'ucs3' ) ) then
return false
endif
return true
endfunction
function Trig_Cast_Gold_Coin_3_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 3
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call CreateItemLoc( 'gold', GetRandomLocInRect(RectFromCenterSizeBJ(GetUnitLoc(GetTriggerUnit()), 300.00, 300.00)) )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call RemoveUnit( GetTriggerUnit() )
endfunction
//===========================================================================
function InitTrig_Cast_Gold_Coin_3 takes nothing returns nothing
set gg_trg_Cast_Gold_Coin_3 = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Gold_Coin_3, Player(0), EVENT_PLAYER_UNIT_SUMMON )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Gold_Coin_3, Player(1), EVENT_PLAYER_UNIT_SUMMON )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Gold_Coin_3, Player(2), EVENT_PLAYER_UNIT_SUMMON )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Gold_Coin_3, Player(3), EVENT_PLAYER_UNIT_SUMMON )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Gold_Coin_3, Player(4), EVENT_PLAYER_UNIT_SUMMON )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Gold_Coin_3, Player(5), EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Cast_Gold_Coin_3, Condition( function Trig_Cast_Gold_Coin_3_Conditions ) )
call TriggerAddAction( gg_trg_Cast_Gold_Coin_3, function Trig_Cast_Gold_Coin_3_Actions )
endfunction
function Trig_Cast_Invulnerable_Aurora_Func001Func002C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'HC04' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'H002' ) ) then
return true
endif
return false
endfunction
function Trig_Cast_Invulnerable_Aurora_Func001C takes nothing returns boolean
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("Voodoo") ) ) then
return false
endif
if ( not Trig_Cast_Invulnerable_Aurora_Func001Func002C() ) then
return false
endif
return true
endfunction
function Trig_Cast_Invulnerable_Aurora_Conditions takes nothing returns boolean
if ( not Trig_Cast_Invulnerable_Aurora_Func001C() ) then
return false
endif
return true
endfunction
function Trig_Cast_Invulnerable_Aurora_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 3
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call CreateNUnitsAtLoc( 1, 'hC23', GetTriggerPlayer(), GetRandomLocInRect(RectFromCenterSizeBJ(GetUnitLoc(GetTriggerUnit()), 100.00, 100.00)), GetUnitFacing(GetTriggerUnit()) )
call ShowUnitHide( GetLastCreatedUnit() )
call IssueImmediateOrderBJ( GetLastCreatedUnit(), "voodoo" )
set udg_u_Temp_Unit = GetLastCreatedUnit()
set udg_Temp_Unit_Life_Time = 30
set udg_Temp_Unit_Death_Type = 2
call TriggerExecute( gg_trg_Set_Unit_Life_Time )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Cast_Invulnerable_Aurora takes nothing returns nothing
set gg_trg_Cast_Invulnerable_Aurora = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Invulnerable_Aurora, Player(0), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Invulnerable_Aurora, Player(1), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Invulnerable_Aurora, Player(2), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Invulnerable_Aurora, Player(3), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Invulnerable_Aurora, Player(4), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Invulnerable_Aurora, Player(5), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerAddCondition( gg_trg_Cast_Invulnerable_Aurora, Condition( function Trig_Cast_Invulnerable_Aurora_Conditions ) )
call TriggerAddAction( gg_trg_Cast_Invulnerable_Aurora, function Trig_Cast_Invulnerable_Aurora_Actions )
endfunction
function Trig_Cast_Dragon_Ensnare_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'HC04' ) ) then
return false
endif
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("ensnare") ) ) then
return false
endif
return true
endfunction
function Trig_Cast_Dragon_Ensnare_Actions takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'o002', GetTriggerPlayer(), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING )
call ShowUnitHide( GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "faeriefire", GetOrderTargetUnit() )
set udg_u_Temp_Unit = GetLastCreatedUnit()
set udg_Temp_Unit_Life_Time = 5
set udg_Temp_Unit_Death_Type = 2
call TriggerExecute( gg_trg_Set_Unit_Life_Time )
endfunction
//===========================================================================
function InitTrig_Cast_Dragon_Ensnare takes nothing returns nothing
set gg_trg_Cast_Dragon_Ensnare = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Dragon_Ensnare, Player(0), EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Dragon_Ensnare, Player(1), EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Dragon_Ensnare, Player(2), EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Dragon_Ensnare, Player(3), EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Dragon_Ensnare, Player(4), EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Dragon_Ensnare, Player(5), EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER )
call TriggerAddCondition( gg_trg_Cast_Dragon_Ensnare, Condition( function Trig_Cast_Dragon_Ensnare_Conditions ) )
call TriggerAddAction( gg_trg_Cast_Dragon_Ensnare, function Trig_Cast_Dragon_Ensnare_Actions )
endfunction
function Trig_Cast_Spirit_Dragon_Func001Func002C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'HC07' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'H00J' ) ) then
return true
endif
return false
endfunction
function Trig_Cast_Spirit_Dragon_Func001C takes nothing returns boolean
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("spiritwolf") ) ) then
return false
endif
if ( not Trig_Cast_Spirit_Dragon_Func001Func002C() ) then
return false
endif
return true
endfunction
function Trig_Cast_Spirit_Dragon_Conditions takes nothing returns boolean
if ( not Trig_Cast_Spirit_Dragon_Func001C() ) then
return false
endif
return true
endfunction
function Trig_Cast_Spirit_Dragon_Actions takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'oC22', GetTriggerPlayer(), GetUnitLoc(GetTriggerUnit()), GetUnitFacing(GetTriggerUnit()) )
call ShowUnitHide( GetLastCreatedUnit() )
call IssueImmediateOrderBJ( GetLastCreatedUnit(), "wateryminion" )
set udg_u_Temp_Unit = GetLastCreatedUnit()
set udg_Temp_Unit_Life_Time = 1
set udg_Temp_Unit_Death_Type = 2
call TriggerExecute( gg_trg_Set_Unit_Life_Time )
call TriggerExecute( gg_trg_Spirit_Dragon_Follow )
endfunction
//===========================================================================
function InitTrig_Cast_Spirit_Dragon takes nothing returns nothing
set gg_trg_Cast_Spirit_Dragon = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Spirit_Dragon, Player(0), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Spirit_Dragon, Player(1), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Spirit_Dragon, Player(2), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Spirit_Dragon, Player(3), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Spirit_Dragon, Player(4), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Spirit_Dragon, Player(5), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerAddCondition( gg_trg_Cast_Spirit_Dragon, Condition( function Trig_Cast_Spirit_Dragon_Conditions ) )
call TriggerAddAction( gg_trg_Cast_Spirit_Dragon, function Trig_Cast_Spirit_Dragon_Actions )
endfunction
function Trig_Cast_Elite_Spirit_Dragon_Func002Func002C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'HC04' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'H002' ) ) then
return true
endif
return false
endfunction
function Trig_Cast_Elite_Spirit_Dragon_Func002C takes nothing returns boolean
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("spiritwolf") ) ) then
return false
endif
if ( not Trig_Cast_Elite_Spirit_Dragon_Func002Func002C() ) then
return false
endif
return true
endfunction
function Trig_Cast_Elite_Spirit_Dragon_Conditions takes nothing returns boolean
if ( not Trig_Cast_Elite_Spirit_Dragon_Func002C() ) then
return false
endif
return true
endfunction
function Trig_Cast_Elite_Spirit_Dragon_Actions takes nothing returns nothing
call GroupClear( udg_gr_DragonSummon )
call CreateNUnitsAtLoc( 1, 'o002', GetTriggerPlayer(), GetUnitLoc(GetTriggerUnit()), GetUnitFacing(GetTriggerUnit()) )
call ShowUnitHide( GetLastCreatedUnit() )
call IssueImmediateOrderBJ( GetLastCreatedUnit(), "wateryminion" )
set udg_u_Temp_Unit = GetLastCreatedUnit()
set udg_Temp_Unit_Life_Time = 1
set udg_Temp_Unit_Death_Type = 2
call TriggerExecute( gg_trg_Set_Unit_Life_Time )
call TriggerExecute( gg_trg_Spirit_Dragon_Follow )
endfunction
//===========================================================================
function InitTrig_Cast_Elite_Spirit_Dragon takes nothing returns nothing
set gg_trg_Cast_Elite_Spirit_Dragon = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Elite_Spirit_Dragon, Player(0), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Elite_Spirit_Dragon, Player(1), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Elite_Spirit_Dragon, Player(2), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Elite_Spirit_Dragon, Player(3), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Elite_Spirit_Dragon, Player(4), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Elite_Spirit_Dragon, Player(5), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerAddCondition( gg_trg_Cast_Elite_Spirit_Dragon, Condition( function Trig_Cast_Elite_Spirit_Dragon_Conditions ) )
call TriggerAddAction( gg_trg_Cast_Elite_Spirit_Dragon, function Trig_Cast_Elite_Spirit_Dragon_Actions )
endfunction
function Trig_Spirit_Dragon_Follow_Func001001002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_FLYING) == true )
endfunction
function Trig_Spirit_Dragon_Follow_Func002A takes nothing returns nothing
call SetUnitInvulnerable( GetEnumUnit(), true )
call SetUnitUseFoodBJ( false, GetEnumUnit() )
call SetUnitPathing( GetEnumUnit(), false )
call UnitAddAbilityBJ( 'Awan', GetEnumUnit() )
endfunction
function Trig_Spirit_Dragon_Follow_Actions takes nothing returns nothing
call GroupAddGroup( GetUnitsOfPlayerMatching(GetTriggerPlayer(), Condition(function Trig_Spirit_Dragon_Follow_Func001001002)), udg_gr_DragonSummon )
call ForGroupBJ( udg_gr_DragonSummon, function Trig_Spirit_Dragon_Follow_Func002A )
call GroupPointOrderLocBJ( udg_gr_DragonSummon, "attack", GetRandomLocInRect(RectFromCenterSizeBJ(GetUnitLoc(GetTriggerUnit()), 1000.00, 1000.00)) )
endfunction
//===========================================================================
function InitTrig_Spirit_Dragon_Follow takes nothing returns nothing
set gg_trg_Spirit_Dragon_Follow = CreateTrigger( )
call TriggerAddAction( gg_trg_Spirit_Dragon_Follow, function Trig_Spirit_Dragon_Follow_Actions )
endfunction
function Trig_Spirit_Dragon_Selected_Event_Func004C takes nothing returns boolean
if ( not ( GetPlayerController(GetOwningPlayer(GetTriggerUnit())) == MAP_CONTROL_USER ) ) then
return false
endif
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_FLYING) == true ) ) then
return false
endif
return true
endfunction
function Trig_Spirit_Dragon_Selected_Event_Conditions takes nothing returns boolean
if ( not Trig_Spirit_Dragon_Selected_Event_Func004C() ) then
return false
endif
return true
endfunction
function Trig_Spirit_Dragon_Selected_Event_Actions takes nothing returns nothing
set udg_Find_Hero_Player = GetTriggerPlayer()
call TriggerExecute( gg_trg_Find_Hero )
call SelectUnitSingle( udg_u_Find_Hero_Result )
endfunction
//===========================================================================
function InitTrig_Spirit_Dragon_Selected_Event takes nothing returns nothing
set gg_trg_Spirit_Dragon_Selected_Event = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Spirit_Dragon_Selected_Event, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Spirit_Dragon_Selected_Event, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Spirit_Dragon_Selected_Event, Player(2), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Spirit_Dragon_Selected_Event, Player(3), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Spirit_Dragon_Selected_Event, Player(4), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Spirit_Dragon_Selected_Event, Player(5), true )
call TriggerAddCondition( gg_trg_Spirit_Dragon_Selected_Event, Condition( function Trig_Spirit_Dragon_Selected_Event_Conditions ) )
call TriggerAddAction( gg_trg_Spirit_Dragon_Selected_Event, function Trig_Spirit_Dragon_Selected_Event_Actions )
endfunction
function Trig_Cast_Feral_Spirit_Func001001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'HC07' )
endfunction
function Trig_Cast_Feral_Spirit_Func001002 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'HC04' )
endfunction
function Trig_Cast_Feral_Spirit_Conditions takes nothing returns boolean
if ( not GetBooleanOr( Trig_Cast_Feral_Spirit_Func001001(), Trig_Cast_Feral_Spirit_Func001002() ) ) then
return false
endif
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("metamorphosis") ) ) then
return false
endif
return true
endfunction
function Trig_Cast_Feral_Spirit_Func005001002 takes nothing returns boolean
return ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_PEON) == false )
endfunction
function Trig_Cast_Feral_Spirit_Func005002 takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "attack", GetRandomLocInRect(RectFromCenterSizeBJ(GetUnitLoc(GetTriggerUnit()), 1000.00, 1000.00)) )
endfunction
function Trig_Cast_Feral_Spirit_Actions takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'hC23', GetTriggerPlayer(), GetUnitLoc(GetTriggerUnit()), GetUnitFacing(GetTriggerUnit()) )
call ShowUnitHide( GetLastCreatedUnit() )
call IssueImmediateOrderBJ( GetLastCreatedUnit(), "roar" )
call ForGroupBJ( GetUnitsOfPlayerMatching(GetOwningPlayer(GetFilterUnit()), Condition(function Trig_Cast_Feral_Spirit_Func005001002)), function Trig_Cast_Feral_Spirit_Func005002 )
set udg_u_Temp_Unit = GetLastCreatedUnit()
set udg_Temp_Unit_Life_Time = 1
set udg_Temp_Unit_Death_Type = 2
call TriggerExecute( gg_trg_Set_Unit_Life_Time )
endfunction
//===========================================================================
function InitTrig_Cast_Feral_Spirit takes nothing returns nothing
set gg_trg_Cast_Feral_Spirit = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Feral_Spirit, Player(0), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Feral_Spirit, Player(1), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Feral_Spirit, Player(2), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Feral_Spirit, Player(3), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Feral_Spirit, Player(4), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Feral_Spirit, Player(5), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerAddCondition( gg_trg_Cast_Feral_Spirit, Condition( function Trig_Cast_Feral_Spirit_Conditions ) )
call TriggerAddAction( gg_trg_Cast_Feral_Spirit, function Trig_Cast_Feral_Spirit_Actions )
endfunction
function Trig_Cast_Final_Battle_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'OC09' ) ) then
return false
endif
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("tranquility") ) ) then
return false
endif
return true
endfunction
function Trig_Cast_Final_Battle_Actions takes nothing returns nothing
call TriggerSleepAction( 1.00 )
call CreateNUnitsAtLoc( 1, 'oC21', GetTriggerPlayer(), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING )
call ShowUnitHide( GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "move", GetTriggerUnit() )
set udg_u_Temp_Unit = GetLastCreatedUnit()
set udg_Temp_Unit_Life_Time = 60
set udg_Temp_Unit_Death_Type = 2
call TriggerExecute( gg_trg_Set_Unit_Life_Time )
call IssueImmediateOrderBJ( GetTriggerUnit(), "stop" )
endfunction
//===========================================================================
function InitTrig_Cast_Final_Battle takes nothing returns nothing
set gg_trg_Cast_Final_Battle = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Final_Battle, Player(0), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Final_Battle, Player(1), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Final_Battle, Player(2), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Final_Battle, Player(3), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Final_Battle, Player(4), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Final_Battle, Player(5), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerAddCondition( gg_trg_Cast_Final_Battle, Condition( function Trig_Cast_Final_Battle_Conditions ) )
call TriggerAddAction( gg_trg_Cast_Final_Battle, function Trig_Cast_Final_Battle_Actions )
endfunction
function Trig_Cast_Earthquake_War_Stomp_Func001Func001001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'OC08' )
endfunction
function Trig_Cast_Earthquake_War_Stomp_Func001Func001002 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'OC09' )
endfunction
function Trig_Cast_Earthquake_War_Stomp_Func001C takes nothing returns boolean
if ( not GetBooleanOr( Trig_Cast_Earthquake_War_Stomp_Func001Func001001(), Trig_Cast_Earthquake_War_Stomp_Func001Func001002() ) ) then
return false
endif
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("stomp") ) ) then
return false
endif
return true
endfunction
function Trig_Cast_Earthquake_War_Stomp_Conditions takes nothing returns boolean
if ( not Trig_Cast_Earthquake_War_Stomp_Func001C() ) then
return false
endif
return true
endfunction
function Trig_Cast_Earthquake_War_Stomp_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 3
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call CreateNUnitsAtLoc( 1, 'o002', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), GetUnitFacing(GetTriggerUnit()) )
call ShowUnitHide( GetLastCreatedUnit() )
call IssueImmediateOrderBJ( GetLastCreatedUnit(), "creepthunderclap" )
set udg_u_Temp_Unit = GetLastCreatedUnit()
set udg_Temp_Unit_Life_Time = 2
set udg_Temp_Unit_Death_Type = 2
call TriggerExecute( gg_trg_Set_Unit_Life_Time )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Cast_Earthquake_War_Stomp takes nothing returns nothing
set gg_trg_Cast_Earthquake_War_Stomp = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Earthquake_War_Stomp, Player(0), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Earthquake_War_Stomp, Player(1), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Earthquake_War_Stomp, Player(2), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Earthquake_War_Stomp, Player(3), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Earthquake_War_Stomp, Player(4), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Earthquake_War_Stomp, Player(5), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerAddCondition( gg_trg_Cast_Earthquake_War_Stomp, Condition( function Trig_Cast_Earthquake_War_Stomp_Conditions ) )
call TriggerAddAction( gg_trg_Cast_Earthquake_War_Stomp, function Trig_Cast_Earthquake_War_Stomp_Actions )
endfunction
function Trig_Cast_Earthquake_War_Stomp_Ugd_1_Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'OC09' ) ) then
return false
endif
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("stomp") ) ) then
return false
endif
return true
endfunction
function Trig_Cast_Earthquake_War_Stomp_Ugd_1_Conditions takes nothing returns boolean
if ( not Trig_Cast_Earthquake_War_Stomp_Ugd_1_Func001C() ) then
return false
endif
return true
endfunction
function Trig_Cast_Earthquake_War_Stomp_Ugd_1_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 2
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call CreateNUnitsAtLoc( 1, 'o002', GetTriggerPlayer(), GetUnitLoc(GetTriggerUnit()), GetUnitFacing(GetTriggerUnit()) )
call ShowUnitHide( GetLastCreatedUnit() )
call IssueImmediateOrderBJ( GetLastCreatedUnit(), "thunderclap" )
set udg_u_Temp_Unit = GetLastCreatedUnit()
set udg_Temp_Unit_Life_Time = 2
set udg_Temp_Unit_Death_Type = 2
call TriggerExecute( gg_trg_Set_Unit_Life_Time )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Cast_Earthquake_War_Stomp_Ugd_1 takes nothing returns nothing
set gg_trg_Cast_Earthquake_War_Stomp_Ugd_1 = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Earthquake_War_Stomp_Ugd_1, Player(0), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Earthquake_War_Stomp_Ugd_1, Player(1), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Earthquake_War_Stomp_Ugd_1, Player(2), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Earthquake_War_Stomp_Ugd_1, Player(3), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Earthquake_War_Stomp_Ugd_1, Player(4), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Earthquake_War_Stomp_Ugd_1, Player(5), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerAddCondition( gg_trg_Cast_Earthquake_War_Stomp_Ugd_1, Condition( function Trig_Cast_Earthquake_War_Stomp_Ugd_1_Conditions ) )
call TriggerAddAction( gg_trg_Cast_Earthquake_War_Stomp_Ugd_1, function Trig_Cast_Earthquake_War_Stomp_Ugd_1_Actions )
endfunction
function Trig_Cast_Earthquake_War_Stomp_Ugd_2_Func001Func001001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'OC08' )
endfunction
function Trig_Cast_Earthquake_War_Stomp_Ugd_2_Func001Func001002 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'OC09' )
endfunction
function Trig_Cast_Earthquake_War_Stomp_Ugd_2_Func001C takes nothing returns boolean
if ( not GetBooleanOr( Trig_Cast_Earthquake_War_Stomp_Ugd_2_Func001Func001001(), Trig_Cast_Earthquake_War_Stomp_Ugd_2_Func001Func001002() ) ) then
return false
endif
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("stomp") ) ) then
return false
endif
return true
endfunction
function Trig_Cast_Earthquake_War_Stomp_Ugd_2_Conditions takes nothing returns boolean
if ( not Trig_Cast_Earthquake_War_Stomp_Ugd_2_Func001C() ) then
return false
endif
return true
endfunction
function Trig_Cast_Earthquake_War_Stomp_Ugd_2_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 4
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call CreateNUnitsAtLoc( 1, 'o002', GetTriggerPlayer(), GetRandomLocInRect(RectFromCenterSizeBJ(GetUnitLoc(GetTriggerUnit()), 400.00, 400.00)), GetRectCenterX(RectFromCenterSizeBJ(GetUnitLoc(GetTriggerUnit()), 16.00, 16.00)) )
call ShowUnitHide( GetLastCreatedUnit() )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "impale", GetUnitLoc(GetTriggerUnit()) )
set udg_u_Temp_Unit = GetLastCreatedUnit()
set udg_Temp_Unit_Life_Time = 2
set udg_Temp_Unit_Death_Type = 2
call TriggerExecute( gg_trg_Set_Unit_Life_Time )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Cast_Earthquake_War_Stomp_Ugd_2 takes nothing returns nothing
set gg_trg_Cast_Earthquake_War_Stomp_Ugd_2 = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Earthquake_War_Stomp_Ugd_2, Player(0), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Earthquake_War_Stomp_Ugd_2, Player(1), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Earthquake_War_Stomp_Ugd_2, Player(2), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Earthquake_War_Stomp_Ugd_2, Player(3), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Earthquake_War_Stomp_Ugd_2, Player(4), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Earthquake_War_Stomp_Ugd_2, Player(5), EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerAddCondition( gg_trg_Cast_Earthquake_War_Stomp_Ugd_2, Condition( function Trig_Cast_Earthquake_War_Stomp_Ugd_2_Conditions ) )
call TriggerAddAction( gg_trg_Cast_Earthquake_War_Stomp_Ugd_2, function Trig_Cast_Earthquake_War_Stomp_Ugd_2_Actions )
endfunction
function Trig_Cast_Mass_Monsoon_Func008001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'UC28' )
endfunction
function Trig_Cast_Mass_Monsoon_Func008002 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'UC29' )
endfunction
function Trig_Cast_Mass_Monsoon_Conditions takes nothing returns boolean
if ( not GetBooleanOr( Trig_Cast_Mass_Monsoon_Func008001(), Trig_Cast_Mass_Monsoon_Func008002() ) ) then
return false
endif
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("monsoon") ) ) then
return false
endif
return true
endfunction
function Trig_Cast_Mass_Monsoon_Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'UC29' ) ) then
return false
endif
return true
endfunction
function Trig_Cast_Mass_Monsoon_Actions takes nothing returns nothing
if ( Trig_Cast_Mass_Monsoon_Func001C() ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 4
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call CreateNUnitsAtLoc( 1, 'oC22', GetTriggerPlayer(), GetUnitLoc(GetTriggerUnit()), GetUnitFacing(GetTriggerUnit()) )
call ShowUnitHide( GetLastCreatedUnit() )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "monsoon", GetOrderPointLoc() )
set udg_u_Temp_Unit = GetLastCreatedUnit()
set udg_Temp_Unit_Life_Time = 30
set udg_Temp_Unit_Death_Type = 2
call TriggerExecute( gg_trg_Set_Unit_Life_Time )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call CreateNUnitsAtLoc( 1, 'oC22', GetTriggerPlayer(), GetUnitLoc(GetTriggerUnit()), GetUnitFacing(GetTriggerUnit()) )
call ShowUnitHide( GetLastCreatedUnit() )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "monsoon", GetOrderPointLoc() )
set udg_u_Temp_Unit = GetLastCreatedUnit()
set udg_Temp_Unit_Life_Time = 30
set udg_Temp_Unit_Death_Type = 2
call TriggerExecute( gg_trg_Set_Unit_Life_Time )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 2
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call CreateNUnitsAtLoc( 1, 'oC22', GetTriggerPlayer(), GetUnitLoc(GetTriggerUnit()), GetUnitFacing(GetTriggerUnit()) )
call ShowUnitHide( GetLastCreatedUnit() )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "rainoffire", GetOrderPointLoc() )
set udg_u_Temp_Unit = GetLastCreatedUnit()
set udg_Temp_Unit_Life_Time = 30
set udg_Temp_Unit_Death_Type = 2
call TriggerExecute( gg_trg_Set_Unit_Life_Time )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 2
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call CreateNUnitsAtLoc( 1, 'oC22', GetTriggerPlayer(), GetUnitLoc(GetTriggerUnit()), GetUnitFacing(GetTriggerUnit()) )
call ShowUnitHide( GetLastCreatedUnit() )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "blizzard", GetOrderPointLoc() )
set udg_u_Temp_Unit = GetLastCreatedUnit()
set udg_Temp_Unit_Life_Time = 30
set udg_Temp_Unit_Death_Type = 2
call TriggerExecute( gg_trg_Set_Unit_Life_Time )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endif
endfunction
//===========================================================================
function InitTrig_Cast_Mass_Monsoon takes nothing returns nothing
set gg_trg_Cast_Mass_Monsoon = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Mass_Monsoon, Player(0), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Mass_Monsoon, Player(1), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Mass_Monsoon, Player(2), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Mass_Monsoon, Player(3), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Mass_Monsoon, Player(4), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Mass_Monsoon, Player(5), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerAddCondition( gg_trg_Cast_Mass_Monsoon, Condition( function Trig_Cast_Mass_Monsoon_Conditions ) )
call TriggerAddAction( gg_trg_Cast_Mass_Monsoon, function Trig_Cast_Mass_Monsoon_Actions )
endfunction
function Trig_Cast_Silence_Terror_Func001Func001001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'UC28' )
endfunction
function Trig_Cast_Silence_Terror_Func001Func001002 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'UC29' )
endfunction
function Trig_Cast_Silence_Terror_Func001C takes nothing returns boolean
if ( not GetBooleanOr( Trig_Cast_Silence_Terror_Func001Func001001(), Trig_Cast_Silence_Terror_Func001Func001002() ) ) then
return false
endif
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("silence") ) ) then
return false
endif
return true
endfunction
function Trig_Cast_Silence_Terror_Conditions takes nothing returns boolean
if ( not Trig_Cast_Silence_Terror_Func001C() ) then
return false
endif
return true
endfunction
function Trig_Cast_Silence_Terror_Actions takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'oC22', GetTriggerPlayer(), GetOrderPointLoc(), GetUnitFacing(GetTriggerUnit()) )
call ShowUnitHide( GetLastCreatedUnit() )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "devourmagic", GetOrderPointLoc() )
call TriggerSleepAction( 0.25 )
call IssueImmediateOrderBJ( GetLastCreatedUnit(), "howlofterror" )
call TriggerSleepAction( 0.25 )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "rejuvination", GetTriggerUnit() )
set udg_u_Temp_Unit = GetLastCreatedUnit()
set udg_Temp_Unit_Life_Time = 2
set udg_Temp_Unit_Death_Type = 1
call TriggerExecute( gg_trg_Set_Unit_Life_Time )
endfunction
//===========================================================================
function InitTrig_Cast_Silence_Terror takes nothing returns nothing
set gg_trg_Cast_Silence_Terror = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Silence_Terror, Player(0), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Silence_Terror, Player(1), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Silence_Terror, Player(2), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Silence_Terror, Player(3), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Silence_Terror, Player(4), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Cast_Silence_Terror, Player(5), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerAddCondition( gg_trg_Cast_Silence_Terror, Condition( function Trig_Cast_Silence_Terror_Conditions ) )
call TriggerAddAction( gg_trg_Cast_Silence_Terror, function Trig_Cast_Silence_Terror_Actions )
endfunction
function Trig_Set_Unit_Life_Time_Actions takes nothing returns nothing
set udg_VariablePos = -1
set bj_forLoopBIndex = ( udg_Temporary_Unit_Max_Num - 1 )
set bj_forLoopBIndexEnd = 0
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
if ( udg_Unit_Life_Time[bj_forLoopBIndex] == -1 ) then
set udg_VariablePos = bj_forLoopBIndex
endif
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
if ( udg_VariablePos == -1 ) then
set udg_VariablePos = udg_Temporary_Unit_Max_Num
set udg_Temporary_Unit_Max_Num = ( udg_Temporary_Unit_Max_Num + 1 )
endif
set udg_Temporary_Unit_Table[udg_VariablePos] = udg_u_Temp_Unit
set udg_Unit_Life_Time[udg_VariablePos] = udg_Temp_Unit_Life_Time
set udg_Unit_Death_Type[udg_VariablePos] = udg_Temp_Unit_Death_Type
endfunction
//===========================================================================
function InitTrig_Set_Unit_Life_Time takes nothing returns nothing
set gg_trg_Set_Unit_Life_Time = CreateTrigger( )
call DisableTrigger( gg_trg_Set_Unit_Life_Time )
call TriggerAddAction( gg_trg_Set_Unit_Life_Time, function Trig_Set_Unit_Life_Time_Actions )
endfunction
function Trig_TUS_Initialize_Actions takes nothing returns nothing
set udg_Unit_Life_Time[0] = -1
call StartTimerBJ( udg_Temporary_Unit_Timer, true, 1.00 )
endfunction
//===========================================================================
function InitTrig_TUS_Initialize takes nothing returns nothing
set gg_trg_TUS_Initialize = CreateTrigger( )
call TriggerAddAction( gg_trg_TUS_Initialize, function Trig_TUS_Initialize_Actions )
endfunction
function Trig_Temporary_Unit_Timer_Actions takes nothing returns nothing
set bj_forLoopAIndex = 0
set bj_forLoopAIndexEnd = ( udg_Temporary_Unit_Max_Num - 1 )
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( udg_Unit_Life_Time[bj_forLoopAIndex] == 0 ) then
if ( udg_Unit_Death_Type[bj_forLoopAIndex] == 0 ) then
call KillUnit( udg_Temporary_Unit_Table[bj_forLoopAIndex] )
endif
if ( udg_Unit_Death_Type[bj_forLoopAIndex] == 1 ) then
call ExplodeUnitBJ( udg_Temporary_Unit_Table[bj_forLoopAIndex] )
endif
if ( udg_Unit_Death_Type[bj_forLoopAIndex] == 2 ) then
call RemoveUnit( udg_Temporary_Unit_Table[bj_forLoopAIndex] )
endif
endif
set udg_Unit_Life_Time[GetForLoopIndexA()] = ( udg_Unit_Life_Time[GetForLoopIndexA()] - 1 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Temporary_Unit_Timer takes nothing returns nothing
set gg_trg_Temporary_Unit_Timer = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_Temporary_Unit_Timer, udg_Temporary_Unit_Timer )
call TriggerAddAction( gg_trg_Temporary_Unit_Timer, function Trig_Temporary_Unit_Timer_Actions )
endfunction
function Trig_Exp_Rate_Initialize_Func002002 takes nothing returns nothing
call SetPlayerHandicapXPBJ( GetEnumPlayer(), ( 25.00 + ( 8.00 * I2R(CountPlayersInForceBJ(udg_Hero_Player_User)) ) ) )
endfunction
function Trig_Exp_Rate_Initialize_Func003002 takes nothing returns nothing
call SetPlayerAllianceBJ( GetEnumPlayer(), ALLIANCE_SHARED_VISION, true, GetEnumPlayer() )
endfunction
function Trig_Exp_Rate_Initialize_Func004002 takes nothing returns nothing
call SetPlayerAllianceBJ( GetEnumPlayer(), ALLIANCE_SHARED_CONTROL, true, GetEnumPlayer() )
endfunction
function Trig_Exp_Rate_Initialize_Func005002 takes nothing returns nothing
call SetPlayerAllianceBJ( GetEnumPlayer(), ALLIANCE_SHARED_ADVANCED_CONTROL, true, GetEnumPlayer() )
endfunction
function Trig_Exp_Rate_Initialize_Func006002 takes nothing returns nothing
call SetPlayerAllianceBJ( GetEnumPlayer(), ALLIANCE_SHARED_XP, true, GetEnumPlayer() )
endfunction
function Trig_Exp_Rate_Initialize_Actions takes nothing returns nothing
call TriggerExecute( gg_trg_Reset_User_Group )
call ForForce( udg_Hero_Player_User, function Trig_Exp_Rate_Initialize_Func002002 )
call ForForce( udg_Hero_Player_User, function Trig_Exp_Rate_Initialize_Func003002 )
call ForForce( udg_Hero_Player_User, function Trig_Exp_Rate_Initialize_Func004002 )
call ForForce( udg_Hero_Player_User, function Trig_Exp_Rate_Initialize_Func005002 )
call ForForce( udg_Hero_Player_User, function Trig_Exp_Rate_Initialize_Func006002 )
endfunction
//===========================================================================
function InitTrig_Exp_Rate_Initialize takes nothing returns nothing
set gg_trg_Exp_Rate_Initialize = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Exp_Rate_Initialize, 1.00 )
call TriggerAddAction( gg_trg_Exp_Rate_Initialize, function Trig_Exp_Rate_Initialize_Actions )
endfunction
function Trig_Quest_Initialize_Actions takes nothing returns nothing
call CreateQuestBJ( bj_QUESTTYPE_REQ_UNDISCOVERED, "TRIGSTR_125", "TRIGSTR_126", "ReplaceableTextures\\CommandButtons\\BTNBanditLord.blp" )
set udg_Quest_Eliminate_Bandits = GetLastCreatedQuestBJ()
call CreateQuestBJ( bj_QUESTTYPE_REQ_UNDISCOVERED, "TRIGSTR_367", "TRIGSTR_368", "ReplaceableTextures\\CommandButtons\\BTNTheCaptain.blp" )
set udg_Quest_Rescue_Watchguard = GetLastCreatedQuestBJ()
call CreateQuestBJ( bj_QUESTTYPE_REQ_UNDISCOVERED, "TRIGSTR_287", "TRIGSTR_288", "ReplaceableTextures\\CommandButtons\\BTNHeroPaladin.blp" )
set udg_Quest_Secret_Way = GetLastCreatedQuestBJ()
call CreateQuestBJ( bj_QUESTTYPE_REQ_UNDISCOVERED, "TRIGSTR_127", "TRIGSTR_128", "ReplaceableTextures\\CommandButtons\\BTNAmbush.blp" )
set udg_Quest_Hunt_Hunter = GetLastCreatedQuestBJ()
call CreateQuestBJ( bj_QUESTTYPE_REQ_UNDISCOVERED, "TRIGSTR_129", "TRIGSTR_130", "ReplaceableTextures\\CommandButtons\\BTNAmbush.blp" )
set udg_Quest_Lich_King = GetLastCreatedQuestBJ()
endfunction
//===========================================================================
function InitTrig_Quest_Initialize takes nothing returns nothing
set gg_trg_Quest_Initialize = CreateTrigger( )
call TriggerAddAction( gg_trg_Quest_Initialize, function Trig_Quest_Initialize_Actions )
endfunction
function Trig_Units_Initialize_Func008A takes nothing returns nothing
call PauseUnitBJ( true, GetEnumUnit() )
call SetUnitPathing( GetEnumUnit(), false )
call SetUnitAcquireRangeBJ( GetEnumUnit(), 0.00 )
call SetUnitInvulnerable( GetEnumUnit(), true )
endfunction
function Trig_Units_Initialize_Func025001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'hhes' )
endfunction
function Trig_Units_Initialize_Func025001002002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'hcth' )
endfunction
function Trig_Units_Initialize_Func025001002 takes nothing returns boolean
return GetBooleanOr( Trig_Units_Initialize_Func025001002001(), Trig_Units_Initialize_Func025001002002() )
endfunction
function Trig_Units_Initialize_Func026A takes nothing returns nothing
call PauseUnitBJ( true, GetEnumUnit() )
call SetUnitAnimationWithRarity( GetEnumUnit(), "stand", RARITY_FREQUENT )
endfunction
function Trig_Units_Initialize_Func029A takes nothing returns nothing
call SetUnitFacingToFaceLocTimed( GetEnumUnit(), GetRectCenter(gg_rct_Monster1_13), 0 )
call SetUnitInvulnerable( GetEnumUnit(), true )
call SetUnitPathing( GetEnumUnit(), false )
call PauseUnitBJ( true, GetEnumUnit() )
call SetUnitAnimationWithRarity( GetEnumUnit(), "stand", RARITY_RARE )
endfunction
function Trig_Units_Initialize_Func038A takes nothing returns nothing
call UnitAddAbilityBJ( 'Awan', GetEnumUnit() )
call UnitSetCanSleepBJ( GetEnumUnit(), true )
endfunction
function Trig_Units_Initialize_Actions takes nothing returns nothing
call PauseUnitBJ( true, gg_unit_Npbm_0041 )
call ShowUnitHide( gg_unit_Npbm_0041 )
call SetHeroLevelBJ( gg_unit_UC33_0179, 35, false )
call SetUnitInvulnerable( gg_unit_nten_0376, true )
call GroupAddUnitSimple( gg_unit_nemi_0383, udg_gr_NPC_Merchant )
call GroupAddUnitSimple( gg_unit_hmtm_0586, udg_gr_NPC_Merchant )
call ForGroupBJ( udg_gr_NPC_Merchant, function Trig_Units_Initialize_Func008A )
// Weapon Shop
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 11
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call AddItemToStockBJ( ChooseRandomItemExBJ(GetRandomInt(1, 5), ITEM_TYPE_ARTIFACT), gg_unit_h007_0002, 3, 5 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 11
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call AddItemToStockBJ( ChooseRandomItemExBJ(GetRandomInt(3, 7), ITEM_TYPE_ARTIFACT), gg_unit_h009_0092, 3, 5 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 11
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call AddItemToStockBJ( ChooseRandomItemExBJ(GetRandomInt(5, 8), ITEM_TYPE_ARTIFACT), gg_unit_h00A_0494, 3, 5 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
// Magic Shop
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call AddItemToStockBJ( ChooseRandomItemExBJ(GetRandomInt(1, 3), ITEM_TYPE_PERMANENT), gg_unit_n000_0298, 3, 5 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call AddItemToStockBJ( ChooseRandomItemExBJ(GetRandomInt(2, 5), ITEM_TYPE_ANY), gg_unit_n00D_0481, 3, 5 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call AddItemToStockBJ( ChooseRandomItemExBJ(GetRandomInt(3, 8), ITEM_TYPE_PERMANENT), gg_unit_n00F_0453, 3, 5 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
// Item Shop
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 11
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call AddItemToStockBJ( ChooseRandomItemExBJ(GetRandomInt(1, 3), ITEM_TYPE_PERMANENT), gg_unit_n000_0298, 3, 5 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 11
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call AddItemToStockBJ( ChooseRandomItemExBJ(GetRandomInt(2, 5), ITEM_TYPE_ANY), gg_unit_n00D_0481, 3, 5 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 11
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call AddItemToStockBJ( ChooseRandomItemExBJ(GetRandomInt(3, 8), ITEM_TYPE_PERMANENT), gg_unit_n00F_0453, 3, 5 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
// Magician
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 11
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call AddItemToStockBJ( ChooseRandomItemExBJ(GetRandomInt(0, 1), ITEM_TYPE_CHARGED), gg_unit_ngme_0628, 3, 5 )
call AddItemToStockBJ( ChooseRandomItemExBJ(GetRandomInt(0, 1), ITEM_TYPE_PURCHASABLE), gg_unit_ngme_0628, 3, 5 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 11
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call AddItemToStockBJ( ChooseRandomItemExBJ(GetRandomInt(0, 1), ITEM_TYPE_CHARGED), gg_unit_ngme_0648, 3, 5 )
call AddItemToStockBJ( ChooseRandomItemExBJ(GetRandomInt(0, 1), ITEM_TYPE_PURCHASABLE), gg_unit_ngme_0648, 3, 5 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
// Reinforcemnet Team
call GroupAddGroup( GetUnitsInRectMatching(gg_rct_Reinforcement_Town1, Condition(function Trig_Units_Initialize_Func025001002)), udg_gr_Reinforce )
call ForGroupBJ( udg_gr_Reinforce, function Trig_Units_Initialize_Func026A )
// Watchguard
call GroupAddGroup( GetUnitsInRectOfPlayer(gg_rct_watchguardrescued, Player(6)), udg_gr_Watchguard )
call ForGroupBJ( udg_gr_Watchguard, function Trig_Units_Initialize_Func029A )
// Villagers
call GroupAddGroup( GetUnitsOfPlayerAndTypeId(Player(6), 'hpea'), udg_gr_Villager )
call GroupAddGroup( GetUnitsOfPlayerAndTypeId(Player(6), 'nhef'), udg_gr_Villager )
call GroupAddGroup( GetUnitsOfPlayerAndTypeId(Player(6), 'nvlw'), udg_gr_Villager )
call GroupAddGroup( GetUnitsOfPlayerAndTypeId(Player(6), 'nvlk'), udg_gr_Villager )
call GroupAddGroup( GetUnitsOfPlayerAndTypeId(Player(6), 'nvk2'), udg_gr_Villager )
call GroupAddGroup( GetUnitsOfPlayerAndTypeId(Player(6), 'nvl2'), udg_gr_Villager )
call GroupAddGroup( GetUnitsOfPlayerAndTypeId(Player(6), 'nvil'), udg_gr_Villager )
call ForGroupBJ( udg_gr_Villager, function Trig_Units_Initialize_Func038A )
// Villagers Ruin
call GroupAddGroup( GetUnitsInRectOfPlayer(gg_rct_VillageNeutral, Player(PLAYER_NEUTRAL_PASSIVE)), udg_gr_Villager_Ruin )
// MiniQuest
call UnitRemoveAbilityBJ( 'Arep', gg_unit_hpea_0621 )
call UnitRemoveAbilityBJ( 'Awan', gg_unit_hpea_0621 )
call UnitRemoveAbilityBJ( 'Ahar', gg_unit_hpea_0621 )
call UnitRemoveAbilityBJ( 'Amil', gg_unit_hpea_0621 )
call UnitRemoveAbilityBJ( 'Awan', gg_unit_nhef_0622 )
call SetUnitInvulnerable( gg_unit_n007_0541, true )
call SetUnitInvulnerable( gg_unit_nvk2_0118, true )
call SetUnitInvulnerable( gg_unit_hpea_0621, true )
call SetUnitInvulnerable( gg_unit_nhef_0622, true )
call UnitRemoveAbilityBJ( 'Awan', gg_unit_nvk2_0118 )
call PauseUnitBJ( true, gg_unit_hhes_0031 )
call PauseUnitBJ( true, gg_unit_Hhkl_0480 )
call PauseUnitBJ( true, gg_unit_Hvwd_0110 )
call PauseUnitBJ( true, gg_unit_Hmbr_0111 )
call PauseUnitBJ( true, gg_unit_H000_0001 )
call PauseUnitBJ( true, gg_unit_EC32_0405 )
endfunction
//===========================================================================
function InitTrig_Units_Initialize takes nothing returns nothing
set gg_trg_Units_Initialize = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Units_Initialize, 1.00 )
call TriggerAddAction( gg_trg_Units_Initialize, function Trig_Units_Initialize_Actions )
endfunction
function Trig_Destructible_Initialize_Func014002 takes nothing returns nothing
call SetDestructableInvulnerableBJ( GetEnumDestructable(), true )
endfunction
function Trig_Destructible_Initialize_Actions takes nothing returns nothing
call SetDestructableInvulnerableBJ( gg_dest_LTg3_0412, true )
call SetDestructableInvulnerableBJ( gg_dest_ATg4_2056, true )
call SetDestructableInvulnerableBJ( gg_dest_LTg3_1103, true )
call SetDestructableInvulnerableBJ( gg_dest_LTg2_0158, true )
call SetDestructableInvulnerableBJ( gg_dest_LTg4_6198, true )
call SetDestructableInvulnerableBJ( gg_dest_LTg4_7532, true )
call SetDestructableInvulnerableBJ( gg_dest_ATg2_4102, true )
call SetDestructableInvulnerableBJ( gg_dest_ATg4_1833, true )
call ModifyGateBJ( bj_GATEOPERATION_CLOSE, gg_dest_LTg2_0158 )
call SetDestructableInvulnerableBJ( gg_dest_LTex_6257, true )
call SetDestructableInvulnerableBJ( gg_dest_LTex_6258, true )
call SetDestructableInvulnerableBJ( gg_dest_LTex_6259, true )
call EnumDestructablesInRectAll( gg_rct_Region_163, function Trig_Destructible_Initialize_Func014002 )
call ModifyGateBJ( bj_GATEOPERATION_OPEN, gg_dest_DTg7_6271 )
call ModifyGateBJ( bj_GATEOPERATION_OPEN, gg_dest_DTg7_4666 )
set udg_Custom_Group_1[1] = 'hhes'
set udg_Custom_Group_1[2] = 'hcth'
set udg_Custom_Group_1[3] = 'nemi'
set udg_Custom_Group_1[4] = 'nhea'
set udg_Custom_Group_1[5] = 'hrif'
set udg_Custom_Group_2[1] = 'njks'
set udg_Custom_Group_2[2] = 'nbld'
set udg_Custom_Group_2[3] = 'nenf'
set udg_Custom_Group_2[4] = 'nass'
set udg_Custom_Group_2[5] = 'hkni'
set udg_Custom_Group_2[6] = 'h00F'
set udg_Custom_Group_2[7] = 'nwzd'
set udg_Custom_Group_2[8] = 'hfoo'
endfunction
//===========================================================================
function InitTrig_Destructible_Initialize takes nothing returns nothing
set gg_trg_Destructible_Initialize = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Destructible_Initialize, 1.00 )
call TriggerAddAction( gg_trg_Destructible_Initialize, function Trig_Destructible_Initialize_Actions )
endfunction
function Trig_Map_Initialize_Func003002 takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'ewsp', GetEnumPlayer(), GetPlayerStartLocationLoc(GetEnumPlayer()), bj_UNIT_FACING )
endfunction
function Trig_Map_Initialize_Func004002 takes nothing returns nothing
call SetPlayerAllianceStateBJ( GetEnumPlayer(), Player(6), bj_ALLIANCE_ALLIED )
endfunction
function Trig_Map_Initialize_Func005002 takes nothing returns nothing
call SetPlayerAllianceStateBJ( Player(6), GetEnumPlayer(), bj_ALLIANCE_ALLIED )
endfunction
function Trig_Map_Initialize_Func006002 takes nothing returns nothing
call SetPlayerAllianceStateBJ( Player(8), GetEnumPlayer(), bj_ALLIANCE_UNALLIED )
endfunction
function Trig_Map_Initialize_Func007002 takes nothing returns nothing
call SetPlayerAllianceStateBJ( GetEnumPlayer(), Player(8), bj_ALLIANCE_UNALLIED )
endfunction
function Trig_Map_Initialize_Func008002 takes nothing returns nothing
call SetPlayerAllianceStateBJ( GetEnumPlayer(), Player(7), bj_ALLIANCE_UNALLIED_VISION )
endfunction
function Trig_Map_Initialize_Func009002 takes nothing returns nothing
call SetPlayerAllianceStateBJ( Player(7), GetEnumPlayer(), bj_ALLIANCE_UNALLIED )
endfunction
function Trig_Map_Initialize_Func017002 takes nothing returns nothing
call SetPlayerAllianceStateBJ( Player(0), Player(9), bj_ALLIANCE_ALLIED )
endfunction
function Trig_Map_Initialize_Func050002 takes nothing returns nothing
call UnitSetCanSleepBJ( GetEnumUnit(), true )
endfunction
function Trig_Map_Initialize_Func051002 takes nothing returns nothing
call UnitSetCanSleepBJ( GetEnumUnit(), true )
endfunction
function Trig_Map_Initialize_Actions takes nothing returns nothing
set udg_u_Current_Town = gg_unit_hcas_0303
call TriggerExecute( gg_trg_Reset_User_Group )
call ForForce( udg_Hero_Player_User, function Trig_Map_Initialize_Func003002 )
call ForForce( udg_Hero_Player_User, function Trig_Map_Initialize_Func004002 )
call ForForce( udg_Hero_Player_User, function Trig_Map_Initialize_Func005002 )
call ForForce( udg_Hero_Player_User, function Trig_Map_Initialize_Func006002 )
call ForForce( udg_Hero_Player_User, function Trig_Map_Initialize_Func007002 )
call ForForce( udg_Hero_Player_User, function Trig_Map_Initialize_Func008002 )
call ForForce( udg_Hero_Player_User, function Trig_Map_Initialize_Func009002 )
call SetPlayerAllianceStateBJ( Player(7), Player(6), bj_ALLIANCE_ALLIED )
call SetPlayerName( Player(9), "TRIGSTR_102" )
call SetPlayerAllianceStateBJ( Player(6), Player(7), bj_ALLIANCE_NEUTRAL )
call SetPlayerAllianceStateBJ( Player(8), Player(9), bj_ALLIANCE_NEUTRAL_VISION )
call SetPlayerAllianceStateBJ( Player(9), Player(8), bj_ALLIANCE_NEUTRAL_VISION )
call SetPlayerAllianceStateBJ( Player(6), Player(9), bj_ALLIANCE_UNALLIED )
call SetPlayerAllianceStateBJ( Player(9), Player(6), bj_ALLIANCE_UNALLIED )
call ForForce( GetPlayersByMapControl(MAP_CONTROL_USER), function Trig_Map_Initialize_Func017002 )
call EnableDawnDusk( true )
call SetMapMusicIndexedBJ( "music", 0 )
call SetAmbientDaySound( "VillageFallDay" )
call SetAmbientNightSound( "BlackCitadelNight" )
call PlayMusicBJ( "music" )
call SetMusicVolumeBJ( 100 )
call VolumeGroupSetVolumeBJ( SOUND_VOLUMEGROUP_AMBIENTSOUNDS, 100 )
call VolumeGroupSetVolumeBJ( SOUND_VOLUMEGROUP_SPELLS, 100 )
call VolumeGroupSetVolumeBJ( SOUND_VOLUMEGROUP_COMBAT, 100.00 )
call VolumeGroupSetVolumeBJ( SOUND_VOLUMEGROUP_FIRE, 100.00 )
call VolumeGroupSetVolumeBJ( SOUND_VOLUMEGROUP_UNITMOVEMENT, 100.00 )
call VolumeGroupSetVolumeBJ( SOUND_VOLUMEGROUP_UNITSOUNDS, 100.00 )
call VolumeGroupSetVolumeBJ( SOUND_VOLUMEGROUP_UI, 100.00 )
call UseTimeOfDayBJ( true )
call SetTimeOfDay( 8.00 )
call SetMapFlag( MAP_RELOADED, true )
call FogEnableOn( )
call SetSkyModel( "Environment\\Sky\\LordaeronFallSky\\LordaeronFallSky.mdl" )
call SetTerrainFogExBJ( 0, 1400.00, 5000.00, 10.00, 50.00, 30.00, 10.00 )
call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, Player(8) )
call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, Player(7) )
call SetPlayerColorBJ( Player(7), GetPlayerColor(Player(8)), true )
call SetPlayerColorBJ( Player(6), PLAYER_COLOR_BROWN, true )
call AdjustPlayerStateBJ( 50000, Player(6), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 50000, Player(6), PLAYER_STATE_RESOURCE_LUMBER )
call AdjustPlayerStateBJ( 1000, Player(6), PLAYER_STATE_RESOURCE_FOOD_CAP )
call AdjustPlayerStateBJ( 1000, Player(6), PLAYER_STATE_FOOD_CAP_CEILING )
call AdjustPlayerStateBJ( 50000, Player(8), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 50000, Player(8), PLAYER_STATE_RESOURCE_LUMBER )
call AdjustPlayerStateBJ( 1000, Player(8), PLAYER_STATE_RESOURCE_FOOD_CAP )
call AdjustPlayerStateBJ( 1000, Player(8), PLAYER_STATE_FOOD_CAP_CEILING )
call EnableCreepSleepBJ( true )
call ForGroupBJ( GetUnitsOfPlayerAll(Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Map_Initialize_Func050002 )
call ForGroupBJ( GetUnitsOfPlayerAll(Player(PLAYER_NEUTRAL_PASSIVE)), function Trig_Map_Initialize_Func051002 )
call TriggerExecute( gg_trg_TUS_Initialize )
call TriggerExecute( gg_trg_HS_Initialize )
call TriggerExecute( gg_trg_ES_Initialize )
call TriggerExecute( gg_trg_Units_Initialize )
call TriggerExecute( gg_trg_Quest_Initialize )
call TriggerExecute( gg_trg_Credits )
endfunction
//===========================================================================
function InitTrig_Map_Initialize takes nothing returns nothing
set gg_trg_Map_Initialize = CreateTrigger( )
call TriggerAddAction( gg_trg_Map_Initialize, function Trig_Map_Initialize_Actions )
endfunction
function Trig_General_Intro_Func001001 takes nothing returns boolean
return ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_General_Intro_Func001002 takes nothing returns boolean
return ( IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()), GetPlayersByMapControl(MAP_CONTROL_USER)) == true )
endfunction
function Trig_General_Intro_Conditions takes nothing returns boolean
if ( not GetBooleanAnd( Trig_General_Intro_Func001001(), Trig_General_Intro_Func001002() ) ) then
return false
endif
return true
endfunction
function Trig_General_Intro_Func007002 takes nothing returns nothing
call SetCameraTargetControllerNoZForPlayer( GetEnumPlayer(), GetTriggerUnit(), 0, 0, false )
endfunction
function Trig_General_Intro_Func010002 takes nothing returns nothing
call CameraSetupApplyForPlayer( true, gg_cam_Camera_001, GetEnumPlayer(), 5.00 )
endfunction
function Trig_General_Intro_Func017002 takes nothing returns nothing
call CameraSetupApplyForPlayer( true, gg_cam_Camera_001a, GetEnumPlayer(), 5.00 )
endfunction
function Trig_General_Intro_Func025002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), GetUnitLoc(GetTriggerUnit()), 2.00 )
endfunction
function Trig_General_Intro_Func026002 takes nothing returns nothing
call ResetToGameCameraForPlayer( GetEnumPlayer(), 2.00 )
endfunction
function Trig_General_Intro_Func038001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'hhes' )
endfunction
function Trig_General_Intro_Func038001002002 takes nothing returns boolean
return ( 'hcth' == 'hcth' )
endfunction
function Trig_General_Intro_Func038001002 takes nothing returns boolean
return GetBooleanOr( Trig_General_Intro_Func038001002001(), Trig_General_Intro_Func038001002002() )
endfunction
function Trig_General_Intro_Func038002 takes nothing returns nothing
call PauseUnitBJ( true, GetEnumUnit() )
endfunction
function Trig_General_Intro_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call PauseAllUnitsBJ( true )
call IssueImmediateOrderBJ( GetTriggerUnit(), "stop" )
call TriggerExecute( gg_trg_Reset_User_Group )
call ForForce( udg_Hero_Player_User, function Trig_General_Intro_Func007002 )
call CinematicModeBJ( true, udg_Hero_Player_User )
call ShowInterfaceForceOff( udg_Hero_Player_User, 2 )
call ForForce( udg_Hero_Player_User, function Trig_General_Intro_Func010002 )
call SetUnitAnimationWithRarity( gg_unit_Harf_0009, "stand", RARITY_FREQUENT )
call TriggerSleepAction( 3.00 )
call TransmissionFromUnitWithNameBJ( udg_Hero_Player_User, gg_unit_Harf_0009, "TRIGSTR_028", null, "TRIGSTR_055", bj_TIMETYPE_ADD, 15.00, true )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = CountPlayersInForceBJ(udg_Hero_Player_User)
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call TriggerSleepAction( 5.00 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call TransmissionFromUnitWithNameBJ( udg_Hero_Player_User, gg_unit_Harf_0009, "TRIGSTR_028", null, "TRIGSTR_059", bj_TIMETYPE_ADD, 15.00, true )
call TriggerSleepAction( 2 )
call ForForce( udg_Hero_Player_User, function Trig_General_Intro_Func017002 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = CountPlayersInForceBJ(udg_Hero_Player_User)
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call TriggerSleepAction( 5.00 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call TransmissionFromUnitWithNameBJ( udg_Hero_Player_User, gg_unit_Harf_0009, "TRIGSTR_028", null, "TRIGSTR_2326", bj_TIMETYPE_ADD, 15.00, true )
call ModifyGateBJ( bj_GATEOPERATION_OPEN, gg_dest_LTg2_0158 )
call PlaySoundBJ( gg_snd_BattleNetDoorsStereo2 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = CountPlayersInForceBJ(udg_Hero_Player_User)
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call TriggerSleepAction( 5.00 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ShowInterfaceForceOn( udg_Hero_Player_User, 2 )
call CinematicModeBJ( false, GetPlayersAll() )
call ForForce( udg_Hero_Player_User, function Trig_General_Intro_Func025002 )
call ForForce( udg_Hero_Player_User, function Trig_General_Intro_Func026002 )
call TriggerExecute( gg_trg_Lock_Camera_to_Heroes )
call PauseAllUnitsBJ( false )
call TriggerExecute( gg_trg_Pause_NPC )
call QuestSetDiscoveredBJ( udg_Quest_Eliminate_Bandits, true )
call QuestMessageBJ( GetPlayersAll(), bj_QUESTMESSAGE_DISCOVERED, "TRIGSTR_371" )
call QuestSetDiscoveredBJ( udg_Quest_Rescue_Watchguard, true )
call QuestMessageBJ( GetPlayersAll(), bj_QUESTMESSAGE_DISCOVERED, "TRIGSTR_133" )
call FlashQuestDialogButtonBJ( )
call IssuePointOrderLocBJ( gg_unit_hhes_0013, "move", GetRectCenter(gg_rct_Monster1_01) )
call IssuePointOrderLocBJ( gg_unit_hhes_0014, "move", GetRectCenter(gg_rct_Monster1_01) )
call IssuePointOrderLocBJ( gg_unit_hhes_0381, "move", GetRectCenter(gg_rct_Monster1_01) )
call ForGroupBJ( GetUnitsInRectMatching(gg_rct_Reinforcement_Town1, Condition(function Trig_General_Intro_Func038001002)), function Trig_General_Intro_Func038002 )
endfunction
//===========================================================================
function InitTrig_General_Intro takes nothing returns nothing
set gg_trg_General_Intro = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_General_Intro, gg_rct_General_Intro )
call TriggerAddCondition( gg_trg_General_Intro, Condition( function Trig_General_Intro_Conditions ) )
call TriggerAddAction( gg_trg_General_Intro, function Trig_General_Intro_Actions )
endfunction
function Trig_Holy_Base_Guard_Func002001 takes nothing returns boolean
return ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Holy_Base_Guard_Func002002 takes nothing returns boolean
return ( IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()), GetPlayersByMapControl(MAP_CONTROL_USER)) == true )
endfunction
function Trig_Holy_Base_Guard_Conditions takes nothing returns boolean
if ( not GetBooleanAnd( Trig_Holy_Base_Guard_Func002001(), Trig_Holy_Base_Guard_Func002002() ) ) then
return false
endif
return true
endfunction
function Trig_Holy_Base_Guard_Func001Func001C takes nothing returns boolean
if ( ( RectContainsUnit(gg_rct_watchguardrescued, gg_unit_hrif_0456) == true ) ) then
return true
endif
if ( ( IsUnitAliveBJ(gg_unit_H000_0001) == true ) ) then
return true
endif
return false
endfunction
function Trig_Holy_Base_Guard_Func001Func013C takes nothing returns boolean
if ( not ( udg_Guard_1_Come != true ) ) then
return false
endif
return true
endfunction
function Trig_Holy_Base_Guard_Func001C takes nothing returns boolean
if ( not Trig_Holy_Base_Guard_Func001Func001C() ) then
return false
endif
return true
endfunction
function Trig_Holy_Base_Guard_Actions takes nothing returns nothing
if ( Trig_Holy_Base_Guard_Func001C() ) then
if ( Trig_Holy_Base_Guard_Func001Func013C() ) then
call DisableTrigger( GetTriggeringTrigger() )
call ForceCinematicSubtitlesBJ( true )
call TransmissionFromUnitWithNameBJ( GetPlayersByMapControl(MAP_CONTROL_USER), gg_unit_hcth_0015, "TRIGSTR_820", null, "TRIGSTR_821", bj_TIMETYPE_ADD, 10.00, true )
call TriggerSleepAction( 5.00 )
set udg_Guard_1_Come = true
call TriggerSleepAction( 30.00 )
call EnableTrigger( GetTriggeringTrigger() )
else
call TriggerSleepAction( 30.00 )
call EnableTrigger( GetTriggeringTrigger() )
endif
else
call DisableTrigger( GetTriggeringTrigger() )
call ForceCinematicSubtitlesBJ( true )
call TransmissionFromUnitWithNameBJ( GetPlayersByMapControl(MAP_CONTROL_USER), gg_unit_hcth_0015, "TRIGSTR_820", null, "TRIGSTR_823", bj_TIMETYPE_ADD, 15.00, true )
call TriggerSleepAction( 5.00 )
call ModifyGateBJ( bj_GATEOPERATION_OPEN, gg_dest_LTg3_0412 )
call PlaySoundBJ( gg_snd_BattleNetDoorsStereo2 )
call TriggerSleepAction( 2.00 )
call TriggerExecute( gg_trg_Pause_NPC )
call TriggerExecute( gg_trg_Set_BL_Enemy )
call TriggerSleepAction( 2 )
call DisableTrigger( GetTriggeringTrigger() )
endif
endfunction
//===========================================================================
function InitTrig_Holy_Base_Guard takes nothing returns nothing
set gg_trg_Holy_Base_Guard = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Holy_Base_Guard, gg_rct_Guard_1 )
call TriggerAddCondition( gg_trg_Holy_Base_Guard, Condition( function Trig_Holy_Base_Guard_Conditions ) )
call TriggerAddAction( gg_trg_Holy_Base_Guard, function Trig_Holy_Base_Guard_Actions )
endfunction
function Trig_Demon_Mount_Guard_Func003001 takes nothing returns boolean
return ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Demon_Mount_Guard_Func003002 takes nothing returns boolean
return ( IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()), GetPlayersByMapControl(MAP_CONTROL_USER)) == true )
endfunction
function Trig_Demon_Mount_Guard_Conditions takes nothing returns boolean
if ( not GetBooleanAnd( Trig_Demon_Mount_Guard_Func003001(), Trig_Demon_Mount_Guard_Func003002() ) ) then
return false
endif
return true
endfunction
function Trig_Demon_Mount_Guard_Func002Func001C takes nothing returns boolean
if ( ( RectContainsUnit(gg_rct_Region_002, gg_unit_Hamg_0709) == true ) ) then
return true
endif
if ( ( IsUnitAliveBJ(gg_unit_EC32_0405) == true ) ) then
return true
endif
return false
endfunction
function Trig_Demon_Mount_Guard_Func002Func014Func021A takes nothing returns nothing
call SetPlayerTechResearchedSwap( 'R000', 2, GetEnumPlayer() )
call SetPlayerTechResearchedSwap( 'R001', 2, GetEnumPlayer() )
call SetPlayerTechResearchedSwap( 'R003', 2, GetEnumPlayer() )
call SetPlayerTechResearchedSwap( 'R004', 2, GetEnumPlayer() )
call SetPlayerTechResearchedSwap( 'R002', 2, GetEnumPlayer() )
endfunction
function Trig_Demon_Mount_Guard_Func002Func014C takes nothing returns boolean
if ( not ( udg_Guard_2_Come != true ) ) then
return false
endif
return true
endfunction
function Trig_Demon_Mount_Guard_Func002C takes nothing returns boolean
if ( not Trig_Demon_Mount_Guard_Func002Func001C() ) then
return false
endif
return true
endfunction
function Trig_Demon_Mount_Guard_Actions takes nothing returns nothing
if ( Trig_Demon_Mount_Guard_Func002C() ) then
if ( Trig_Demon_Mount_Guard_Func002Func014C() ) then
call DisableTrigger( GetTriggeringTrigger() )
call ForceCinematicSubtitlesBJ( true )
call TransmissionFromUnitWithNameBJ( GetPlayersByMapControl(MAP_CONTROL_USER), gg_unit_Hlgr_0072, "TRIGSTR_941", null, "TRIGSTR_944", bj_TIMETYPE_ADD, 10.00, true )
call TriggerSleepAction( 7.00 )
call TransmissionFromUnitWithNameBJ( GetPlayersByMapControl(MAP_CONTROL_USER), gg_unit_Hlgr_0072, "TRIGSTR_941", null, "TRIGSTR_948", bj_TIMETYPE_ADD, 15.00, true )
call TriggerSleepAction( 5.00 )
set udg_Guard_2_Come = true
call TriggerSleepAction( 1.00 )
call QuestSetDiscoveredBJ( udg_Quest_Hunt_Hunter, true )
call QuestMessageBJ( GetPlayersAll(), bj_QUESTMESSAGE_DISCOVERED, "TRIGSTR_949" )
call FlashQuestDialogButtonBJ( )
call ModifyGateBJ( bj_GATEOPERATION_OPEN, gg_dest_LTg4_7532 )
call PlaySoundBJ( gg_snd_BattleNetDoorsStereo2 )
call SetPlayerTechResearchedSwap( 'R000', 3, Player(6) )
call SetPlayerTechResearchedSwap( 'R001', 3, Player(6) )
call SetPlayerTechResearchedSwap( 'R003', 3, Player(6) )
call SetPlayerTechResearchedSwap( 'R004', 3, Player(6) )
call SetPlayerTechResearchedSwap( 'R002', 3, Player(6) )
call ForForce( udg_Hero_Player_User, function Trig_Demon_Mount_Guard_Func002Func014Func021A )
call TriggerSleepAction( 30.00 )
call EnableTrigger( GetTriggeringTrigger() )
else
call TriggerSleepAction( 30.00 )
call EnableTrigger( GetTriggeringTrigger() )
endif
else
call DisableTrigger( GetTriggeringTrigger() )
call ForceCinematicSubtitlesBJ( true )
call TransmissionFromUnitWithNameBJ( GetPlayersByMapControl(MAP_CONTROL_USER), gg_unit_Hlgr_0072, "TRIGSTR_941", null, "TRIGSTR_942", bj_TIMETYPE_ADD, 15.00, true )
call TriggerSleepAction( 5.00 )
call ModifyGateBJ( bj_GATEOPERATION_OPEN, gg_dest_ATg4_2056 )
call PlaySoundBJ( gg_snd_BattleNetDoorsStereo2 )
call TriggerSleepAction( 2.00 )
call QuestSetDiscoveredBJ( udg_Quest_Lich_King, true )
call QuestMessageBJ( GetPlayersAll(), bj_QUESTMESSAGE_DISCOVERED, "TRIGSTR_952" )
call FlashQuestDialogButtonBJ( )
call TriggerSleepAction( 2 )
call DisableTrigger( GetTriggeringTrigger() )
endif
endfunction
//===========================================================================
function InitTrig_Demon_Mount_Guard takes nothing returns nothing
set gg_trg_Demon_Mount_Guard = CreateTrigger( )
call TriggerRegisterUnitInRangeSimple( gg_trg_Demon_Mount_Guard, 256, gg_unit_Hlgr_0072 )
call TriggerAddCondition( gg_trg_Demon_Mount_Guard, Condition( function Trig_Demon_Mount_Guard_Conditions ) )
call TriggerAddAction( gg_trg_Demon_Mount_Guard, function Trig_Demon_Mount_Guard_Actions )
endfunction
function Trig_Watchguard_Rescued_Func001001 takes nothing returns boolean
return ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Watchguard_Rescued_Func001002 takes nothing returns boolean
return ( IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()), GetPlayersByMapControl(MAP_CONTROL_USER)) == true )
endfunction
function Trig_Watchguard_Rescued_Conditions takes nothing returns boolean
if ( not GetBooleanAnd( Trig_Watchguard_Rescued_Func001001(), Trig_Watchguard_Rescued_Func001002() ) ) then
return false
endif
return true
endfunction
function Trig_Watchguard_Rescued_Func004A takes nothing returns nothing
call SetUnitFacingTimed( GetEnumUnit(), 180.00, 0 )
call SetUnitAnimationWithRarity( GetEnumUnit(), "stand", RARITY_RARE )
endfunction
function Trig_Watchguard_Rescued_Func020002 takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "attack", GetRectCenter(gg_rct_General_Intro) )
endfunction
function Trig_Watchguard_Rescued_Func024002 takes nothing returns nothing
call SetUnitInvulnerable( GetEnumUnit(), false )
endfunction
function Trig_Watchguard_Rescued_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call TriggerSleepAction( 3.00 )
call ForGroupBJ( udg_gr_Watchguard, function Trig_Watchguard_Rescued_Func004A )
call ForceCinematicSubtitlesBJ( true )
call TransmissionFromUnitWithNameBJ( GetPlayersByMapControl(MAP_CONTROL_USER), gg_unit_hcth_0496, "TRIGSTR_931", null, "TRIGSTR_932", bj_TIMETYPE_ADD, 10.00, true )
call TriggerSleepAction( 5.00 )
call ForceCinematicSubtitlesBJ( true )
call TransmissionFromUnitWithNameBJ( GetPlayersByMapControl(MAP_CONTROL_USER), gg_unit_hcth_0496, "TRIGSTR_931", null, "TRIGSTR_2327", bj_TIMETYPE_ADD, 15.00, true )
call TriggerSleepAction( 5.00 )
call ForceCinematicSubtitlesBJ( true )
call TransmissionFromUnitWithNameBJ( GetPlayersByMapControl(MAP_CONTROL_USER), gg_unit_hcth_0496, "TRIGSTR_931", null, "TRIGSTR_936", bj_TIMETYPE_ADD, 5.00, true )
call TriggerSleepAction( 5.00 )
call QuestSetCompletedBJ( udg_Quest_Rescue_Watchguard, true )
call QuestMessageBJ( GetPlayersAll(), bj_QUESTMESSAGE_DISCOVERED, "TRIGSTR_289" )
call QuestSetDiscoveredBJ( udg_Quest_Secret_Way, true )
call QuestMessageBJ( GetPlayersAll(), bj_QUESTMESSAGE_DISCOVERED, "TRIGSTR_290" )
call FlashQuestDialogButtonBJ( )
call ForGroupBJ( udg_gr_Watchguard, function Trig_Watchguard_Rescued_Func020002 )
call TriggerSleepAction( 5.00 )
call IssuePointOrderLocBJ( gg_unit_hrif_0456, "move", GetRectCenter(gg_rct_General_Intro) )
call TriggerSleepAction( 150.00 )
call ForGroupBJ( udg_gr_Watchguard, function Trig_Watchguard_Rescued_Func024002 )
call DisableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Watchguard_Rescued takes nothing returns nothing
set gg_trg_Watchguard_Rescued = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Watchguard_Rescued, gg_rct_watchguardrescued )
call TriggerAddCondition( gg_trg_Watchguard_Rescued, Condition( function Trig_Watchguard_Rescued_Conditions ) )
call TriggerAddAction( gg_trg_Watchguard_Rescued, function Trig_Watchguard_Rescued_Actions )
endfunction
function Trig_Bandit_Lord_Func001001 takes nothing returns boolean
return ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Bandit_Lord_Func001002 takes nothing returns boolean
return ( IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()), GetPlayersByMapControl(MAP_CONTROL_USER)) == true )
endfunction
function Trig_Bandit_Lord_Conditions takes nothing returns boolean
if ( not GetBooleanAnd( Trig_Bandit_Lord_Func001001(), Trig_Bandit_Lord_Func001002() ) ) then
return false
endif
return true
endfunction
function Trig_Bandit_Lord_Func010002 takes nothing returns nothing
call SetCameraTargetControllerNoZForPlayer( GetEnumPlayer(), gg_unit_H000_0001, 0, 0, false )
endfunction
function Trig_Bandit_Lord_Func013002 takes nothing returns nothing
call CameraSetupApplyForPlayer( true, gg_cam_Camera_003, GetEnumPlayer(), 0.00 )
endfunction
function Trig_Bandit_Lord_Func019002 takes nothing returns nothing
call CameraSetupApplyForPlayer( true, gg_cam_Camera_004, GetEnumPlayer(), 0.00 )
endfunction
function Trig_Bandit_Lord_Func023002 takes nothing returns nothing
call SetUnitAnimation( GetEnumUnit(), "stand defend" )
endfunction
function Trig_Bandit_Lord_Func027002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), GetUnitLoc(GetTriggerUnit()), 2.00 )
endfunction
function Trig_Bandit_Lord_Func028002 takes nothing returns nothing
call ResetToGameCameraForPlayer( GetEnumPlayer(), 2.00 )
endfunction
function Trig_Bandit_Lord_Func030002 takes nothing returns nothing
call PauseUnitBJ( false, GetEnumUnit() )
endfunction
function Trig_Bandit_Lord_Func031002 takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "attack", GetUnitLoc(gg_unit_H000_0001) )
endfunction
function Trig_Bandit_Lord_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call PauseAllUnitsBJ( true )
call IssueImmediateOrderBJ( gg_unit_H000_0001, "stop" )
call SetUnitFacingTimed( gg_unit_H000_0001, 180.00, 0 )
call IssueImmediateOrderBJ( gg_unit_H000_0001, "holdposition" )
call IssueImmediateOrderBJ( GetTriggerUnit(), "stop" )
call CinematicFadeBJ( bj_CINEFADETYPE_FADEOUTIN, 2, "ReplaceableTextures\\CameraMasks\\Black_mask.blp", 0, 0, 0, 0 )
call ForForce( udg_Hero_Player_User, function Trig_Bandit_Lord_Func010002 )
call CinematicModeBJ( true, udg_Hero_Player_User )
call ShowInterfaceForceOff( udg_Hero_Player_User, 2 )
call ForForce( udg_Hero_Player_User, function Trig_Bandit_Lord_Func013002 )
call SetUnitAnimation( gg_unit_H000_0001, "stand victory" )
call TriggerSleepAction( 1.00 )
call TransmissionFromUnitWithNameBJ( udg_Hero_Player_User, gg_unit_H000_0001, "TRIGSTR_372", null, "TRIGSTR_374", bj_TIMETYPE_ADD, 15.00, true )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = CountPlayersInForceBJ(udg_Hero_Player_User)
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call TriggerSleepAction( 5.00 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call CinematicFadeBJ( bj_CINEFADETYPE_FADEOUTIN, 3.00, "ReplaceableTextures\\CameraMasks\\Black_mask.blp", 0, 0, 0, 0 )
call ForForce( udg_Hero_Player_User, function Trig_Bandit_Lord_Func019002 )
call TriggerSleepAction( 1.00 )
call TransmissionFromUnitWithNameBJ( udg_Hero_Player_User, gg_unit_hcth_0577, "TRIGSTR_385", null, "TRIGSTR_386", bj_TIMETYPE_ADD, 10.00, true )
call TriggerSleepAction( 2 )
call ForGroupBJ( udg_gr_Reinforce, function Trig_Bandit_Lord_Func023002 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = CountPlayersInForceBJ(udg_Hero_Player_User)
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call TriggerSleepAction( 5.00 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ShowInterfaceForceOn( udg_Hero_Player_User, 2 )
call CinematicModeBJ( false, GetPlayersAll() )
call ForForce( udg_Hero_Player_User, function Trig_Bandit_Lord_Func027002 )
call ForForce( udg_Hero_Player_User, function Trig_Bandit_Lord_Func028002 )
call TriggerExecute( gg_trg_Lock_Camera_to_Heroes )
call ForGroupBJ( udg_gr_Reinforce, function Trig_Bandit_Lord_Func030002 )
call ForGroupBJ( udg_gr_Reinforce, function Trig_Bandit_Lord_Func031002 )
call PauseAllUnitsBJ( false )
call TriggerExecute( gg_trg_Pause_NPC )
call PauseUnitBJ( false, gg_unit_H000_0001 )
endfunction
//===========================================================================
function InitTrig_Bandit_Lord takes nothing returns nothing
set gg_trg_Bandit_Lord = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Bandit_Lord, gg_rct_Bandit_Lord_Scene )
call TriggerAddCondition( gg_trg_Bandit_Lord, Condition( function Trig_Bandit_Lord_Conditions ) )
call TriggerAddAction( gg_trg_Bandit_Lord, function Trig_Bandit_Lord_Actions )
endfunction
function Trig_Kill_Rebel_Func001001 takes nothing returns boolean
return ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Kill_Rebel_Func001002 takes nothing returns boolean
return ( IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()), GetPlayersByMapControl(MAP_CONTROL_USER)) == true )
endfunction
function Trig_Kill_Rebel_Conditions takes nothing returns boolean
if ( not GetBooleanAnd( Trig_Kill_Rebel_Func001001(), Trig_Kill_Rebel_Func001002() ) ) then
return false
endif
return true
endfunction
function Trig_Kill_Rebel_Func010002 takes nothing returns nothing
call SetCameraTargetControllerNoZForPlayer( GetEnumPlayer(), gg_unit_Hhkl_0480, 0, 0, false )
endfunction
function Trig_Kill_Rebel_Func013002 takes nothing returns nothing
call CameraSetupApplyForPlayer( true, gg_cam_Camera_002, GetEnumPlayer(), 5.00 )
endfunction
function Trig_Kill_Rebel_Func019002 takes nothing returns nothing
call CameraSetupApplyForPlayer( true, gg_cam_Camera_002a, GetEnumPlayer(), 10.00 )
endfunction
function Trig_Kill_Rebel_Func021002 takes nothing returns nothing
call RotateCameraAroundLocBJ( 350.00, GetRectCenter(gg_rct_Monster3_13), GetEnumPlayer(), 30.00 )
endfunction
function Trig_Kill_Rebel_Func024002 takes nothing returns nothing
call CameraSetupApplyForPlayer( true, gg_cam_Camera_002b, GetEnumPlayer(), 7.00 )
endfunction
function Trig_Kill_Rebel_Func032002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), GetUnitLoc(GetTriggerUnit()), 2.00 )
endfunction
function Trig_Kill_Rebel_Func033002 takes nothing returns nothing
call ResetToGameCameraForPlayer( GetEnumPlayer(), 2.00 )
endfunction
function Trig_Kill_Rebel_Func042A takes nothing returns nothing
call SetPlayerTechResearchedSwap( 'R000', 1, GetEnumPlayer() )
call SetPlayerTechResearchedSwap( 'R001', 1, GetEnumPlayer() )
call SetPlayerTechResearchedSwap( 'R003', 1, GetEnumPlayer() )
call SetPlayerTechResearchedSwap( 'R004', 1, GetEnumPlayer() )
call SetPlayerTechResearchedSwap( 'R002', 1, GetEnumPlayer() )
endfunction
function Trig_Kill_Rebel_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call PauseAllUnitsBJ( true )
call SetUnitFacingTimed( gg_unit_Hhkl_0480, 206.00, 0 )
call SetUnitFacingTimed( gg_unit_Hvwd_0110, 206.00, 0 )
call SetUnitFacingTimed( gg_unit_Hmbr_0111, 206.00, 0 )
call IssueImmediateOrderBJ( GetTriggerUnit(), "stop" )
call TriggerExecute( gg_trg_Reset_User_Group )
call ForForce( udg_Hero_Player_User, function Trig_Kill_Rebel_Func010002 )
call CinematicModeBJ( true, udg_Hero_Player_User )
call ShowInterfaceForceOff( udg_Hero_Player_User, 2 )
call ForForce( udg_Hero_Player_User, function Trig_Kill_Rebel_Func013002 )
call SetUnitAnimationWithRarity( gg_unit_Hhkl_0480, "stand", RARITY_FREQUENT )
call TriggerSleepAction( 3.00 )
call TransmissionFromUnitWithNameBJ( udg_Hero_Player_User, gg_unit_Hhkl_0480, "TRIGSTR_030", null, "TRIGSTR_346", bj_TIMETYPE_ADD, 10.00, true )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = CountPlayersInForceBJ(udg_Hero_Player_User)
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call TriggerSleepAction( 2.00 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call CinematicFadeBJ( bj_CINEFADETYPE_FADEOUTIN, 5.00, "ReplaceableTextures\\CameraMasks\\Black_mask.blp", 0, 0, 0, 0 )
call ForForce( udg_Hero_Player_User, function Trig_Kill_Rebel_Func019002 )
call TriggerSleepAction( 8.00 )
call ForForce( udg_Hero_Player_User, function Trig_Kill_Rebel_Func021002 )
call TransmissionFromUnitWithNameBJ( udg_Hero_Player_User, gg_unit_Hhkl_0480, "TRIGSTR_030", null, "TRIGSTR_348", bj_TIMETYPE_ADD, 20.00, true )
call CinematicFadeBJ( bj_CINEFADETYPE_FADEOUTIN, 5.00, "ReplaceableTextures\\CameraMasks\\Black_mask.blp", 0, 0, 0, 0 )
call ForForce( udg_Hero_Player_User, function Trig_Kill_Rebel_Func024002 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = CountPlayersInForceBJ(udg_Hero_Player_User)
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call TriggerSleepAction( 10.00 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ModifyGateBJ( bj_GATEOPERATION_OPEN, gg_dest_LTg4_6198 )
call PlaySoundBJ( gg_snd_BattleNetDoorsStereo2 )
call TransmissionFromUnitWithNameBJ( udg_Hero_Player_User, gg_unit_Hhkl_0480, "TRIGSTR_030", null, "TRIGSTR_350", bj_TIMETYPE_ADD, 10.00, true )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = CountPlayersInForceBJ(udg_Hero_Player_User)
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call TriggerSleepAction( 10.00 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ShowInterfaceForceOn( udg_Hero_Player_User, 2 )
call CinematicModeBJ( false, GetPlayersAll() )
call ForForce( udg_Hero_Player_User, function Trig_Kill_Rebel_Func032002 )
call ForForce( udg_Hero_Player_User, function Trig_Kill_Rebel_Func033002 )
call TriggerExecute( gg_trg_Lock_Camera_to_Heroes )
call PauseUnitBJ( false, gg_unit_Hhkl_0480 )
call PauseAllUnitsBJ( false )
call SetPlayerTechResearchedSwap( 'R000', 2, Player(6) )
call SetPlayerTechResearchedSwap( 'R001', 2, Player(6) )
call SetPlayerTechResearchedSwap( 'R003', 2, Player(6) )
call SetPlayerTechResearchedSwap( 'R004', 2, Player(6) )
call SetPlayerTechResearchedSwap( 'R002', 2, Player(6) )
call ForForce( udg_Hero_Player_User, function Trig_Kill_Rebel_Func042A )
call QuestSetTitleBJ( udg_Quest_Secret_Way, "TRIGSTR_353" )
call QuestSetDescriptionBJ( udg_Quest_Secret_Way, "TRIGSTR_355" )
call QuestMessageBJ( GetPlayersAll(), bj_QUESTMESSAGE_DISCOVERED, "TRIGSTR_352" )
call FlashQuestDialogButtonBJ( )
endfunction
//===========================================================================
function InitTrig_Kill_Rebel takes nothing returns nothing
set gg_trg_Kill_Rebel = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Kill_Rebel, gg_rct_Kill_the_Pit_Lord )
call TriggerAddCondition( gg_trg_Kill_Rebel, Condition( function Trig_Kill_Rebel_Conditions ) )
call TriggerAddAction( gg_trg_Kill_Rebel, function Trig_Kill_Rebel_Actions )
endfunction
function Trig_Camp_Func001001 takes nothing returns boolean
return ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Camp_Func001002 takes nothing returns boolean
return ( IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()), GetPlayersByMapControl(MAP_CONTROL_USER)) == true )
endfunction
function Trig_Camp_Conditions takes nothing returns boolean
if ( not GetBooleanAnd( Trig_Camp_Func001001(), Trig_Camp_Func001002() ) ) then
return false
endif
return true
endfunction
function Trig_Camp_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
// Orcs Base
set bj_forLoopBIndex = 1
set bj_forLoopBIndexEnd = 10
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
call CreateNUnitsAtLoc( 1, udg_Custom_Group_2[GetRandomInt(1, 8)], Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Region_005), bj_UNIT_FACING )
call SetUnitManaPercentBJ( GetLastCreatedUnit(), 100 )
call SetUnitLifePercentBJ( GetLastCreatedUnit(), 100 )
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
call TriggerSleepAction( 2 )
set bj_forLoopBIndex = 1
set bj_forLoopBIndexEnd = 10
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
call CreateNUnitsAtLoc( 1, udg_Custom_Group_2[GetRandomInt(1, 8)], Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Region_005), bj_UNIT_FACING )
call SetUnitManaPercentBJ( GetLastCreatedUnit(), 100 )
call SetUnitLifePercentBJ( GetLastCreatedUnit(), 100 )
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
call TriggerSleepAction( 2 )
set bj_forLoopBIndex = 1
set bj_forLoopBIndexEnd = 10
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
call CreateNUnitsAtLoc( 1, udg_Custom_Group_2[GetRandomInt(1, 8)], Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Region_005), bj_UNIT_FACING )
call SetUnitManaPercentBJ( GetLastCreatedUnit(), 100 )
call SetUnitLifePercentBJ( GetLastCreatedUnit(), 100 )
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Camp takes nothing returns nothing
set gg_trg_Camp = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Camp, gg_rct_Monster5_03 )
call TriggerAddCondition( gg_trg_Camp, Condition( function Trig_Camp_Conditions ) )
call TriggerAddAction( gg_trg_Camp, function Trig_Camp_Actions )
endfunction
function Trig_Boss_Intro_Func001001 takes nothing returns boolean
return ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Boss_Intro_Func001002 takes nothing returns boolean
return ( IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()), GetPlayersByMapControl(MAP_CONTROL_USER)) == true )
endfunction
function Trig_Boss_Intro_Conditions takes nothing returns boolean
if ( not GetBooleanAnd( Trig_Boss_Intro_Func001001(), Trig_Boss_Intro_Func001002() ) ) then
return false
endif
return true
endfunction
function Trig_Boss_Intro_Func007002 takes nothing returns nothing
call SetCameraTargetControllerNoZForPlayer( GetEnumPlayer(), GetTriggerUnit(), 0, 0, false )
endfunction
function Trig_Boss_Intro_Func010002 takes nothing returns nothing
call CameraSetupApplyForPlayer( true, gg_cam_Camera_005, GetEnumPlayer(), 5.00 )
endfunction
function Trig_Boss_Intro_Func017002 takes nothing returns nothing
call CameraSetupApplyForPlayer( true, gg_cam_Camera_005, GetEnumPlayer(), 5.00 )
endfunction
function Trig_Boss_Intro_Func023002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), GetUnitLoc(GetTriggerUnit()), 2.00 )
endfunction
function Trig_Boss_Intro_Func024002 takes nothing returns nothing
call ResetToGameCameraForPlayer( GetEnumPlayer(), 2.00 )
endfunction
function Trig_Boss_Intro_Func031001002001001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_Boss_Intro_Func031001002001002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_MECHANICAL) == false )
endfunction
function Trig_Boss_Intro_Func031001002001 takes nothing returns boolean
return GetBooleanAnd( Trig_Boss_Intro_Func031001002001001(), Trig_Boss_Intro_Func031001002001002() )
endfunction
function Trig_Boss_Intro_Func031001002002001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_PEON) == false )
endfunction
function Trig_Boss_Intro_Func031001002002002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_TOWNHALL) == false )
endfunction
function Trig_Boss_Intro_Func031001002002 takes nothing returns boolean
return GetBooleanAnd( Trig_Boss_Intro_Func031001002002001(), Trig_Boss_Intro_Func031001002002002() )
endfunction
function Trig_Boss_Intro_Func031001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Boss_Intro_Func031001002001(), Trig_Boss_Intro_Func031001002002() )
endfunction
function Trig_Boss_Intro_Func031A takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "attack", GetRectCenter(gg_rct_Boss_Target) )
endfunction
function Trig_Boss_Intro_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call PauseAllUnitsBJ( true )
call IssueImmediateOrderBJ( GetTriggerUnit(), "stop" )
call TriggerExecute( gg_trg_Reset_User_Group )
call ForForce( udg_Hero_Player_User, function Trig_Boss_Intro_Func007002 )
call CinematicModeBJ( true, udg_Hero_Player_User )
call ShowInterfaceForceOff( udg_Hero_Player_User, 2 )
call ForForce( udg_Hero_Player_User, function Trig_Boss_Intro_Func010002 )
call SetUnitAnimationWithRarity( gg_unit_UC33_0179, "stand", RARITY_FREQUENT )
call TriggerSleepAction( 3.00 )
call TransmissionFromUnitWithNameBJ( udg_Hero_Player_User, gg_unit_UC33_0179, "TRIGSTR_129", null, "TRIGSTR_1273", bj_TIMETYPE_ADD, 15.00, true )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = CountPlayersInForceBJ(udg_Hero_Player_User)
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call TriggerSleepAction( 5.00 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call TransmissionFromUnitWithNameBJ( udg_Hero_Player_User, gg_unit_UC33_0179, "TRIGSTR_129", null, "TRIGSTR_1275", bj_TIMETYPE_ADD, 15.00, true )
call TriggerSleepAction( 2 )
call ForForce( udg_Hero_Player_User, function Trig_Boss_Intro_Func017002 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = CountPlayersInForceBJ(udg_Hero_Player_User)
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call TriggerSleepAction( 5.00 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call TransmissionFromUnitWithNameBJ( udg_Hero_Player_User, gg_unit_UC33_0179, "TRIGSTR_129", null, "TRIGSTR_1277", bj_TIMETYPE_ADD, 15.00, true )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = CountPlayersInForceBJ(udg_Hero_Player_User)
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call TriggerSleepAction( 5.00 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ShowInterfaceForceOn( udg_Hero_Player_User, 2 )
call CinematicModeBJ( false, GetPlayersAll() )
call ForForce( udg_Hero_Player_User, function Trig_Boss_Intro_Func023002 )
call ForForce( udg_Hero_Player_User, function Trig_Boss_Intro_Func024002 )
call TriggerExecute( gg_trg_Lock_Camera_to_Heroes )
call PauseAllUnitsBJ( false )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 10
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call CreateNUnitsAtLoc( 1, udg_Custom_Group_1[GetRandomInt(1, 5)], Player(6), GetRandomLocInRect(gg_rct_Reinforcement_Town1), bj_UNIT_FACING )
call SetUnitManaPercentBJ( GetLastCreatedUnit(), 100 )
call SetUnitLifePercentBJ( GetLastCreatedUnit(), 100 )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_gr_Reinforce )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 10
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call CreateNUnitsAtLoc( 1, udg_Custom_Group_1[GetRandomInt(1, 5)], Player(6), GetRandomLocInRect(gg_rct_rectBLSupport1), bj_UNIT_FACING )
call SetUnitManaPercentBJ( GetLastCreatedUnit(), 100 )
call SetUnitLifePercentBJ( GetLastCreatedUnit(), 100 )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_gr_BLSupport_1 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 10
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call CreateNUnitsAtLoc( 1, udg_Custom_Group_1[GetRandomInt(1, 5)], Player(6), GetRandomLocInRect(gg_rct_rectBLSupport2), bj_UNIT_FACING )
call SetUnitManaPercentBJ( GetLastCreatedUnit(), 100 )
call SetUnitLifePercentBJ( GetLastCreatedUnit(), 100 )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_gr_BLSupport_2 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 10
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call CreateNUnitsAtLoc( 1, udg_Custom_Group_1[GetRandomInt(1, 5)], Player(6), GetRandomLocInRect(gg_rct_Reinforcement_DM), bj_UNIT_FACING )
call SetUnitManaPercentBJ( GetLastCreatedUnit(), 100 )
call SetUnitLifePercentBJ( GetLastCreatedUnit(), 100 )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_gr_BLSupport_3 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForGroupBJ( GetUnitsOfPlayerMatching(Player(6), Condition(function Trig_Boss_Intro_Func031001002)), function Trig_Boss_Intro_Func031A )
endfunction
//===========================================================================
function InitTrig_Boss_Intro takes nothing returns nothing
set gg_trg_Boss_Intro = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Boss_Intro, gg_rct_Region_004 )
call TriggerAddCondition( gg_trg_Boss_Intro, Condition( function Trig_Boss_Intro_Conditions ) )
call TriggerAddAction( gg_trg_Boss_Intro, function Trig_Boss_Intro_Actions )
endfunction
function Trig_Night_Func002001002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_PEON) == true )
endfunction
function Trig_Night_Func002A takes nothing returns nothing
call ShowUnitHide( GetEnumUnit() )
call PauseUnitBJ( true, GetEnumUnit() )
call SetUnitPathing( GetEnumUnit(), false )
endfunction
function Trig_Night_Actions takes nothing returns nothing
call SetTerrainFogExBJ( 0, 1000.00, 3500.00, 15.00, 50.00, 30.00, 10.00 )
call ForGroupBJ( GetUnitsOfPlayerMatching(Player(6), Condition(function Trig_Night_Func002001002)), function Trig_Night_Func002A )
endfunction
//===========================================================================
function InitTrig_Night takes nothing returns nothing
set gg_trg_Night = CreateTrigger( )
call TriggerRegisterGameStateEventTimeOfDay( gg_trg_Night, EQUAL, 20.30 )
call TriggerAddAction( gg_trg_Night, function Trig_Night_Actions )
endfunction
function Trig_Almost_Night_Func002001002001001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_Almost_Night_Func002001002001002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) != 'nspr' )
endfunction
function Trig_Almost_Night_Func002001002001 takes nothing returns boolean
return GetBooleanAnd( Trig_Almost_Night_Func002001002001001(), Trig_Almost_Night_Func002001002001002() )
endfunction
function Trig_Almost_Night_Func002001002002001 takes nothing returns boolean
return ( GetFilterUnit() != gg_unit_hpea_0621 )
endfunction
function Trig_Almost_Night_Func002001002002002001 takes nothing returns boolean
return ( GetFilterUnit() != gg_unit_nhef_0622 )
endfunction
function Trig_Almost_Night_Func002001002002002002 takes nothing returns boolean
return ( GetFilterUnit() != gg_unit_nvk2_0118 )
endfunction
function Trig_Almost_Night_Func002001002002002 takes nothing returns boolean
return GetBooleanAnd( Trig_Almost_Night_Func002001002002002001(), Trig_Almost_Night_Func002001002002002002() )
endfunction
function Trig_Almost_Night_Func002001002002 takes nothing returns boolean
return GetBooleanAnd( Trig_Almost_Night_Func002001002002001(), Trig_Almost_Night_Func002001002002002() )
endfunction
function Trig_Almost_Night_Func002001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Almost_Night_Func002001002001(), Trig_Almost_Night_Func002001002002() )
endfunction
function Trig_Almost_Night_Func002A takes nothing returns nothing
call ShowUnitHide( GetEnumUnit() )
call PauseUnitBJ( true, GetEnumUnit() )
call SetUnitPathing( GetEnumUnit(), false )
endfunction
function Trig_Almost_Night_Actions takes nothing returns nothing
call SetTerrainFogExBJ( 0, 1200.00, 4250.00, 12.00, 50.00, 30.00, 10.00 )
call ForGroupBJ( GetUnitsOfPlayerMatching(Player(PLAYER_NEUTRAL_PASSIVE), Condition(function Trig_Almost_Night_Func002001002)), function Trig_Almost_Night_Func002A )
endfunction
//===========================================================================
function InitTrig_Almost_Night takes nothing returns nothing
set gg_trg_Almost_Night = CreateTrigger( )
call TriggerRegisterGameStateEventTimeOfDay( gg_trg_Almost_Night, EQUAL, 18.30 )
call TriggerAddAction( gg_trg_Almost_Night, function Trig_Almost_Night_Actions )
endfunction
function Trig_Day_Func002001002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_PEON) == true )
endfunction
function Trig_Day_Func002A takes nothing returns nothing
call ShowUnitShow( GetEnumUnit() )
call PauseUnitBJ( false, GetEnumUnit() )
call SetUnitPathing( GetEnumUnit(), true )
endfunction
function Trig_Day_Actions takes nothing returns nothing
call SetTerrainFogExBJ( 0, 1400.00, 5000.00, 10.00, 50.00, 30.00, 10.00 )
call ForGroupBJ( GetUnitsOfPlayerMatching(Player(6), Condition(function Trig_Day_Func002001002)), function Trig_Day_Func002A )
endfunction
//===========================================================================
function InitTrig_Day takes nothing returns nothing
set gg_trg_Day = CreateTrigger( )
call TriggerRegisterGameStateEventTimeOfDay( gg_trg_Day, EQUAL, 7.00 )
call TriggerAddAction( gg_trg_Day, function Trig_Day_Actions )
endfunction
function Trig_Almost_Day_Func002001002001001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_Almost_Day_Func002001002001002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) != 'nspr' )
endfunction
function Trig_Almost_Day_Func002001002001 takes nothing returns boolean
return GetBooleanAnd( Trig_Almost_Day_Func002001002001001(), Trig_Almost_Day_Func002001002001002() )
endfunction
function Trig_Almost_Day_Func002001002002001 takes nothing returns boolean
return ( GetFilterUnit() != gg_unit_hpea_0621 )
endfunction
function Trig_Almost_Day_Func002001002002002001 takes nothing returns boolean
return ( GetFilterUnit() != gg_unit_nhef_0622 )
endfunction
function Trig_Almost_Day_Func002001002002002002 takes nothing returns boolean
return ( GetFilterUnit() != gg_unit_nvk2_0118 )
endfunction
function Trig_Almost_Day_Func002001002002002 takes nothing returns boolean
return GetBooleanAnd( Trig_Almost_Day_Func002001002002002001(), Trig_Almost_Day_Func002001002002002002() )
endfunction
function Trig_Almost_Day_Func002001002002 takes nothing returns boolean
return GetBooleanAnd( Trig_Almost_Day_Func002001002002001(), Trig_Almost_Day_Func002001002002002() )
endfunction
function Trig_Almost_Day_Func002001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Almost_Day_Func002001002001(), Trig_Almost_Day_Func002001002002() )
endfunction
function Trig_Almost_Day_Func002A takes nothing returns nothing
call ShowUnitShow( GetEnumUnit() )
call PauseUnitBJ( false, GetEnumUnit() )
call SetUnitPathing( GetEnumUnit(), true )
endfunction
function Trig_Almost_Day_Actions takes nothing returns nothing
call SetTerrainFogExBJ( 0, 1200.00, 4250.00, 12.00, 50.00, 30.00, 10.00 )
call ForGroupBJ( GetUnitsOfPlayerMatching(Player(PLAYER_NEUTRAL_PASSIVE), Condition(function Trig_Almost_Day_Func002001002)), function Trig_Almost_Day_Func002A )
endfunction
//===========================================================================
function InitTrig_Almost_Day takes nothing returns nothing
set gg_trg_Almost_Day = CreateTrigger( )
call TriggerRegisterGameStateEventTimeOfDay( gg_trg_Almost_Day, EQUAL, 5.00 )
call TriggerAddAction( gg_trg_Almost_Day, function Trig_Almost_Day_Actions )
endfunction
function Trig_Town_1_Bookmark_Func005C takes nothing returns boolean
if ( not ( IsUnitType(GetEnteringUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( GetPlayerController(GetOwningPlayer(GetEnteringUnit())) == MAP_CONTROL_USER ) ) then
return false
endif
if ( not ( GetUnitUserData(GetEnteringUnit()) == 99 ) ) then
return false
endif
return true
endfunction
function Trig_Town_1_Bookmark_Conditions takes nothing returns boolean
if ( not Trig_Town_1_Bookmark_Func005C() ) then
return false
endif
return true
endfunction
function Trig_Town_1_Bookmark_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
set udg_u_Current_Town = gg_unit_hcas_0303
call TriggerSleepAction( 5.00 )
call EnableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Town_1_Bookmark takes nothing returns nothing
set gg_trg_Town_1_Bookmark = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Town_1_Bookmark, gg_rct_Town_01 )
call TriggerRegisterEnterRectSimple( gg_trg_Town_1_Bookmark, gg_rct_Monster2_03 )
call TriggerRegisterEnterRectSimple( gg_trg_Town_1_Bookmark, gg_rct_Town_1_Port )
call TriggerAddCondition( gg_trg_Town_1_Bookmark, Condition( function Trig_Town_1_Bookmark_Conditions ) )
call TriggerAddAction( gg_trg_Town_1_Bookmark, function Trig_Town_1_Bookmark_Actions )
endfunction
function Trig_Town_2_Bookmark_Func005C takes nothing returns boolean
if ( not ( IsUnitType(GetEnteringUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( GetPlayerController(GetOwningPlayer(GetEnteringUnit())) == MAP_CONTROL_USER ) ) then
return false
endif
if ( not ( GetUnitUserData(GetEnteringUnit()) == 99 ) ) then
return false
endif
return true
endfunction
function Trig_Town_2_Bookmark_Conditions takes nothing returns boolean
if ( not Trig_Town_2_Bookmark_Func005C() ) then
return false
endif
return true
endfunction
function Trig_Town_2_Bookmark_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
set udg_u_Current_Town = gg_unit_htow_0033
call TriggerSleepAction( 5.00 )
call EnableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Town_2_Bookmark takes nothing returns nothing
set gg_trg_Town_2_Bookmark = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Town_2_Bookmark, gg_rct_EH_150pc )
call TriggerRegisterEnterRectSimple( gg_trg_Town_2_Bookmark, gg_rct_Monster4_10 )
call TriggerRegisterEnterRectSimple( gg_trg_Town_2_Bookmark, gg_rct_Town_2_Port )
call TriggerAddCondition( gg_trg_Town_2_Bookmark, Condition( function Trig_Town_2_Bookmark_Conditions ) )
call TriggerAddAction( gg_trg_Town_2_Bookmark, function Trig_Town_2_Bookmark_Actions )
endfunction
function Trig_Town_3_Bookmark_Func005C takes nothing returns boolean
if ( not ( IsUnitType(GetEnteringUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( GetPlayerController(GetOwningPlayer(GetEnteringUnit())) == MAP_CONTROL_USER ) ) then
return false
endif
if ( not ( GetUnitUserData(GetEnteringUnit()) == 99 ) ) then
return false
endif
return true
endfunction
function Trig_Town_3_Bookmark_Conditions takes nothing returns boolean
if ( not Trig_Town_3_Bookmark_Func005C() ) then
return false
endif
return true
endfunction
function Trig_Town_3_Bookmark_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
set udg_u_Current_Town = gg_unit_hkee_0050
call TriggerSleepAction( 5.00 )
call EnableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Town_3_Bookmark takes nothing returns nothing
set gg_trg_Town_3_Bookmark = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Town_3_Bookmark, gg_rct_Scene_04 )
call TriggerRegisterEnterRectSimple( gg_trg_Town_3_Bookmark, gg_rct_Town_3_Port )
call TriggerAddCondition( gg_trg_Town_3_Bookmark, Condition( function Trig_Town_3_Bookmark_Conditions ) )
call TriggerAddAction( gg_trg_Town_3_Bookmark, function Trig_Town_3_Bookmark_Actions )
endfunction
function Trig_Town_1_Enter_Func001001 takes nothing returns boolean
return ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Town_1_Enter_Func001002 takes nothing returns boolean
return ( IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()), GetPlayersByMapControl(MAP_CONTROL_USER)) == true )
endfunction
function Trig_Town_1_Enter_Conditions takes nothing returns boolean
if ( not GetBooleanAnd( Trig_Town_1_Enter_Func001001(), Trig_Town_1_Enter_Func001002() ) ) then
return false
endif
return true
endfunction
function Trig_Town_1_Enter_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call CreateNUnitsAtLocFacingLocBJ( 1, 'nwad', GetOwningPlayer(GetTriggerUnit()), GetRectCenter(gg_rct_Town_1_Port), GetUnitLoc(gg_unit_htow_0033) )
endfunction
//===========================================================================
function InitTrig_Town_1_Enter takes nothing returns nothing
set gg_trg_Town_1_Enter = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Town_1_Enter, gg_rct_Town_1_Port )
call TriggerAddCondition( gg_trg_Town_1_Enter, Condition( function Trig_Town_1_Enter_Conditions ) )
call TriggerAddAction( gg_trg_Town_1_Enter, function Trig_Town_1_Enter_Actions )
endfunction
function Trig_Town_2_Enter_Func001001 takes nothing returns boolean
return ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Town_2_Enter_Func001002 takes nothing returns boolean
return ( IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()), GetPlayersByMapControl(MAP_CONTROL_USER)) == true )
endfunction
function Trig_Town_2_Enter_Conditions takes nothing returns boolean
if ( not GetBooleanAnd( Trig_Town_2_Enter_Func001001(), Trig_Town_2_Enter_Func001002() ) ) then
return false
endif
return true
endfunction
function Trig_Town_2_Enter_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call CreateNUnitsAtLocFacingLocBJ( 1, 'nwad', GetOwningPlayer(GetTriggerUnit()), GetRectCenter(gg_rct_Town_2_Port), GetUnitLoc(gg_unit_hkee_0050) )
endfunction
//===========================================================================
function InitTrig_Town_2_Enter takes nothing returns nothing
set gg_trg_Town_2_Enter = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Town_2_Enter, gg_rct_Town_2_Port )
call TriggerAddCondition( gg_trg_Town_2_Enter, Condition( function Trig_Town_2_Enter_Conditions ) )
call TriggerAddAction( gg_trg_Town_2_Enter, function Trig_Town_2_Enter_Actions )
endfunction
function Trig_Town_3_Enter_Func001001 takes nothing returns boolean
return ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Town_3_Enter_Func001002 takes nothing returns boolean
return ( IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()), GetPlayersByMapControl(MAP_CONTROL_USER)) == true )
endfunction
function Trig_Town_3_Enter_Conditions takes nothing returns boolean
if ( not GetBooleanAnd( Trig_Town_3_Enter_Func001001(), Trig_Town_3_Enter_Func001002() ) ) then
return false
endif
return true
endfunction
function Trig_Town_3_Enter_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call CreateNUnitsAtLocFacingLocBJ( 1, 'nwad', GetOwningPlayer(GetTriggerUnit()), GetRectCenter(gg_rct_Town_3_Port), GetUnitLoc(gg_unit_hcas_0303) )
endfunction
//===========================================================================
function InitTrig_Town_3_Enter takes nothing returns nothing
set gg_trg_Town_3_Enter = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Town_3_Enter, gg_rct_Town_3_Port )
call TriggerAddCondition( gg_trg_Town_3_Enter, Condition( function Trig_Town_3_Enter_Conditions ) )
call TriggerAddAction( gg_trg_Town_3_Enter, function Trig_Town_3_Enter_Actions )
endfunction
function Trig_Enemy_Door_1_Enter_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetEnteringUnit()) == Player(8) ) ) then
return false
endif
return true
endfunction
function Trig_Enemy_Door_1_Enter_Actions takes nothing returns nothing
call TriggerSleepAction( 1.00 )
call PlaySoundAtPointBJ( gg_snd_HumanCallToArmsWhat1, 100, GetRectCenter(gg_rct_Town_01), 0 )
endfunction
//===========================================================================
function InitTrig_Enemy_Door_1_Enter takes nothing returns nothing
set gg_trg_Enemy_Door_1_Enter = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Enemy_Door_1_Enter, gg_rct_Town_01 )
call TriggerAddCondition( gg_trg_Enemy_Door_1_Enter, Condition( function Trig_Enemy_Door_1_Enter_Conditions ) )
call TriggerAddAction( gg_trg_Enemy_Door_1_Enter, function Trig_Enemy_Door_1_Enter_Actions )
endfunction
function Trig_Woods_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Woods_Func002001001 takes nothing returns boolean
return ( GetOwningPlayer(GetTriggerUnit()) == GetFilterPlayer() )
endfunction
function Trig_Woods_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call DisplayTextToForce( GetPlayersMatching(Condition(function Trig_Woods_Func002001001)), "TRIGSTR_062" )
endfunction
//===========================================================================
function InitTrig_Woods takes nothing returns nothing
set gg_trg_Woods = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Woods, gg_rct_Scene_01 )
call TriggerAddCondition( gg_trg_Woods, Condition( function Trig_Woods_Conditions ) )
call TriggerAddAction( gg_trg_Woods, function Trig_Woods_Actions )
endfunction
function Trig_Blue_Lake_Town_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Blue_Lake_Town_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
set udg_u_Current_Town = gg_unit_htow_0033
endfunction
//===========================================================================
function InitTrig_Blue_Lake_Town takes nothing returns nothing
set gg_trg_Blue_Lake_Town = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Blue_Lake_Town, gg_rct_EH_150pc )
call TriggerAddCondition( gg_trg_Blue_Lake_Town, Condition( function Trig_Blue_Lake_Town_Conditions ) )
call TriggerAddAction( gg_trg_Blue_Lake_Town, function Trig_Blue_Lake_Town_Actions )
endfunction
function Trig_Demon_Moutain_Town_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Demon_Moutain_Town_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
set udg_u_Current_Town = gg_unit_h00C_0056
endfunction
//===========================================================================
function InitTrig_Demon_Moutain_Town takes nothing returns nothing
set gg_trg_Demon_Moutain_Town = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Demon_Moutain_Town, gg_rct_Scene_04 )
call TriggerAddCondition( gg_trg_Demon_Moutain_Town, Condition( function Trig_Demon_Moutain_Town_Conditions ) )
call TriggerAddAction( gg_trg_Demon_Moutain_Town, function Trig_Demon_Moutain_Town_Actions )
endfunction
function Trig_Blue_Lake_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Blue_Lake_Func002001001 takes nothing returns boolean
return ( GetOwningPlayer(GetTriggerUnit()) == GetFilterPlayer() )
endfunction
function Trig_Blue_Lake_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call DisplayTextToForce( GetPlayersMatching(Condition(function Trig_Blue_Lake_Func002001001)), "TRIGSTR_063" )
endfunction
//===========================================================================
function InitTrig_Blue_Lake takes nothing returns nothing
set gg_trg_Blue_Lake = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Blue_Lake, gg_rct_Scene_02 )
call TriggerAddCondition( gg_trg_Blue_Lake, Condition( function Trig_Blue_Lake_Conditions ) )
call TriggerAddAction( gg_trg_Blue_Lake, function Trig_Blue_Lake_Actions )
endfunction
function Trig_Blue_Lake_Door_Func005001 takes nothing returns boolean
return ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Blue_Lake_Door_Func005002 takes nothing returns boolean
return ( IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()), GetPlayersByMapControl(MAP_CONTROL_USER)) == true )
endfunction
function Trig_Blue_Lake_Door_Conditions takes nothing returns boolean
if ( not GetBooleanAnd( Trig_Blue_Lake_Door_Func005001(), Trig_Blue_Lake_Door_Func005002() ) ) then
return false
endif
return true
endfunction
function Trig_Blue_Lake_Door_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call SetPlayerHandicapBJ( Player(8), 120.00 )
call ModifyGateBJ( bj_GATEOPERATION_OPEN, gg_dest_LTg3_1103 )
call PlaySoundBJ( gg_snd_BattleNetDoorsStereo2 )
endfunction
//===========================================================================
function InitTrig_Blue_Lake_Door takes nothing returns nothing
set gg_trg_Blue_Lake_Door = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Blue_Lake_Door, gg_rct_EH_150pc )
call TriggerAddCondition( gg_trg_Blue_Lake_Door, Condition( function Trig_Blue_Lake_Door_Conditions ) )
call TriggerAddAction( gg_trg_Blue_Lake_Door, function Trig_Blue_Lake_Door_Actions )
endfunction
function Trig_South_BL_Village_Func004001 takes nothing returns boolean
return ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_South_BL_Village_Func004002 takes nothing returns boolean
return ( IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()), GetPlayersByMapControl(MAP_CONTROL_USER)) == true )
endfunction
function Trig_South_BL_Village_Conditions takes nothing returns boolean
if ( not GetBooleanAnd( Trig_South_BL_Village_Func004001(), Trig_South_BL_Village_Func004002() ) ) then
return false
endif
return true
endfunction
function Trig_South_BL_Village_Func002A takes nothing returns nothing
call SetUnitOwner( GetEnumUnit(), Player(6), true )
endfunction
function Trig_South_BL_Village_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call ForGroupBJ( udg_gr_Villager_Ruin, function Trig_South_BL_Village_Func002A )
call DisableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_South_BL_Village takes nothing returns nothing
set gg_trg_South_BL_Village = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_South_BL_Village, gg_rct_Monster2_20 )
call TriggerAddCondition( gg_trg_South_BL_Village, Condition( function Trig_South_BL_Village_Conditions ) )
call TriggerAddAction( gg_trg_South_BL_Village, function Trig_South_BL_Village_Actions )
endfunction
function Trig_Pit_Lord_Rebel_say_1_Func008001 takes nothing returns boolean
return ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Pit_Lord_Rebel_say_1_Func008002 takes nothing returns boolean
return ( IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()), GetPlayersByMapControl(MAP_CONTROL_USER)) == true )
endfunction
function Trig_Pit_Lord_Rebel_say_1_Conditions takes nothing returns boolean
if ( not GetBooleanAnd( Trig_Pit_Lord_Rebel_say_1_Func008001(), Trig_Pit_Lord_Rebel_say_1_Func008002() ) ) then
return false
endif
return true
endfunction
function Trig_Pit_Lord_Rebel_say_1_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call TransmissionFromUnitWithNameBJ( GetPlayersByMapControl(MAP_CONTROL_USER), gg_unit_Hapm_0117, "TRIGSTR_988", null, "TRIGSTR_989", bj_TIMETYPE_ADD, 10.00, true )
call TriggerSleepAction( 2 )
call TransmissionFromUnitWithNameBJ( GetPlayersByMapControl(MAP_CONTROL_USER), gg_unit_Hapm_0117, "TRIGSTR_988", null, "TRIGSTR_991", bj_TIMETYPE_ADD, 5.00, true )
call TriggerSleepAction( 2 )
call TransmissionFromUnitWithNameBJ( GetPlayersByMapControl(MAP_CONTROL_USER), gg_unit_Hapm_0117, "TRIGSTR_988", null, "TRIGSTR_993", bj_TIMETYPE_ADD, 10.00, true )
call DisableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Pit_Lord_Rebel_say_1 takes nothing returns nothing
set gg_trg_Pit_Lord_Rebel_say_1 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Pit_Lord_Rebel_say_1, gg_rct_Monster3_04 )
call TriggerAddCondition( gg_trg_Pit_Lord_Rebel_say_1, Condition( function Trig_Pit_Lord_Rebel_say_1_Conditions ) )
call TriggerAddAction( gg_trg_Pit_Lord_Rebel_say_1, function Trig_Pit_Lord_Rebel_say_1_Actions )
endfunction
function Trig_Pit_Lord_Rebel_say_2_Func008001 takes nothing returns boolean
return ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Pit_Lord_Rebel_say_2_Func008002 takes nothing returns boolean
return ( IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()), GetPlayersByMapControl(MAP_CONTROL_USER)) == true )
endfunction
function Trig_Pit_Lord_Rebel_say_2_Conditions takes nothing returns boolean
if ( not GetBooleanAnd( Trig_Pit_Lord_Rebel_say_2_Func008001(), Trig_Pit_Lord_Rebel_say_2_Func008002() ) ) then
return false
endif
return true
endfunction
function Trig_Pit_Lord_Rebel_say_2_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call TransmissionFromUnitWithNameBJ( GetPlayersByMapControl(MAP_CONTROL_USER), gg_unit_Hapm_0117, "TRIGSTR_988", null, "TRIGSTR_995", bj_TIMETYPE_ADD, 10.00, true )
call TriggerSleepAction( 2 )
call TransmissionFromUnitWithNameBJ( GetPlayersByMapControl(MAP_CONTROL_USER), gg_unit_Hapm_0117, "TRIGSTR_988", null, "TRIGSTR_2328", bj_TIMETYPE_ADD, 20.00, true )
call TriggerSleepAction( 2 )
call TransmissionFromUnitWithNameBJ( GetPlayersByMapControl(MAP_CONTROL_USER), gg_unit_Hapm_0117, "TRIGSTR_988", null, "TRIGSTR_999", bj_TIMETYPE_ADD, 10.00, true )
call DisableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Pit_Lord_Rebel_say_2 takes nothing returns nothing
set gg_trg_Pit_Lord_Rebel_say_2 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Pit_Lord_Rebel_say_2, gg_rct_Monster3_10 )
call TriggerAddCondition( gg_trg_Pit_Lord_Rebel_say_2, Condition( function Trig_Pit_Lord_Rebel_say_2_Conditions ) )
call TriggerAddAction( gg_trg_Pit_Lord_Rebel_say_2, function Trig_Pit_Lord_Rebel_say_2_Actions )
endfunction
function Trig_Pit_Lord_Rebel_say_3_Func009001 takes nothing returns boolean
return ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Pit_Lord_Rebel_say_3_Func009002 takes nothing returns boolean
return ( IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()), GetPlayersByMapControl(MAP_CONTROL_USER)) == true )
endfunction
function Trig_Pit_Lord_Rebel_say_3_Conditions takes nothing returns boolean
if ( not GetBooleanAnd( Trig_Pit_Lord_Rebel_say_3_Func009001(), Trig_Pit_Lord_Rebel_say_3_Func009002() ) ) then
return false
endif
return true
endfunction
function Trig_Pit_Lord_Rebel_say_3_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call TransmissionFromUnitWithNameBJ( GetPlayersByMapControl(MAP_CONTROL_USER), gg_unit_Hapm_0117, "TRIGSTR_000", null, "TRIGSTR_006", bj_TIMETYPE_ADD, 5.00, true )
call TriggerSleepAction( 2 )
call TransmissionFromUnitWithNameBJ( GetPlayersByMapControl(MAP_CONTROL_USER), gg_unit_Hapm_0117, "TRIGSTR_000", null, "TRIGSTR_010", bj_TIMETYPE_ADD, 5.00, true )
call TriggerSleepAction( 2 )
call TransmissionFromUnitWithNameBJ( GetPlayersByMapControl(MAP_CONTROL_USER), gg_unit_Hapm_0117, "TRIGSTR_000", null, "TRIGSTR_012", bj_TIMETYPE_ADD, 10.00, true )
call DisableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Pit_Lord_Rebel_say_3 takes nothing returns nothing
set gg_trg_Pit_Lord_Rebel_say_3 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Pit_Lord_Rebel_say_3, gg_rct_Monster3_14 )
call TriggerAddCondition( gg_trg_Pit_Lord_Rebel_say_3, Condition( function Trig_Pit_Lord_Rebel_say_3_Conditions ) )
call TriggerAddAction( gg_trg_Pit_Lord_Rebel_say_3, function Trig_Pit_Lord_Rebel_say_3_Actions )
endfunction
function Trig_Pit_Lord_Battle_Func111001 takes nothing returns boolean
return ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Pit_Lord_Battle_Func111002 takes nothing returns boolean
return ( IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()), GetPlayersByMapControl(MAP_CONTROL_USER)) == true )
endfunction
function Trig_Pit_Lord_Battle_Conditions takes nothing returns boolean
if ( not GetBooleanAnd( Trig_Pit_Lord_Battle_Func111001(), Trig_Pit_Lord_Battle_Func111002() ) ) then
return false
endif
return true
endfunction
function Trig_Pit_Lord_Battle_Func023002 takes nothing returns nothing
call RemoveGuardPosition( GetEnumUnit() )
endfunction
function Trig_Pit_Lord_Battle_Func024002 takes nothing returns nothing
call RemoveGuardPosition( GetEnumUnit() )
endfunction
function Trig_Pit_Lord_Battle_Func025002 takes nothing returns nothing
call RemoveGuardPosition( GetEnumUnit() )
endfunction
function Trig_Pit_Lord_Battle_Func026002 takes nothing returns nothing
call RemoveGuardPosition( GetEnumUnit() )
endfunction
function Trig_Pit_Lord_Battle_Func027002 takes nothing returns nothing
call RemoveGuardPosition( GetEnumUnit() )
endfunction
function Trig_Pit_Lord_Battle_Func028002 takes nothing returns nothing
call RemoveGuardPosition( GetEnumUnit() )
endfunction
function Trig_Pit_Lord_Battle_Func029002 takes nothing returns nothing
call RemoveGuardPosition( GetEnumUnit() )
endfunction
function Trig_Pit_Lord_Battle_Func030002 takes nothing returns nothing
call RemoveGuardPosition( GetEnumUnit() )
endfunction
function Trig_Pit_Lord_Battle_Func031002 takes nothing returns nothing
call RemoveGuardPosition( GetEnumUnit() )
endfunction
function Trig_Pit_Lord_Battle_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call GroupAddUnitSimple( gg_unit_nhea_0474, udg_gr_BLSupport_3 )
call GroupAddUnitSimple( gg_unit_nhea_0116, udg_gr_BLSupport_3 )
call GroupAddUnitSimple( gg_unit_nhea_0113, udg_gr_BLSupport_3 )
call GroupAddUnitSimple( gg_unit_nhea_0038, udg_gr_BLSupport_3 )
call GroupAddUnitSimple( gg_unit_nhea_0472, udg_gr_BLSupport_3 )
call GroupAddUnitSimple( gg_unit_nhea_0475, udg_gr_BLSupport_3 )
call GroupAddUnitSimple( gg_unit_hhes_0086, udg_gr_BLSupport_3 )
call GroupAddUnitSimple( gg_unit_hhes_0720, udg_gr_BLSupport_3 )
call GroupAddUnitSimple( gg_unit_hhes_0718, udg_gr_BLSupport_3 )
call GroupAddUnitSimple( gg_unit_hhes_0713, udg_gr_BLSupport_3 )
call TriggerSleepAction( 2 )
// BlueLake Support
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 10
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call CreateNUnitsAtLoc( 1, udg_Custom_Group_1[GetRandomInt(1, 5)], Player(6), GetRandomLocInRect(gg_rct_rectBLSupport2), bj_UNIT_FACING )
call SetUnitManaPercentBJ( GetLastCreatedUnit(), 100 )
call SetUnitLifePercentBJ( GetLastCreatedUnit(), 100 )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_gr_BLSupport_1 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 10
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call CreateNUnitsAtLoc( 1, udg_Custom_Group_1[GetRandomInt(1, 5)], Player(6), GetRandomLocInRect(gg_rct_rectBLSupport2), bj_UNIT_FACING )
call SetUnitManaPercentBJ( GetLastCreatedUnit(), 100 )
call SetUnitLifePercentBJ( GetLastCreatedUnit(), 100 )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_gr_BLSupport_2 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
// Orcs Base
set bj_forLoopBIndex = 1
set bj_forLoopBIndexEnd = 10
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
call CreateNUnitsAtLoc( 1, udg_Custom_Group_2[GetRandomInt(1, 8)], Player(8), GetRandomLocInRect(gg_rct_Blue_Lake_Battle), bj_UNIT_FACING )
call SetUnitManaPercentBJ( GetLastCreatedUnit(), 100 )
call SetUnitLifePercentBJ( GetLastCreatedUnit(), 100 )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_gr_Orc_PL_Army_1 )
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
call TriggerSleepAction( 2 )
set bj_forLoopBIndex = 1
set bj_forLoopBIndexEnd = 10
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
call CreateNUnitsAtLoc( 1, udg_Custom_Group_2[GetRandomInt(1, 8)], Player(8), GetRandomLocInRect(gg_rct_Blue_Lake_Battle), bj_UNIT_FACING )
call SetUnitManaPercentBJ( GetLastCreatedUnit(), 100 )
call SetUnitLifePercentBJ( GetLastCreatedUnit(), 100 )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_gr_Orc_PL_Army_2 )
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
call TriggerSleepAction( 2 )
set bj_forLoopBIndex = 1
set bj_forLoopBIndexEnd = 10
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
call CreateNUnitsAtLoc( 1, udg_Custom_Group_2[GetRandomInt(1, 8)], Player(8), GetRandomLocInRect(gg_rct_Blue_Lake_Battle), bj_UNIT_FACING )
call SetUnitManaPercentBJ( GetLastCreatedUnit(), 100 )
call SetUnitLifePercentBJ( GetLastCreatedUnit(), 100 )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_gr_Orc_PL_Army_3 )
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
call ModifyGateBJ( bj_GATEOPERATION_OPEN, gg_dest_DTg5_1436 )
call ForGroupBJ( udg_gr_AssassultTeam, function Trig_Pit_Lord_Battle_Func023002 )
call ForGroupBJ( udg_gr_BLSupport_1, function Trig_Pit_Lord_Battle_Func024002 )
call ForGroupBJ( udg_gr_BLSupport_2, function Trig_Pit_Lord_Battle_Func025002 )
call ForGroupBJ( udg_gr_BLSupport_3, function Trig_Pit_Lord_Battle_Func026002 )
call ForGroupBJ( udg_gr_Orc_PL_Army_1, function Trig_Pit_Lord_Battle_Func027002 )
call ForGroupBJ( udg_gr_Orc_PL_Army_2, function Trig_Pit_Lord_Battle_Func028002 )
call ForGroupBJ( udg_gr_Orc_PL_Army_3, function Trig_Pit_Lord_Battle_Func029002 )
call ForGroupBJ( udg_gr_Reinforce, function Trig_Pit_Lord_Battle_Func030002 )
call ForGroupBJ( udg_gr_Watchguard, function Trig_Pit_Lord_Battle_Func031002 )
// Begin attacking
call IssuePointOrderLocBJ( gg_unit_Hhkl_0480, "attack", GetRectCenter(gg_rct_Blue_Lake_Battle) )
call GroupPointOrderLocBJ( udg_gr_BLSupport_1, "attack", GetUnitLoc(gg_unit_hhou_0355) )
call GroupPointOrderLocBJ( udg_gr_BLSupport_2, "attack", GetUnitLoc(gg_unit_hhou_0355) )
call GroupPointOrderLocBJ( udg_gr_BLSupport_3, "attack", GetUnitLoc(gg_unit_hhou_0355) )
call GroupPointOrderLocBJ( udg_gr_Orc_PL_Army_1, "attack", GetRandomLocInRect(gg_rct_rectBLSupport1) )
call GroupPointOrderLocBJ( udg_gr_Orc_PL_Army_2, "attack", GetRandomLocInRect(gg_rct_rectBLSupport2) )
call GroupPointOrderLocBJ( udg_gr_Orc_PL_Army_3, "attack", GetRandomLocInRect(gg_rct_Town_2_Port) )
call IssuePointOrderLocBJ( gg_unit_U003_0406, "attack", GetRectCenter(gg_rct_Kill_the_Pit_Lord) )
call TriggerSleepAction( 60.00 )
call GroupPointOrderLocBJ( udg_gr_Orc_PL_Army_1, "attack", GetRandomLocInRect(gg_rct_rectBLSupport1) )
call GroupPointOrderLocBJ( udg_gr_Orc_PL_Army_2, "attack", GetRandomLocInRect(gg_rct_rectBLSupport2) )
call GroupPointOrderLocBJ( udg_gr_Orc_PL_Army_3, "attack", GetRandomLocInRect(gg_rct_Town_2_Port) )
call GroupPointOrderLocBJ( udg_gr_BLSupport_1, "attack", GetUnitLoc(gg_unit_hhou_0355) )
call GroupPointOrderLocBJ( udg_gr_BLSupport_2, "attack", GetUnitLoc(gg_unit_hhou_0355) )
call GroupPointOrderLocBJ( udg_gr_BLSupport_3, "attack", GetUnitLoc(gg_unit_hhou_0355) )
call GroupPointOrderLocBJ( udg_gr_Reinforce, "attack", GetUnitLoc(gg_unit_hhou_0355) )
call GroupPointOrderLocBJ( udg_gr_Watchguard, "attack", GetUnitLoc(gg_unit_hhou_0355) )
call IssuePointOrderLocBJ( gg_unit_U003_0406, "attack", GetRectCenter(gg_rct_Kill_the_Pit_Lord) )
call TriggerSleepAction( 15.00 )
call GroupPointOrderLocBJ( udg_gr_Orc_PL_Army_1, "attack", GetRandomLocInRect(gg_rct_rectBLSupport1) )
call GroupPointOrderLocBJ( udg_gr_Orc_PL_Army_2, "attack", GetRandomLocInRect(gg_rct_rectBLSupport2) )
call GroupPointOrderLocBJ( udg_gr_Orc_PL_Army_3, "attack", GetRandomLocInRect(gg_rct_Town_2_Port) )
call GroupPointOrderLocBJ( udg_gr_BLSupport_1, "attack", GetUnitLoc(gg_unit_hhou_0355) )
call GroupPointOrderLocBJ( udg_gr_BLSupport_2, "attack", GetUnitLoc(gg_unit_hhou_0355) )
call GroupPointOrderLocBJ( udg_gr_BLSupport_3, "attack", GetUnitLoc(gg_unit_hhou_0355) )
call GroupPointOrderLocBJ( udg_gr_Reinforce, "attack", GetUnitLoc(gg_unit_hhou_0355) )
call GroupPointOrderLocBJ( udg_gr_Watchguard, "attack", GetUnitLoc(gg_unit_hhou_0355) )
call IssuePointOrderLocBJ( gg_unit_Hvwd_0110, "attack", GetRectCenter(gg_rct_Blue_Lake_Battle) )
call IssuePointOrderLocBJ( gg_unit_Hmbr_0111, "attack", GetRectCenter(gg_rct_Blue_Lake_Battle) )
call IssuePointOrderLocBJ( gg_unit_U003_0406, "attack", GetRectCenter(gg_rct_Kill_the_Pit_Lord) )
call TriggerSleepAction( 15.00 )
call GroupPointOrderLocBJ( udg_gr_BLSupport_1, "attack", GetUnitLoc(gg_unit_hhou_0355) )
call GroupPointOrderLocBJ( udg_gr_BLSupport_2, "attack", GetUnitLoc(gg_unit_hhou_0355) )
call GroupPointOrderLocBJ( udg_gr_BLSupport_3, "attack", GetUnitLoc(gg_unit_hhou_0355) )
call GroupPointOrderLocBJ( udg_gr_Orc_PL_Army_1, "attack", GetRandomLocInRect(gg_rct_rectBLSupport1) )
call GroupPointOrderLocBJ( udg_gr_Orc_PL_Army_2, "attack", GetRandomLocInRect(gg_rct_rectBLSupport2) )
call GroupPointOrderLocBJ( udg_gr_Orc_PL_Army_3, "attack", GetRandomLocInRect(gg_rct_Town_2_Port) )
call IssuePointOrderLocBJ( gg_unit_U003_0406, "attack", GetRectCenter(gg_rct_Kill_the_Pit_Lord) )
call TriggerSleepAction( 60.00 )
call GroupPointOrderLocBJ( udg_gr_Orc_PL_Army_1, "attack", GetRandomLocInRect(gg_rct_rectBLSupport1) )
call GroupPointOrderLocBJ( udg_gr_Orc_PL_Army_2, "attack", GetRandomLocInRect(gg_rct_rectBLSupport2) )
call GroupPointOrderLocBJ( udg_gr_Orc_PL_Army_3, "attack", GetRandomLocInRect(gg_rct_Town_2_Port) )
call GroupPointOrderLocBJ( udg_gr_BLSupport_1, "attack", GetUnitLoc(gg_unit_hhou_0355) )
call GroupPointOrderLocBJ( udg_gr_BLSupport_2, "attack", GetUnitLoc(gg_unit_hhou_0355) )
call GroupPointOrderLocBJ( udg_gr_BLSupport_3, "attack", GetUnitLoc(gg_unit_hhou_0355) )
call GroupPointOrderLocBJ( udg_gr_Reinforce, "attack", GetUnitLoc(gg_unit_hhou_0355) )
call GroupPointOrderLocBJ( udg_gr_Watchguard, "attack", GetUnitLoc(gg_unit_hhou_0355) )
call IssuePointOrderLocBJ( gg_unit_Hhkl_0480, "attack", GetRectCenter(gg_rct_Blue_Lake_Battle) )
call IssuePointOrderLocBJ( gg_unit_Hvwd_0110, "attack", GetRectCenter(gg_rct_Blue_Lake_Battle) )
call IssuePointOrderLocBJ( gg_unit_Hmbr_0111, "attack", GetRectCenter(gg_rct_Blue_Lake_Battle) )
call IssuePointOrderLocBJ( gg_unit_U003_0406, "attack", GetRectCenter(gg_rct_Kill_the_Pit_Lord) )
call TriggerSleepAction( 120.00 )
call GroupPointOrderLocBJ( udg_gr_Orc_PL_Army_1, "attack", GetRandomLocInRect(gg_rct_rectBLSupport1) )
call GroupPointOrderLocBJ( udg_gr_Orc_PL_Army_2, "attack", GetRandomLocInRect(gg_rct_rectBLSupport2) )
call GroupPointOrderLocBJ( udg_gr_Orc_PL_Army_3, "attack", GetRandomLocInRect(gg_rct_Town_2_Port) )
call GroupPointOrderLocBJ( udg_gr_BLSupport_1, "attack", GetUnitLoc(gg_unit_hhou_0355) )
call GroupPointOrderLocBJ( udg_gr_BLSupport_2, "attack", GetUnitLoc(gg_unit_hhou_0355) )
call GroupPointOrderLocBJ( udg_gr_BLSupport_3, "attack", GetUnitLoc(gg_unit_hhou_0355) )
call GroupPointOrderLocBJ( udg_gr_Reinforce, "attack", GetUnitLoc(gg_unit_hhou_0355) )
call GroupPointOrderLocBJ( udg_gr_Watchguard, "attack", GetUnitLoc(gg_unit_hhou_0355) )
call IssuePointOrderLocBJ( gg_unit_Hhkl_0480, "attack", GetRectCenter(gg_rct_Blue_Lake_Battle) )
call IssuePointOrderLocBJ( gg_unit_Hvwd_0110, "attack", GetRectCenter(gg_rct_Blue_Lake_Battle) )
call IssuePointOrderLocBJ( gg_unit_Hmbr_0111, "attack", GetRectCenter(gg_rct_Blue_Lake_Battle) )
call IssuePointOrderLocBJ( gg_unit_U003_0406, "attack", GetRectCenter(gg_rct_Kill_the_Pit_Lord) )
call TriggerSleepAction( 400.00 )
call GroupPointOrderLocBJ( udg_gr_Orc_PL_Army_1, "attack", GetRandomLocInRect(gg_rct_rectBLSupport1) )
call GroupPointOrderLocBJ( udg_gr_Orc_PL_Army_2, "attack", GetRandomLocInRect(gg_rct_rectBLSupport2) )
call GroupPointOrderLocBJ( udg_gr_Orc_PL_Army_3, "attack", GetRandomLocInRect(gg_rct_Town_2_Port) )
call GroupPointOrderLocBJ( udg_gr_BLSupport_1, "attack", GetUnitLoc(gg_unit_hhou_0355) )
call GroupPointOrderLocBJ( udg_gr_BLSupport_2, "attack", GetUnitLoc(gg_unit_hhou_0355) )
call GroupPointOrderLocBJ( udg_gr_BLSupport_3, "attack", GetUnitLoc(gg_unit_hhou_0355) )
call GroupPointOrderLocBJ( udg_gr_Reinforce, "attack", GetUnitLoc(gg_unit_hhou_0355) )
call GroupPointOrderLocBJ( udg_gr_Watchguard, "attack", GetUnitLoc(gg_unit_hhou_0355) )
call IssuePointOrderLocBJ( gg_unit_Hhkl_0480, "attack", GetRectCenter(gg_rct_Blue_Lake_Battle) )
call IssuePointOrderLocBJ( gg_unit_Hvwd_0110, "attack", GetRectCenter(gg_rct_Blue_Lake_Battle) )
call IssuePointOrderLocBJ( gg_unit_Hmbr_0111, "attack", GetRectCenter(gg_rct_Blue_Lake_Battle) )
call IssuePointOrderLocBJ( gg_unit_U003_0406, "attack", GetRectCenter(gg_rct_Kill_the_Pit_Lord) )
call DisableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Pit_Lord_Battle takes nothing returns nothing
set gg_trg_Pit_Lord_Battle = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Pit_Lord_Battle, gg_rct_Monster3_14 )
call TriggerAddCondition( gg_trg_Pit_Lord_Battle, Condition( function Trig_Pit_Lord_Battle_Conditions ) )
call TriggerAddAction( gg_trg_Pit_Lord_Battle, function Trig_Pit_Lord_Battle_Actions )
endfunction
function Trig_Pit_Lord_Cry_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetTriggerUnit()) == Player(6) ) ) then
return false
endif
return true
endfunction
function Trig_Pit_Lord_Cry_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call TransmissionFromUnitWithNameBJ( GetPlayersByMapControl(MAP_CONTROL_USER), GetTriggerUnit(), GetUnitName(GetTriggerUnit()), null, "TRIGSTR_014", bj_TIMETYPE_ADD, 5.00, true )
call TriggerSleepAction( 120.00 )
call TransmissionFromUnitWithNameBJ( GetPlayersByMapControl(MAP_CONTROL_USER), GetTriggerUnit(), GetUnitName(GetTriggerUnit()), null, "TRIGSTR_014", bj_TIMETYPE_ADD, 5.00, true )
endfunction
//===========================================================================
function InitTrig_Pit_Lord_Cry takes nothing returns nothing
set gg_trg_Pit_Lord_Cry = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Pit_Lord_Cry, gg_rct_Blue_Lake_Battle )
call TriggerAddCondition( gg_trg_Pit_Lord_Cry, Condition( function Trig_Pit_Lord_Cry_Conditions ) )
call TriggerAddAction( gg_trg_Pit_Lord_Cry, function Trig_Pit_Lord_Cry_Actions )
endfunction
function Trig_Demon_Mountain_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Demon_Mountain_Func002001001 takes nothing returns boolean
return ( GetOwningPlayer(GetTriggerUnit()) == GetFilterPlayer() )
endfunction
function Trig_Demon_Mountain_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call DisplayTextToForce( GetPlayersMatching(Condition(function Trig_Demon_Mountain_Func002001001)), "TRIGSTR_064" )
endfunction
//===========================================================================
function InitTrig_Demon_Mountain takes nothing returns nothing
set gg_trg_Demon_Mountain = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Demon_Mountain, gg_rct_Scene_05 )
call TriggerAddCondition( gg_trg_Demon_Mountain, Condition( function Trig_Demon_Mountain_Conditions ) )
call TriggerAddAction( gg_trg_Demon_Mountain, function Trig_Demon_Mountain_Actions )
endfunction
function Trig_Camp_Assault_Town_Func005C takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectAll(gg_rct_Region_005)) != 25 ) ) then
return false
endif
return true
endfunction
function Trig_Camp_Assault_Town_Func007A takes nothing returns nothing
call SetUnitFacingToFaceLocTimed( GetEnumUnit(), GetRectCenter(gg_rct_Monster6_17), 0 )
call IssuePointOrderLocBJ( GetEnumUnit(), "attack", GetUnitLoc(gg_unit_EC32_0405) )
endfunction
function Trig_Camp_Assault_Town_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call TriggerSleepAction( 4.00 )
// Assault Army
if ( Trig_Camp_Assault_Town_Func005C() ) then
set bj_forLoopBIndex = 1
set bj_forLoopBIndexEnd = 20
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
call CreateNUnitsAtLoc( 1, udg_Custom_Group_2[GetRandomInt(1, 8)], Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Region_005), bj_UNIT_FACING )
call SetUnitManaPercentBJ( GetLastCreatedUnit(), 100 )
call SetUnitLifePercentBJ( GetLastCreatedUnit(), 100 )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_gr_AssassultTeam )
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
else
endif
call TriggerSleepAction( 4.00 )
call ForGroupBJ( udg_gr_AssassultTeam, function Trig_Camp_Assault_Town_Func007A )
endfunction
//===========================================================================
function InitTrig_Camp_Assault_Town takes nothing returns nothing
set gg_trg_Camp_Assault_Town = CreateTrigger( )
call TriggerRegisterDeathEvent( gg_trg_Camp_Assault_Town, gg_dest_LTe2_0342 )
call TriggerAddAction( gg_trg_Camp_Assault_Town, function Trig_Camp_Assault_Town_Actions )
endfunction
function Trig_Tauren_Camp_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Tauren_Camp_Func002001001 takes nothing returns boolean
return ( GetOwningPlayer(GetTriggerUnit()) == GetFilterPlayer() )
endfunction
function Trig_Tauren_Camp_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call DisplayTextToForce( GetPlayersMatching(Condition(function Trig_Tauren_Camp_Func002001001)), "TRIGSTR_066" )
endfunction
//===========================================================================
function InitTrig_Tauren_Camp takes nothing returns nothing
set gg_trg_Tauren_Camp = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Tauren_Camp, gg_rct_Scene_03 )
call TriggerAddCondition( gg_trg_Tauren_Camp, Condition( function Trig_Tauren_Camp_Conditions ) )
call TriggerAddAction( gg_trg_Tauren_Camp, function Trig_Tauren_Camp_Actions )
endfunction
function Trig_City_of_Despair_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_City_of_Despair_Func002001001 takes nothing returns boolean
return ( GetOwningPlayer(GetTriggerUnit()) == GetFilterPlayer() )
endfunction
function Trig_City_of_Despair_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call DisplayTextToForce( GetPlayersMatching(Condition(function Trig_City_of_Despair_Func002001001)), "TRIGSTR_067" )
endfunction
//===========================================================================
function InitTrig_City_of_Despair takes nothing returns nothing
set gg_trg_City_of_Despair = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_City_of_Despair, gg_rct_Scene_06 )
call TriggerAddCondition( gg_trg_City_of_Despair, Condition( function Trig_City_of_Despair_Conditions ) )
call TriggerAddAction( gg_trg_City_of_Despair, function Trig_City_of_Despair_Actions )
endfunction
function Trig_Chaos_Palace_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Chaos_Palace_Func004001001 takes nothing returns boolean
return ( GetOwningPlayer(GetTriggerUnit()) == GetFilterPlayer() )
endfunction
function Trig_Chaos_Palace_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
set udg_Enemy_Group_Num_1 = 0
call EnableTrigger( gg_trg_Lich_King_Summon )
call DisplayTextToForce( GetPlayersMatching(Condition(function Trig_Chaos_Palace_Func004001001)), "TRIGSTR_124" )
endfunction
//===========================================================================
function InitTrig_Chaos_Palace takes nothing returns nothing
set gg_trg_Chaos_Palace = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Chaos_Palace, gg_rct_Scene_07 )
call TriggerAddCondition( gg_trg_Chaos_Palace, Condition( function Trig_Chaos_Palace_Conditions ) )
call TriggerAddAction( gg_trg_Chaos_Palace, function Trig_Chaos_Palace_Actions )
endfunction
function Trig_Chaos_Palace_Door_1_Func001C takes nothing returns boolean
if ( not ( GetPlayerController(GetOwningPlayer(GetTriggerUnit())) == MAP_CONTROL_USER ) ) then
return false
endif
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'kygh') == true ) ) then
return false
endif
return true
endfunction
function Trig_Chaos_Palace_Door_1_Conditions takes nothing returns boolean
if ( not Trig_Chaos_Palace_Door_1_Func001C() ) then
return false
endif
return true
endfunction
function Trig_Chaos_Palace_Door_1_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'kygh') )
call ModifyGateBJ( bj_GATEOPERATION_OPEN, gg_dest_ATg4_1833 )
call PlaySoundBJ( gg_snd_BattleNetDoorsStereo2 )
endfunction
//===========================================================================
function InitTrig_Chaos_Palace_Door_1 takes nothing returns nothing
set gg_trg_Chaos_Palace_Door_1 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Chaos_Palace_Door_1, gg_rct_KeyNeeded1 )
call TriggerAddCondition( gg_trg_Chaos_Palace_Door_1, Condition( function Trig_Chaos_Palace_Door_1_Conditions ) )
call TriggerAddAction( gg_trg_Chaos_Palace_Door_1, function Trig_Chaos_Palace_Door_1_Actions )
endfunction
function Trig_Chaos_Palace_Door_2_Func001C takes nothing returns boolean
if ( not ( GetPlayerController(GetOwningPlayer(GetTriggerUnit())) == MAP_CONTROL_USER ) ) then
return false
endif
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'kygh') == true ) ) then
return false
endif
return true
endfunction
function Trig_Chaos_Palace_Door_2_Conditions takes nothing returns boolean
if ( not Trig_Chaos_Palace_Door_2_Func001C() ) then
return false
endif
return true
endfunction
function Trig_Chaos_Palace_Door_2_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'kygh') )
call ModifyGateBJ( bj_GATEOPERATION_OPEN, gg_dest_ATg2_4102 )
call PlaySoundBJ( gg_snd_BattleNetDoorsStereo2 )
endfunction
//===========================================================================
function InitTrig_Chaos_Palace_Door_2 takes nothing returns nothing
set gg_trg_Chaos_Palace_Door_2 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Chaos_Palace_Door_2, gg_rct_KeyNeeded2 )
call TriggerAddCondition( gg_trg_Chaos_Palace_Door_2, Condition( function Trig_Chaos_Palace_Door_2_Conditions ) )
call TriggerAddAction( gg_trg_Chaos_Palace_Door_2, function Trig_Chaos_Palace_Door_2_Actions )
endfunction
function Trig_Bandits_Lord_Rage_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call TriggerSleepAction( 1.00 )
call PlaySoundOnUnitBJ( gg_snd_SoulPreservation, 100, gg_unit_H000_0001 )
call AddSpecialEffectLocBJ( GetUnitLoc(GetTriggerUnit()), "Objects\\Spawnmodels\\Undead\\UCancelDeath\\UCancelDeath.mdl" )
set udg_Boss_FX[1] = GetLastCreatedEffectBJ()
call CreateNUnitsAtLoc( 1, 'n00E', Player(8), GetUnitLoc(gg_unit_H000_0001), GetUnitFacing(gg_unit_H000_0001) )
set udg_u_Bandit_Child = GetLastCreatedUnit()
call TriggerSleepAction( 2.00 )
call DestroyEffectBJ( udg_Boss_FX[1] )
call DisableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Bandits_Lord_Rage takes nothing returns nothing
set gg_trg_Bandits_Lord_Rage = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_Bandits_Lord_Rage, gg_unit_H000_0001, EVENT_UNIT_DEATH )
call TriggerAddAction( gg_trg_Bandits_Lord_Rage, function Trig_Bandits_Lord_Rage_Actions )
endfunction
function Trig_Bandits_Lord_Die_Conditions takes nothing returns boolean
if ( not ( GetDyingUnit() == udg_u_Bandit_Child ) ) then
return false
endif
return true
endfunction
function Trig_Bandits_Lord_Die_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call TriggerSleepAction( 2 )
call QuestMessageBJ( GetPlayersAll(), bj_QUESTMESSAGE_DISCOVERED, "TRIGSTR_546" )
call QuestSetCompletedBJ( udg_Quest_Eliminate_Bandits, true )
call DisableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Bandits_Lord_Die takes nothing returns nothing
set gg_trg_Bandits_Lord_Die = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Bandits_Lord_Die, Player(8), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Bandits_Lord_Die, Condition( function Trig_Bandits_Lord_Die_Conditions ) )
call TriggerAddAction( gg_trg_Bandits_Lord_Die, function Trig_Bandits_Lord_Die_Actions )
endfunction
function Trig_Pit_Lord_Die_Func002001 takes nothing returns boolean
return ( IsUnitDeadBJ(gg_unit_Hapm_0117) == true )
endfunction
function Trig_Pit_Lord_Die_Func002002 takes nothing returns boolean
return ( IsUnitDeadBJ(gg_unit_Udre_0646) == true )
endfunction
function Trig_Pit_Lord_Die_Func003001 takes nothing returns boolean
return ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Pit_Lord_Die_Func003002 takes nothing returns boolean
return ( IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()), GetPlayersByMapControl(MAP_CONTROL_USER)) == true )
endfunction
function Trig_Pit_Lord_Die_Conditions takes nothing returns boolean
if ( not GetBooleanAnd( Trig_Pit_Lord_Die_Func002001(), Trig_Pit_Lord_Die_Func002002() ) ) then
return false
endif
if ( not GetBooleanAnd( Trig_Pit_Lord_Die_Func003001(), Trig_Pit_Lord_Die_Func003002() ) ) then
return false
endif
return true
endfunction
function Trig_Pit_Lord_Die_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call TransmissionFromUnitWithNameBJ( GetPlayersByMapControl(MAP_CONTROL_USER), gg_unit_Hhkl_0480, GetUnitName(GetTriggerUnit()), null, "TRIGSTR_019", bj_TIMETYPE_ADD, 10.00, true )
call TriggerSleepAction( 2 )
call RemoveDestructable( gg_dest_LTrc_6238 )
call RemoveDestructable( gg_dest_LTrc_6245 )
call RemoveDestructable( gg_dest_LTrc_6246 )
call RemoveDestructable( gg_dest_LTrc_6247 )
call RemoveDestructable( gg_dest_LTrc_6248 )
call RemoveDestructable( gg_dest_LTrc_6249 )
call RemoveDestructable( gg_dest_LTrc_6250 )
call RemoveDestructable( gg_dest_LTrc_6251 )
call RemoveDestructable( gg_dest_LTrc_6252 )
call KillDestructable( gg_dest_LTex_6257 )
call KillDestructable( gg_dest_LTex_6258 )
call KillDestructable( gg_dest_LTex_6259 )
call TriggerSleepAction( 2 )
call QuestMessageBJ( GetPlayersAll(), bj_QUESTMESSAGE_DISCOVERED, "TRIGSTR_134" )
call QuestSetCompletedBJ( udg_Quest_Secret_Way, true )
call TriggerExecute( gg_trg_Set_DM_Enemy )
endfunction
//===========================================================================
function InitTrig_Pit_Lord_Die takes nothing returns nothing
set gg_trg_Pit_Lord_Die = CreateTrigger( )
call TriggerRegisterUnitInRangeSimple( gg_trg_Pit_Lord_Die, 300.00, gg_unit_Hhkl_0480 )
call TriggerAddCondition( gg_trg_Pit_Lord_Die, Condition( function Trig_Pit_Lord_Die_Conditions ) )
call TriggerAddAction( gg_trg_Pit_Lord_Die, function Trig_Pit_Lord_Die_Actions )
endfunction
function Trig_Demon_Hunter_Die_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
set udg_Boss_Demon_Killed = true
call TriggerSleepAction( 2 )
call QuestMessageBJ( GetPlayersAll(), bj_QUESTMESSAGE_DISCOVERED, "TRIGSTR_136" )
call QuestSetCompletedBJ( udg_Quest_Hunt_Hunter, true )
call TriggerExecute( gg_trg_Set_COD_Enemy )
endfunction
//===========================================================================
function InitTrig_Demon_Hunter_Die takes nothing returns nothing
set gg_trg_Demon_Hunter_Die = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_Demon_Hunter_Die, gg_unit_EC32_0405, EVENT_UNIT_DEATH )
call TriggerAddAction( gg_trg_Demon_Hunter_Die, function Trig_Demon_Hunter_Die_Actions )
endfunction
function Trig_Demon_Hunter_Rage_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call SelectHeroSkill( GetTriggerUnit(), 'AEme' )
call SetUnitLifePercentBJ( GetTriggerUnit(), 100 )
call SetUnitManaPercentBJ( GetTriggerUnit(), 100 )
call IssueImmediateOrderBJ( GetTriggerUnit(), "metamorphosis" )
endfunction
//===========================================================================
function InitTrig_Demon_Hunter_Rage takes nothing returns nothing
set gg_trg_Demon_Hunter_Rage = CreateTrigger( )
call DisableTrigger( gg_trg_Demon_Hunter_Rage )
call TriggerRegisterUnitLifeEvent( gg_trg_Demon_Hunter_Rage, gg_unit_EC32_0405, LESS_THAN, 500.00 )
call TriggerAddAction( gg_trg_Demon_Hunter_Rage, function Trig_Demon_Hunter_Rage_Actions )
endfunction
function Trig_Lich_King_Summon_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'hwt3' ) ) then
return false
endif
return true
endfunction
function Trig_Lich_King_Summon_Actions takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'nC39', Player(8), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nC38', Player(8), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nC40', Player(8), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING )
endfunction
//===========================================================================
function InitTrig_Lich_King_Summon takes nothing returns nothing
set gg_trg_Lich_King_Summon = CreateTrigger( )
call DisableTrigger( gg_trg_Lich_King_Summon )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Lich_King_Summon, Player(8), EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Lich_King_Summon, Condition( function Trig_Lich_King_Summon_Conditions ) )
call TriggerAddAction( gg_trg_Lich_King_Summon, function Trig_Lich_King_Summon_Actions )
endfunction
function Trig_Lich_King_Die_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call CinematicFadeBJ( bj_CINEFADETYPE_FADEOUTIN, 2, "ReplaceableTextures\\CameraMasks\\SpecialSplatMask.blp", 0, 0, 0, 0 )
call TriggerSleepAction( 2 )
call SetTimeOfDayScalePercentBJ( 500.00 )
call AddWeatherEffectSaveLast( RectFromCenterSizeBJ(GetUnitLoc(GetDyingUnit()), 1000.00, 1000.00), 'LRaa' )
call AddWeatherEffectSaveLast( RectFromCenterSizeBJ(GetUnitLoc(GetDyingUnit()), 1000.00, 1000.00), 'LRma' )
call ReviveHeroLoc( gg_unit_Npbm_0041, GetUnitLoc(GetDyingUnit()), true )
call TriggerSleepAction( 30.00 )
call KillUnit( GetDyingUnit() )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 10
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call CreateNUnitsAtLoc( 1, 'nglm', Player(8), GetRandomLocInRect(RectFromCenterSizeBJ(GetUnitLoc(gg_unit_Npbm_0041), 256.00, 256.00)), bj_UNIT_FACING )
call ExplodeUnitBJ( GetLastCreatedUnit() )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call TriggerSleepAction( 1.00 )
call UseTimeOfDayBJ( false )
call SetTimeOfDay( 10.00 )
call CinematicFadeBJ( bj_CINEFADETYPE_FADEOUTIN, 2.00, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 0, 0, 0, 0 )
call TriggerSleepAction( 5.00 )
call QuestMessageBJ( GetPlayersAll(), bj_QUESTMESSAGE_DISCOVERED, "TRIGSTR_139" )
call QuestSetCompletedBJ( udg_Quest_Lich_King, true )
call TriggerSleepAction( 5.00 )
call CustomVictoryBJ( Player(0), true, true )
call CustomVictoryBJ( Player(1), true, true )
call CustomVictoryBJ( Player(2), true, true )
call CustomVictoryBJ( Player(3), true, true )
call CustomVictoryBJ( Player(4), true, true )
call CustomVictoryBJ( Player(5), true, true )
endfunction
//===========================================================================
function InitTrig_Lich_King_Die takes nothing returns nothing
set gg_trg_Lich_King_Die = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_Lich_King_Die, gg_unit_Npbm_0041, EVENT_UNIT_DEATH )
call TriggerAddAction( gg_trg_Lich_King_Die, function Trig_Lich_King_Die_Actions )
endfunction
function Trig_Lich_King_Rage_Func007001002001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_PEON) == false )
endfunction
function Trig_Lich_King_Rage_Func007001002002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_TOWNHALL) == false )
endfunction
function Trig_Lich_King_Rage_Func007001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Lich_King_Rage_Func007001002001(), Trig_Lich_King_Rage_Func007001002002() )
endfunction
function Trig_Lich_King_Rage_Func007A takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "attack", GetRandomLocInRect(gg_rct_Boss_Target) )
endfunction
function Trig_Lich_King_Rage_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call PauseUnitBJ( false, gg_unit_Npbm_0041 )
call ShowUnitShow( gg_unit_Npbm_0041 )
call SetUnitOwner( gg_unit_Npbm_0041, Player(8), true )
call SetUnitPositionLocFacingBJ( gg_unit_Npbm_0041, GetUnitLoc(GetDyingUnit()), GetUnitFacing(gg_unit_UC33_0179) )
call PlayMusicBJ( gg_snd_PH1 )
call ForGroupBJ( GetUnitsOfPlayerMatching(Player(6), Condition(function Trig_Lich_King_Rage_Func007001002)), function Trig_Lich_King_Rage_Func007A )
endfunction
//===========================================================================
function InitTrig_Lich_King_Rage takes nothing returns nothing
set gg_trg_Lich_King_Rage = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_Lich_King_Rage, gg_unit_UC33_0179, EVENT_UNIT_DEATH )
call TriggerAddAction( gg_trg_Lich_King_Rage, function Trig_Lich_King_Rage_Actions )
endfunction
function Trig_Prince_Hurt_Func004001 takes nothing returns boolean
return ( IsUnitType(GetAttacker(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Prince_Hurt_Func004002 takes nothing returns boolean
return ( IsPlayerInForce(GetOwningPlayer(GetAttacker()), GetPlayersByMapControl(MAP_CONTROL_USER)) == true )
endfunction
function Trig_Prince_Hurt_Conditions takes nothing returns boolean
if ( not GetBooleanAnd( Trig_Prince_Hurt_Func004001(), Trig_Prince_Hurt_Func004002() ) ) then
return false
endif
return true
endfunction
function Trig_Prince_Hurt_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call SetPlayerAllianceStateBJ( GetOwningPlayer(GetAttacker()), Player(6), bj_ALLIANCE_UNALLIED )
call SetPlayerAllianceStateBJ( Player(6), GetOwningPlayer(GetAttacker()), bj_ALLIANCE_UNALLIED )
endfunction
//===========================================================================
function InitTrig_Prince_Hurt takes nothing returns nothing
set gg_trg_Prince_Hurt = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_Prince_Hurt, gg_unit_Harf_0009, EVENT_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Prince_Hurt, Condition( function Trig_Prince_Hurt_Conditions ) )
call TriggerAddAction( gg_trg_Prince_Hurt, function Trig_Prince_Hurt_Actions )
endfunction
function Trig_QWpnShp_Func002001 takes nothing returns boolean
return ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_QWpnShp_Func002002 takes nothing returns boolean
return ( GetPlayerController(GetOwningPlayer(GetTriggerUnit())) == MAP_CONTROL_USER )
endfunction
function Trig_QWpnShp_Conditions takes nothing returns boolean
if ( not GetBooleanAnd( Trig_QWpnShp_Func002001(), Trig_QWpnShp_Func002002() ) ) then
return false
endif
return true
endfunction
function Trig_QWpnShp_Func001C takes nothing returns boolean
if ( not ( udg_MnQst_WpnShp == 2 ) ) then
return false
endif
return true
endfunction
function Trig_QWpnShp_Actions takes nothing returns nothing
if ( Trig_QWpnShp_Func001C() ) then
call DisableTrigger( GetTriggeringTrigger() )
call CreateTextTagUnitBJ( "TRIGSTR_2766", gg_unit_hmtm_0586, 30.00, 10.00, 0.00, 100.00, 0.00, 0 )
set udg_ft_Speech[1] = GetLastCreatedTextTag()
call TriggerSleepAction( ( udg_ft_Text_Delay + 1.00 ) )
call DestroyTextTagBJ( udg_ft_Speech[1] )
call TriggerSleepAction( 6.00 )
call CreateTextTagUnitBJ( "TRIGSTR_2767", gg_unit_hmtm_0586, 30.00, 10.00, 0.00, 100.00, 0.00, 0 )
set udg_ft_Speech[2] = GetLastCreatedTextTag()
call TriggerSleepAction( ( udg_ft_Text_Delay + 1.00 ) )
call DestroyTextTagBJ( udg_ft_Speech[2] )
call SetUnitInvulnerable( gg_unit_n007_0541, false )
call SetUnitOwner( gg_unit_n007_0541, Player(6), true )
call IssueTargetOrderBJ( gg_unit_n007_0541, "move", gg_unit_hmtm_0586 )
call TriggerSleepAction( 1.00 )
call PlaySoundOnUnitBJ( gg_snd_ItemReceived, 100, gg_unit_hmtm_0586 )
call CreateItemLoc( 'I001', GetRectCenter(gg_rct_QWpnShp) )
call DisableTrigger( GetTriggeringTrigger() )
else
call DisableTrigger( GetTriggeringTrigger() )
call CreateTextTagUnitBJ( "TRIGSTR_2768", gg_unit_hmtm_0586, 30.00, 10.00, 0.00, 100.00, 0.00, 0 )
set udg_ft_Speech[1] = GetLastCreatedTextTag()
call TriggerSleepAction( ( udg_ft_Text_Delay + 1.00 ) )
call DestroyTextTagBJ( udg_ft_Speech[1] )
set udg_MnQst_WpnShp = 1
call TriggerSleepAction( 12.00 )
call EnableTrigger( GetTriggeringTrigger() )
endif
endfunction
//===========================================================================
function InitTrig_QWpnShp takes nothing returns nothing
set gg_trg_QWpnShp = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_QWpnShp, gg_rct_QWpnShp )
call TriggerAddCondition( gg_trg_QWpnShp, Condition( function Trig_QWpnShp_Conditions ) )
call TriggerAddAction( gg_trg_QWpnShp, function Trig_QWpnShp_Actions )
endfunction
function Trig_QWpnShpDg_Func001001 takes nothing returns boolean
return ( IsUnitType(GetEnteringUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_QWpnShpDg_Func001002 takes nothing returns boolean
return ( GetPlayerController(GetOwningPlayer(GetEnteringUnit())) == MAP_CONTROL_USER )
endfunction
function Trig_QWpnShpDg_Conditions takes nothing returns boolean
if ( not GetBooleanAnd( Trig_QWpnShpDg_Func001001(), Trig_QWpnShpDg_Func001002() ) ) then
return false
endif
return true
endfunction
function Trig_QWpnShpDg_Func002C takes nothing returns boolean
if ( not ( udg_MnQst_WpnShp == 1 ) ) then
return false
endif
return true
endfunction
function Trig_QWpnShpDg_Actions takes nothing returns nothing
if ( Trig_QWpnShpDg_Func002C() ) then
call DisableTrigger( GetTriggeringTrigger() )
call SetUnitOwner( gg_unit_n007_0541, GetOwningPlayer(GetEnteringUnit()), false )
call CreateTextTagUnitBJ( "TRIGSTR_903", gg_unit_n007_0541, 30.00, 10.00, 0.00, 100.00, 0.00, 0 )
set udg_ft_Speech[1] = GetLastCreatedTextTag()
call TriggerSleepAction( ( udg_ft_Text_Delay + 1.00 ) )
call DestroyTextTagBJ( udg_ft_Speech[1] )
call TriggerSleepAction( 1.00 )
call IssueTargetOrderBJ( gg_unit_n007_0541, "move", GetEnteringUnit() )
set udg_MnQst_WpnShp = 2
call DisableTrigger( GetTriggeringTrigger() )
else
endif
endfunction
//===========================================================================
function InitTrig_QWpnShpDg takes nothing returns nothing
set gg_trg_QWpnShpDg = CreateTrigger( )
call TriggerRegisterUnitInRangeSimple( gg_trg_QWpnShpDg, 100.00, gg_unit_n007_0541 )
call TriggerAddCondition( gg_trg_QWpnShpDg, Condition( function Trig_QWpnShpDg_Conditions ) )
call TriggerAddAction( gg_trg_QWpnShpDg, function Trig_QWpnShpDg_Actions )
endfunction
function Trig_QKillSpd_Func002001 takes nothing returns boolean
return ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_QKillSpd_Func002002 takes nothing returns boolean
return ( IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()), GetPlayersByMapControl(MAP_CONTROL_USER)) == true )
endfunction
function Trig_QKillSpd_Conditions takes nothing returns boolean
if ( not GetBooleanAnd( Trig_QKillSpd_Func002001(), Trig_QKillSpd_Func002002() ) ) then
return false
endif
return true
endfunction
function Trig_QKillSpd_Func001Func001C takes nothing returns boolean
if ( not ( CountLivingPlayerUnitsOfTypeId('nspr', Player(7)) > 0 ) ) then
return false
endif
return true
endfunction
function Trig_QKillSpd_Func001Func009002 takes nothing returns nothing
call SetUnitOwner( GetEnumUnit(), Player(7), true )
endfunction
function Trig_QKillSpd_Func001Func010002 takes nothing returns nothing
call UnitAddAbilityBJ( 'Awan', GetEnumUnit() )
endfunction
function Trig_QKillSpd_Func001C takes nothing returns boolean
if ( not ( udg_MnQst_Spd == 0 ) ) then
return false
endif
return true
endfunction
function Trig_QKillSpd_Actions takes nothing returns nothing
if ( Trig_QKillSpd_Func001C() ) then
call DisableTrigger( GetTriggeringTrigger() )
call CreateTextTagUnitBJ( "TRIGSTR_2352", gg_unit_hhes_0031, 30.00, 10.00, 0.00, 100.00, 0.00, 0 )
set udg_ft_Speech[3] = GetLastCreatedTextTag()
call TriggerSleepAction( ( udg_ft_Text_Delay + 1.00 ) )
call DestroyTextTagBJ( udg_ft_Speech[3] )
set udg_MnQst_Spd = 1
call ForGroupBJ( GetUnitsOfPlayerAndTypeId(Player(PLAYER_NEUTRAL_PASSIVE), 'nspr'), function Trig_QKillSpd_Func001Func009002 )
call ForGroupBJ( GetUnitsOfPlayerAndTypeId(Player(7), 'nspr'), function Trig_QKillSpd_Func001Func010002 )
call TriggerSleepAction( 10.00 )
call EnableTrigger( GetTriggeringTrigger() )
else
if ( Trig_QKillSpd_Func001Func001C() ) then
call DisableTrigger( GetTriggeringTrigger() )
call CreateTextTagUnitBJ( "TRIGSTR_2357", gg_unit_hhes_0031, 30.00, 10.00, 0.00, 100.00, 0.00, 0 )
set udg_ft_Speech[3] = GetLastCreatedTextTag()
call TriggerSleepAction( ( udg_ft_Text_Delay + 1.00 ) )
call DestroyTextTagBJ( udg_ft_Speech[3] )
call TriggerSleepAction( 10.00 )
call EnableTrigger( GetTriggeringTrigger() )
else
call DisableTrigger( GetTriggeringTrigger() )
call CreateTextTagUnitBJ( "TRIGSTR_2356", gg_unit_hhes_0031, 30.00, 10.00, 0.00, 100.00, 0.00, 0 )
set udg_ft_Speech[3] = GetLastCreatedTextTag()
call TriggerSleepAction( ( udg_ft_Text_Delay + 1.00 ) )
call DestroyTextTagBJ( udg_ft_Speech[3] )
call DisableTrigger( GetTriggeringTrigger() )
endif
endif
endfunction
//===========================================================================
function InitTrig_QKillSpd takes nothing returns nothing
set gg_trg_QKillSpd = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_QKillSpd, gg_rct_QKillSpd )
call TriggerAddCondition( gg_trg_QKillSpd, Condition( function Trig_QKillSpd_Conditions ) )
call TriggerAddAction( gg_trg_QKillSpd, function Trig_QKillSpd_Actions )
endfunction
function Trig_QLostSon_Func001001 takes nothing returns boolean
return ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_QLostSon_Func001002 takes nothing returns boolean
return ( IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()), GetPlayersByMapControl(MAP_CONTROL_USER)) == true )
endfunction
function Trig_QLostSon_Conditions takes nothing returns boolean
if ( not GetBooleanAnd( Trig_QLostSon_Func001001(), Trig_QLostSon_Func001002() ) ) then
return false
endif
return true
endfunction
function Trig_QLostSon_Func002Func001Func012C takes nothing returns boolean
if ( not ( udg_MnQst_LostSon == 2 ) ) then
return false
endif
return true
endfunction
function Trig_QLostSon_Func002Func001C takes nothing returns boolean
if ( not ( udg_MnQst_LostSon == 1 ) ) then
return false
endif
return true
endfunction
function Trig_QLostSon_Func002C takes nothing returns boolean
if ( not ( udg_MnQst_LostSon == 0 ) ) then
return false
endif
return true
endfunction
function Trig_QLostSon_Actions takes nothing returns nothing
if ( Trig_QLostSon_Func002C() ) then
call DisableTrigger( GetTriggeringTrigger() )
call CreateTextTagUnitBJ( "TRIGSTR_983", gg_unit_hpea_0621, 30.00, 10.00, 0.00, 100.00, 0.00, 0 )
set udg_ft_Speech[4] = GetLastCreatedTextTag()
call TriggerSleepAction( ( udg_ft_Text_Delay + 1.00 ) )
call DestroyTextTagBJ( udg_ft_Speech[4] )
call CreateTextTagUnitBJ( "TRIGSTR_984", gg_unit_nhef_0622, 30.00, 10.00, 0.00, 100.00, 0.00, 0 )
set udg_ft_Speech[5] = GetLastCreatedTextTag()
call TriggerSleepAction( ( udg_ft_Text_Delay + 1.00 ) )
call DestroyTextTagBJ( udg_ft_Speech[5] )
set udg_MnQst_LostSon = 1
call TriggerSleepAction( 6.00 )
call EnableTrigger( GetTriggeringTrigger() )
else
if ( Trig_QLostSon_Func002Func001C() ) then
call DisableTrigger( GetTriggeringTrigger() )
call CreateTextTagUnitBJ( "TRIGSTR_2337", gg_unit_hpea_0621, 30.00, 10.00, 0.00, 100.00, 0.00, 0 )
set udg_ft_Speech[4] = GetLastCreatedTextTag()
call TriggerSleepAction( ( udg_ft_Text_Delay + 1.00 ) )
call DestroyTextTagBJ( udg_ft_Speech[4] )
call CreateTextTagUnitBJ( "TRIGSTR_2338", gg_unit_nhef_0622, 30.00, 10.00, 0.00, 100.00, 0.00, 0 )
set udg_ft_Speech[5] = GetLastCreatedTextTag()
call TriggerSleepAction( ( udg_ft_Text_Delay + 1.00 ) )
call DestroyTextTagBJ( udg_ft_Speech[5] )
call TriggerSleepAction( 6.00 )
call EnableTrigger( GetTriggeringTrigger() )
else
if ( Trig_QLostSon_Func002Func001Func012C() ) then
call DisableTrigger( GetTriggeringTrigger() )
call CreateTextTagUnitBJ( "TRIGSTR_2339", gg_unit_hpea_0621, 30.00, 10.00, 0.00, 100.00, 0.00, 0 )
set udg_ft_Speech[4] = GetLastCreatedTextTag()
call TriggerSleepAction( ( udg_ft_Text_Delay + 1.00 ) )
call DestroyTextTagBJ( udg_ft_Speech[4] )
call TriggerSleepAction( 6.00 )
call CreateTextTagUnitBJ( "TRIGSTR_2340", gg_unit_nhef_0622, 30.00, 10.00, 0.00, 100.00, 0.00, 0 )
set udg_ft_Speech[5] = GetLastCreatedTextTag()
call TriggerSleepAction( ( udg_ft_Text_Delay + 1.00 ) )
call DestroyTextTagBJ( udg_ft_Speech[5] )
call TriggerSleepAction( 6.00 )
call CreateTextTagUnitBJ( "TRIGSTR_2353", gg_unit_nhef_0622, 30.00, 10.00, 0.00, 100.00, 0.00, 0 )
set udg_ft_Speech[6] = GetLastCreatedTextTag()
call TriggerSleepAction( ( udg_ft_Text_Delay + 1.00 ) )
call DestroyTextTagBJ( udg_ft_Speech[6] )
call SelectUnitRemove( gg_unit_nvk2_0118 )
call SetUnitOwner( gg_unit_nvk2_0118, Player(PLAYER_NEUTRAL_PASSIVE), false )
call IssuePointOrderLocBJ( gg_unit_nvk2_0118, "move", GetRandomLocInRect(gg_rct_QKlls1Hlb) )
call UnitAddItemByIdSwapped( 'I00E', GetTriggerUnit() )
call DisableTrigger( GetTriggeringTrigger() )
else
endif
endif
endif
endfunction
//===========================================================================
function InitTrig_QLostSon takes nothing returns nothing
set gg_trg_QLostSon = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_QLostSon, gg_rct_QKlls1Hlb )
call TriggerAddCondition( gg_trg_QLostSon, Condition( function Trig_QLostSon_Conditions ) )
call TriggerAddAction( gg_trg_QLostSon, function Trig_QLostSon_Actions )
endfunction
function Trig_QLostSonKd_Func002001 takes nothing returns boolean
return ( IsUnitType(GetEnteringUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_QLostSonKd_Func002002 takes nothing returns boolean
return ( GetPlayerController(GetOwningPlayer(GetEnteringUnit())) == MAP_CONTROL_USER )
endfunction
function Trig_QLostSonKd_Conditions takes nothing returns boolean
if ( not GetBooleanAnd( Trig_QLostSonKd_Func002001(), Trig_QLostSonKd_Func002002() ) ) then
return false
endif
return true
endfunction
function Trig_QLostSonKd_Func001C takes nothing returns boolean
if ( not ( udg_MnQst_LostSon == 1 ) ) then
return false
endif
return true
endfunction
function Trig_QLostSonKd_Actions takes nothing returns nothing
if ( Trig_QLostSonKd_Func001C() ) then
call DisableTrigger( GetTriggeringTrigger() )
call CreateTextTagUnitBJ( "TRIGSTR_2345", gg_unit_nvk2_0118, 8.00, 10.00, 0.00, 100.00, 0.00, 0 )
set udg_ft_Speech[4] = GetLastCreatedTextTag()
call TriggerSleepAction( ( udg_ft_Text_Delay + 1.00 ) )
call DestroyTextTagBJ( udg_ft_Speech[4] )
call TriggerSleepAction( 6.00 )
call CreateTextTagUnitBJ( "TRIGSTR_2346", gg_unit_nvk2_0118, 8.00, 10.00, 0.00, 100.00, 0.00, 0 )
set udg_ft_Speech[5] = GetLastCreatedTextTag()
call TriggerSleepAction( ( udg_ft_Text_Delay + 1.00 ) )
call DestroyTextTagBJ( udg_ft_Speech[5] )
call SetUnitOwner( gg_unit_nvk2_0118, GetOwningPlayer(GetEnteringUnit()), false )
call IssueTargetOrderBJ( gg_unit_nvk2_0118, "move", GetEnteringUnit() )
set udg_MnQst_LostSon = 2
call DisableTrigger( GetTriggeringTrigger() )
else
endif
endfunction
//===========================================================================
function InitTrig_QLostSonKd takes nothing returns nothing
set gg_trg_QLostSonKd = CreateTrigger( )
call TriggerRegisterUnitInRangeSimple( gg_trg_QLostSonKd, 256, gg_unit_nvk2_0118 )
call TriggerAddCondition( gg_trg_QLostSonKd, Condition( function Trig_QLostSonKd_Conditions ) )
call TriggerAddAction( gg_trg_QLostSonKd, function Trig_QLostSonKd_Actions )
endfunction
function Trig_QSplBook_Func002001 takes nothing returns boolean
return ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_QSplBook_Func002002 takes nothing returns boolean
return ( IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()), GetPlayersByMapControl(MAP_CONTROL_USER)) == true )
endfunction
function Trig_QSplBook_Conditions takes nothing returns boolean
if ( not GetBooleanAnd( Trig_QSplBook_Func002001(), Trig_QSplBook_Func002002() ) ) then
return false
endif
return true
endfunction
function Trig_QSplBook_Func001Func001Func001C takes nothing returns boolean
if ( not ( IsItemOwned(GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'ledg')) == true ) ) then
return false
endif
return true
endfunction
function Trig_QSplBook_Func001Func001C takes nothing returns boolean
if ( not ( udg_MnQst_SplBook1 == 1 ) ) then
return false
endif
return true
endfunction
function Trig_QSplBook_Func001C takes nothing returns boolean
if ( not ( udg_MnQst_SplBook1 == 0 ) ) then
return false
endif
return true
endfunction
function Trig_QSplBook_Actions takes nothing returns nothing
if ( Trig_QSplBook_Func001C() ) then
call DisableTrigger( GetTriggeringTrigger() )
call CreateTextTagUnitBJ( "TRIGSTR_176", gg_unit_nemi_0383, 30.00, 10.00, 0.00, 100.00, 0.00, 0 )
set udg_ft_Speech[7] = GetLastCreatedTextTag()
call TriggerSleepAction( ( udg_ft_Text_Delay + 1.00 ) )
call DestroyTextTagBJ( udg_ft_Speech[7] )
call CreateTextTagUnitBJ( "TRIGSTR_177", gg_unit_nemi_0383, 30.00, 10.00, 0.00, 100.00, 0.00, 0 )
set udg_ft_Speech[8] = GetLastCreatedTextTag()
call TriggerSleepAction( ( udg_ft_Text_Delay + 1.00 ) )
call DestroyTextTagBJ( udg_ft_Speech[8] )
set udg_MnQst_SplBook1 = 1
call TriggerSleepAction( 6.00 )
call EnableTrigger( GetTriggeringTrigger() )
else
if ( Trig_QSplBook_Func001Func001C() ) then
if ( Trig_QSplBook_Func001Func001Func001C() ) then
call DisableTrigger( GetTriggeringTrigger() )
call UnitAddItemByIdSwapped( 'ledg', gg_unit_nemi_0383 )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'ledg') )
call CreateTextTagUnitBJ( "TRIGSTR_132", gg_unit_nemi_0383, 30.00, 10.00, 0.00, 100.00, 0.00, 0 )
set udg_ft_Speech[7] = GetLastCreatedTextTag()
call TriggerSleepAction( ( udg_ft_Text_Delay + 1.00 ) )
call DestroyTextTagBJ( udg_ft_Speech[7] )
call CreateTextTagUnitBJ( "TRIGSTR_135", gg_unit_nemi_0383, 30.00, 10.00, 0.00, 100.00, 0.00, 0 )
set udg_ft_Speech[8] = GetLastCreatedTextTag()
call TriggerSleepAction( ( udg_ft_Text_Delay + 1.00 ) )
call DestroyTextTagBJ( udg_ft_Speech[8] )
call UnitAddItemByIdSwapped( 'bfhr', GetTriggerUnit() )
set udg_MnQst_SplBook1 = 3
call DisableTrigger( GetTriggeringTrigger() )
else
call DisableTrigger( GetTriggeringTrigger() )
call CreateTextTagUnitBJ( "TRIGSTR_181", gg_unit_nemi_0383, 30.00, 10.00, 0.00, 100.00, 0.00, 0 )
set udg_ft_Speech[7] = GetLastCreatedTextTag()
call TriggerSleepAction( ( udg_ft_Text_Delay + 1.00 ) )
call DestroyTextTagBJ( udg_ft_Speech[7] )
call CreateTextTagUnitBJ( "TRIGSTR_182", gg_unit_nemi_0383, 30.00, 10.00, 0.00, 100.00, 0.00, 0 )
set udg_ft_Speech[8] = GetLastCreatedTextTag()
call TriggerSleepAction( ( udg_ft_Text_Delay + 1.00 ) )
call DestroyTextTagBJ( udg_ft_Speech[8] )
call TriggerSleepAction( 6.00 )
call EnableTrigger( GetTriggeringTrigger() )
endif
else
call DisableTrigger( GetTriggeringTrigger() )
call CreateTextTagUnitBJ( "TRIGSTR_181", gg_unit_nemi_0383, 30.00, 10.00, 0.00, 100.00, 0.00, 0 )
set udg_ft_Speech[7] = GetLastCreatedTextTag()
call TriggerSleepAction( ( udg_ft_Text_Delay + 1.00 ) )
call DestroyTextTagBJ( udg_ft_Speech[7] )
call TriggerSleepAction( 6.00 )
call CreateTextTagUnitBJ( "TRIGSTR_182", gg_unit_nemi_0383, 30.00, 10.00, 0.00, 100.00, 0.00, 0 )
set udg_ft_Speech[8] = GetLastCreatedTextTag()
call TriggerSleepAction( ( udg_ft_Text_Delay + 1.00 ) )
call DestroyTextTagBJ( udg_ft_Speech[8] )
call TriggerSleepAction( 6.00 )
call EnableTrigger( GetTriggeringTrigger() )
endif
endif
endfunction
//===========================================================================
function InitTrig_QSplBook takes nothing returns nothing
set gg_trg_QSplBook = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_QSplBook, gg_rct_QSplBook )
call TriggerAddCondition( gg_trg_QSplBook, Condition( function Trig_QSplBook_Conditions ) )
call TriggerAddAction( gg_trg_QSplBook, function Trig_QSplBook_Actions )
endfunction
function Trig_QDullSwd_Func002001 takes nothing returns boolean
return ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_QDullSwd_Func002002 takes nothing returns boolean
return ( IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()), GetPlayersByMapControl(MAP_CONTROL_USER)) == true )
endfunction
function Trig_QDullSwd_Conditions takes nothing returns boolean
if ( not GetBooleanAnd( Trig_QDullSwd_Func002001(), Trig_QDullSwd_Func002002() ) ) then
return false
endif
return true
endfunction
function Trig_QDullSwd_Func001Func001Func001C takes nothing returns boolean
if ( not ( IsItemOwned(GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I001')) == true ) ) then
return false
endif
return true
endfunction
function Trig_QDullSwd_Func001Func001C takes nothing returns boolean
if ( not ( udg_MnQst_DullSword == 1 ) ) then
return false
endif
return true
endfunction
function Trig_QDullSwd_Func001C takes nothing returns boolean
if ( not ( udg_MnQst_DullSword == 0 ) ) then
return false
endif
return true
endfunction
function Trig_QDullSwd_Actions takes nothing returns nothing
if ( Trig_QDullSwd_Func001C() ) then
call DisableTrigger( GetTriggeringTrigger() )
call CreateTextTagUnitBJ( "TRIGSTR_185", gg_unit_nwzd_0101, 30.00, 10.00, 0.00, 100.00, 0.00, 0 )
set udg_ft_Speech[9] = GetLastCreatedTextTag()
call TriggerSleepAction( ( udg_ft_Text_Delay + 1.00 ) )
call DestroyTextTagBJ( udg_ft_Speech[9] )
call CreateTextTagUnitBJ( "TRIGSTR_186", gg_unit_nwzd_0101, 30.00, 10.00, 0.00, 100.00, 0.00, 0 )
set udg_ft_Speech[10] = GetLastCreatedTextTag()
call TriggerSleepAction( ( udg_ft_Text_Delay + 1.00 ) )
call DestroyTextTagBJ( udg_ft_Speech[10] )
set udg_MnQst_DullSword = 1
call TriggerSleepAction( 6.00 )
call EnableTrigger( GetTriggeringTrigger() )
else
if ( Trig_QDullSwd_Func001Func001C() ) then
if ( Trig_QDullSwd_Func001Func001Func001C() ) then
call DisableTrigger( GetTriggeringTrigger() )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I001') )
call CreateTextTagUnitBJ( "TRIGSTR_155", gg_unit_nwzd_0101, 30.00, 10.00, 0.00, 100.00, 0.00, 0 )
set udg_ft_Speech[9] = GetLastCreatedTextTag()
call TriggerSleepAction( ( udg_ft_Text_Delay + 1.00 ) )
call DestroyTextTagBJ( udg_ft_Speech[9] )
call CreateTextTagUnitBJ( "TRIGSTR_160", gg_unit_nemi_0383, 30.00, 10.00, 0.00, 100.00, 0.00, 0 )
set udg_ft_Speech[10] = GetLastCreatedTextTag()
call TriggerSleepAction( ( udg_ft_Text_Delay + 1.00 ) )
call DestroyTextTagBJ( udg_ft_Speech[10] )
call UnitAddItemByIdSwapped( 'I00B', GetTriggerUnit() )
set udg_MnQst_DullSword = 3
call DisableTrigger( GetTriggeringTrigger() )
else
call DisableTrigger( GetTriggeringTrigger() )
call CreateTextTagUnitBJ( "TRIGSTR_187", gg_unit_nwzd_0101, 30.00, 10.00, 0.00, 100.00, 0.00, 0 )
set udg_ft_Speech[9] = GetLastCreatedTextTag()
call TriggerSleepAction( ( udg_ft_Text_Delay + 1.00 ) )
call DestroyTextTagBJ( udg_ft_Speech[9] )
call TriggerSleepAction( 8.00 )
call EnableTrigger( GetTriggeringTrigger() )
endif
else
call DisableTrigger( GetTriggeringTrigger() )
call CreateTextTagUnitBJ( "TRIGSTR_181", gg_unit_nwzd_0101, 30.00, 10.00, 0.00, 100.00, 0.00, 0 )
set udg_ft_Speech[9] = GetLastCreatedTextTag()
call TriggerSleepAction( ( udg_ft_Text_Delay + 1.00 ) )
call DestroyTextTagBJ( udg_ft_Speech[9] )
call CreateTextTagUnitBJ( "TRIGSTR_182", gg_unit_nwzd_0101, 30.00, 10.00, 0.00, 100.00, 0.00, 0 )
set udg_ft_Speech[10] = GetLastCreatedTextTag()
call TriggerSleepAction( ( udg_ft_Text_Delay + 1.00 ) )
call DestroyTextTagBJ( udg_ft_Speech[10] )
call TriggerSleepAction( 8.00 )
call EnableTrigger( GetTriggeringTrigger() )
endif
endif
endfunction
//===========================================================================
function InitTrig_QDullSwd takes nothing returns nothing
set gg_trg_QDullSwd = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_QDullSwd, gg_rct_QsplBookX )
call TriggerAddCondition( gg_trg_QDullSwd, Condition( function Trig_QDullSwd_Conditions ) )
call TriggerAddAction( gg_trg_QDullSwd, function Trig_QDullSwd_Actions )
endfunction
function Trig_Cheat_Help_Actions takes nothing returns nothing
call QuestMessageBJ( GetPlayersAll(), bj_QUESTMESSAGE_HINT, "TRIGSTR_2329" )
endfunction
//===========================================================================
function InitTrig_Cheat_Help takes nothing returns nothing
set gg_trg_Cheat_Help = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Help, Player(0), "[cheat]", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Help, Player(1), "[cheat]", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Help, Player(2), "[cheat]", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Help, Player(3), "[cheat]", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Help, Player(4), "[cheat]", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Help, Player(5), "[cheat]", true )
call TriggerAddAction( gg_trg_Cheat_Help, function Trig_Cheat_Help_Actions )
endfunction
function Trig_Cheat_Lock_Camera_to_Player_Actions takes nothing returns nothing
set udg_Find_Hero_Player = GetTriggerPlayer()
call TriggerExecute( gg_trg_Find_Hero )
call PanCameraToTimedLocForPlayer( udg_Find_Hero_Player, GetUnitLoc(udg_u_Find_Hero_Result), 2.00 )
call ResetToGameCameraForPlayer( udg_Find_Hero_Player, 2.00 )
call TriggerExecute( gg_trg_Lock_Camera_to_Heroes )
endfunction
//===========================================================================
function InitTrig_Cheat_Lock_Camera_to_Player takes nothing returns nothing
set gg_trg_Cheat_Lock_Camera_to_Player = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Lock_Camera_to_Player, Player(0), "[cam_lock]", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Lock_Camera_to_Player, Player(1), "[cam_lock]", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Lock_Camera_to_Player, Player(2), "[cam_lock]", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Lock_Camera_to_Player, Player(3), "[cam_lock]", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Lock_Camera_to_Player, Player(4), "[cam_lock]", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Lock_Camera_to_Player, Player(5), "[cam_lock]", true )
call TriggerAddAction( gg_trg_Cheat_Lock_Camera_to_Player, function Trig_Cheat_Lock_Camera_to_Player_Actions )
endfunction
function Trig_Cheat_Kill_Hero_Actions takes nothing returns nothing
set udg_Find_Hero_Player = GetTriggerPlayer()
call TriggerExecute( gg_trg_Find_Hero )
call KillUnit( udg_u_Find_Hero_Result )
endfunction
//===========================================================================
function InitTrig_Cheat_Kill_Hero takes nothing returns nothing
set gg_trg_Cheat_Kill_Hero = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Kill_Hero, Player(0), "[kill]", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Kill_Hero, Player(1), "[kill]", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Kill_Hero, Player(2), "[kill]", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Kill_Hero, Player(3), "[kill]", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Kill_Hero, Player(4), "[kill]", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Kill_Hero, Player(5), "[kill]", true )
call TriggerAddAction( gg_trg_Cheat_Kill_Hero, function Trig_Cheat_Kill_Hero_Actions )
endfunction
function Trig_Cheat_Teleport_Hero_Actions takes nothing returns nothing
set udg_Find_Hero_Player = GetTriggerPlayer()
call TriggerExecute( gg_trg_Find_Hero )
call SetUnitPositionLocFacingLocBJ( udg_u_Find_Hero_Result, GetRectCenter(GetCurrentCameraBoundsMapRectBJ()), GetUnitLoc(GetTriggerUnit()) )
endfunction
//===========================================================================
function InitTrig_Cheat_Teleport_Hero takes nothing returns nothing
set gg_trg_Cheat_Teleport_Hero = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Teleport_Hero, Player(0), "[cam_warp]", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Teleport_Hero, Player(1), "[cam_warp]", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Teleport_Hero, Player(2), "[cam_warp]", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Teleport_Hero, Player(3), "[cam_warp]", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Teleport_Hero, Player(4), "[cam_warp]", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Teleport_Hero, Player(5), "[cam_warp]", true )
call TriggerAddAction( gg_trg_Cheat_Teleport_Hero, function Trig_Cheat_Teleport_Hero_Actions )
endfunction
function Trig_Cheat_Reveal_Func003C takes nothing returns boolean
if ( not ( udg_m_iCheat[1] == true ) ) then
return false
endif
return true
endfunction
function Trig_Cheat_Reveal_Actions takes nothing returns nothing
set udg_Find_Hero_Player = GetTriggerPlayer()
call TriggerExecute( gg_trg_Find_Hero )
if ( Trig_Cheat_Reveal_Func003C() ) then
call FogEnableOn( )
call FogMaskEnableOn( )
set udg_m_iCheat[1] = false
else
call FogEnableOff( )
call FogMaskEnableOff( )
set udg_m_iCheat[1] = true
endif
endfunction
//===========================================================================
function InitTrig_Cheat_Reveal takes nothing returns nothing
set gg_trg_Cheat_Reveal = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Reveal, Player(0), "[plr_give]+item_reveal", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Reveal, Player(1), "[plr_give]+item_reveal", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Reveal, Player(2), "[plr_give]+item_reveal", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Reveal, Player(3), "[plr_give]+item_reveal", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Reveal, Player(4), "[plr_give]+item_reveal", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Reveal, Player(5), "[plr_give]+item_reveal", true )
call TriggerAddAction( gg_trg_Cheat_Reveal, function Trig_Cheat_Reveal_Actions )
endfunction
function Trig_Cheat_Full_Health_Mana_Func009A takes nothing returns nothing
call UnitResetCooldown( GetEnumUnit() )
call SetUnitLifePercentBJ( GetEnumUnit(), 100 )
call SetUnitManaPercentBJ( GetEnumUnit(), 100 )
endfunction
function Trig_Cheat_Full_Health_Mana_Actions takes nothing returns nothing
set udg_Find_Hero_Player = GetTriggerPlayer()
call TriggerExecute( gg_trg_Find_Hero )
call ForGroupBJ( GetUnitsOfPlayerAll(udg_Find_Hero_Player), function Trig_Cheat_Full_Health_Mana_Func009A )
endfunction
//===========================================================================
function InitTrig_Cheat_Full_Health_Mana takes nothing returns nothing
set gg_trg_Cheat_Full_Health_Mana = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Full_Health_Mana, Player(0), "[chr_restatus]", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Full_Health_Mana, Player(1), "[chr_restatus]", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Full_Health_Mana, Player(2), "[chr_restatus]", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Full_Health_Mana, Player(3), "[chr_restatus]", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Full_Health_Mana, Player(4), "[chr_restatus]", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Full_Health_Mana, Player(5), "[chr_restatus]", true )
call TriggerAddAction( gg_trg_Cheat_Full_Health_Mana, function Trig_Cheat_Full_Health_Mana_Actions )
endfunction
function Trig_Cheat_Money_Actions takes nothing returns nothing
call AdjustPlayerStateBJ( 250, GetTriggerPlayer(), PLAYER_STATE_RESOURCE_GOLD )
endfunction
//===========================================================================
function InitTrig_Cheat_Money takes nothing returns nothing
set gg_trg_Cheat_Money = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Money, Player(0), "[plr_give]+money", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Money, Player(1), "[plr_give]+money", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Money, Player(2), "[plr_give]+money", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Money, Player(3), "[plr_give]+money", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Money, Player(4), "[plr_give]+money", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Money, Player(5), "[plr_give]+money", true )
call TriggerAddAction( gg_trg_Cheat_Money, function Trig_Cheat_Money_Actions )
endfunction
function Trig_Cheat_Money_Money_Actions takes nothing returns nothing
call AdjustPlayerStateBJ( 30000, GetTriggerPlayer(), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 100, GetTriggerPlayer(), PLAYER_STATE_FOOD_CAP_CEILING )
endfunction
//===========================================================================
function InitTrig_Cheat_Money_Money takes nothing returns nothing
set gg_trg_Cheat_Money_Money = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Money_Money, Player(0), "[plr_give]+money+money", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Money_Money, Player(1), "[plr_give]+money+money", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Money_Money, Player(2), "[plr_give]+money+money", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Money_Money, Player(3), "[plr_give]+money+money", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Money_Money, Player(4), "[plr_give]+money+money", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Money_Money, Player(5), "[plr_give]+money+money", true )
call TriggerAddAction( gg_trg_Cheat_Money_Money, function Trig_Cheat_Money_Money_Actions )
endfunction
function Trig_Cheat_Wood_Actions takes nothing returns nothing
call AdjustPlayerStateBJ( 250, GetTriggerPlayer(), PLAYER_STATE_RESOURCE_LUMBER )
endfunction
//===========================================================================
function InitTrig_Cheat_Wood takes nothing returns nothing
set gg_trg_Cheat_Wood = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Wood, Player(0), "[plr_give]+wood", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Wood, Player(1), "[plr_give]+wood", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Wood, Player(2), "[plr_give]+wood", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Wood, Player(3), "[plr_give]+wood", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Wood, Player(4), "[plr_give]+wood", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Wood, Player(5), "[plr_give]+wood", true )
call TriggerAddAction( gg_trg_Cheat_Wood, function Trig_Cheat_Wood_Actions )
endfunction
function Trig_Cheat_Wood_Wood_Actions takes nothing returns nothing
call AdjustPlayerStateBJ( 30000, GetTriggerPlayer(), PLAYER_STATE_RESOURCE_LUMBER )
endfunction
//===========================================================================
function InitTrig_Cheat_Wood_Wood takes nothing returns nothing
set gg_trg_Cheat_Wood_Wood = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Wood_Wood, Player(0), "[plr_give]+wood+wood", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Wood_Wood, Player(1), "[plr_give]+wood+wood", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Wood_Wood, Player(2), "[plr_give]+wood+wood", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Wood_Wood, Player(3), "[plr_give]+wood+wood", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Wood_Wood, Player(4), "[plr_give]+wood+wood", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Wood_Wood, Player(5), "[plr_give]+wood+wood", true )
call TriggerAddAction( gg_trg_Cheat_Wood_Wood, function Trig_Cheat_Wood_Wood_Actions )
endfunction
function Trig_Cheat_Give_Item_Actions takes nothing returns nothing
set udg_Find_Hero_Player = GetTriggerPlayer()
call TriggerExecute( gg_trg_Find_Hero )
call UnitAddItemByIdSwapped( 'I00B', udg_u_Find_Hero_Result )
call UnitAddItemByIdSwapped( 'bfhr', udg_u_Find_Hero_Result )
call UnitAddItemByIdSwapped( 'I00E', udg_u_Find_Hero_Result )
call UnitAddItemByIdSwapped( 'I00G', udg_u_Find_Hero_Result )
endfunction
//===========================================================================
function InitTrig_Cheat_Give_Item takes nothing returns nothing
set gg_trg_Cheat_Give_Item = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Item, Player(0), "[plr_give]+item_rare", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Item, Player(1), "[plr_give]+item_rare", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Item, Player(2), "[plr_give]+item_rare", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Item, Player(3), "[plr_give]+item_rare", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Item, Player(4), "[plr_give]+item_rare", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Item, Player(5), "[plr_give]+item_rare", true )
call TriggerAddAction( gg_trg_Cheat_Give_Item, function Trig_Cheat_Give_Item_Actions )
endfunction
function Trig_Cheat_Farm_Actions takes nothing returns nothing
set udg_Find_Hero_Player = GetTriggerPlayer()
call TriggerExecute( gg_trg_Find_Hero )
call CreateNUnitsAtLoc( 1, 'hhou', udg_Find_Hero_Player, GetRandomLocInRect(gg_rct_HousePlayer), bj_UNIT_FACING )
endfunction
//===========================================================================
function InitTrig_Cheat_Farm takes nothing returns nothing
set gg_trg_Cheat_Farm = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Farm, Player(0), "[plr_give]+farm", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Farm, Player(1), "[plr_give]+farm", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Farm, Player(2), "[plr_give]+farm", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Farm, Player(3), "[plr_give]+farm", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Farm, Player(4), "[plr_give]+farm", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Farm, Player(5), "[plr_give]+farm", true )
call TriggerAddAction( gg_trg_Cheat_Farm, function Trig_Cheat_Farm_Actions )
endfunction
function Trig_Cheat_Upgrade_Merc_Up_Actions takes nothing returns nothing
set udg_Find_Hero_Player = GetTriggerPlayer()
call TriggerExecute( gg_trg_Find_Hero )
call SetPlayerTechResearchedSwap( 'R000', 1, udg_Find_Hero_Player )
call SetPlayerTechResearchedSwap( 'R001', 1, udg_Find_Hero_Player )
call SetPlayerTechResearchedSwap( 'R003', 1, udg_Find_Hero_Player )
call SetPlayerTechResearchedSwap( 'R004', 1, udg_Find_Hero_Player )
call SetPlayerTechResearchedSwap( 'R002', 1, udg_Find_Hero_Player )
endfunction
//===========================================================================
function InitTrig_Cheat_Upgrade_Merc_Up takes nothing returns nothing
set gg_trg_Cheat_Upgrade_Merc_Up = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Upgrade_Merc_Up, Player(0), "[chr_state]+merc+up", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Upgrade_Merc_Up, Player(1), "[chr_state]+merc+up", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Upgrade_Merc_Up, Player(2), "[chr_state]+merc+up", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Upgrade_Merc_Up, Player(3), "[chr_state]+merc+up", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Upgrade_Merc_Up, Player(4), "[chr_state]+merc+up", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Upgrade_Merc_Up, Player(5), "[chr_state]+merc+up", true )
call TriggerAddAction( gg_trg_Cheat_Upgrade_Merc_Up, function Trig_Cheat_Upgrade_Merc_Up_Actions )
endfunction
function Trig_Cheat_Upgrade_Merc_Up_Up_Actions takes nothing returns nothing
set udg_Find_Hero_Player = GetTriggerPlayer()
call TriggerExecute( gg_trg_Find_Hero )
call SetPlayerTechResearchedSwap( 'R000', 2, udg_Find_Hero_Player )
call SetPlayerTechResearchedSwap( 'R001', 2, udg_Find_Hero_Player )
call SetPlayerTechResearchedSwap( 'R003', 2, udg_Find_Hero_Player )
call SetPlayerTechResearchedSwap( 'R004', 2, udg_Find_Hero_Player )
call SetPlayerTechResearchedSwap( 'R002', 2, udg_Find_Hero_Player )
endfunction
//===========================================================================
function InitTrig_Cheat_Upgrade_Merc_Up_Up takes nothing returns nothing
set gg_trg_Cheat_Upgrade_Merc_Up_Up = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Upgrade_Merc_Up_Up, Player(0), "[chr_state]+merc+up+up", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Upgrade_Merc_Up_Up, Player(1), "[chr_state]+merc+up+up", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Upgrade_Merc_Up_Up, Player(2), "[chr_state]+merc+up+up", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Upgrade_Merc_Up_Up, Player(3), "[chr_state]+merc+up+up", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Upgrade_Merc_Up_Up, Player(4), "[chr_state]+merc+up+up", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Upgrade_Merc_Up_Up, Player(5), "[chr_state]+merc+up+up", true )
call TriggerAddAction( gg_trg_Cheat_Upgrade_Merc_Up_Up, function Trig_Cheat_Upgrade_Merc_Up_Up_Actions )
endfunction
function Trig_Cheat_Level_Up_Func002001002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Cheat_Level_Up_Func002A takes nothing returns nothing
call UnitAddItemByIdSwapped( 'tkno', GetEnumUnit() )
call UnitUseItem( GetEnumUnit(), GetLastCreatedItem() )
endfunction
function Trig_Cheat_Level_Up_Actions takes nothing returns nothing
set udg_Find_Hero_Player = GetTriggerPlayer()
call ForGroupBJ( GetUnitsOfPlayerMatching(udg_Find_Hero_Player, Condition(function Trig_Cheat_Level_Up_Func002001002)), function Trig_Cheat_Level_Up_Func002A )
endfunction
//===========================================================================
function InitTrig_Cheat_Level_Up takes nothing returns nothing
set gg_trg_Cheat_Level_Up = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Level_Up, Player(0), "[plr_give]+item_level", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Level_Up, Player(1), "[plr_give]+item_level", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Level_Up, Player(2), "[plr_give]+item_level", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Level_Up, Player(3), "[plr_give]+item_level", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Level_Up, Player(4), "[plr_give]+item_level", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Level_Up, Player(5), "[plr_give]+item_level", true )
call TriggerAddAction( gg_trg_Cheat_Level_Up, function Trig_Cheat_Level_Up_Actions )
endfunction
function Trig_Cheat_Horse_Follow_Actions takes nothing returns nothing
set udg_Find_Hero_Player = GetTriggerPlayer()
call TriggerExecute( gg_trg_Find_Hero )
call IssueTargetOrderBJ( GroupPickRandomUnit(GetUnitsOfPlayerAndTypeId(udg_Find_Hero_Player, 'hrdh')), "move", udg_u_Find_Hero_Result )
endfunction
//===========================================================================
function InitTrig_Cheat_Horse_Follow takes nothing returns nothing
set gg_trg_Cheat_Horse_Follow = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Horse_Follow, Player(0), "[horse-follow]", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Horse_Follow, Player(1), "[horse-follow]", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Horse_Follow, Player(2), "[horse-follow]", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Horse_Follow, Player(3), "[horse-follow]", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Horse_Follow, Player(4), "[horse-follow]", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Horse_Follow, Player(5), "[horse-follow]", true )
call TriggerAddAction( gg_trg_Cheat_Horse_Follow, function Trig_Cheat_Horse_Follow_Actions )
endfunction
function Trig_Cheat_All_Unit_Follow_Actions takes nothing returns nothing
set udg_Find_Hero_Player = GetTriggerPlayer()
call TriggerExecute( gg_trg_Find_Hero )
call GroupTargetOrderBJ( GetUnitsOfPlayerAll(udg_Find_Hero_Player), "move", udg_u_Find_Hero_Result )
endfunction
//===========================================================================
function InitTrig_Cheat_All_Unit_Follow takes nothing returns nothing
set gg_trg_Cheat_All_Unit_Follow = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_All_Unit_Follow, Player(0), "[follow]", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_All_Unit_Follow, Player(1), "[follow]", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_All_Unit_Follow, Player(2), "[follow]", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_All_Unit_Follow, Player(3), "[follow]", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_All_Unit_Follow, Player(4), "[follow]", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_All_Unit_Follow, Player(5), "[follow]", true )
call TriggerAddAction( gg_trg_Cheat_All_Unit_Follow, function Trig_Cheat_All_Unit_Follow_Actions )
endfunction
function Trig_Cheat_Full_State_Hero_Actions takes nothing returns nothing
set udg_Find_Hero_Player = GetTriggerPlayer()
call TriggerExecute( gg_trg_Find_Hero )
call ModifyHeroStat( bj_HEROSTAT_STR, udg_u_Find_Hero_Result, bj_MODIFYMETHOD_ADD, 999 )
call ModifyHeroStat( bj_HEROSTAT_AGI, udg_u_Find_Hero_Result, bj_MODIFYMETHOD_ADD, 999 )
call ModifyHeroStat( bj_HEROSTAT_INT, udg_u_Find_Hero_Result, bj_MODIFYMETHOD_ADD, 999 )
endfunction
//===========================================================================
function InitTrig_Cheat_Full_State_Hero takes nothing returns nothing
set gg_trg_Cheat_Full_State_Hero = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Full_State_Hero, Player(0), "[chr_state]+all+999", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Full_State_Hero, Player(1), "[chr_state]+all+999", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Full_State_Hero, Player(2), "[chr_state]+all+999", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Full_State_Hero, Player(3), "[chr_state]+all+999", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Full_State_Hero, Player(4), "[chr_state]+all+999", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Full_State_Hero, Player(5), "[chr_state]+all+999", true )
call TriggerAddAction( gg_trg_Cheat_Full_State_Hero, function Trig_Cheat_Full_State_Hero_Actions )
endfunction
function Trig_Cheat_Med_State_Hero_Actions takes nothing returns nothing
set udg_Find_Hero_Player = GetTriggerPlayer()
call TriggerExecute( gg_trg_Find_Hero )
call ModifyHeroStat( bj_HEROSTAT_STR, udg_u_Find_Hero_Result, bj_MODIFYMETHOD_ADD, 25 )
call ModifyHeroStat( bj_HEROSTAT_AGI, udg_u_Find_Hero_Result, bj_MODIFYMETHOD_ADD, 25 )
call ModifyHeroStat( bj_HEROSTAT_INT, udg_u_Find_Hero_Result, bj_MODIFYMETHOD_ADD, 25 )
endfunction
//===========================================================================
function InitTrig_Cheat_Med_State_Hero takes nothing returns nothing
set gg_trg_Cheat_Med_State_Hero = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Med_State_Hero, Player(0), "[chr_state]+all+25", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Med_State_Hero, Player(1), "[chr_state]+all+25", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Med_State_Hero, Player(2), "[chr_state]+all+25", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Med_State_Hero, Player(3), "[chr_state]+all+25", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Med_State_Hero, Player(4), "[chr_state]+all+25", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Med_State_Hero, Player(5), "[chr_state]+all+25", true )
call TriggerAddAction( gg_trg_Cheat_Med_State_Hero, function Trig_Cheat_Med_State_Hero_Actions )
endfunction
function Trig_Cheat_Revive_Hero_Actions takes nothing returns nothing
set udg_Find_Hero_Player = GetTriggerPlayer()
call TriggerExecute( gg_trg_Find_Hero )
call ReviveHeroLoc( udg_u_Find_Hero_Result, GetRandomLocInRect(gg_rct_General_Intro), true )
call PanCameraToTimedLocForPlayer( udg_Find_Hero_Player, GetUnitLoc(udg_u_Find_Hero_Result), 2.00 )
call ResetToGameCameraForPlayer( udg_Find_Hero_Player, 2.00 )
call TriggerExecute( gg_trg_Lock_Camera_to_Heroes )
call TriggerExecute( gg_trg_Find_Hero_NPC )
call ReviveHeroLoc( udg_u_Find_Hero_NPC_Result, GetRandomLocInRect(gg_rct_General_Intro), true )
endfunction
//===========================================================================
function InitTrig_Cheat_Revive_Hero takes nothing returns nothing
set gg_trg_Cheat_Revive_Hero = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Revive_Hero, Player(0), "[chr_revieve]", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Revive_Hero, Player(1), "[chr_revieve]", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Revive_Hero, Player(2), "[chr_revieve]", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Revive_Hero, Player(3), "[chr_revieve]", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Revive_Hero, Player(4), "[chr_revieve]", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Revive_Hero, Player(5), "[chr_revieve]", true )
call TriggerAddAction( gg_trg_Cheat_Revive_Hero, function Trig_Cheat_Revive_Hero_Actions )
endfunction
function Trig_Cheat_Give_Heroes_Actions takes nothing returns nothing
set udg_Find_Hero_Player = GetTriggerPlayer()
call TriggerExecute( gg_trg_Find_Hero )
call CreateNUnitsAtLoc( 1, 'O001', udg_Find_Hero_Player, GetUnitLoc(udg_u_Find_Hero_Result), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'H004', udg_Find_Hero_Player, GetUnitLoc(udg_u_Find_Hero_Result), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'H00D', udg_Find_Hero_Player, GetUnitLoc(udg_u_Find_Hero_Result), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'O003', udg_Find_Hero_Player, GetUnitLoc(udg_u_Find_Hero_Result), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'E001', udg_Find_Hero_Player, GetUnitLoc(udg_u_Find_Hero_Result), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'H003', udg_Find_Hero_Player, GetUnitLoc(udg_u_Find_Hero_Result), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'H00G', udg_Find_Hero_Player, GetUnitLoc(udg_u_Find_Hero_Result), bj_UNIT_FACING )
endfunction
//===========================================================================
function InitTrig_Cheat_Give_Heroes takes nothing returns nothing
set gg_trg_Cheat_Give_Heroes = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Heroes, Player(0), "[plr_give]+heroes", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Heroes, Player(1), "[plr_give]+heroes", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Heroes, Player(2), "[plr_give]+heroes", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Heroes, Player(3), "[plr_give]+heroes", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Heroes, Player(4), "[plr_give]+heroes", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Heroes, Player(5), "[plr_give]+heroes", true )
call TriggerAddAction( gg_trg_Cheat_Give_Heroes, function Trig_Cheat_Give_Heroes_Actions )
endfunction
function Trig_Cheat_Give_Hero_Func045C takes nothing returns boolean
if ( not ( GetEventPlayerChatStringMatched() == "[plr_give]+hero+id+1" ) ) then
return false
endif
return true
endfunction
function Trig_Cheat_Give_Hero_Func046C takes nothing returns boolean
if ( not ( GetEventPlayerChatStringMatched() == "[plr_give]+hero+id+2" ) ) then
return false
endif
return true
endfunction
function Trig_Cheat_Give_Hero_Func047C takes nothing returns boolean
if ( not ( GetEventPlayerChatStringMatched() == "[plr_give]+hero+id+3" ) ) then
return false
endif
return true
endfunction
function Trig_Cheat_Give_Hero_Func048C takes nothing returns boolean
if ( not ( GetEventPlayerChatString() == "[plr_give]+hero+id+4" ) ) then
return false
endif
return true
endfunction
function Trig_Cheat_Give_Hero_Func049C takes nothing returns boolean
if ( not ( GetEventPlayerChatStringMatched() == "[plr_give]+hero+id+5" ) ) then
return false
endif
return true
endfunction
function Trig_Cheat_Give_Hero_Func050C takes nothing returns boolean
if ( not ( GetEventPlayerChatStringMatched() == "[plr_give]+hero+id+6" ) ) then
return false
endif
return true
endfunction
function Trig_Cheat_Give_Hero_Func051C takes nothing returns boolean
if ( not ( GetEventPlayerChatStringMatched() == "[plr_give]+hero+id+7" ) ) then
return false
endif
return true
endfunction
function Trig_Cheat_Give_Hero_Actions takes nothing returns nothing
set udg_Find_Hero_Player = GetTriggerPlayer()
call TriggerExecute( gg_trg_Find_Hero )
if ( Trig_Cheat_Give_Hero_Func045C() ) then
call CreateNUnitsAtLoc( 1, 'O001', udg_Find_Hero_Player, GetUnitLoc(udg_u_Find_Hero_Result), bj_UNIT_FACING )
call UnitAddItemByIdSwapped( 'I00G', GetLastCreatedUnit() )
call SetUnitUseFoodBJ( false, GetLastCreatedUnit() )
else
endif
if ( Trig_Cheat_Give_Hero_Func046C() ) then
call CreateNUnitsAtLoc( 1, 'H004', udg_Find_Hero_Player, GetUnitLoc(udg_u_Find_Hero_Result), bj_UNIT_FACING )
call UnitAddItemByIdSwapped( 'I00G', GetLastCreatedUnit() )
call SetUnitUseFoodBJ( false, GetLastCreatedUnit() )
else
endif
if ( Trig_Cheat_Give_Hero_Func047C() ) then
call CreateNUnitsAtLoc( 1, 'H00D', udg_Find_Hero_Player, GetUnitLoc(udg_u_Find_Hero_Result), bj_UNIT_FACING )
call UnitAddItemByIdSwapped( 'I00G', GetLastCreatedUnit() )
call SetUnitUseFoodBJ( false, GetLastCreatedUnit() )
else
endif
if ( Trig_Cheat_Give_Hero_Func048C() ) then
call CreateNUnitsAtLoc( 1, 'O003', udg_Find_Hero_Player, GetUnitLoc(udg_u_Find_Hero_Result), bj_UNIT_FACING )
call UnitAddItemByIdSwapped( 'I00G', GetLastCreatedUnit() )
call SetUnitUseFoodBJ( false, GetLastCreatedUnit() )
else
endif
if ( Trig_Cheat_Give_Hero_Func049C() ) then
call CreateNUnitsAtLoc( 1, 'E001', udg_Find_Hero_Player, GetUnitLoc(udg_u_Find_Hero_Result), bj_UNIT_FACING )
call UnitAddItemByIdSwapped( 'I00G', GetLastCreatedUnit() )
call SetUnitUseFoodBJ( false, GetLastCreatedUnit() )
else
endif
if ( Trig_Cheat_Give_Hero_Func050C() ) then
call CreateNUnitsAtLoc( 1, 'H003', udg_Find_Hero_Player, GetUnitLoc(udg_u_Find_Hero_Result), bj_UNIT_FACING )
call UnitAddItemByIdSwapped( 'I00G', GetLastCreatedUnit() )
call SetUnitUseFoodBJ( false, GetLastCreatedUnit() )
else
endif
if ( Trig_Cheat_Give_Hero_Func051C() ) then
call CreateNUnitsAtLoc( 1, 'H00G', udg_Find_Hero_Player, GetUnitLoc(udg_u_Find_Hero_Result), bj_UNIT_FACING )
call UnitAddItemByIdSwapped( 'I00G', GetLastCreatedUnit() )
call SetUnitUseFoodBJ( false, GetLastCreatedUnit() )
else
endif
endfunction
//===========================================================================
function InitTrig_Cheat_Give_Hero takes nothing returns nothing
set gg_trg_Cheat_Give_Hero = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Hero, Player(0), "[plr_give]+hero+id+1", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Hero, Player(0), "[plr_give]+hero+id+2", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Hero, Player(0), "[plr_give]+hero+id+3", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Hero, Player(0), "[plr_give]+hero+id+4", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Hero, Player(0), "[plr_give]+hero+id+5", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Hero, Player(0), "[plr_give]+hero+id+6", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Hero, Player(0), "[plr_give]+hero+id+7", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Hero, Player(1), "[plr_give]+hero+id+1", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Hero, Player(1), "[plr_give]+hero+id+2", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Hero, Player(1), "[plr_give]+hero+id+3", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Hero, Player(1), "[plr_give]+hero+id+4", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Hero, Player(1), "[plr_give]+hero+id+5", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Hero, Player(1), "[plr_give]+hero+id+6", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Hero, Player(1), "[plr_give]+hero+id+7", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Hero, Player(2), "[plr_give]+hero+id+1", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Hero, Player(2), "[plr_give]+hero+id+2", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Hero, Player(2), "[plr_give]+hero+id+3", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Hero, Player(2), "[plr_give]+hero+id+4", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Hero, Player(2), "[plr_give]+hero+id+5", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Hero, Player(2), "[plr_give]+hero+id+6", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Hero, Player(2), "[plr_give]+hero+id+7", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Hero, Player(3), "[plr_give]+hero+id+1", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Hero, Player(3), "[plr_give]+hero+id+2", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Hero, Player(3), "[plr_give]+hero+id+3", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Hero, Player(3), "[plr_give]+hero+id+4", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Hero, Player(3), "[plr_give]+hero+id+5", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Hero, Player(3), "[plr_give]+hero+id+6", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Hero, Player(3), "[plr_give]+hero+id+7", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Hero, Player(4), "[plr_give]+hero+id+1", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Hero, Player(4), "[plr_give]+hero+id+2", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Hero, Player(4), "[plr_give]+hero+id+3", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Hero, Player(4), "[plr_give]+hero+id+4", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Hero, Player(4), "[plr_give]+hero+id+5", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Hero, Player(4), "[plr_give]+hero+id+6", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Hero, Player(4), "[plr_give]+hero+id+7", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Hero, Player(5), "[plr_give]+hero+id+1", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Hero, Player(5), "[plr_give]+hero+id+2", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Hero, Player(5), "[plr_give]+hero+id+3", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Hero, Player(5), "[plr_give]+hero+id+4", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Hero, Player(5), "[plr_give]+hero+id+5", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Hero, Player(5), "[plr_give]+hero+id+6", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Hero, Player(5), "[plr_give]+hero+id+7", true )
call TriggerAddAction( gg_trg_Cheat_Give_Hero, function Trig_Cheat_Give_Hero_Actions )
endfunction
function Trig_Cheat_Give_Beast_Actions takes nothing returns nothing
set udg_Find_Hero_Player = GetTriggerPlayer()
call TriggerExecute( gg_trg_Find_Hero )
call CreateNUnitsAtLoc( 1, 'o006', udg_Find_Hero_Player, GetUnitLoc(udg_u_Find_Hero_Result), bj_UNIT_FACING )
call SetUnitUseFoodBJ( false, GetLastCreatedUnit() )
endfunction
//===========================================================================
function InitTrig_Cheat_Give_Beast takes nothing returns nothing
set gg_trg_Cheat_Give_Beast = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Beast, Player(0), "[plr_give]+beast", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Beast, Player(1), "[plr_give]+beast", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Beast, Player(2), "[plr_give]+beast", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Beast, Player(3), "[plr_give]+beast", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Beast, Player(4), "[plr_give]+beast", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_Beast, Player(5), "[plr_give]+beast", true )
call TriggerAddAction( gg_trg_Cheat_Give_Beast, function Trig_Cheat_Give_Beast_Actions )
endfunction
function Trig_Cheat_Give_SoulTheive_Actions takes nothing returns nothing
set udg_Find_Hero_Player = GetTriggerPlayer()
call TriggerExecute( gg_trg_Find_Hero )
call CreateNUnitsAtLoc( 1, 'N001', udg_Find_Hero_Player, GetUnitLoc(udg_u_Find_Hero_Result), bj_UNIT_FACING )
call SetUnitUseFoodBJ( false, GetLastCreatedUnit() )
endfunction
//===========================================================================
function InitTrig_Cheat_Give_SoulTheive takes nothing returns nothing
set gg_trg_Cheat_Give_SoulTheive = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_SoulTheive, Player(0), "[plr_give]+soul", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_SoulTheive, Player(1), "[plr_give]+soul", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_SoulTheive, Player(2), "[plr_give]+soul", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_SoulTheive, Player(3), "[plr_give]+soul", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_SoulTheive, Player(4), "[plr_give]+soul", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Give_SoulTheive, Player(5), "[plr_give]+soul", true )
call TriggerAddAction( gg_trg_Cheat_Give_SoulTheive, function Trig_Cheat_Give_SoulTheive_Actions )
endfunction
function Trig_Cheat_Food_Cap_Actions takes nothing returns nothing
call AdjustPlayerStateBJ( 5, GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_CAP )
endfunction
//===========================================================================
function InitTrig_Cheat_Food_Cap takes nothing returns nothing
set gg_trg_Cheat_Food_Cap = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Food_Cap, Player(0), "[plr_give]+food_cap", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Food_Cap, Player(1), "[plr_give]+food_cap", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Food_Cap, Player(2), "[plr_give]+food_cap", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Food_Cap, Player(3), "[plr_give]+food_cap", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Food_Cap, Player(4), "[plr_give]+food_cap", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Food_Cap, Player(5), "[plr_give]+food_cap", true )
call TriggerAddAction( gg_trg_Cheat_Food_Cap, function Trig_Cheat_Food_Cap_Actions )
endfunction
function Trig_Cheat_Food_Reset_Actions takes nothing returns nothing
call SetPlayerStateBJ( udg_Find_Hero_Player, PLAYER_STATE_FOOD_CAP_CEILING, 30 )
call SetPlayerStateBJ( udg_Find_Hero_Player, PLAYER_STATE_RESOURCE_FOOD_CAP, 30 )
endfunction
//===========================================================================
function InitTrig_Cheat_Food_Reset takes nothing returns nothing
set gg_trg_Cheat_Food_Reset = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Food_Reset, Player(0), "[plr_give]+food_reset", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Food_Reset, Player(1), "[plr_give]+food_reset", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Food_Reset, Player(2), "[plr_give]+food_reset", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Food_Reset, Player(3), "[plr_give]+food_reset", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Food_Reset, Player(4), "[plr_give]+food_reset", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Food_Reset, Player(5), "[plr_give]+food_reset", true )
call TriggerAddAction( gg_trg_Cheat_Food_Reset, function Trig_Cheat_Food_Reset_Actions )
endfunction
function Trig_Cheat_Q1_Completed_Func004002 takes nothing returns nothing
call KillDestructable( GetEnumDestructable() )
endfunction
function Trig_Cheat_Q1_Completed_Actions takes nothing returns nothing
set udg_Find_Hero_Player = GetTriggerPlayer()
call TriggerExecute( gg_trg_Find_Hero )
call KillUnit( gg_unit_H000_0001 )
call EnumDestructablesInRectAll( gg_rct_cheatquest1, function Trig_Cheat_Q1_Completed_Func004002 )
call CreateNUnitsAtLoc( 1, 'Hpal', udg_Find_Hero_Player, GetRectCenter(gg_rct_watchguardrescued), bj_UNIT_FACING )
call TriggerSleepAction( 0.50 )
call RemoveUnit( GetLastCreatedUnit() )
endfunction
//===========================================================================
function InitTrig_Cheat_Q1_Completed takes nothing returns nothing
set gg_trg_Cheat_Q1_Completed = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Q1_Completed, Player(0), "[plr_give]+quest+1", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Q1_Completed, Player(1), "[plr_give]+quest+1", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Q1_Completed, Player(2), "[plr_give]+quest+1", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Q1_Completed, Player(3), "[plr_give]+quest+1", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Q1_Completed, Player(4), "[plr_give]+quest+1", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Q1_Completed, Player(5), "[plr_give]+quest+1", true )
call TriggerAddAction( gg_trg_Cheat_Q1_Completed, function Trig_Cheat_Q1_Completed_Actions )
endfunction
function Trig_Cheat_Q2_Completed_Actions takes nothing returns nothing
set udg_Find_Hero_Player = GetTriggerPlayer()
call TriggerExecute( gg_trg_Find_Hero )
call KillUnit( gg_unit_Udre_0646 )
call KillUnit( gg_unit_Hapm_0117 )
call CreateNUnitsAtLoc( 1, 'Hpal', udg_Find_Hero_Player, GetUnitLoc(gg_unit_Hhkl_0480), bj_UNIT_FACING )
call TriggerSleepAction( 0.50 )
call RemoveUnit( GetLastCreatedUnit() )
endfunction
//===========================================================================
function InitTrig_Cheat_Q2_Completed takes nothing returns nothing
set gg_trg_Cheat_Q2_Completed = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Q2_Completed, Player(0), "[plr_give]+quest+2", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Q2_Completed, Player(1), "[plr_give]+quest+2", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Q2_Completed, Player(2), "[plr_give]+quest+2", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Q2_Completed, Player(3), "[plr_give]+quest+2", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Q2_Completed, Player(4), "[plr_give]+quest+2", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Cheat_Q2_Completed, Player(5), "[plr_give]+quest+2", true )
call TriggerAddAction( gg_trg_Cheat_Q2_Completed, function Trig_Cheat_Q2_Completed_Actions )
endfunction
function Trig_Item_to_Gold_Func001C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'sor1' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'sora' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'sor2' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'sor3' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'sor4' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'sor5' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'sor6' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'sor7' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'sor8' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'sor9' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'thdm' ) ) then
return true
endif
return false
endfunction
function Trig_Item_to_Gold_Conditions takes nothing returns boolean
if ( not Trig_Item_to_Gold_Func001C() ) then
return false
endif
return true
endfunction
function Trig_Item_to_Gold_Actions takes nothing returns nothing
call DisplayTimedTextToForce( GetForceOfPlayer(GetOwningPlayer(GetManipulatingUnit())), 12.00, ( "|cffdddd32Gold + " + ( I2S(R2I(GetItemLifeBJ(GetManipulatedItem()))) + "|r" ) ) )
call AdjustPlayerStateBJ( R2I(GetItemLifeBJ(GetManipulatedItem())), GetOwningPlayer(GetManipulatingUnit()), PLAYER_STATE_RESOURCE_GOLD )
call RemoveItem( GetManipulatedItem() )
endfunction
//===========================================================================
function InitTrig_Item_to_Gold takes nothing returns nothing
set gg_trg_Item_to_Gold = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Item_to_Gold, Player(0), EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Item_to_Gold, Player(1), EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Item_to_Gold, Player(2), EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Item_to_Gold, Player(3), EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Item_to_Gold, Player(4), EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Item_to_Gold, Player(5), EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Item_to_Gold, Condition( function Trig_Item_to_Gold_Conditions ) )
call TriggerAddAction( gg_trg_Item_to_Gold, function Trig_Item_to_Gold_Actions )
endfunction
function Trig_Credits_Actions takes nothing returns nothing
call TriggerSleepAction( 5.00 )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_026" )
call TriggerSleepAction( 1.00 )
call DisplayTimedTextToForce( GetPlayersAll(), 12.00, "TRIGSTR_027" )
call TriggerSleepAction( 1.00 )
call DisplayTimedTextToForce( GetPlayersAll(), 12.00, "TRIGSTR_034" )
call TriggerSleepAction( 15.00 )
call DisplayTimedTextToForce( GetPlayersAll(), 60.00, "TRIGSTR_036" )
call TriggerSleepAction( 2.00 )
call DisplayTimedTextToForce( GetPlayersAll(), 20.00, "TRIGSTR_041" )
call TriggerSleepAction( 22.00 )
call DisplayTimedTextToForce( GetPlayersAll(), 12.00, "TRIGSTR_040" )
call TriggerSleepAction( 15.00 )
call DisplayTimedTextToForce( GetPlayersAll(), 15.00, "TRIGSTR_042" )
call TriggerSleepAction( 18.00 )
call DisplayTimedTextToForce( GetPlayersAll(), 15.00, "TRIGSTR_044" )
call TriggerSleepAction( 18.00 )
call DisplayTimedTextToForce( GetPlayersAll(), 15.00, "TRIGSTR_051" )
call TriggerSleepAction( 18.00 )
call DisplayTimedTextToForce( GetPlayersAll(), 15.00, "TRIGSTR_051" )
call TriggerSleepAction( 18.00 )
call TriggerExecute( gg_trg_Hint )
endfunction
//===========================================================================
function InitTrig_Credits takes nothing returns nothing
set gg_trg_Credits = CreateTrigger( )
call TriggerAddAction( gg_trg_Credits, function Trig_Credits_Actions )
endfunction
function Trig_Hint_Actions takes nothing returns nothing
call QuestMessageBJ( GetPlayersAll(), bj_QUESTMESSAGE_HINT, "TRIGSTR_106" )
call TriggerSleepAction( 15.00 )
call QuestMessageBJ( GetPlayersAll(), bj_QUESTMESSAGE_HINT, "TRIGSTR_2330" )
call TriggerSleepAction( 30.00 )
call QuestMessageBJ( GetPlayersAll(), bj_QUESTMESSAGE_HINT, "TRIGSTR_109" )
endfunction
//===========================================================================
function InitTrig_Hint takes nothing returns nothing
set gg_trg_Hint = CreateTrigger( )
call TriggerAddAction( gg_trg_Hint, function Trig_Hint_Actions )
endfunction
function Trig_Hint_Help_Actions takes nothing returns nothing
call QuestMessageBJ( GetPlayersAll(), bj_QUESTMESSAGE_HINT, "TRIGSTR_2331" )
call TriggerSleepAction( 30.00 )
call QuestMessageBJ( GetPlayersAll(), bj_QUESTMESSAGE_HINT, "TRIGSTR_106" )
call TriggerSleepAction( 15.00 )
call QuestMessageBJ( GetPlayersAll(), bj_QUESTMESSAGE_HINT, "TRIGSTR_2330" )
call TriggerSleepAction( 30.00 )
call QuestMessageBJ( GetPlayersAll(), bj_QUESTMESSAGE_HINT, "TRIGSTR_1992" )
endfunction
//===========================================================================
function InitTrig_Hint_Help takes nothing returns nothing
set gg_trg_Hint_Help = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Hint_Help, Player(0), "[help]", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Hint_Help, Player(1), "[help]", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Hint_Help, Player(2), "[help]", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Hint_Help, Player(3), "[help]", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Hint_Help, Player(4), "[help]", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Hint_Help, Player(5), "[help]", true )
call TriggerAddAction( gg_trg_Hint_Help, function Trig_Hint_Help_Actions )
endfunction
function Trig_UnPause_NPC_Actions takes nothing returns nothing
call TriggerSleepAction( 1.00 )
call PauseUnitBJ( false, gg_unit_Hhkl_0480 )
call PauseUnitBJ( false, gg_unit_Hvwd_0110 )
call PauseUnitBJ( false, gg_unit_Hmbr_0111 )
endfunction
//===========================================================================
function InitTrig_UnPause_NPC takes nothing returns nothing
set gg_trg_UnPause_NPC = CreateTrigger( )
call TriggerAddAction( gg_trg_UnPause_NPC, function Trig_UnPause_NPC_Actions )
endfunction
function Trig_Pause_NPC_Actions takes nothing returns nothing
call TriggerSleepAction( 1.00 )
call PauseUnitBJ( true, gg_unit_Hhkl_0480 )
call PauseUnitBJ( true, gg_unit_Hvwd_0110 )
call PauseUnitBJ( true, gg_unit_Hmbr_0111 )
call PauseUnitBJ( true, gg_unit_hhes_0031 )
endfunction
//===========================================================================
function InitTrig_Pause_NPC takes nothing returns nothing
set gg_trg_Pause_NPC = CreateTrigger( )
call TriggerAddAction( gg_trg_Pause_NPC, function Trig_Pause_NPC_Actions )
endfunction
function Trig_Town_Portal_KB_1_Func009Func001001 takes nothing returns boolean
return ( UnitHasItemOfTypeBJ(udg_u_Find_Hero_Result, 'stwp') == true )
endfunction
function Trig_Town_Portal_KB_1_Func009Func002001 takes nothing returns boolean
return ( UnitHasItemOfTypeBJ(udg_u_Find_Hero_Result, 'I003') == true )
endfunction
function Trig_Town_Portal_KB_1_Func009Func003001 takes nothing returns boolean
return ( UnitHasItemOfTypeBJ(udg_u_Find_Hero_Result, 'stel') == true )
endfunction
function Trig_Town_Portal_KB_1_Func009Func004C takes nothing returns boolean
if ( ( UnitHasItemOfTypeBJ(udg_u_Find_Hero_Result, 'stwp') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(udg_u_Find_Hero_Result, 'I003') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(udg_u_Find_Hero_Result, 'stel') == true ) ) then
return true
endif
return false
endfunction
function Trig_Town_Portal_KB_1_Func009Func005001 takes nothing returns boolean
return ( GetUnitTypeId(udg_u_Find_Hero_Result) == 'EC16' )
endfunction
function Trig_Town_Portal_KB_1_Func009C takes nothing returns boolean
if ( not Trig_Town_Portal_KB_1_Func009Func004C() ) then
return false
endif
return true
endfunction
function Trig_Town_Portal_KB_1_Actions takes nothing returns nothing
set udg_Find_Hero_Player = GetTriggerPlayer()
call TriggerExecute( gg_trg_Find_Hero )
if ( Trig_Town_Portal_KB_1_Func009C() ) then
if ( Trig_Town_Portal_KB_1_Func009Func001001() ) then
call UnitUseItemTarget( udg_u_Find_Hero_Result, GetItemOfTypeFromUnitBJ(udg_u_Find_Hero_Result, 'stwp'), gg_unit_hcas_0303 )
else
// Do Nothing
endif
if ( Trig_Town_Portal_KB_1_Func009Func002001() ) then
call UnitUseItemTarget( udg_u_Find_Hero_Result, GetItemOfTypeFromUnitBJ(udg_u_Find_Hero_Result, 'I003'), gg_unit_hcas_0303 )
else
// Do Nothing
endif
if ( Trig_Town_Portal_KB_1_Func009Func003001() ) then
call UnitUseItemTarget( udg_u_Find_Hero_Result, GetItemOfTypeFromUnitBJ(udg_u_Find_Hero_Result, 'stel'), gg_unit_hcas_0303 )
else
// Do Nothing
endif
else
if ( Trig_Town_Portal_KB_1_Func009Func005001() ) then
call IssueTargetOrderBJ( udg_u_Find_Hero_Result, "massteleport", gg_unit_hcas_0303 )
else
call DoNothing( )
endif
endif
endfunction
//===========================================================================
function InitTrig_Town_Portal_KB_1 takes nothing returns nothing
set gg_trg_Town_Portal_KB_1 = CreateTrigger( )
call TriggerRegisterPlayerKeyEventBJ( gg_trg_Town_Portal_KB_1, Player(0), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_DOWN )
call TriggerRegisterPlayerKeyEventBJ( gg_trg_Town_Portal_KB_1, Player(1), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_DOWN )
call TriggerRegisterPlayerKeyEventBJ( gg_trg_Town_Portal_KB_1, Player(2), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_DOWN )
call TriggerRegisterPlayerKeyEventBJ( gg_trg_Town_Portal_KB_1, Player(3), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_DOWN )
call TriggerRegisterPlayerKeyEventBJ( gg_trg_Town_Portal_KB_1, Player(4), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_DOWN )
call TriggerRegisterPlayerKeyEventBJ( gg_trg_Town_Portal_KB_1, Player(5), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_DOWN )
call TriggerAddAction( gg_trg_Town_Portal_KB_1, function Trig_Town_Portal_KB_1_Actions )
endfunction
function Trig_Town_Portal_KB_2_Func009Func001001 takes nothing returns boolean
return ( UnitHasItemOfTypeBJ(udg_u_Find_Hero_Result, 'stwp') == true )
endfunction
function Trig_Town_Portal_KB_2_Func009Func002001 takes nothing returns boolean
return ( UnitHasItemOfTypeBJ(udg_u_Find_Hero_Result, 'I003') == true )
endfunction
function Trig_Town_Portal_KB_2_Func009Func003001 takes nothing returns boolean
return ( UnitHasItemOfTypeBJ(udg_u_Find_Hero_Result, 'stel') == true )
endfunction
function Trig_Town_Portal_KB_2_Func009Func004C takes nothing returns boolean
if ( ( UnitHasItemOfTypeBJ(udg_u_Find_Hero_Result, 'stwp') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(udg_u_Find_Hero_Result, 'I003') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(udg_u_Find_Hero_Result, 'stel') == true ) ) then
return true
endif
return false
endfunction
function Trig_Town_Portal_KB_2_Func009Func005001 takes nothing returns boolean
return ( GetUnitTypeId(udg_u_Find_Hero_Result) == 'EC16' )
endfunction
function Trig_Town_Portal_KB_2_Func009C takes nothing returns boolean
if ( not Trig_Town_Portal_KB_2_Func009Func004C() ) then
return false
endif
return true
endfunction
function Trig_Town_Portal_KB_2_Actions takes nothing returns nothing
set udg_Find_Hero_Player = GetTriggerPlayer()
call TriggerExecute( gg_trg_Find_Hero )
if ( Trig_Town_Portal_KB_2_Func009C() ) then
if ( Trig_Town_Portal_KB_2_Func009Func001001() ) then
call UnitUseItemTarget( udg_u_Find_Hero_Result, GetItemOfTypeFromUnitBJ(udg_u_Find_Hero_Result, 'stwp'), gg_unit_htow_0033 )
else
// Do Nothing
endif
if ( Trig_Town_Portal_KB_2_Func009Func002001() ) then
call UnitUseItemTarget( udg_u_Find_Hero_Result, GetItemOfTypeFromUnitBJ(udg_u_Find_Hero_Result, 'I003'), gg_unit_htow_0033 )
else
// Do Nothing
endif
if ( Trig_Town_Portal_KB_2_Func009Func003001() ) then
call UnitUseItemTarget( udg_u_Find_Hero_Result, GetItemOfTypeFromUnitBJ(udg_u_Find_Hero_Result, 'stel'), gg_unit_htow_0033 )
else
// Do Nothing
endif
else
if ( Trig_Town_Portal_KB_2_Func009Func005001() ) then
call IssueTargetOrderBJ( udg_u_Find_Hero_Result, "massteleport", gg_unit_htow_0033 )
else
call DoNothing( )
endif
endif
endfunction
//===========================================================================
function InitTrig_Town_Portal_KB_2 takes nothing returns nothing
set gg_trg_Town_Portal_KB_2 = CreateTrigger( )
call TriggerRegisterPlayerKeyEventBJ( gg_trg_Town_Portal_KB_2, Player(0), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_RIGHT )
call TriggerRegisterPlayerKeyEventBJ( gg_trg_Town_Portal_KB_2, Player(1), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_RIGHT )
call TriggerRegisterPlayerKeyEventBJ( gg_trg_Town_Portal_KB_2, Player(2), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_RIGHT )
call TriggerRegisterPlayerKeyEventBJ( gg_trg_Town_Portal_KB_2, Player(3), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_RIGHT )
call TriggerRegisterPlayerKeyEventBJ( gg_trg_Town_Portal_KB_2, Player(4), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_RIGHT )
call TriggerRegisterPlayerKeyEventBJ( gg_trg_Town_Portal_KB_2, Player(5), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_RIGHT )
call TriggerAddAction( gg_trg_Town_Portal_KB_2, function Trig_Town_Portal_KB_2_Actions )
endfunction
function Trig_Town_Portal_KB_3_Func009Func001001 takes nothing returns boolean
return ( UnitHasItemOfTypeBJ(udg_u_Find_Hero_Result, 'stwp') == true )
endfunction
function Trig_Town_Portal_KB_3_Func009Func002001 takes nothing returns boolean
return ( UnitHasItemOfTypeBJ(udg_u_Find_Hero_Result, 'I003') == true )
endfunction
function Trig_Town_Portal_KB_3_Func009Func003001 takes nothing returns boolean
return ( UnitHasItemOfTypeBJ(udg_u_Find_Hero_Result, 'stel') == true )
endfunction
function Trig_Town_Portal_KB_3_Func009Func004C takes nothing returns boolean
if ( ( UnitHasItemOfTypeBJ(udg_u_Find_Hero_Result, 'stwp') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(udg_u_Find_Hero_Result, 'I003') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(udg_u_Find_Hero_Result, 'stel') == true ) ) then
return true
endif
return false
endfunction
function Trig_Town_Portal_KB_3_Func009Func005001 takes nothing returns boolean
return ( GetUnitTypeId(udg_u_Find_Hero_Result) == 'EC16' )
endfunction
function Trig_Town_Portal_KB_3_Func009C takes nothing returns boolean
if ( not Trig_Town_Portal_KB_3_Func009Func004C() ) then
return false
endif
return true
endfunction
function Trig_Town_Portal_KB_3_Actions takes nothing returns nothing
set udg_Find_Hero_Player = GetTriggerPlayer()
call TriggerExecute( gg_trg_Find_Hero )
if ( Trig_Town_Portal_KB_3_Func009C() ) then
if ( Trig_Town_Portal_KB_3_Func009Func001001() ) then
call UnitUseItemTarget( udg_u_Find_Hero_Result, GetItemOfTypeFromUnitBJ(udg_u_Find_Hero_Result, 'stwp'), gg_unit_hkee_0050 )
else
// Do Nothing
endif
if ( Trig_Town_Portal_KB_3_Func009Func002001() ) then
call UnitUseItemTarget( udg_u_Find_Hero_Result, GetItemOfTypeFromUnitBJ(udg_u_Find_Hero_Result, 'I003'), gg_unit_hkee_0050 )
else
// Do Nothing
endif
if ( Trig_Town_Portal_KB_3_Func009Func003001() ) then
call UnitUseItemTarget( udg_u_Find_Hero_Result, GetItemOfTypeFromUnitBJ(udg_u_Find_Hero_Result, 'stel'), gg_unit_hkee_0050 )
else
// Do Nothing
endif
else
if ( Trig_Town_Portal_KB_3_Func009Func005001() ) then
call IssueTargetOrderBJ( udg_u_Find_Hero_Result, "massteleport", gg_unit_hkee_0050 )
else
call DoNothing( )
endif
endif
endfunction
//===========================================================================
function InitTrig_Town_Portal_KB_3 takes nothing returns nothing
set gg_trg_Town_Portal_KB_3 = CreateTrigger( )
call TriggerRegisterPlayerKeyEventBJ( gg_trg_Town_Portal_KB_3, Player(0), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_UP )
call TriggerRegisterPlayerKeyEventBJ( gg_trg_Town_Portal_KB_3, Player(1), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_UP )
call TriggerRegisterPlayerKeyEventBJ( gg_trg_Town_Portal_KB_3, Player(2), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_UP )
call TriggerRegisterPlayerKeyEventBJ( gg_trg_Town_Portal_KB_3, Player(3), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_UP )
call TriggerRegisterPlayerKeyEventBJ( gg_trg_Town_Portal_KB_3, Player(4), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_UP )
call TriggerRegisterPlayerKeyEventBJ( gg_trg_Town_Portal_KB_3, Player(5), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_UP )
call TriggerAddAction( gg_trg_Town_Portal_KB_3, function Trig_Town_Portal_KB_3_Actions )
endfunction
function Trig_Town_Portal_KB_4_Func009Func001001 takes nothing returns boolean
return ( UnitHasItemOfTypeBJ(udg_u_Find_Hero_Result, 'stwp') == true )
endfunction
function Trig_Town_Portal_KB_4_Func009Func002001 takes nothing returns boolean
return ( UnitHasItemOfTypeBJ(udg_u_Find_Hero_Result, 'I003') == true )
endfunction
function Trig_Town_Portal_KB_4_Func009Func003001 takes nothing returns boolean
return ( UnitHasItemOfTypeBJ(udg_u_Find_Hero_Result, 'stel') == true )
endfunction
function Trig_Town_Portal_KB_4_Func009Func004C takes nothing returns boolean
if ( ( UnitHasItemOfTypeBJ(udg_u_Find_Hero_Result, 'stwp') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(udg_u_Find_Hero_Result, 'I003') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(udg_u_Find_Hero_Result, 'stel') == true ) ) then
return true
endif
return false
endfunction
function Trig_Town_Portal_KB_4_Func009Func005001 takes nothing returns boolean
return ( GetUnitTypeId(udg_u_Find_Hero_Result) == 'EC16' )
endfunction
function Trig_Town_Portal_KB_4_Func009C takes nothing returns boolean
if ( not Trig_Town_Portal_KB_4_Func009Func004C() ) then
return false
endif
return true
endfunction
function Trig_Town_Portal_KB_4_Actions takes nothing returns nothing
set udg_Find_Hero_Player = GetTriggerPlayer()
call TriggerExecute( gg_trg_Find_Hero )
if ( Trig_Town_Portal_KB_4_Func009C() ) then
if ( Trig_Town_Portal_KB_4_Func009Func001001() ) then
call UnitUseItemTarget( udg_u_Find_Hero_Result, GetItemOfTypeFromUnitBJ(udg_u_Find_Hero_Result, 'stwp'), udg_u_Current_Town )
else
// Do Nothing
endif
if ( Trig_Town_Portal_KB_4_Func009Func002001() ) then
call UnitUseItemTarget( udg_u_Find_Hero_Result, GetItemOfTypeFromUnitBJ(udg_u_Find_Hero_Result, 'I003'), udg_u_Current_Town )
else
// Do Nothing
endif
if ( Trig_Town_Portal_KB_4_Func009Func003001() ) then
call UnitUseItemTarget( udg_u_Find_Hero_Result, GetItemOfTypeFromUnitBJ(udg_u_Find_Hero_Result, 'stel'), udg_u_Current_Town )
else
// Do Nothing
endif
else
if ( Trig_Town_Portal_KB_4_Func009Func005001() ) then
call IssueTargetOrderBJ( udg_u_Find_Hero_Result, "massteleport", udg_u_Current_Town )
else
call DoNothing( )
endif
endif
endfunction
//===========================================================================
function InitTrig_Town_Portal_KB_4 takes nothing returns nothing
set gg_trg_Town_Portal_KB_4 = CreateTrigger( )
call TriggerRegisterPlayerKeyEventBJ( gg_trg_Town_Portal_KB_4, Player(0), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_LEFT )
call TriggerRegisterPlayerKeyEventBJ( gg_trg_Town_Portal_KB_4, Player(1), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_LEFT )
call TriggerRegisterPlayerKeyEventBJ( gg_trg_Town_Portal_KB_4, Player(2), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_LEFT )
call TriggerRegisterPlayerKeyEventBJ( gg_trg_Town_Portal_KB_4, Player(3), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_LEFT )
call TriggerRegisterPlayerKeyEventBJ( gg_trg_Town_Portal_KB_4, Player(4), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_LEFT )
call TriggerRegisterPlayerKeyEventBJ( gg_trg_Town_Portal_KB_4, Player(5), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_LEFT )
call TriggerAddAction( gg_trg_Town_Portal_KB_4, function Trig_Town_Portal_KB_4_Actions )
endfunction
function Trig_Town_Portal_Func003Func001001 takes nothing returns boolean
return ( UnitHasItemOfTypeBJ(udg_u_Find_Hero_Result, 'stwp') == true )
endfunction
function Trig_Town_Portal_Func003Func002001 takes nothing returns boolean
return ( UnitHasItemOfTypeBJ(udg_u_Find_Hero_Result, 'I003') == true )
endfunction
function Trig_Town_Portal_Func003Func003001 takes nothing returns boolean
return ( UnitHasItemOfTypeBJ(udg_u_Find_Hero_Result, 'stel') == true )
endfunction
function Trig_Town_Portal_Func003Func004C takes nothing returns boolean
if ( ( UnitHasItemOfTypeBJ(udg_u_Find_Hero_Result, 'stwp') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(udg_u_Find_Hero_Result, 'I003') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(udg_u_Find_Hero_Result, 'stel') == true ) ) then
return true
endif
return false
endfunction
function Trig_Town_Portal_Func003Func005001 takes nothing returns boolean
return ( GetUnitTypeId(udg_u_Find_Hero_Result) == 'EC16' )
endfunction
function Trig_Town_Portal_Func003C takes nothing returns boolean
if ( not Trig_Town_Portal_Func003Func004C() ) then
return false
endif
return true
endfunction
function Trig_Town_Portal_Actions takes nothing returns nothing
set udg_Find_Hero_Player = GetTriggerPlayer()
call TriggerExecute( gg_trg_Find_Hero )
if ( Trig_Town_Portal_Func003C() ) then
if ( Trig_Town_Portal_Func003Func001001() ) then
call UnitUseItemTarget( udg_u_Find_Hero_Result, GetItemOfTypeFromUnitBJ(udg_u_Find_Hero_Result, 'stwp'), udg_u_Current_Town )
else
// Do Nothing
endif
if ( Trig_Town_Portal_Func003Func002001() ) then
call UnitUseItemTarget( udg_u_Find_Hero_Result, GetItemOfTypeFromUnitBJ(udg_u_Find_Hero_Result, 'I003'), udg_u_Current_Town )
else
// Do Nothing
endif
if ( Trig_Town_Portal_Func003Func003001() ) then
call UnitUseItemTarget( udg_u_Find_Hero_Result, GetItemOfTypeFromUnitBJ(udg_u_Find_Hero_Result, 'stel'), udg_u_Current_Town )
else
// Do Nothing
endif
else
if ( Trig_Town_Portal_Func003Func005001() ) then
call IssueTargetOrderBJ( udg_u_Find_Hero_Result, "massteleport", udg_u_Current_Town )
else
call DoNothing( )
endif
endif
endfunction
//===========================================================================
function InitTrig_Town_Portal takes nothing returns nothing
set gg_trg_Town_Portal = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Town_Portal, Player(0), "[town]", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Town_Portal, Player(1), "[town]", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Town_Portal, Player(2), "[town]", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Town_Portal, Player(3), "[town]", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Town_Portal, Player(4), "[town]", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Town_Portal, Player(5), "[town]", true )
call TriggerAddAction( gg_trg_Town_Portal, function Trig_Town_Portal_Actions )
endfunction
function Trig_Town_Portal_1_Func009Func001001 takes nothing returns boolean
return ( UnitHasItemOfTypeBJ(udg_u_Find_Hero_Result, 'stwp') == true )
endfunction
function Trig_Town_Portal_1_Func009Func002001 takes nothing returns boolean
return ( UnitHasItemOfTypeBJ(udg_u_Find_Hero_Result, 'I003') == true )
endfunction
function Trig_Town_Portal_1_Func009Func003001 takes nothing returns boolean
return ( UnitHasItemOfTypeBJ(udg_u_Find_Hero_Result, 'stel') == true )
endfunction
function Trig_Town_Portal_1_Func009Func004C takes nothing returns boolean
if ( ( UnitHasItemOfTypeBJ(udg_u_Find_Hero_Result, 'stwp') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(udg_u_Find_Hero_Result, 'I003') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(udg_u_Find_Hero_Result, 'stel') == true ) ) then
return true
endif
return false
endfunction
function Trig_Town_Portal_1_Func009Func005001 takes nothing returns boolean
return ( GetUnitTypeId(udg_u_Find_Hero_Result) == 'EC16' )
endfunction
function Trig_Town_Portal_1_Func009C takes nothing returns boolean
if ( not Trig_Town_Portal_1_Func009Func004C() ) then
return false
endif
return true
endfunction
function Trig_Town_Portal_1_Actions takes nothing returns nothing
set udg_Find_Hero_Player = GetTriggerPlayer()
call TriggerExecute( gg_trg_Find_Hero )
if ( Trig_Town_Portal_1_Func009C() ) then
if ( Trig_Town_Portal_1_Func009Func001001() ) then
call UnitUseItemTarget( udg_u_Find_Hero_Result, GetItemOfTypeFromUnitBJ(udg_u_Find_Hero_Result, 'stwp'), gg_unit_hcas_0303 )
else
// Do Nothing
endif
if ( Trig_Town_Portal_1_Func009Func002001() ) then
call UnitUseItemTarget( udg_u_Find_Hero_Result, GetItemOfTypeFromUnitBJ(udg_u_Find_Hero_Result, 'I003'), gg_unit_hcas_0303 )
else
// Do Nothing
endif
if ( Trig_Town_Portal_1_Func009Func003001() ) then
call UnitUseItemTarget( udg_u_Find_Hero_Result, GetItemOfTypeFromUnitBJ(udg_u_Find_Hero_Result, 'stel'), gg_unit_hcas_0303 )
else
// Do Nothing
endif
else
if ( Trig_Town_Portal_1_Func009Func005001() ) then
call IssueTargetOrderBJ( udg_u_Find_Hero_Result, "massteleport", gg_unit_hcas_0303 )
else
call DoNothing( )
endif
endif
endfunction
//===========================================================================
function InitTrig_Town_Portal_1 takes nothing returns nothing
set gg_trg_Town_Portal_1 = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Town_Portal_1, Player(0), "[town]+1", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Town_Portal_1, Player(1), "[town]+1", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Town_Portal_1, Player(2), "[town]+1", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Town_Portal_1, Player(3), "[town]+1", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Town_Portal_1, Player(4), "[town]+1", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Town_Portal_1, Player(5), "[town]+1", true )
call TriggerAddAction( gg_trg_Town_Portal_1, function Trig_Town_Portal_1_Actions )
endfunction
function Trig_Town_Portal_2_Func009Func001001 takes nothing returns boolean
return ( UnitHasItemOfTypeBJ(udg_u_Find_Hero_Result, 'stwp') == true )
endfunction
function Trig_Town_Portal_2_Func009Func002001 takes nothing returns boolean
return ( UnitHasItemOfTypeBJ(udg_u_Find_Hero_Result, 'I003') == true )
endfunction
function Trig_Town_Portal_2_Func009Func003001 takes nothing returns boolean
return ( UnitHasItemOfTypeBJ(udg_u_Find_Hero_Result, 'stel') == true )
endfunction
function Trig_Town_Portal_2_Func009Func004C takes nothing returns boolean
if ( ( UnitHasItemOfTypeBJ(udg_u_Find_Hero_Result, 'stwp') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(udg_u_Find_Hero_Result, 'I003') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(udg_u_Find_Hero_Result, 'stel') == true ) ) then
return true
endif
return false
endfunction
function Trig_Town_Portal_2_Func009Func005001 takes nothing returns boolean
return ( GetUnitTypeId(udg_u_Find_Hero_Result) == 'EC16' )
endfunction
function Trig_Town_Portal_2_Func009C takes nothing returns boolean
if ( not Trig_Town_Portal_2_Func009Func004C() ) then
return false
endif
return true
endfunction
function Trig_Town_Portal_2_Actions takes nothing returns nothing
set udg_Find_Hero_Player = GetTriggerPlayer()
call TriggerExecute( gg_trg_Find_Hero )
if ( Trig_Town_Portal_2_Func009C() ) then
if ( Trig_Town_Portal_2_Func009Func001001() ) then
call UnitUseItemTarget( udg_u_Find_Hero_Result, GetItemOfTypeFromUnitBJ(udg_u_Find_Hero_Result, 'stwp'), gg_unit_htow_0033 )
else
// Do Nothing
endif
if ( Trig_Town_Portal_2_Func009Func002001() ) then
call UnitUseItemTarget( udg_u_Find_Hero_Result, GetItemOfTypeFromUnitBJ(udg_u_Find_Hero_Result, 'I003'), gg_unit_htow_0033 )
else
// Do Nothing
endif
if ( Trig_Town_Portal_2_Func009Func003001() ) then
call UnitUseItemTarget( udg_u_Find_Hero_Result, GetItemOfTypeFromUnitBJ(udg_u_Find_Hero_Result, 'stel'), gg_unit_htow_0033 )
else
// Do Nothing
endif
else
if ( Trig_Town_Portal_2_Func009Func005001() ) then
call IssueTargetOrderBJ( udg_u_Find_Hero_Result, "massteleport", gg_unit_htow_0033 )
else
call DoNothing( )
endif
endif
endfunction
//===========================================================================
function InitTrig_Town_Portal_2 takes nothing returns nothing
set gg_trg_Town_Portal_2 = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Town_Portal_2, Player(0), "[town]+2", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Town_Portal_2, Player(1), "[town]+2", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Town_Portal_2, Player(2), "[town]+2", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Town_Portal_2, Player(3), "[town]+2", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Town_Portal_2, Player(4), "[town]+2", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Town_Portal_2, Player(5), "[town]+2", true )
call TriggerAddAction( gg_trg_Town_Portal_2, function Trig_Town_Portal_2_Actions )
endfunction
function Trig_Town_Portal_3_Func003Func001001 takes nothing returns boolean
return ( UnitHasItemOfTypeBJ(udg_u_Find_Hero_Result, 'stwp') == true )
endfunction
function Trig_Town_Portal_3_Func003Func002001 takes nothing returns boolean
return ( UnitHasItemOfTypeBJ(udg_u_Find_Hero_Result, 'I003') == true )
endfunction
function Trig_Town_Portal_3_Func003Func003001 takes nothing returns boolean
return ( UnitHasItemOfTypeBJ(udg_u_Find_Hero_Result, 'stel') == true )
endfunction
function Trig_Town_Portal_3_Func003Func004C takes nothing returns boolean
if ( ( UnitHasItemOfTypeBJ(udg_u_Find_Hero_Result, 'stwp') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(udg_u_Find_Hero_Result, 'I003') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(udg_u_Find_Hero_Result, 'stel') == true ) ) then
return true
endif
return false
endfunction
function Trig_Town_Portal_3_Func003Func005001 takes nothing returns boolean
return ( GetUnitTypeId(udg_u_Find_Hero_Result) == 'EC16' )
endfunction
function Trig_Town_Portal_3_Func003C takes nothing returns boolean
if ( not Trig_Town_Portal_3_Func003Func004C() ) then
return false
endif
return true
endfunction
function Trig_Town_Portal_3_Actions takes nothing returns nothing
set udg_Find_Hero_Player = GetTriggerPlayer()
call TriggerExecute( gg_trg_Find_Hero )
if ( Trig_Town_Portal_3_Func003C() ) then
if ( Trig_Town_Portal_3_Func003Func001001() ) then
call UnitUseItemTarget( udg_u_Find_Hero_Result, GetItemOfTypeFromUnitBJ(udg_u_Find_Hero_Result, 'stwp'), gg_unit_hkee_0050 )
else
// Do Nothing
endif
if ( Trig_Town_Portal_3_Func003Func002001() ) then
call UnitUseItemTarget( udg_u_Find_Hero_Result, GetItemOfTypeFromUnitBJ(udg_u_Find_Hero_Result, 'I003'), gg_unit_hkee_0050 )
else
// Do Nothing
endif
if ( Trig_Town_Portal_3_Func003Func003001() ) then
call UnitUseItemTarget( udg_u_Find_Hero_Result, GetItemOfTypeFromUnitBJ(udg_u_Find_Hero_Result, 'stel'), gg_unit_hkee_0050 )
else
// Do Nothing
endif
else
if ( Trig_Town_Portal_3_Func003Func005001() ) then
call IssueTargetOrderBJ( udg_u_Find_Hero_Result, "massteleport", gg_unit_hkee_0050 )
else
call DoNothing( )
endif
endif
endfunction
//===========================================================================
function InitTrig_Town_Portal_3 takes nothing returns nothing
set gg_trg_Town_Portal_3 = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Town_Portal_3, Player(0), "[town]+3", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Town_Portal_3, Player(1), "[town]+3", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Town_Portal_3, Player(2), "[town]+3", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Town_Portal_3, Player(3), "[town]+3", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Town_Portal_3, Player(4), "[town]+3", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Town_Portal_3, Player(5), "[town]+3", true )
call TriggerAddAction( gg_trg_Town_Portal_3, function Trig_Town_Portal_3_Actions )
endfunction
function Trig_All_Unit_Follow_Event_Func004001 takes nothing returns boolean
return ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_All_Unit_Follow_Event_Func004002 takes nothing returns boolean
return ( GetUnitUserData(GetTriggerUnit()) == 99 )
endfunction
function Trig_All_Unit_Follow_Event_Func005C takes nothing returns boolean
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("patrol") ) ) then
return true
endif
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("attack") ) ) then
return true
endif
return false
endfunction
function Trig_All_Unit_Follow_Event_Conditions takes nothing returns boolean
if ( not GetBooleanAnd( Trig_All_Unit_Follow_Event_Func004001(), Trig_All_Unit_Follow_Event_Func004002() ) ) then
return false
endif
if ( not Trig_All_Unit_Follow_Event_Func005C() ) then
return false
endif
return true
endfunction
function Trig_All_Unit_Follow_Event_Func003001002001001001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_All_Unit_Follow_Event_Func003001002001001002 takes nothing returns boolean
return ( GetUnitUserData(GetFilterUnit()) != 99 )
endfunction
function Trig_All_Unit_Follow_Event_Func003001002001001 takes nothing returns boolean
return GetBooleanAnd( Trig_All_Unit_Follow_Event_Func003001002001001001(), Trig_All_Unit_Follow_Event_Func003001002001001002() )
endfunction
function Trig_All_Unit_Follow_Event_Func003001002001002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_PEON) == false )
endfunction
function Trig_All_Unit_Follow_Event_Func003001002001 takes nothing returns boolean
return GetBooleanAnd( Trig_All_Unit_Follow_Event_Func003001002001001(), Trig_All_Unit_Follow_Event_Func003001002001002() )
endfunction
function Trig_All_Unit_Follow_Event_Func003001002002001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_TOWNHALL) == false )
endfunction
function Trig_All_Unit_Follow_Event_Func003001002002002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) != 'hrdh' )
endfunction
function Trig_All_Unit_Follow_Event_Func003001002002002002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) != 'o006' )
endfunction
function Trig_All_Unit_Follow_Event_Func003001002002002 takes nothing returns boolean
return GetBooleanAnd( Trig_All_Unit_Follow_Event_Func003001002002002001(), Trig_All_Unit_Follow_Event_Func003001002002002002() )
endfunction
function Trig_All_Unit_Follow_Event_Func003001002002 takes nothing returns boolean
return GetBooleanAnd( Trig_All_Unit_Follow_Event_Func003001002002001(), Trig_All_Unit_Follow_Event_Func003001002002002() )
endfunction
function Trig_All_Unit_Follow_Event_Func003001002 takes nothing returns boolean
return GetBooleanAnd( Trig_All_Unit_Follow_Event_Func003001002001(), Trig_All_Unit_Follow_Event_Func003001002002() )
endfunction
function Trig_All_Unit_Follow_Event_Func003Func001C takes nothing returns boolean
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("patrol") ) ) then
return false
endif
return true
endfunction
function Trig_All_Unit_Follow_Event_Func003A takes nothing returns nothing
if ( Trig_All_Unit_Follow_Event_Func003Func001C() ) then
call IssueTargetOrderBJ( GetEnumUnit(), "smart", udg_u_Find_Hero_Result )
call TriggerSleepAction( 0.25 )
call IssueImmediateOrderBJ( udg_u_Find_Hero_Result, "stop" )
else
endif
endfunction
function Trig_All_Unit_Follow_Event_Actions takes nothing returns nothing
set udg_Find_Hero_Player = GetTriggerPlayer()
call TriggerExecute( gg_trg_Find_Hero )
call ForGroupBJ( GetUnitsOfPlayerMatching(udg_Find_Hero_Player, Condition(function Trig_All_Unit_Follow_Event_Func003001002)), function Trig_All_Unit_Follow_Event_Func003A )
endfunction
//===========================================================================
function InitTrig_All_Unit_Follow_Event takes nothing returns nothing
set gg_trg_All_Unit_Follow_Event = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_All_Unit_Follow_Event, Player(0), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_All_Unit_Follow_Event, Player(1), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_All_Unit_Follow_Event, Player(2), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_All_Unit_Follow_Event, Player(3), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_All_Unit_Follow_Event, Player(4), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_All_Unit_Follow_Event, Player(5), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerAddCondition( gg_trg_All_Unit_Follow_Event, Condition( function Trig_All_Unit_Follow_Event_Conditions ) )
call TriggerAddAction( gg_trg_All_Unit_Follow_Event, function Trig_All_Unit_Follow_Event_Actions )
endfunction
function Trig_Beast_Follow_Event_Func001Func001001 takes nothing returns boolean
return ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Beast_Follow_Event_Func001Func001002 takes nothing returns boolean
return ( GetUnitUserData(GetTriggerUnit()) == 99 )
endfunction
function Trig_Beast_Follow_Event_Func001C takes nothing returns boolean
if ( not GetBooleanAnd( Trig_Beast_Follow_Event_Func001Func001001(), Trig_Beast_Follow_Event_Func001Func001002() ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetOrderedUnit()) == GetUnitTypeId(GetTriggerUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Beast_Follow_Event_Conditions takes nothing returns boolean
if ( not Trig_Beast_Follow_Event_Func001C() ) then
return false
endif
return true
endfunction
function Trig_Beast_Follow_Event_Func004001002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'o006' )
endfunction
function Trig_Beast_Follow_Event_Actions takes nothing returns nothing
set udg_Find_Hero_Player = GetTriggerPlayer()
call TriggerExecute( gg_trg_Find_Hero )
call GroupTargetOrderBJ( GetUnitsOfPlayerMatching(udg_Find_Hero_Player, Condition(function Trig_Beast_Follow_Event_Func004001002)), "move", udg_u_Find_Hero_Result )
endfunction
//===========================================================================
function InitTrig_Beast_Follow_Event takes nothing returns nothing
set gg_trg_Beast_Follow_Event = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Beast_Follow_Event, Player(0), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Beast_Follow_Event, Player(1), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Beast_Follow_Event, Player(2), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Beast_Follow_Event, Player(3), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Beast_Follow_Event, Player(4), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Beast_Follow_Event, Player(5), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerAddCondition( gg_trg_Beast_Follow_Event, Condition( function Trig_Beast_Follow_Event_Conditions ) )
call TriggerAddAction( gg_trg_Beast_Follow_Event, function Trig_Beast_Follow_Event_Actions )
endfunction
function Trig_Reset_User_Group_Func002002001 takes nothing returns boolean
return ( GetPlayerSlotState(GetEnumPlayer()) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Reset_User_Group_Func002002 takes nothing returns nothing
if ( Trig_Reset_User_Group_Func002002001() ) then
call ForceAddPlayerSimple( GetEnumPlayer(), udg_Hero_Player_User )
else
call DoNothing( )
endif
endfunction
function Trig_Reset_User_Group_Actions takes nothing returns nothing
call ForceClear( udg_Hero_Player_User )
call ForForce( GetPlayersByMapControl(MAP_CONTROL_USER), function Trig_Reset_User_Group_Func002002 )
endfunction
//===========================================================================
function InitTrig_Reset_User_Group takes nothing returns nothing
set gg_trg_Reset_User_Group = CreateTrigger( )
call TriggerAddAction( gg_trg_Reset_User_Group, function Trig_Reset_User_Group_Actions )
endfunction
function Trig_Find_Hero_Func001002001002001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Find_Hero_Func001002001002002001 takes nothing returns boolean
return ( GetUnitUserData(GetFilterUnit()) == 99 )
endfunction
function Trig_Find_Hero_Func001002001002002002 takes nothing returns boolean
return ( GetPlayerSlotState(GetOwningPlayer(GetFilterUnit())) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Find_Hero_Func001002001002002 takes nothing returns boolean
return GetBooleanAnd( Trig_Find_Hero_Func001002001002002001(), Trig_Find_Hero_Func001002001002002002() )
endfunction
function Trig_Find_Hero_Func001002001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Find_Hero_Func001002001002001(), Trig_Find_Hero_Func001002001002002() )
endfunction
function Trig_Find_Hero_Actions takes nothing returns nothing
set udg_u_Find_Hero_Result = GroupPickRandomUnit(GetUnitsOfPlayerMatching(udg_Find_Hero_Player, Condition(function Trig_Find_Hero_Func001002001002)))
endfunction
//===========================================================================
function InitTrig_Find_Hero takes nothing returns nothing
set gg_trg_Find_Hero = CreateTrigger( )
call TriggerAddAction( gg_trg_Find_Hero, function Trig_Find_Hero_Actions )
endfunction
function Trig_Find_Hero_NPC_Func001002001002001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Find_Hero_NPC_Func001002001002002 takes nothing returns boolean
return ( GetUnitUserData(GetFilterUnit()) != 99 )
endfunction
function Trig_Find_Hero_NPC_Func001002001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Find_Hero_NPC_Func001002001002001(), Trig_Find_Hero_NPC_Func001002001002002() )
endfunction
function Trig_Find_Hero_NPC_Actions takes nothing returns nothing
set udg_u_Find_Hero_NPC_Result = GroupPickRandomUnit(GetUnitsOfPlayerMatching(udg_Find_Hero_Player, Condition(function Trig_Find_Hero_NPC_Func001002001002)))
endfunction
//===========================================================================
function InitTrig_Find_Hero_NPC takes nothing returns nothing
set gg_trg_Find_Hero_NPC = CreateTrigger( )
call TriggerAddAction( gg_trg_Find_Hero_NPC, function Trig_Find_Hero_NPC_Actions )
endfunction
function Trig_Lock_Camera_to_Heroes_Func001002002001002001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Lock_Camera_to_Heroes_Func001002002001002002001 takes nothing returns boolean
return ( GetUnitUserData(GetFilterUnit()) == 99 )
endfunction
function Trig_Lock_Camera_to_Heroes_Func001002002001002002002 takes nothing returns boolean
return ( GetPlayerSlotState(GetOwningPlayer(GetFilterUnit())) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Lock_Camera_to_Heroes_Func001002002001002002 takes nothing returns boolean
return GetBooleanAnd( Trig_Lock_Camera_to_Heroes_Func001002002001002002001(), Trig_Lock_Camera_to_Heroes_Func001002002001002002002() )
endfunction
function Trig_Lock_Camera_to_Heroes_Func001002002001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Lock_Camera_to_Heroes_Func001002002001002001(), Trig_Lock_Camera_to_Heroes_Func001002002001002002() )
endfunction
function Trig_Lock_Camera_to_Heroes_Func001002 takes nothing returns nothing
call SetCameraTargetControllerNoZForPlayer( GetEnumPlayer(), GroupPickRandomUnit(GetUnitsOfPlayerMatching(GetEnumPlayer(), Condition(function Trig_Lock_Camera_to_Heroes_Func001002002001002))), 0, 0, false )
endfunction
function Trig_Lock_Camera_to_Heroes_Actions takes nothing returns nothing
call ForForce( udg_Hero_Player_User, function Trig_Lock_Camera_to_Heroes_Func001002 )
endfunction
//===========================================================================
function InitTrig_Lock_Camera_to_Heroes takes nothing returns nothing
set gg_trg_Lock_Camera_to_Heroes = CreateTrigger( )
call TriggerAddAction( gg_trg_Lock_Camera_to_Heroes, function Trig_Lock_Camera_to_Heroes_Actions )
endfunction