Name | Type | is_array | initial_value |
AGI | integer | Yes | |
Aura_Unit | unit | No | |
Blizzard_Status | boolean | No | |
Blizzard_Unit | unit | No | |
Blizzard_Var | integer | No | |
Blue | string | No | |cff0041FF |
Button_Point | button | Yes | |
Button_Unit | button | Yes | |
Default | string | No | |cff7777AA |
Default2 | string | No | |cffc3dbff |
EndParam | string | No | |r |
Gray | string | No | |cff949596 |
Green | string | No | |cff1FBF00 |
Hero | unit | Yes | |
Hero_Kinds | integer | Yes | |
Hero_Level | integer | Yes | |
Hero_Type | unitcode | Yes | |
INT | integer | Yes | 0 |
Item_Price | integer | Yes | |
Item_Type | itemcode | Yes | |
Leaderboard | leaderboard | No | |
LightBlue | string | No | |cff7DBEF1 |
MaxHero | integer | No | 6 |
MortarWarsCenter | unit | No | |
Orange | string | No | |cffFE890D |
PanCamera | real | No | 1.00 |
Ping | real | No | 2.00 |
Pink | string | No | |cffE55AAF |
player | player | No | |
Player_Kill | integer | Yes | |
PlayerColor | string | Yes | |
Point | integer | No | 1 |
Position | rect | No | |
Purple | string | No | |cff530080 |
Random_Stats | integer | Yes | |
Red | string | No | |cffFF0202 |
SelectButtonPoint | boolean | No | |
SelectButtonUnit | boolean | Yes | |
SelectPoint | dialog | No | |
SelectUnit | dialog | Yes | |
STR | integer | Yes | |
String | string | No | |
Teal | string | No | |cff1BE6B8 |
Unit | integer | Yes | |
UnitVar | unit | Yes | |
Visible | texttag | Yes | |
x | integer | No | |
y | integer | No | |
Yellow | string | No | |cffFFFC00 |
function Trig_Kill_Copy_Func002Func005A takes nothing returns nothing
call PauseUnitBJ( true, GetEnumUnit() )
endfunction
function Trig_Kill_Copy_Func002Func006Func002C takes nothing returns boolean
if ( not ( IsUnitType(GetKillingUnitBJ(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Kill_Copy_Func002Func006C takes nothing returns boolean
if ( not Trig_Kill_Copy_Func002Func006Func002C() ) then
return false
endif
return true
endfunction
function Trig_Kill_Copy_Func002Func007Func003C takes nothing returns boolean
if ( not ( IsUnitType(GetKillingUnitBJ(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetDyingUnit()) == Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Kill_Copy_Func002Func007C takes nothing returns boolean
if ( not Trig_Kill_Copy_Func002Func007Func003C() ) then
return false
endif
return true
endfunction
function Trig_Kill_Copy_Func002Func009A takes nothing returns nothing
call PauseUnitBJ( false, GetEnumUnit() )
endfunction
function Trig_Kill_Copy_Func002C takes nothing returns boolean
if ( not ( IsUnitType(GetDyingUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Kill_Copy_Actions takes nothing returns nothing
if ( Trig_Kill_Copy_Func002C() ) then
set udg_Player_Kill[GetConvertedPlayerId(GetOwningPlayer(GetKillingUnitBJ()))] = ( udg_Player_Kill[GetConvertedPlayerId(GetOwningPlayer(GetKillingUnitBJ()))] + 1 )
call AdjustPlayerStateBJ( 1, GetOwningPlayer(GetKillingUnitBJ()), PLAYER_STATE_RESOURCE_FOOD_USED )
call DisplayTextToForce( GetPlayersAll(), ( "Message: " + ( ( udg_PlayerColor[GetConvertedPlayerId(GetOwningPlayer(GetDyingUnit()))] + ( GetPlayerName(GetOwningPlayer(GetDyingUnit())) + udg_EndParam ) ) + ( ( udg_Default + ( " killed by " + udg_EndParam ) ) + ( udg_PlayerColor[GetConvertedPlayerId(GetOwningPlayer(GetKillingUnitBJ()))] + ( GetPlayerName(GetOwningPlayer(GetKillingUnitBJ())) + udg_EndParam ) ) ) ) ) )
call ForGroupBJ( GetUnitsOfPlayerAndTypeId(GetOwningPlayer(GetDyingUnit()), 'h00C'), function Trig_Kill_Copy_Func002Func005A )
if ( Trig_Kill_Copy_Func002Func006C() ) then
call AdjustPlayerStateBJ( GetRandomInt(1, 50), GetOwningPlayer(GetKillingUnitBJ()), PLAYER_STATE_RESOURCE_GOLD )
else
endif
if ( Trig_Kill_Copy_Func002Func007C() ) then
call AdjustPlayerStateBJ( GetRandomInt(1, 10), GetOwningPlayer(GetKillingUnitBJ()), PLAYER_STATE_RESOURCE_GOLD )
else
call DoNothing( )
endif
call TriggerSleepAction( 10.00 )
call ForGroupBJ( GetUnitsOfPlayerAndTypeId(GetOwningPlayer(GetDyingUnit()), 'h00C'), function Trig_Kill_Copy_Func002Func009A )
call ReviveHeroLoc( GetDyingUnit(), GetRandomLocInRect(gg_rct_Creeps), true )
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetDyingUnit()), GetUnitLoc(GetDyingUnit()), udg_PanCamera )
call SelectUnitForPlayerSingle( GetDyingUnit(), GetOwningPlayer(GetDyingUnit()) )
call PingMinimapLocForForce( GetPlayersAll(), GetUnitLoc(GetDyingUnit()), udg_Ping )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Killed takes nothing returns nothing
set gg_trg_Killed = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Killed, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddAction( gg_trg_Killed, function Trig_Kill_Copy_Actions )
endfunction
function Trig_Finish_Train_Unit_Copy_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetSoldUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Finish_Train_Unit_Copy_Func003A takes nothing returns nothing
call SetUnitPositionLocFacingLocBJ( GetSoldUnit(), GetUnitLoc(GetEnumUnit()), GetUnitLoc(udg_MortarWarsCenter) )
endfunction
function Trig_Finish_Train_Unit_Copy_Actions takes nothing returns nothing
call DisplayTextToForce( GetPlayersAll(), ( "Message: " + ( ( udg_PlayerColor[GetConvertedPlayerId(GetOwningPlayer(GetSoldUnit()))] + ( GetPlayerName(GetOwningPlayer(GetSoldUnit())) + udg_EndParam ) ) + ( ( udg_Default + ( " has picked " + udg_EndParam ) ) + ( udg_Default2 + ( GetUnitName(GetSoldUnit()) + udg_EndParam ) ) ) ) ) )
call UnitAddAbilityBJ( 'Avul', GetSoldUnit() )
call ForGroupBJ( GetUnitsOfPlayerAll(GetOwningPlayer(GetSoldUnit())), function Trig_Finish_Train_Unit_Copy_Func003A )
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetSoldUnit()), GetUnitLoc(GetSoldUnit()), udg_PanCamera )
call SelectUnitForPlayerSingle( GetSoldUnit(), GetOwningPlayer(GetSoldUnit()) )
call PingMinimapLocForForce( GetPlayersAll(), GetUnitLoc(GetSoldUnit()), udg_Ping )
endfunction
//===========================================================================
function InitTrig_Finish_Train_Unit_2 takes nothing returns nothing
set gg_trg_Finish_Train_Unit_2 = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_Finish_Train_Unit_2, gg_unit_h004_0002, EVENT_UNIT_SELL )
call TriggerAddCondition( gg_trg_Finish_Train_Unit_2, Condition( function Trig_Finish_Train_Unit_Copy_Conditions ) )
call TriggerAddAction( gg_trg_Finish_Train_Unit_2, function Trig_Finish_Train_Unit_Copy_Actions )
endfunction
function Trig_Random_Unit_Copy_Func002Func001C takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectOfPlayer(GetPlayableMapRect(), Player(0))) == 0 ) ) then
return false
endif
if ( not ( GetPlayerSlotState(Player(0)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_Random_Unit_Copy_Func002Func005Func004A takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetEnumUnit()), GetUnitLoc(GetEnumUnit()), 1.00 )
endfunction
function Trig_Random_Unit_Copy_Func002Func005C takes nothing returns boolean
if ( not ( udg_Hero_Kinds[udg_x] == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Random_Unit_Copy_Func002Func006Func004A takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetEnumUnit()), GetUnitLoc(GetEnumUnit()), 1.00 )
endfunction
function Trig_Random_Unit_Copy_Func002Func006C takes nothing returns boolean
if ( not ( udg_Hero_Kinds[udg_x] == 2 ) ) then
return false
endif
return true
endfunction
function Trig_Random_Unit_Copy_Func002Func007Func004A takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetEnumUnit()), GetUnitLoc(GetEnumUnit()), 1.00 )
endfunction
function Trig_Random_Unit_Copy_Func002Func007C takes nothing returns boolean
if ( not ( udg_Hero_Kinds[udg_x] == 3 ) ) then
return false
endif
return true
endfunction
function Trig_Random_Unit_Copy_Func002Func008Func004A takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetEnumUnit()), GetUnitLoc(GetEnumUnit()), 1.00 )
endfunction
function Trig_Random_Unit_Copy_Func002Func008C takes nothing returns boolean
if ( not ( udg_Hero_Kinds[udg_x] == 4 ) ) then
return false
endif
return true
endfunction
function Trig_Random_Unit_Copy_Func002Func009Func004A takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetEnumUnit()), GetUnitLoc(GetEnumUnit()), 1.00 )
endfunction
function Trig_Random_Unit_Copy_Func002Func009C takes nothing returns boolean
if ( not ( udg_Hero_Kinds[udg_x] == 5 ) ) then
return false
endif
return true
endfunction
function Trig_Random_Unit_Copy_Func003Func001Func001001001002001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Random_Unit_Copy_Func003Func001Func001001001002002 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == Player(0) )
endfunction
function Trig_Random_Unit_Copy_Func003Func001Func001001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Random_Unit_Copy_Func003Func001Func001001001002001(), Trig_Random_Unit_Copy_Func003Func001Func001001001002002() )
endfunction
function Trig_Random_Unit_Copy_Func003Func001C takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Random_Unit_Copy_Func003Func001Func001001001002))) == 0 ) ) then
return false
endif
if ( not ( GetPlayerSlotState(Player(0)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_Random_Unit_Copy_Func003C takes nothing returns boolean
if ( not Trig_Random_Unit_Copy_Func003Func001C() ) then
return false
endif
return true
endfunction
function Trig_Random_Unit_Copy_Func005Func006Func001001001002001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Random_Unit_Copy_Func005Func006Func001001001002002 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == Player(1) )
endfunction
function Trig_Random_Unit_Copy_Func005Func006Func001001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Random_Unit_Copy_Func005Func006Func001001001002001(), Trig_Random_Unit_Copy_Func005Func006Func001001001002002() )
endfunction
function Trig_Random_Unit_Copy_Func005Func006C takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Random_Unit_Copy_Func005Func006Func001001001002))) == 0 ) ) then
return false
endif
if ( not ( GetPlayerSlotState(Player(1)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_Random_Unit_Copy_Func005C takes nothing returns boolean
if ( not Trig_Random_Unit_Copy_Func005Func006C() ) then
return false
endif
return true
endfunction
function Trig_Random_Unit_Copy_Func007Func006Func001001001002001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Random_Unit_Copy_Func007Func006Func001001001002002 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == Player(2) )
endfunction
function Trig_Random_Unit_Copy_Func007Func006Func001001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Random_Unit_Copy_Func007Func006Func001001001002001(), Trig_Random_Unit_Copy_Func007Func006Func001001001002002() )
endfunction
function Trig_Random_Unit_Copy_Func007Func006C takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Random_Unit_Copy_Func007Func006Func001001001002))) == 0 ) ) then
return false
endif
if ( not ( GetPlayerSlotState(Player(2)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_Random_Unit_Copy_Func007C takes nothing returns boolean
if ( not Trig_Random_Unit_Copy_Func007Func006C() ) then
return false
endif
return true
endfunction
function Trig_Random_Unit_Copy_Func009Func006Func001001001002001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Random_Unit_Copy_Func009Func006Func001001001002002 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == Player(3) )
endfunction
function Trig_Random_Unit_Copy_Func009Func006Func001001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Random_Unit_Copy_Func009Func006Func001001001002001(), Trig_Random_Unit_Copy_Func009Func006Func001001001002002() )
endfunction
function Trig_Random_Unit_Copy_Func009Func006C takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Random_Unit_Copy_Func009Func006Func001001001002))) == 0 ) ) then
return false
endif
if ( not ( GetPlayerSlotState(Player(3)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_Random_Unit_Copy_Func009C takes nothing returns boolean
if ( not Trig_Random_Unit_Copy_Func009Func006C() ) then
return false
endif
return true
endfunction
function Trig_Random_Unit_Copy_Func011Func006Func001001001002001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Random_Unit_Copy_Func011Func006Func001001001002002 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == Player(4) )
endfunction
function Trig_Random_Unit_Copy_Func011Func006Func001001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Random_Unit_Copy_Func011Func006Func001001001002001(), Trig_Random_Unit_Copy_Func011Func006Func001001001002002() )
endfunction
function Trig_Random_Unit_Copy_Func011Func006C takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Random_Unit_Copy_Func011Func006Func001001001002))) == 0 ) ) then
return false
endif
if ( not ( GetPlayerSlotState(Player(4)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_Random_Unit_Copy_Func011C takes nothing returns boolean
if ( not Trig_Random_Unit_Copy_Func011Func006C() ) then
return false
endif
return true
endfunction
function Trig_Random_Unit_Copy_Func013Func006Func001001001002001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Random_Unit_Copy_Func013Func006Func001001001002002 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == Player(5) )
endfunction
function Trig_Random_Unit_Copy_Func013Func006Func001001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Random_Unit_Copy_Func013Func006Func001001001002001(), Trig_Random_Unit_Copy_Func013Func006Func001001001002002() )
endfunction
function Trig_Random_Unit_Copy_Func013Func006C takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Random_Unit_Copy_Func013Func006Func001001001002))) == 0 ) ) then
return false
endif
if ( not ( GetPlayerSlotState(Player(5)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_Random_Unit_Copy_Func013C takes nothing returns boolean
if ( not Trig_Random_Unit_Copy_Func013Func006C() ) then
return false
endif
return true
endfunction
function Trig_Random_Unit_Copy_Func015Func006Func001001001002001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Random_Unit_Copy_Func015Func006Func001001001002002 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == Player(6) )
endfunction
function Trig_Random_Unit_Copy_Func015Func006Func001001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Random_Unit_Copy_Func015Func006Func001001001002001(), Trig_Random_Unit_Copy_Func015Func006Func001001001002002() )
endfunction
function Trig_Random_Unit_Copy_Func015Func006C takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Random_Unit_Copy_Func015Func006Func001001001002))) == 0 ) ) then
return false
endif
if ( not ( GetPlayerSlotState(Player(6)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_Random_Unit_Copy_Func015C takes nothing returns boolean
if ( not Trig_Random_Unit_Copy_Func015Func006C() ) then
return false
endif
return true
endfunction
function Trig_Random_Unit_Copy_Func017Func006Func001001001002001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Random_Unit_Copy_Func017Func006Func001001001002002 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == Player(7) )
endfunction
function Trig_Random_Unit_Copy_Func017Func006Func001001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Random_Unit_Copy_Func017Func006Func001001001002001(), Trig_Random_Unit_Copy_Func017Func006Func001001001002002() )
endfunction
function Trig_Random_Unit_Copy_Func017Func006C takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Random_Unit_Copy_Func017Func006Func001001001002))) == 0 ) ) then
return false
endif
if ( not ( GetPlayerSlotState(Player(7)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_Random_Unit_Copy_Func017C takes nothing returns boolean
if ( not Trig_Random_Unit_Copy_Func017Func006C() ) then
return false
endif
return true
endfunction
function Trig_Random_Unit_Copy_Func019Func006Func001001001002001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Random_Unit_Copy_Func019Func006Func001001001002002 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == Player(8) )
endfunction
function Trig_Random_Unit_Copy_Func019Func006Func001001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Random_Unit_Copy_Func019Func006Func001001001002001(), Trig_Random_Unit_Copy_Func019Func006Func001001001002002() )
endfunction
function Trig_Random_Unit_Copy_Func019Func006C takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Random_Unit_Copy_Func019Func006Func001001001002))) == 0 ) ) then
return false
endif
if ( not ( GetPlayerSlotState(Player(8)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_Random_Unit_Copy_Func019C takes nothing returns boolean
if ( not Trig_Random_Unit_Copy_Func019Func006C() ) then
return false
endif
return true
endfunction
function Trig_Random_Unit_Copy_Func021Func006Func001001001002001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Random_Unit_Copy_Func021Func006Func001001001002002 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == Player(9) )
endfunction
function Trig_Random_Unit_Copy_Func021Func006Func001001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Random_Unit_Copy_Func021Func006Func001001001002001(), Trig_Random_Unit_Copy_Func021Func006Func001001001002002() )
endfunction
function Trig_Random_Unit_Copy_Func021Func006C takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Random_Unit_Copy_Func021Func006Func001001001002))) == 0 ) ) then
return false
endif
if ( not ( GetPlayerSlotState(Player(9)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_Random_Unit_Copy_Func021C takes nothing returns boolean
if ( not Trig_Random_Unit_Copy_Func021Func006C() ) then
return false
endif
return true
endfunction
function Trig_Random_Unit_Copy_Func023Func001001002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Random_Unit_Copy_Func023Func001A takes nothing returns nothing
call SetPlayerName( GetEnumPlayer(), ( "AI " + ( GetUnitName(GetEnumUnit()) + ( " - " + I2S(GetRandomInt(1, 100)) ) ) ) )
endfunction
function Trig_Random_Unit_Copy_Func023A takes nothing returns nothing
call ForGroupBJ( GetUnitsOfPlayerMatching(GetEnumPlayer(), Condition(function Trig_Random_Unit_Copy_Func023Func001001002)), function Trig_Random_Unit_Copy_Func023Func001A )
endfunction
function Trig_Random_Unit_Copy_Actions takes nothing returns nothing
call ShowUnitHide( udg_MortarWarsCenter )
if ( Trig_Random_Unit_Copy_Func003C() ) then
set udg_x = 1
call CreateNUnitsAtLocFacingLocBJ( 1, udg_Hero_Type[udg_Hero_Kinds[udg_x]], ConvertedPlayer(udg_x), GetUnitLoc(udg_UnitVar[udg_x]), GetUnitLoc(udg_MortarWarsCenter) )
call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, udg_player )
call DisplayTextToForce( GetPlayersAll(), ( "Message: " + ( ( udg_PlayerColor[udg_x] + ( GetPlayerName(ConvertedPlayer(udg_x)) + udg_EndParam ) ) + ( ( udg_Default + ( " has random picked " + udg_EndParam ) ) + ( udg_Default2 + ( GetUnitName(GetLastCreatedUnit()) + udg_EndParam ) ) ) ) ) )
call UnitAddAbilityBJ( 'Avul', GetLastCreatedUnit() )
else
call DoNothing( )
endif
call TriggerSleepAction( 0.25 )
if ( Trig_Random_Unit_Copy_Func005C() ) then
set udg_x = 2
call CreateNUnitsAtLocFacingLocBJ( 1, udg_Hero_Type[udg_Hero_Kinds[udg_x]], ConvertedPlayer(udg_x), GetUnitLoc(udg_UnitVar[udg_x]), GetUnitLoc(udg_MortarWarsCenter) )
call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, udg_player )
call DisplayTextToForce( GetPlayersAll(), ( "Message: " + ( ( udg_PlayerColor[udg_x] + ( GetPlayerName(ConvertedPlayer(udg_x)) + udg_EndParam ) ) + ( ( udg_Default + ( " has random picked " + udg_EndParam ) ) + ( udg_Default2 + ( GetUnitName(GetLastCreatedUnit()) + udg_EndParam ) ) ) ) ) )
call UnitAddAbilityBJ( 'Avul', GetLastCreatedUnit() )
else
call DoNothing( )
endif
call TriggerSleepAction( 0.25 )
if ( Trig_Random_Unit_Copy_Func007C() ) then
set udg_x = 3
call CreateNUnitsAtLocFacingLocBJ( 1, udg_Hero_Type[udg_Hero_Kinds[udg_x]], ConvertedPlayer(udg_x), GetUnitLoc(udg_UnitVar[udg_x]), GetUnitLoc(udg_MortarWarsCenter) )
call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, udg_player )
call DisplayTextToForce( GetPlayersAll(), ( "Message: " + ( ( udg_PlayerColor[udg_x] + ( GetPlayerName(ConvertedPlayer(udg_x)) + udg_EndParam ) ) + ( ( udg_Default + ( " has random picked " + udg_EndParam ) ) + ( udg_Default2 + ( GetUnitName(GetLastCreatedUnit()) + udg_EndParam ) ) ) ) ) )
call UnitAddAbilityBJ( 'Avul', GetLastCreatedUnit() )
else
call DoNothing( )
endif
call TriggerSleepAction( 0.25 )
if ( Trig_Random_Unit_Copy_Func009C() ) then
set udg_x = 4
call CreateNUnitsAtLocFacingLocBJ( 1, udg_Hero_Type[udg_Hero_Kinds[udg_x]], ConvertedPlayer(udg_x), GetUnitLoc(udg_UnitVar[udg_x]), GetUnitLoc(udg_MortarWarsCenter) )
call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, udg_player )
call DisplayTextToForce( GetPlayersAll(), ( "Message: " + ( ( udg_PlayerColor[udg_x] + ( GetPlayerName(ConvertedPlayer(udg_x)) + udg_EndParam ) ) + ( ( udg_Default + ( " has random picked " + udg_EndParam ) ) + ( udg_Default2 + ( GetUnitName(GetLastCreatedUnit()) + udg_EndParam ) ) ) ) ) )
call UnitAddAbilityBJ( 'Avul', GetLastCreatedUnit() )
else
call DoNothing( )
endif
call TriggerSleepAction( 0.25 )
if ( Trig_Random_Unit_Copy_Func011C() ) then
set udg_x = 5
call CreateNUnitsAtLocFacingLocBJ( 1, udg_Hero_Type[udg_Hero_Kinds[udg_x]], ConvertedPlayer(udg_x), GetUnitLoc(udg_UnitVar[udg_x]), GetUnitLoc(udg_MortarWarsCenter) )
call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, udg_player )
call DisplayTextToForce( GetPlayersAll(), ( "Message: " + ( ( udg_PlayerColor[udg_x] + ( GetPlayerName(ConvertedPlayer(udg_x)) + udg_EndParam ) ) + ( ( udg_Default + ( " has random picked " + udg_EndParam ) ) + ( udg_Default2 + ( GetUnitName(GetLastCreatedUnit()) + udg_EndParam ) ) ) ) ) )
call UnitAddAbilityBJ( 'Avul', GetLastCreatedUnit() )
else
call DoNothing( )
endif
call TriggerSleepAction( 0.25 )
if ( Trig_Random_Unit_Copy_Func013C() ) then
set udg_x = 6
call CreateNUnitsAtLocFacingLocBJ( 1, udg_Hero_Type[udg_Hero_Kinds[udg_x]], ConvertedPlayer(udg_x), GetUnitLoc(udg_UnitVar[udg_x]), GetUnitLoc(udg_MortarWarsCenter) )
call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, udg_player )
call DisplayTextToForce( GetPlayersAll(), ( "Message: " + ( ( udg_PlayerColor[udg_x] + ( GetPlayerName(ConvertedPlayer(udg_x)) + udg_EndParam ) ) + ( ( udg_Default + ( " has random picked " + udg_EndParam ) ) + ( udg_Default2 + ( GetUnitName(GetLastCreatedUnit()) + udg_EndParam ) ) ) ) ) )
call UnitAddAbilityBJ( 'Avul', GetLastCreatedUnit() )
else
call DoNothing( )
endif
call TriggerSleepAction( 0.25 )
if ( Trig_Random_Unit_Copy_Func015C() ) then
set udg_x = 7
call CreateNUnitsAtLocFacingLocBJ( 1, udg_Hero_Type[udg_Hero_Kinds[udg_x]], ConvertedPlayer(udg_x), GetUnitLoc(udg_UnitVar[udg_x]), GetUnitLoc(udg_MortarWarsCenter) )
call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, udg_player )
call DisplayTextToForce( GetPlayersAll(), ( "Message: " + ( ( udg_PlayerColor[udg_x] + ( GetPlayerName(ConvertedPlayer(udg_x)) + udg_EndParam ) ) + ( ( udg_Default + ( " has random picked " + udg_EndParam ) ) + ( udg_Default2 + ( GetUnitName(GetLastCreatedUnit()) + udg_EndParam ) ) ) ) ) )
call UnitAddAbilityBJ( 'Avul', GetLastCreatedUnit() )
else
call DoNothing( )
endif
call TriggerSleepAction( 0.25 )
if ( Trig_Random_Unit_Copy_Func017C() ) then
set udg_x = 8
call CreateNUnitsAtLocFacingLocBJ( 1, udg_Hero_Type[udg_Hero_Kinds[udg_x]], ConvertedPlayer(udg_x), GetUnitLoc(udg_UnitVar[udg_x]), GetUnitLoc(udg_MortarWarsCenter) )
call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, udg_player )
call DisplayTextToForce( GetPlayersAll(), ( "Message: " + ( ( udg_PlayerColor[udg_x] + ( GetPlayerName(ConvertedPlayer(udg_x)) + udg_EndParam ) ) + ( ( udg_Default + ( " has random picked " + udg_EndParam ) ) + ( udg_Default2 + ( GetUnitName(GetLastCreatedUnit()) + udg_EndParam ) ) ) ) ) )
call UnitAddAbilityBJ( 'Avul', GetLastCreatedUnit() )
else
call DoNothing( )
endif
call TriggerSleepAction( 0.25 )
if ( Trig_Random_Unit_Copy_Func019C() ) then
set udg_x = 9
call CreateNUnitsAtLocFacingLocBJ( 1, udg_Hero_Type[udg_Hero_Kinds[udg_x]], ConvertedPlayer(udg_x), GetUnitLoc(udg_UnitVar[udg_x]), GetUnitLoc(udg_MortarWarsCenter) )
call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, udg_player )
call DisplayTextToForce( GetPlayersAll(), ( "Message: " + ( ( udg_PlayerColor[udg_x] + ( GetPlayerName(ConvertedPlayer(udg_x)) + udg_EndParam ) ) + ( ( udg_Default + ( " has random picked " + udg_EndParam ) ) + ( udg_Default2 + ( GetUnitName(GetLastCreatedUnit()) + udg_EndParam ) ) ) ) ) )
call UnitAddAbilityBJ( 'Avul', GetLastCreatedUnit() )
else
call DoNothing( )
endif
call TriggerSleepAction( 0.25 )
if ( Trig_Random_Unit_Copy_Func021C() ) then
set udg_x = 10
call CreateNUnitsAtLocFacingLocBJ( 1, udg_Hero_Type[udg_Hero_Kinds[udg_x]], ConvertedPlayer(udg_x), GetUnitLoc(udg_UnitVar[udg_x]), GetUnitLoc(udg_MortarWarsCenter) )
call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, udg_player )
call DisplayTextToForce( GetPlayersAll(), ( "Message: " + ( ( udg_PlayerColor[udg_x] + ( GetPlayerName(ConvertedPlayer(udg_x)) + udg_EndParam ) ) + ( ( udg_Default + ( " has random picked " + udg_EndParam ) ) + ( udg_Default2 + ( GetUnitName(GetLastCreatedUnit()) + udg_EndParam ) ) ) ) ) )
call UnitAddAbilityBJ( 'Avul', GetLastCreatedUnit() )
else
call DoNothing( )
endif
call TriggerSleepAction( 0.50 )
call ForForce( GetPlayersByMapControl(MAP_CONTROL_COMPUTER), function Trig_Random_Unit_Copy_Func023A )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 10
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call ShowUnitHide( udg_UnitVar[GetForLoopIndexA()] )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call DisableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Random_Unit_2 takes nothing returns nothing
set gg_trg_Random_Unit_2 = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Random_Unit_2, 35.00 )
call TriggerAddAction( gg_trg_Random_Unit_2, function Trig_Random_Unit_Copy_Actions )
endfunction