//TESH.scrollpos=25
//TESH.alwaysfold=0
function Trig_Matchup_Func001002002001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Matchup_Func001002002002 takes nothing returns boolean
return ( GetPlayerController(GetOwningPlayer(GetFilterUnit())) == MAP_CONTROL_USER )
endfunction
function Trig_Matchup_Func001002002 takes nothing returns boolean
return GetBooleanAnd( Trig_Matchup_Func001002002001(), Trig_Matchup_Func001002002002() )
endfunction
function Trig_Matchup_Func002Func001C takes nothing returns boolean
if ( not ( IsPlayerEnemy(GetOwningPlayer(GetEnumUnit()), GetTriggerPlayer()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Matchup_Func002A takes nothing returns nothing
if ( Trig_Matchup_Func002Func001C() ) then
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), ( ( "|cffFEFFD7" + ( GetPlayerName(GetOwningPlayer(GetEnumUnit())) + "|r" ) ) + ( " memegang hero " + ( ( "|cff01A2FF" + GetUnitName(GetEnumUnit()) ) + ( " |c004e2a04Telah menginjak Level |r|c007ebff1" + ( I2S(GetHeroLevel(GetEnumUnit())) + "|r" ) ) ) ) ) )
else
endif
endfunction
function Trig_Matchup_Actions takes nothing returns nothing
local group APALU = GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Matchup_Func001002002))
call ForGroupBJ( APALU, function Trig_Matchup_Func002A )
call TriggerSleepAction( 1.00 )
call DestroyGroup(APALU)
set APALU = null
endfunction
//===========================================================================
function InitTrig_Matchup takes nothing returns nothing
set gg_trg_Matchup = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Matchup, Player(1), "-ma", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Matchup, Player(6), "-ma", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Matchup, Player(0), "-ma", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Matchup, Player(2), "-ma", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Matchup, Player(3), "-ma", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Matchup, Player(4), "-ma", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Matchup, Player(5), "-ma", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Matchup, Player(7), "-ma", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Matchup, Player(8), "-ma", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Matchup, Player(9), "-ma", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Matchup, Player(10), "-ma", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Matchup, Player(11), "-ma", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Matchup, Player(1), "-matchup", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Matchup, Player(0), "-matchup", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Matchup, Player(6), "-matchup", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Matchup, Player(2), "-matchup", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Matchup, Player(3), "-matchup", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Matchup, Player(4), "-matchup", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Matchup, Player(5), "-matchup", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Matchup, Player(7), "-matchup", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Matchup, Player(8), "-matchup", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Matchup, Player(9), "-matchup", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Matchup, Player(10), "-matchup", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Matchup, Player(11), "-matchup", true )
call TriggerAddAction( gg_trg_Matchup, function Trig_Matchup_Actions )
endfunction