Name | Type | is_array | initial_value |
AllSheep | unit | Yes | |
AllSheepAmount | integer | No | 0 |
AllSheepCounter | integer | No | 0 |
Awards | timer | No | |
Awards_Win | timerdialog | No | |
BabyAnimals | group | No | |
CycleLen | real | No | 0.09 |
FeedRad | real | No | 300.00 |
Fetuses | group | No | |
MateRad | real | No | 400.00 |
score_Largest_Herd | integer | Yes | 4 |
score_Lost_Child | integer | Yes | 0 |
score_Lost_Mature | integer | Yes | 0 |
score_Lost_Slain | integer | Yes | 0 |
score_Lost_Starved | integer | Yes | 0 |
score_LS_Born | integer | Yes | 0 |
score_LS_Concieved | integer | Yes | 0 |
score_LS_Matured | integer | Yes | 0 |
score_Meat_LostToTheif | integer | Yes | 0 |
score_Meat_Plundered | integer | Yes | 0 |
score_Meat_Produced | integer | Yes | 0 |
score_Total | integer | Yes | 0 |
SheepThought | integer | No | 0 |
TempInt | integer | No | 0 |
TempIntB | integer | No | 0 |
TempIntC | integer | No | 0 |
TempPlrGrp | force | No | |
TempUnit | unit | No | |
TempUnitB | unit | No | |
TempUnitGrp | group | No | |
WalkRad | real | No | 300.00 |
function Trig_init_Func002A takes nothing returns nothing
call SetPlayerStateBJ( GetEnumPlayer(), PLAYER_STATE_RESOURCE_GOLD, 1500 )
endfunction
function Trig_init_Func011A takes nothing returns nothing
call ReplaceUnitBJ( GetEnumUnit(), 'nshe', bj_UNIT_STATE_METHOD_RELATIVE )
endfunction
function Trig_init_Func012A takes nothing returns nothing
call ReplaceUnitBJ( GetEnumUnit(), 'n000', bj_UNIT_STATE_METHOD_RELATIVE )
endfunction
function Trig_init_Actions takes nothing returns nothing
call StopMusicBJ( false )
call ForForce( GetPlayersAll(), function Trig_init_Func002A )
call CreateTextTagUnitBJ( "TRIGSTR_101", gg_unit_ncp3_0015, 0, 10, 100, 100, 100, 0 )
call CreateTextTagUnitBJ( "TRIGSTR_102", gg_unit_ncp3_0016, 0, 10, 100, 100, 100, 0 )
call CreateTextTagUnitBJ( "TRIGSTR_103", gg_unit_ncop_0013, 0, 10, 100, 100, 100, 0 )
call CreateTextTagUnitBJ( "TRIGSTR_104", gg_unit_ncop_0014, 0, 10, 100, 100, 100, 0 )
call SetUnitVertexColorBJ( gg_unit_ncp3_0015, 100, 0.00, 0.00, 0 )
call SetUnitVertexColorBJ( gg_unit_ncop_0013, 100, 0.00, 0.00, 0 )
call SetUnitVertexColorBJ( gg_unit_ncp3_0016, 0.00, 0.00, 100.00, 0 )
call SetUnitVertexColorBJ( gg_unit_ncop_0014, 0.00, 0.00, 100.00, 0 )
call ForGroupBJ( GetUnitsOfTypeIdAll('nshe'), function Trig_init_Func011A )
call ForGroupBJ( GetUnitsOfTypeIdAll('n000'), function Trig_init_Func012A )
endfunction
//===========================================================================
function InitTrig_init takes nothing returns nothing
set gg_trg_init = CreateTrigger( )
call TriggerAddAction( gg_trg_init, function Trig_init_Actions )
endfunction
function Trig_ALPHA_SHEEP_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'n004' ) ) then
return false
endif
return true
endfunction
function Trig_ALPHA_SHEEP_Func002002001003001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_ANCIENT) == true )
endfunction
function Trig_ALPHA_SHEEP_Func002002001003002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_SAPPER) == true )
endfunction
function Trig_ALPHA_SHEEP_Func002002001003 takes nothing returns boolean
return GetBooleanAnd( Trig_ALPHA_SHEEP_Func002002001003001(), Trig_ALPHA_SHEEP_Func002002001003002() )
endfunction
function Trig_ALPHA_SHEEP_Func005C takes nothing returns boolean
if ( not ( IsUnitAliveBJ(GetTriggerUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_ALPHA_SHEEP_Actions takes nothing returns nothing
call TriggerSleepAction( 5.50 )
set udg_TempUnit = GroupPickRandomUnit(GetUnitsInRangeOfLocMatching(1000.00, GetUnitLoc(GetTriggerUnit()), Condition(function Trig_ALPHA_SHEEP_Func002002001003)))
call IssueTargetOrderBJ( GetTriggerUnit(), "heal", udg_TempUnit )
call TriggerSleepAction( 0.50 )
if ( Trig_ALPHA_SHEEP_Func005C() ) then
call TriggerExecute( GetTriggeringTrigger() )
else
endif
endfunction
//===========================================================================
function InitTrig_ALPHA_SHEEP takes nothing returns nothing
set gg_trg_ALPHA_SHEEP = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_ALPHA_SHEEP, GetPlayableMapRect() )
call TriggerAddCondition( gg_trg_ALPHA_SHEEP, Condition( function Trig_ALPHA_SHEEP_Conditions ) )
call TriggerAddAction( gg_trg_ALPHA_SHEEP, function Trig_ALPHA_SHEEP_Actions )
endfunction
function Trig_Defeat_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_PEON) == true ) ) then
return false
endif
return true
endfunction
function Trig_Defeat_Func002001002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_Defeat_Func002A takes nothing returns nothing
call SetUnitOwner( GetEnumUnit(), Player(PLAYER_NEUTRAL_PASSIVE), false )
endfunction
function Trig_Defeat_Actions takes nothing returns nothing
call DisplayTimedTextToForce( GetPlayersAll(), 60.00, ( ( "|CFFffff00" + GetPlayerName(GetOwningPlayer(GetTriggerUnit())) ) + "|R has failed to survive." ) )
call ForGroupBJ( GetUnitsOfPlayerMatching(GetOwningPlayer(GetTriggerUnit()), Condition(function Trig_Defeat_Func002001002)), function Trig_Defeat_Func002A )
endfunction
//===========================================================================
function InitTrig_Defeat takes nothing returns nothing
set gg_trg_Defeat = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Defeat, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Defeat, Condition( function Trig_Defeat_Conditions ) )
call TriggerAddAction( gg_trg_Defeat, function Trig_Defeat_Actions )
endfunction
function Trig_Auto_Mate_Conditions takes nothing returns boolean
if ( not ( IsUnitType(udg_TempUnit, UNIT_TYPE_SAPPER) == false ) ) then
return false
endif
return true
endfunction
function Trig_Auto_Mate_Func002002001003001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_ANCIENT) == true )
endfunction
function Trig_Auto_Mate_Func002002001003002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_SAPPER) == true )
endfunction
function Trig_Auto_Mate_Func002002001003 takes nothing returns boolean
return GetBooleanAnd( Trig_Auto_Mate_Func002002001003001(), Trig_Auto_Mate_Func002002001003002() )
endfunction
function Trig_Auto_Mate_Actions takes nothing returns nothing
set udg_TempUnitB = GroupPickRandomUnit(GetUnitsInRangeOfLocMatching(udg_MateRad, GetUnitLoc(udg_TempUnit), Condition(function Trig_Auto_Mate_Func002002001003)))
call IssueTargetOrderBJ( udg_TempUnit, "heal", udg_TempUnitB )
// call DisplayTextToPlayer( GetOwningPlayer(udg_TempUnitB),0,0, "Sheep Issued Order To Mate")
endfunction
//===========================================================================
function InitTrig_Auto_Mate takes nothing returns nothing
set gg_trg_Auto_Mate = CreateTrigger( )
call TriggerAddCondition( gg_trg_Auto_Mate, Condition( function Trig_Auto_Mate_Conditions ) )
call TriggerAddAction( gg_trg_Auto_Mate, function Trig_Auto_Mate_Actions )
endfunction
function Trig_Mate_Func002C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A001' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A00C' ) ) then
return true
endif
return false
endfunction
function Trig_Mate_Conditions takes nothing returns boolean
if ( not Trig_Mate_Func002C() ) then
return false
endif
return true
endfunction
function Trig_Mate_Actions takes nothing returns nothing
call PlaySoundOnUnitBJ( gg_snd_Sheep1, 100, GetSpellTargetUnit() )
call CreateNUnitsAtLocFacingLocBJ( 1, 'n001', GetOwningPlayer(GetSpellTargetUnit()), GetUnitLoc(GetSpellTargetUnit()), GetUnitLoc(GetSpellTargetUnit()) )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "board", GetSpellTargetUnit() )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_Fetuses )
endfunction
//===========================================================================
function InitTrig_Mate takes nothing returns nothing
set gg_trg_Mate = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Mate, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Mate, Condition( function Trig_Mate_Conditions ) )
call TriggerAddAction( gg_trg_Mate, function Trig_Mate_Actions )
endfunction
function Trig_Aborted_Fetus_Func001001002001001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_ANCIENT) == true )
endfunction
function Trig_Aborted_Fetus_Func001001002001002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_MECHANICAL) == true )
endfunction
function Trig_Aborted_Fetus_Func001001002001 takes nothing returns boolean
return GetBooleanAnd( Trig_Aborted_Fetus_Func001001002001001(), Trig_Aborted_Fetus_Func001001002001002() )
endfunction
function Trig_Aborted_Fetus_Func001001002002 takes nothing returns boolean
return ( IsUnitLoadedBJ(GetFilterUnit()) == false )
endfunction
function Trig_Aborted_Fetus_Func001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Aborted_Fetus_Func001001002001(), Trig_Aborted_Fetus_Func001001002002() )
endfunction
function Trig_Aborted_Fetus_Func001A takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Aborted_Fetus_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Aborted_Fetus_Func001001002)), function Trig_Aborted_Fetus_Func001A )
endfunction
//===========================================================================
function InitTrig_Aborted_Fetus takes nothing returns nothing
set gg_trg_Aborted_Fetus = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Aborted_Fetus, 30.00 )
call TriggerAddAction( gg_trg_Aborted_Fetus, function Trig_Aborted_Fetus_Actions )
endfunction
function Trig_Birth_Func002Func001Func001002001002 takes nothing returns boolean
return ( IsUnitInTransportBJ(GetEnumUnit(), GetFilterUnit()) == true )
endfunction
function Trig_Birth_Func002Func001Func003Func001C takes nothing returns boolean
if ( not ( GetRandomInt(1, 2) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Birth_Func002Func001Func003C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n001' ) ) then
return false
endif
return true
endfunction
function Trig_Birth_Func002Func001Func011002001002001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_ANCIENT) == true )
endfunction
function Trig_Birth_Func002Func001Func011002001002002001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_MECHANICAL) == false )
endfunction
function Trig_Birth_Func002Func001Func011002001002002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Birth_Func002Func001Func011002001002002 takes nothing returns boolean
return GetBooleanAnd( Trig_Birth_Func002Func001Func011002001002002001(), Trig_Birth_Func002Func001Func011002001002002002() )
endfunction
function Trig_Birth_Func002Func001Func011002001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Birth_Func002Func001Func011002001002001(), Trig_Birth_Func002Func001Func011002001002002() )
endfunction
function Trig_Birth_Func002Func001Func012C takes nothing returns boolean
if ( not ( udg_TempInt > udg_score_Largest_Herd[GetConvertedPlayerId(GetOwningPlayer(GetLastCreatedUnit()))] ) ) then
return false
endif
return true
endfunction
function Trig_Birth_Func002Func001C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Birth_Func002A takes nothing returns nothing
if ( Trig_Birth_Func002Func001C() ) then
set udg_TempUnit = GroupPickRandomUnit(GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Birth_Func002Func001Func001002001002)))
// Sheep Fetus
if ( Trig_Birth_Func002Func001Func003C() ) then
if ( Trig_Birth_Func002Func001Func003Func001C() ) then
call CreateNUnitsAtLoc( 1, 'n002', GetOwningPlayer(GetEnumUnit()), GetUnitLoc(udg_TempUnit), bj_UNIT_FACING )
else
call CreateNUnitsAtLoc( 1, 'n003', GetOwningPlayer(GetEnumUnit()), GetUnitLoc(udg_TempUnit), bj_UNIT_FACING )
endif
else
endif
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_BabyAnimals )
call AddSpecialEffectTargetUnitBJ( "origin", GetLastCreatedUnit(), "Objects\\Spawnmodels\\Human\\HumanLargeDeathExplode\\HumanLargeDeathExplode.mdl" )
// now remove the fetus
call RemoveUnit( GetEnumUnit() )
// Counter
set udg_score_LS_Born[GetConvertedPlayerId(GetOwningPlayer(GetLastCreatedUnit()))] = ( udg_score_LS_Born[GetConvertedPlayerId(GetOwningPlayer(GetLastCreatedUnit()))] + 1 )
// Compare current count for largest herd
set udg_TempInt = CountUnitsInGroup(GetUnitsOfPlayerMatching(GetOwningPlayer(GetLastCreatedUnit()), Condition(function Trig_Birth_Func002Func001Func011002001002)))
if ( Trig_Birth_Func002Func001Func012C() ) then
set udg_score_Largest_Herd[GetConvertedPlayerId(GetOwningPlayer(GetLastCreatedUnit()))] = udg_TempInt
else
endif
else
endif
endfunction
function Trig_Birth_Actions takes nothing returns nothing
call ForGroupBJ( udg_Fetuses, function Trig_Birth_Func002A )
endfunction
//===========================================================================
function InitTrig_Birth takes nothing returns nothing
set gg_trg_Birth = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Birth, 10.00 )
call TriggerAddAction( gg_trg_Birth, function Trig_Birth_Actions )
endfunction
function Trig_Grow_up_Func001C takes nothing returns boolean
if ( ( GetUnitTypeId(udg_TempUnit) == 'n002' ) ) then
return true
endif
if ( ( GetUnitTypeId(udg_TempUnit) == 'n003' ) ) then
return true
endif
return false
endfunction
function Trig_Grow_up_Conditions takes nothing returns boolean
if ( not Trig_Grow_up_Func001C() ) then
return false
endif
return true
endfunction
function Trig_Grow_up_Func002Func004Func001Func001C takes nothing returns boolean
if ( not ( GetPlayerTechCountSimple('R005', GetOwningPlayer(udg_TempUnit)) == 1 ) ) then
return false
endif
if ( not ( udg_TempInt <= 20 ) ) then
return false
endif
return true
endfunction
function Trig_Grow_up_Func002Func004Func001C takes nothing returns boolean
if ( not ( GetPlayerTechCountSimple('R000', GetOwningPlayer(udg_TempUnit)) == 1 ) ) then
return false
endif
if ( not ( udg_TempInt <= 10 ) ) then
return false
endif
return true
endfunction
function Trig_Grow_up_Func002Func004C takes nothing returns boolean
if ( not ( GetUnitTypeId(udg_TempUnit) == 'n002' ) ) then
return false
endif
return true
endfunction
function Trig_Grow_up_Func002Func005Func001C takes nothing returns boolean
if ( not ( GetPlayerTechCountSimple('R005', GetOwningPlayer(udg_TempUnit)) == 1 ) ) then
return false
endif
if ( not ( udg_TempInt <= 10 ) ) then
return false
endif
return true
endfunction
function Trig_Grow_up_Func002Func005C takes nothing returns boolean
if ( not ( GetUnitTypeId(udg_TempUnit) == 'n003' ) ) then
return false
endif
return true
endfunction
function Trig_Grow_up_Func002C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, udg_TempUnit) == GetUnitStateSwap(UNIT_STATE_MAX_MANA, udg_TempUnit) ) ) then
return false
endif
return true
endfunction
function Trig_Grow_up_Actions takes nothing returns nothing
if ( Trig_Grow_up_Func002C() ) then
call SetUnitManaBJ( GetEnumUnit(), 0 )
set udg_TempInt = GetRandomInt(1, 100)
// Lamb
if ( Trig_Grow_up_Func002Func004C() ) then
if ( Trig_Grow_up_Func002Func004Func001C() ) then
call ReplaceUnitBJ( udg_TempUnit, 'n004', bj_UNIT_STATE_METHOD_RELATIVE )
else
if ( Trig_Grow_up_Func002Func004Func001Func001C() ) then
call ReplaceUnitBJ( udg_TempUnit, 'n005', bj_UNIT_STATE_METHOD_RELATIVE )
else
call ReplaceUnitBJ( udg_TempUnit, 'nshe', bj_UNIT_STATE_METHOD_RELATIVE )
endif
endif
else
endif
if ( Trig_Grow_up_Func002Func005C() ) then
if ( Trig_Grow_up_Func002Func005Func001C() ) then
call ReplaceUnitBJ( udg_TempUnit, 'n005', bj_UNIT_STATE_METHOD_RELATIVE )
else
call ReplaceUnitBJ( udg_TempUnit, 'n000', bj_UNIT_STATE_METHOD_RELATIVE )
endif
else
endif
// Counter
set udg_score_LS_Matured[GetConvertedPlayerId(GetOwningPlayer(GetLastReplacedUnitBJ()))] = ( udg_score_LS_Matured[GetConvertedPlayerId(GetOwningPlayer(GetLastReplacedUnitBJ()))] + 1 )
else
endif
endfunction
//===========================================================================
function InitTrig_Grow_up takes nothing returns nothing
set gg_trg_Grow_up = CreateTrigger( )
call TriggerAddCondition( gg_trg_Grow_up, Condition( function Trig_Grow_up_Conditions ) )
call TriggerAddAction( gg_trg_Grow_up, function Trig_Grow_up_Actions )
endfunction
function Trig_Count_Concieved_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetLoadedUnitBJ(), UNIT_TYPE_ANCIENT) == true ) ) then
return false
endif
return true
endfunction
function Trig_Count_Concieved_Actions takes nothing returns nothing
set udg_score_LS_Concieved[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_score_LS_Concieved[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
endfunction
//===========================================================================
function InitTrig_Count_Concieved takes nothing returns nothing
set gg_trg_Count_Concieved = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Count_Concieved, EVENT_PLAYER_UNIT_LOADED )
call TriggerAddCondition( gg_trg_Count_Concieved, Condition( function Trig_Count_Concieved_Conditions ) )
call TriggerAddAction( gg_trg_Count_Concieved, function Trig_Count_Concieved_Actions )
endfunction
function Trig_farm_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'hhou' ) ) then
return false
endif
return true
endfunction
function Trig_farm_Func003C takes nothing returns boolean
if ( not ( IsUnitAliveBJ(GetTriggerUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_farm_Actions takes nothing returns nothing
call CreateItemLoc( 'I000', GetUnitLoc(GetTriggerUnit()) )
call TriggerSleepAction( 40.00 )
if ( Trig_farm_Func003C() ) then
call TriggerExecute( GetTriggeringTrigger() )
else
endif
endfunction
//===========================================================================
function InitTrig_farm takes nothing returns nothing
set gg_trg_farm = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_farm, EVENT_PLAYER_UNIT_CONSTRUCT_FINISH )
call TriggerAddCondition( gg_trg_farm, Condition( function Trig_farm_Conditions ) )
call TriggerAddAction( gg_trg_farm, function Trig_farm_Actions )
endfunction
function Trig_crop_decay_Func001Func001001 takes nothing returns boolean
return ( GetItemTypeId(GetEnumItem()) == 'I000' )
endfunction
function Trig_crop_decay_Func001A takes nothing returns nothing
if ( Trig_crop_decay_Func001Func001001() ) then
call SetItemLifeBJ( GetEnumItem(), ( GetItemLifeBJ(GetEnumItem()) - 15.00 ) )
else
call DoNothing( )
endif
endfunction
function Trig_crop_decay_Actions takes nothing returns nothing
call EnumItemsInRectBJ( GetPlayableMapRect(), function Trig_crop_decay_Func001A )
endfunction
//===========================================================================
function InitTrig_crop_decay takes nothing returns nothing
set gg_trg_crop_decay = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_crop_decay, 30.00 )
call TriggerAddAction( gg_trg_crop_decay, function Trig_crop_decay_Actions )
endfunction
function Trig_sheep_crops_bonus_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I000' ) ) then
return false
endif
return true
endfunction
function Trig_sheep_crops_bonus_Func001C takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_ANCIENT) == true ) ) then
return false
endif
return true
endfunction
function Trig_sheep_crops_bonus_Actions takes nothing returns nothing
if ( Trig_sheep_crops_bonus_Func001C() ) then
call SetUnitLifeBJ( GetTriggerUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetTriggerUnit()) + 10.00 ) )
else
call SetUnitLifeBJ( GetTriggerUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetTriggerUnit()) + 0.10 ) )
endif
endfunction
//===========================================================================
function InitTrig_sheep_crops_bonus takes nothing returns nothing
set gg_trg_sheep_crops_bonus = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_sheep_crops_bonus, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_sheep_crops_bonus, Condition( function Trig_sheep_crops_bonus_Conditions ) )
call TriggerAddAction( gg_trg_sheep_crops_bonus, function Trig_sheep_crops_bonus_Actions )
endfunction
function Trig_Meat_Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I001' ) ) then
return false
endif
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_ANCIENT) == false ) ) then
return false
endif
return true
endfunction
function Trig_Meat_Func002C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I004' ) ) then
return false
endif
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_ANCIENT) == false ) ) then
return false
endif
return true
endfunction
function Trig_Meat_Actions takes nothing returns nothing
if ( Trig_Meat_Func001C() ) then
call SetUnitLifeBJ( GetTriggerUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetTriggerUnit()) + 50.00 ) )
else
endif
if ( Trig_Meat_Func002C() ) then
call SetUnitLifeBJ( GetTriggerUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetTriggerUnit()) + 100.00 ) )
else
endif
endfunction
//===========================================================================
function InitTrig_Meat takes nothing returns nothing
set gg_trg_Meat = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Meat, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddAction( gg_trg_Meat, function Trig_Meat_Actions )
endfunction
function Trig_slaughter_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A004' ) ) then
return false
endif
return true
endfunction
function Trig_slaughter_Func004Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSpellTargetUnit()) == 'n005' ) ) then
return false
endif
return true
endfunction
function Trig_slaughter_Func004Func001Func003C takes nothing returns boolean
if ( ( GetUnitTypeId(GetSpellTargetUnit()) == 'n002' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetSpellTargetUnit()) == 'n003' ) ) then
return true
endif
return false
endfunction
function Trig_slaughter_Func004Func001C takes nothing returns boolean
if ( not Trig_slaughter_Func004Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_slaughter_Func004Func004C takes nothing returns boolean
if ( ( GetUnitTypeId(GetSpellTargetUnit()) == 'nshe' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetSpellTargetUnit()) == 'n000' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetSpellTargetUnit()) == 'n004' ) ) then
return true
endif
return false
endfunction
function Trig_slaughter_Func004C takes nothing returns boolean
if ( not Trig_slaughter_Func004Func004C() ) then
return false
endif
return true
endfunction
function Trig_slaughter_Func006Func001Func001C takes nothing returns boolean
if ( not ( udg_TempIntB == 2 ) ) then
return false
endif
return true
endfunction
function Trig_slaughter_Func006Func001C takes nothing returns boolean
if ( not ( udg_TempIntB == 1 ) ) then
return false
endif
return true
endfunction
function Trig_slaughter_Func008Func001C takes nothing returns boolean
if ( not ( IsPlayerAlly(GetOwningPlayer(GetTriggerUnit()), GetOwningPlayer(GetSpellTargetUnit())) == true ) ) then
return false
endif
return true
endfunction
function Trig_slaughter_Func008C takes nothing returns boolean
if ( not ( udg_TempIntB == 1 ) ) then
return false
endif
return true
endfunction
function Trig_slaughter_Func009Func001C takes nothing returns boolean
if ( not ( IsPlayerAlly(GetOwningPlayer(GetTriggerUnit()), GetOwningPlayer(GetSpellTargetUnit())) == true ) ) then
return false
endif
return true
endfunction
function Trig_slaughter_Func009C takes nothing returns boolean
if ( not ( udg_TempIntB == 2 ) ) then
return false
endif
return true
endfunction
function Trig_slaughter_Actions takes nothing returns nothing
set udg_TempInt = 1
set udg_TempIntB = 1
// Sheep
if ( Trig_slaughter_Func004C() ) then
set udg_TempInt = 2
set udg_TempIntB = 2
else
if ( Trig_slaughter_Func004Func001C() ) then
set udg_TempInt = 1
else
if ( Trig_slaughter_Func004Func001Func001C() ) then
set udg_TempInt = 4
set udg_TempIntB = 2
else
endif
endif
endif
// -----
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = udg_TempInt
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_slaughter_Func006Func001C() ) then
call CreateItemLoc( 'I001', GetUnitLoc(GetSpellTargetUnit()) )
else
if ( Trig_slaughter_Func006Func001Func001C() ) then
call CreateItemLoc( 'I004', GetUnitLoc(GetSpellTargetUnit()) )
else
endif
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
// Scoring
if ( Trig_slaughter_Func008C() ) then
if ( Trig_slaughter_Func008Func001C() ) then
set udg_score_Meat_Produced[GetConvertedPlayerId(GetOwningPlayer(GetSpellTargetUnit()))] = ( udg_score_Meat_Produced[GetConvertedPlayerId(GetOwningPlayer(GetSpellTargetUnit()))] + ( 50 * udg_TempInt ) )
else
set udg_score_Meat_Plundered[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_score_Meat_Plundered[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + ( 50 * udg_TempInt ) )
set udg_score_Meat_LostToTheif[GetConvertedPlayerId(GetOwningPlayer(GetSpellTargetUnit()))] = ( udg_score_Meat_LostToTheif[GetConvertedPlayerId(GetOwningPlayer(GetSpellTargetUnit()))] + ( 50 * udg_TempInt ) )
endif
else
endif
if ( Trig_slaughter_Func009C() ) then
if ( Trig_slaughter_Func009Func001C() ) then
set udg_score_Meat_Produced[GetConvertedPlayerId(GetOwningPlayer(GetSpellTargetUnit()))] = ( udg_score_Meat_Produced[GetConvertedPlayerId(GetOwningPlayer(GetSpellTargetUnit()))] + ( 100 * udg_TempInt ) )
else
set udg_score_Meat_Plundered[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_score_Meat_Plundered[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + ( 100 * udg_TempInt ) )
set udg_score_Meat_LostToTheif[GetConvertedPlayerId(GetOwningPlayer(GetSpellTargetUnit()))] = ( udg_score_Meat_LostToTheif[GetConvertedPlayerId(GetOwningPlayer(GetSpellTargetUnit()))] + ( 100 * udg_TempInt ) )
endif
else
endif
call DisableTrigger( gg_trg_count_death_type )
call ExplodeUnitBJ( GetSpellTargetUnit() )
call EnableTrigger( gg_trg_count_death_type )
endfunction
//===========================================================================
function InitTrig_slaughter takes nothing returns nothing
set gg_trg_slaughter = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_slaughter, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_slaughter, Condition( function Trig_slaughter_Conditions ) )
call TriggerAddAction( gg_trg_slaughter, function Trig_slaughter_Actions )
endfunction
function Trig_count_death_type_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_ANCIENT) == true ) ) then
return false
endif
return true
endfunction
function Trig_count_death_type_Func002C takes nothing returns boolean
if ( not ( IsUnitInGroup(GetTriggerUnit(), udg_BabyAnimals) == true ) ) then
return false
endif
return true
endfunction
function Trig_count_death_type_Actions takes nothing returns nothing
if ( Trig_count_death_type_Func002C() ) then
set udg_score_Lost_Child[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_score_Lost_Child[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
else
set udg_score_Lost_Mature[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_score_Lost_Mature[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
endif
endfunction
//===========================================================================
function InitTrig_count_death_type takes nothing returns nothing
set gg_trg_count_death_type = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_count_death_type, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_count_death_type, Condition( function Trig_count_death_type_Conditions ) )
call TriggerAddAction( gg_trg_count_death_type, function Trig_count_death_type_Actions )
endfunction
function Trig_board_init_Actions takes nothing returns nothing
call CreateMultiboardBJ( 5, 9, "TRIGSTR_056" )
call MultiboardSetItemStyleBJ( GetLastCreatedMultiboard(), 0, 0, true, false )
call MultiboardSetItemStyleBJ( GetLastCreatedMultiboard(), 1, 0, false, true )
call MultiboardSetItemStyleBJ( GetLastCreatedMultiboard(), 1, 1, false, false )
call MultiboardSetItemIconBJ( GetLastCreatedMultiboard(), 1, 0, "ReplaceableTextures\\CommandButtons\\BTNFarm.blp" )
call MultiboardSetItemWidthBJ( GetLastCreatedMultiboard(), 1, 0, 1.50 )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 3, 1, "TRIGSTR_057" )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 4, 1, "TRIGSTR_058" )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 5, 1, "TRIGSTR_059" )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 2, ( 1 + GetForLoopIndexA() ), GetPlayerName(ConvertedPlayer(GetForLoopIndexA())) )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call MultiboardSetItemWidthBJ( GetLastCreatedMultiboard(), 2, 0, 8.00 )
call MultiboardSetItemColorBJ( GetLastCreatedMultiboard(), 0, 1, 75.00, 75.00, 0.00, 0 )
set udg_TempInt = 2
call MultiboardSetItemColorBJ( GetLastCreatedMultiboard(), 0, udg_TempInt, 100, 0.00, 0.00, 0 )
set udg_TempInt = ( udg_TempInt + 1 )
call MultiboardSetItemColorBJ( GetLastCreatedMultiboard(), 0, udg_TempInt, 0.00, 0.00, 100.00, 0 )
set udg_TempInt = ( udg_TempInt + 1 )
call MultiboardSetItemColorBJ( GetLastCreatedMultiboard(), 0, udg_TempInt, 0.00, 100.00, 100.00, 0 )
set udg_TempInt = ( udg_TempInt + 1 )
call MultiboardSetItemColorBJ( GetLastCreatedMultiboard(), 0, udg_TempInt, 50.00, 0.00, 50.00, 0 )
set udg_TempInt = ( udg_TempInt + 1 )
call MultiboardSetItemColorBJ( GetLastCreatedMultiboard(), 0, udg_TempInt, 100.00, 100.00, 0.00, 0 )
set udg_TempInt = ( udg_TempInt + 1 )
call MultiboardSetItemColorBJ( GetLastCreatedMultiboard(), 0, udg_TempInt, 75.00, 75.00, 0.00, 0 )
set udg_TempInt = ( udg_TempInt + 1 )
call MultiboardSetItemColorBJ( GetLastCreatedMultiboard(), 0, udg_TempInt, 0.00, 100.00, 0.00, 0 )
set udg_TempInt = ( udg_TempInt + 1 )
call MultiboardSetItemColorBJ( GetLastCreatedMultiboard(), 0, udg_TempInt, 75.00, 0.00, 75.00, 0 )
call MultiboardDisplayBJ( true, GetLastCreatedMultiboard() )
endfunction
//===========================================================================
function InitTrig_board_init takes nothing returns nothing
set gg_trg_board_init = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_board_init, 1.00 )
call TriggerAddAction( gg_trg_board_init, function Trig_board_init_Actions )
endfunction
function Trig_update_Func002Func001002001002001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_ANCIENT) == true )
endfunction
function Trig_update_Func002Func001002001002002001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_MECHANICAL) == false )
endfunction
function Trig_update_Func002Func001002001002002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_update_Func002Func001002001002002 takes nothing returns boolean
return GetBooleanAnd( Trig_update_Func002Func001002001002002001(), Trig_update_Func002Func001002001002002002() )
endfunction
function Trig_update_Func002Func001002001002 takes nothing returns boolean
return GetBooleanAnd( Trig_update_Func002Func001002001002001(), Trig_update_Func002Func001002001002002() )
endfunction
function Trig_update_Actions takes nothing returns nothing
call ConditionalTriggerExecute( gg_trg_Total_Score )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set udg_TempInt = CountUnitsInGroup(GetUnitsOfPlayerMatching(ConvertedPlayer(GetForLoopIndexA()), Condition(function Trig_update_Func002Func001002001002)))
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 3, ( 1 + GetForLoopIndexA() ), I2S(udg_TempInt) )
set udg_TempInt = ( udg_score_Lost_Child[GetForLoopIndexA()] + udg_score_Lost_Mature[GetForLoopIndexA()] )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 4, ( 1 + GetForLoopIndexA() ), I2S(udg_TempInt) )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 5, ( 1 + GetForLoopIndexA() ), I2S(udg_score_Total[GetForLoopIndexA()]) )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_update takes nothing returns nothing
set gg_trg_update = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_update, 5.00 )
call TriggerAddAction( gg_trg_update, function Trig_update_Actions )
endfunction
function Trig_query_stats_Func003C takes nothing returns boolean
if ( not ( udg_TempInt >= 1 ) ) then
return false
endif
if ( not ( udg_TempInt <= 12 ) ) then
return false
endif
return true
endfunction
function Trig_query_stats_Actions takes nothing returns nothing
set udg_TempInt = S2I(SubStringBJ(GetEventPlayerChatString(), 8, 9))
set udg_TempPlrGrp = GetForceOfPlayer(GetTriggerPlayer())
if ( Trig_query_stats_Func003C() ) then
call ConditionalTriggerExecute( gg_trg_Show_Stats )
else
endif
endfunction
//===========================================================================
function InitTrig_query_stats takes nothing returns nothing
set gg_trg_query_stats = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_query_stats, Player(0), ".score ", false )
call TriggerRegisterPlayerChatEvent( gg_trg_query_stats, Player(1), ".score ", false )
call TriggerRegisterPlayerChatEvent( gg_trg_query_stats, Player(2), ".score ", false )
call TriggerRegisterPlayerChatEvent( gg_trg_query_stats, Player(3), ".score ", false )
call TriggerRegisterPlayerChatEvent( gg_trg_query_stats, Player(4), ".score ", false )
call TriggerRegisterPlayerChatEvent( gg_trg_query_stats, Player(5), ".score ", false )
call TriggerRegisterPlayerChatEvent( gg_trg_query_stats, Player(6), ".score ", false )
call TriggerRegisterPlayerChatEvent( gg_trg_query_stats, Player(7), ".score ", false )
call TriggerAddAction( gg_trg_query_stats, function Trig_query_stats_Actions )
endfunction
function Trig_Show_Stats_Func017C takes nothing returns boolean
if ( not ( udg_score_Total[udg_TempInt] > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Show_Stats_Actions takes nothing returns nothing
call DisplayTimedTextToForce( udg_TempPlrGrp, 30, ( "|CFF88ffff" + ( GetPlayerName(ConvertedPlayer(udg_TempInt)) + "|R Score:" ) ) )
call DisplayTimedTextToForce( udg_TempPlrGrp, 30, "TRIGSTR_048" )
call DisplayTimedTextToForce( udg_TempPlrGrp, 30, ( "Livestock Concieved: |CFFffff00" + ( I2S(udg_score_LS_Concieved[udg_TempInt]) + ( "|R(+|CFF88ff88" + ( I2S(( udg_score_LS_Concieved[udg_TempInt] * 10 )) + "|R points)" ) ) ) ) )
call DisplayTimedTextToForce( udg_TempPlrGrp, 30, ( "Livestock Born: |CFFffff00" + ( I2S(udg_score_LS_Born[udg_TempInt]) + ( "|R(+|CFF88ff88" + ( I2S(( udg_score_LS_Born[udg_TempInt] * 25 )) + "|R points)" ) ) ) ) )
call DisplayTimedTextToForce( udg_TempPlrGrp, 30, ( "Livestock Matured: |CFFffff00" + ( I2S(udg_score_LS_Matured[udg_TempInt]) + ( "|R(+|CFF88ff88" + ( I2S(( udg_score_LS_Matured[udg_TempInt] * 50 )) + "|R points)" ) ) ) ) )
call DisplayTimedTextToForce( udg_TempPlrGrp, 30, ( "Largest Herd: |CFFffff00" + ( I2S(udg_score_Largest_Herd[udg_TempInt]) + ( "|R(+|CFF88ff88" + ( I2S(( udg_score_Largest_Herd[udg_TempInt] * 25 )) + "|R points)" ) ) ) ) )
call DisplayTimedTextToForce( udg_TempPlrGrp, 30, ( "Meat Produced: |CFFffff00" + ( I2S(udg_score_Meat_Produced[udg_TempInt]) + ( "|R(+|CFF88ff88" + ( I2S(( udg_score_Meat_Produced[udg_TempInt] / 2 )) + "|R points)" ) ) ) ) )
call DisplayTimedTextToForce( udg_TempPlrGrp, 30, ( "Meat Plundered: |CFFffff00" + ( I2S(udg_score_Meat_Plundered[udg_TempInt]) + ( "|R(+|CFF88ff88" + ( I2S(( udg_score_Meat_Plundered[udg_TempInt] / 2 )) + "|R points)" ) ) ) ) )
call DisplayTimedTextToForce( udg_TempPlrGrp, 30, "TRIGSTR_049" )
call DisplayTimedTextToForce( udg_TempPlrGrp, 30, ( "Child Fatality: |CFFcccc00" + ( I2S(udg_score_Lost_Child[udg_TempInt]) + ( "|R(-|CFFff8888" + ( I2S(( udg_score_Lost_Child[udg_TempInt] * 25 )) + "|R points)" ) ) ) ) )
call DisplayTimedTextToForce( udg_TempPlrGrp, 30, ( "Adult Fatality: |CFFcccc00" + ( I2S(udg_score_Lost_Mature[udg_TempInt]) + ( "|R(-|CFFff8888" + ( I2S(( udg_score_Lost_Mature[udg_TempInt] * 50 )) + "|R points)" ) ) ) ) )
call DisplayTimedTextToForce( udg_TempPlrGrp, 30, ( "Meat Lost to Thief: |CFFcccc00" + ( I2S(udg_score_Meat_LostToTheif[udg_TempInt]) + ( "|R(-|CFFff8888" + ( I2S(( udg_score_Meat_LostToTheif[udg_TempInt] / 2 )) + "|R points)" ) ) ) ) )
if ( Trig_Show_Stats_Func017C() ) then
call DisplayTimedTextToForce( udg_TempPlrGrp, 30, ( " TOTAL SCORE: |CFF88ff88" + ( I2S(udg_score_Total[udg_TempInt]) + "|R points." ) ) )
else
call DisplayTimedTextToForce( udg_TempPlrGrp, 30, ( " TOTAL SCORE: |CFFff8888" + ( I2S(udg_score_Total[udg_TempInt]) + "|R points." ) ) )
endif
endfunction
//===========================================================================
function InitTrig_Show_Stats takes nothing returns nothing
set gg_trg_Show_Stats = CreateTrigger( )
call TriggerAddAction( gg_trg_Show_Stats, function Trig_Show_Stats_Actions )
endfunction
function Trig_Total_Score_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set udg_score_Total[GetForLoopIndexA()] = 0
set udg_score_Total[GetForLoopIndexA()] = ( udg_score_Total[GetForLoopIndexA()] + ( udg_score_LS_Concieved[GetForLoopIndexA()] * 10 ) )
set udg_score_Total[GetForLoopIndexA()] = ( udg_score_Total[GetForLoopIndexA()] + ( udg_score_LS_Born[GetForLoopIndexA()] * 25 ) )
set udg_score_Total[GetForLoopIndexA()] = ( udg_score_Total[GetForLoopIndexA()] + ( udg_score_LS_Matured[GetForLoopIndexA()] * 50 ) )
set udg_score_Total[GetForLoopIndexA()] = ( udg_score_Total[GetForLoopIndexA()] + ( udg_score_Largest_Herd[GetForLoopIndexA()] * 25 ) )
set udg_score_Total[GetForLoopIndexA()] = ( udg_score_Total[GetForLoopIndexA()] + ( udg_score_Meat_Produced[GetForLoopIndexA()] / 2 ) )
set udg_score_Total[GetForLoopIndexA()] = ( udg_score_Total[GetForLoopIndexA()] + ( udg_score_Meat_Plundered[GetForLoopIndexA()] / 2 ) )
// Losses
set udg_score_Total[GetForLoopIndexA()] = ( udg_score_Total[GetForLoopIndexA()] - ( udg_score_Lost_Child[GetForLoopIndexA()] * 25 ) )
set udg_score_Total[GetForLoopIndexA()] = ( udg_score_Total[GetForLoopIndexA()] - ( udg_score_Lost_Mature[GetForLoopIndexA()] * 50 ) )
set udg_score_Total[GetForLoopIndexA()] = ( udg_score_Total[GetForLoopIndexA()] - ( udg_score_Meat_LostToTheif[GetForLoopIndexA()] / 2 ) )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Total_Score takes nothing returns nothing
set gg_trg_Total_Score = CreateTrigger( )
call TriggerAddAction( gg_trg_Total_Score, function Trig_Total_Score_Actions )
endfunction
function Trig_open_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A006' ) ) then
return false
endif
return true
endfunction
function Trig_open_Actions takes nothing returns nothing
call ReplaceUnitBJ( GetTriggerUnit(), 'h004', bj_UNIT_STATE_METHOD_RELATIVE )
call SelectUnitForPlayerSingle( GetLastReplacedUnitBJ(), GetOwningPlayer(GetLastReplacedUnitBJ()) )
call SetUnitAnimation( GetLastReplacedUnitBJ(), "death" )
endfunction
//===========================================================================
function InitTrig_open takes nothing returns nothing
set gg_trg_open = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_open, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_open, Condition( function Trig_open_Conditions ) )
call TriggerAddAction( gg_trg_open, function Trig_open_Actions )
endfunction
function Trig_close_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A007' ) ) then
return false
endif
return true
endfunction
function Trig_close_Func002001003 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_close_Func002A takes nothing returns nothing
call ShowUnitHide( GetEnumUnit() )
call GroupAddUnitSimple( GetEnumUnit(), udg_TempUnitGrp )
endfunction
function Trig_close_Func005A takes nothing returns nothing
call ShowUnitShow( GetEnumUnit() )
call SetUnitPositionLoc( GetEnumUnit(), GetUnitLoc(GetEnumUnit()) )
endfunction
function Trig_close_Actions takes nothing returns nothing
call GroupClear( udg_TempUnitGrp )
call ForGroupBJ( GetUnitsInRangeOfLocMatching(150.00, GetUnitLoc(GetTriggerUnit()), Condition(function Trig_close_Func002001003)), function Trig_close_Func002A )
call ReplaceUnitBJ( GetTriggerUnit(), 'h003', bj_UNIT_STATE_METHOD_RELATIVE )
call SelectUnitForPlayerSingle( GetLastReplacedUnitBJ(), GetOwningPlayer(GetLastReplacedUnitBJ()) )
call ForGroupBJ( udg_TempUnitGrp, function Trig_close_Func005A )
endfunction
//===========================================================================
function InitTrig_close takes nothing returns nothing
set gg_trg_close = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_close, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_close, Condition( function Trig_close_Conditions ) )
call TriggerAddAction( gg_trg_close, function Trig_close_Actions )
endfunction
function Trig_trade_A_Func005001001002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_PEON) == true )
endfunction
function Trig_trade_A_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_PEON) == true ) ) then
return false
endif
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(gg_rct_accept_B, Condition(function Trig_trade_A_Func005001001002))) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_trade_A_Func002002001002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_PEON) == true )
endfunction
function Trig_trade_A_Actions takes nothing returns nothing
set udg_TempUnit = GetTriggerUnit()
set udg_TempUnitB = GroupPickRandomUnit(GetUnitsInRectMatching(gg_rct_accept_B, Condition(function Trig_trade_A_Func002002001002)))
call TriggerExecute( gg_trg_Trade )
endfunction
//===========================================================================
function InitTrig_trade_A takes nothing returns nothing
set gg_trg_trade_A = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_trade_A, gg_rct_accept_A )
call TriggerAddCondition( gg_trg_trade_A, Condition( function Trig_trade_A_Conditions ) )
call TriggerAddAction( gg_trg_trade_A, function Trig_trade_A_Actions )
endfunction
function Trig_trade_B_Func005001001002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_PEON) == true )
endfunction
function Trig_trade_B_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_PEON) == true ) ) then
return false
endif
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(gg_rct_accept_A, Condition(function Trig_trade_B_Func005001001002))) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_trade_B_Func001002001002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_PEON) == true )
endfunction
function Trig_trade_B_Actions takes nothing returns nothing
set udg_TempUnit = GroupPickRandomUnit(GetUnitsInRectMatching(gg_rct_accept_A, Condition(function Trig_trade_B_Func001002001002)))
set udg_TempUnitB = GetTriggerUnit()
call TriggerExecute( gg_trg_Trade )
endfunction
//===========================================================================
function InitTrig_trade_B takes nothing returns nothing
set gg_trg_trade_B = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_trade_B, gg_rct_accept_B )
call TriggerAddCondition( gg_trg_trade_B, Condition( function Trig_trade_B_Conditions ) )
call TriggerAddAction( gg_trg_trade_B, function Trig_trade_B_Actions )
endfunction
function Trig_Trade_Func001A takes nothing returns nothing
call SetUnitOwner( GetEnumUnit(), GetOwningPlayer(udg_TempUnitB), true )
endfunction
function Trig_Trade_Func002A takes nothing returns nothing
call SetUnitOwner( GetEnumUnit(), GetOwningPlayer(udg_TempUnit), true )
endfunction
function Trig_Trade_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_trade_A, GetOwningPlayer(udg_TempUnit)), function Trig_Trade_Func001A )
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_trade_B, GetOwningPlayer(udg_TempUnitB)), function Trig_Trade_Func002A )
endfunction
//===========================================================================
function InitTrig_Trade takes nothing returns nothing
set gg_trg_Trade = CreateTrigger( )
call TriggerAddAction( gg_trg_Trade, function Trig_Trade_Actions )
endfunction
function Trig_Awards_Func005Func001C takes nothing returns boolean
if ( not ( udg_score_Total[GetForLoopIndexA()] > udg_TempInt ) ) then
return false
endif
return true
endfunction
function Trig_Awards_Func011Func001C takes nothing returns boolean
if ( not ( udg_score_Meat_Produced[GetForLoopIndexA()] > udg_TempInt ) ) then
return false
endif
return true
endfunction
function Trig_Awards_Func017Func001C takes nothing returns boolean
if ( not ( udg_score_LS_Matured[GetForLoopIndexA()] > udg_TempInt ) ) then
return false
endif
return true
endfunction
function Trig_Awards_Func023Func001C takes nothing returns boolean
if ( not ( udg_score_Largest_Herd[GetForLoopIndexA()] > udg_TempInt ) ) then
return false
endif
return true
endfunction
function Trig_Awards_Actions takes nothing returns nothing
call DisplayTimedTextToForce( GetPlayersAll(), 30, "TRIGSTR_149" )
set udg_TempInt = 0
set udg_TempIntB = 13
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 12
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Awards_Func005Func001C() ) then
set udg_TempInt = udg_score_Total[GetForLoopIndexA()]
set udg_TempIntB = GetForLoopIndexA()
else
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call DisplayTimedTextToForce( GetPlayersAll(), 30, ( ( "Golden Sheep Award(|CFF88ffffHighest overall score|R) goes to: |CFFffff00" + GetPlayerName(ConvertedPlayer(udg_TempIntB)) ) + "|R Prize: |CFF88ff88100|R wood" ) )
call AdjustPlayerStateBJ( 100, ConvertedPlayer(udg_TempIntB), PLAYER_STATE_RESOURCE_LUMBER )
// -----
set udg_TempInt = 0
set udg_TempIntB = 13
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 12
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Awards_Func011Func001C() ) then
set udg_TempInt = udg_score_Meat_Produced[GetForLoopIndexA()]
set udg_TempIntB = GetForLoopIndexA()
else
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call DisplayTimedTextToForce( GetPlayersAll(), 30, ( ( "Meat Market Award(|CFF88ffffMost meat produced|R) goes to: |CFFffff00" + GetPlayerName(ConvertedPlayer(udg_TempIntB)) ) + "|R Prize: |CFF88ff8850|R wood" ) )
call AdjustPlayerStateBJ( 50, ConvertedPlayer(udg_TempIntB), PLAYER_STATE_RESOURCE_LUMBER )
// -----
set udg_TempInt = 0
set udg_TempIntB = 13
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 12
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Awards_Func017Func001C() ) then
set udg_TempInt = udg_score_LS_Matured[GetForLoopIndexA()]
set udg_TempIntB = GetForLoopIndexA()
else
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call DisplayTimedTextToForce( GetPlayersAll(), 30, ( ( "Breeder Award(|CFF88ffffMost sheep raised to adulthood|R) goes to: |CFFffff00" + GetPlayerName(ConvertedPlayer(udg_TempIntB)) ) + "|R Prize: |CFF88ff8850|R wood" ) )
call AdjustPlayerStateBJ( 50, ConvertedPlayer(udg_TempIntB), PLAYER_STATE_RESOURCE_LUMBER )
// -----
set udg_TempInt = 0
set udg_TempIntB = 13
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 12
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Awards_Func023Func001C() ) then
set udg_TempInt = udg_score_Largest_Herd[GetForLoopIndexA()]
set udg_TempIntB = GetForLoopIndexA()
else
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call DisplayTimedTextToForce( GetPlayersAll(), 30, ( ( "Rancher Award(|CFF88ffffLargest Herd|R) goes to: |CFFffff00" + GetPlayerName(ConvertedPlayer(udg_TempIntB)) ) + "|R Prize: |CFF88ff8850|R wood" ) )
call AdjustPlayerStateBJ( 50, ConvertedPlayer(udg_TempIntB), PLAYER_STATE_RESOURCE_LUMBER )
endfunction
//===========================================================================
function InitTrig_Awards takes nothing returns nothing
set gg_trg_Awards = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_Awards, udg_Awards )
call TriggerAddAction( gg_trg_Awards, function Trig_Awards_Actions )
endfunction
function Trig_award_init_Actions takes nothing returns nothing
call StartTimerBJ( udg_Awards, true, 450.00 )
call CreateTimerDialogBJ( GetLastCreatedTimerBJ(), "TRIGSTR_150" )
set udg_Awards_Win = GetLastCreatedTimerDialogBJ()
endfunction
//===========================================================================
function InitTrig_award_init takes nothing returns nothing
set gg_trg_award_init = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_award_init, 5.00 )
call TriggerAddAction( gg_trg_award_init, function Trig_award_init_Actions )
endfunction
function Trig_Farm_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'hhou' ) ) then
return false
endif
return true
endfunction
function Trig_Farm_Actions takes nothing returns nothing
call SetUnitVertexColorBJ( GetTriggerUnit(), 100, 100, 100, 100.00 )
endfunction
//===========================================================================
function InitTrig_Farm takes nothing returns nothing
set gg_trg_Farm = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Farm, EVENT_PLAYER_UNIT_CONSTRUCT_START )
call TriggerAddCondition( gg_trg_Farm, Condition( function Trig_Farm_Conditions ) )
call TriggerAddAction( gg_trg_Farm, function Trig_Farm_Actions )
endfunction
function Trig_Sheep_Functions_Func002Func001003002001 takes nothing returns boolean
return ( DistanceBetweenPoints(GetUnitLoc(udg_TempUnit), GetItemLoc(GetFilterItem())) <= 400.00 )
endfunction
function Trig_Sheep_Functions_Func002Func001003002002 takes nothing returns boolean
return ( GetItemTypeId(GetFilterItem()) == 'I000' )
endfunction
function Trig_Sheep_Functions_Func002Func001003002 takes nothing returns boolean
return GetBooleanAnd( Trig_Sheep_Functions_Func002Func001003002001(), Trig_Sheep_Functions_Func002Func001003002002() )
endfunction
function Trig_Sheep_Functions_Func002Func002003001003 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'emow' )
endfunction
function Trig_Sheep_Functions_Func002C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_LIFE, udg_TempUnit) < ( GetUnitStateSwap(UNIT_STATE_MAX_LIFE, udg_TempUnit) - 10.00 ) ) ) then
return false
endif
return true
endfunction
function Trig_Sheep_Functions_Func006C takes nothing returns boolean
if ( not ( udg_AllSheepCounter > udg_AllSheepAmount ) ) then
return false
endif
return true
endfunction
function Trig_Sheep_Functions_Actions takes nothing returns nothing
set udg_TempUnit = udg_AllSheep[udg_AllSheepCounter]
set udg_SheepThought = GetRandomInt(0, 4)
if ( Trig_Sheep_Functions_Func002C() and (udg_SheepThought == 1)) then
//call DisplayTextToPlayer(GetOwningPlayer(udg_TempUnit),0,0, "Sheep Issued Order To Feed")
call IssueTargetItemOrder( udg_TempUnit, "smart", RandomItemInRectBJ(GetRectFromCircleBJ(GetUnitLoc(udg_TempUnit), udg_FeedRad), Condition(function Trig_Sheep_Functions_Func002Func001003002002)) )
//call IssueTargetItemOrder( udg_TempUnit, "smart", RandomItemInRectBJ(GetPlayableMapRect(), Condition(function Trig_Sheep_Functions_Func002Func001003002)) )
//call IssueTargetOrderBJ( udg_TempUnit, "smart", GroupPickRandomUnit(GetUnitsInRangeOfLocMatching(300.00, GetUnitLoc(udg_TempUnit), Condition(function Trig_Sheep_Functions_Func002Func002003001003))) )
else
endif
if (udg_SheepThought == 2) then
call ConditionalTriggerExecute( gg_trg_Auto_Mate )
else
endif
if (udg_SheepThought == 3) then
call IssuePointOrderLoc( udg_TempUnit, "move", GetRandomLocInRect(GetRectFromCircleBJ(GetUnitLoc(udg_TempUnit), udg_WalkRad)))
//call DisplayTextToPlayer(GetOwningPlayer(udg_TempUnitB),0,0, "Sheep Issued Order To Move")
else
endif
call ConditionalTriggerExecute( gg_trg_Grow_up )
set udg_AllSheepCounter = ( udg_AllSheepCounter + 1 )
if ( Trig_Sheep_Functions_Func006C() ) then
set udg_AllSheepCounter = 0
set udg_CycleLen = (3 / I2R(udg_AllSheepAmount))
else
endif
endfunction
//===========================================================================
function InitTrig_Sheep_Functions takes nothing returns nothing
set gg_trg_Sheep_Functions = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Sheep_Functions, udg_CycleLen )
call TriggerAddAction( gg_trg_Sheep_Functions, function Trig_Sheep_Functions_Actions )
endfunction
function Trig_eat_3_add_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_ANCIENT) == true ) ) then
return false
endif
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_MECHANICAL) == false ) ) then
return false
endif
return true
endfunction
function Trig_eat_3_add_Actions takes nothing returns nothing
set udg_AllSheep[udg_AllSheepAmount] = GetTriggerUnit()
set udg_AllSheepAmount = ( udg_AllSheepAmount + 1 )
endfunction
//===========================================================================
function InitTrig_eat_3_add takes nothing returns nothing
set gg_trg_eat_3_add = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_eat_3_add, GetPlayableMapRect() )
call TriggerAddCondition( gg_trg_eat_3_add, Condition( function Trig_eat_3_add_Conditions ) )
call TriggerAddAction( gg_trg_eat_3_add, function Trig_eat_3_add_Actions )
endfunction
function Trig_Teir_Upgrade_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_TOWNHALL) == true ) ) then
return false
endif
return true
endfunction
function Trig_Teir_Upgrade_Func002Func002Func001Func004001001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'htow' )
endfunction
function Trig_Teir_Upgrade_Func002Func002Func001Func004001001002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Teir_Upgrade_Func002Func002Func001Func004001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Teir_Upgrade_Func002Func002Func001Func004001001002001(), Trig_Teir_Upgrade_Func002Func002Func001Func004001001002002() )
endfunction
function Trig_Teir_Upgrade_Func002Func002Func001C takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsOfPlayerMatching(GetOwningPlayer(GetTriggerUnit()), Condition(function Trig_Teir_Upgrade_Func002Func002Func001Func004001001002))) >= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Teir_Upgrade_Func002Func002Func004001001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'hkee' )
endfunction
function Trig_Teir_Upgrade_Func002Func002Func004001001002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Teir_Upgrade_Func002Func002Func004001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Teir_Upgrade_Func002Func002Func004001001002001(), Trig_Teir_Upgrade_Func002Func002Func004001001002002() )
endfunction
function Trig_Teir_Upgrade_Func002Func002C takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsOfPlayerMatching(GetOwningPlayer(GetTriggerUnit()), Condition(function Trig_Teir_Upgrade_Func002Func002Func004001001002))) >= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Teir_Upgrade_Func002Func006001001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'hcas' )
endfunction
function Trig_Teir_Upgrade_Func002Func006001001002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Teir_Upgrade_Func002Func006001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Teir_Upgrade_Func002Func006001001002001(), Trig_Teir_Upgrade_Func002Func006001001002002() )
endfunction
function Trig_Teir_Upgrade_Func002C takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsOfPlayerMatching(GetOwningPlayer(GetTriggerUnit()), Condition(function Trig_Teir_Upgrade_Func002Func006001001002))) >= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Teir_Upgrade_Actions takes nothing returns nothing
call TriggerSleepAction( 0.25 )
if ( Trig_Teir_Upgrade_Func002C() ) then
call MultiboardSetItemIconBJ( GetLastCreatedMultiboard(), 1, ( 1 + GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit())) ), "ReplaceableTextures\\CommandButtons\\BTNCastle.blp" )
call DisplayTimedTextToForce( GetPlayersAll(), 30, ( "|CFFffff00" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "|R's farm has become a kingdom." ) ) )
call UnitAddAbilityBJ( 'A00F', GroupPickRandomUnit(GetUnitsOfPlayerAndTypeId(GetOwningPlayer(GetTriggerUnit()), 'hpea')) )
else
call UnitRemoveAbilityBJ( 'A00F', GroupPickRandomUnit(GetUnitsOfPlayerAndTypeId(GetOwningPlayer(GetTriggerUnit()), 'hpea')) )
if ( Trig_Teir_Upgrade_Func002Func002C() ) then
call MultiboardSetItemIconBJ( GetLastCreatedMultiboard(), 1, ( 1 + GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit())) ), "ReplaceableTextures\\CommandButtons\\BTNKeep.blp" )
call DisplayTimedTextToForce( GetPlayersAll(), 30, ( "|CFFffff00" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "|R's farm has become a city." ) ) )
else
if ( Trig_Teir_Upgrade_Func002Func002Func001C() ) then
call MultiboardSetItemIconBJ( GetLastCreatedMultiboard(), 1, ( 1 + GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit())) ), "ReplaceableTextures\\CommandButtons\\BTNTownHall.blp" )
call DisplayTimedTextToForce( GetPlayersAll(), 30, ( "|CFFffff00" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "|R's farm has become a town." ) ) )
else
call MultiboardSetItemIconBJ( GetLastCreatedMultiboard(), 1, ( 1 + GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit())) ), "ReplaceableTextures\\CommandButtons\\BTNFarm.blp" )
endif
endif
endif
endfunction
//===========================================================================
function InitTrig_Teir_Upgrade takes nothing returns nothing
set gg_trg_Teir_Upgrade = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Teir_Upgrade, EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Teir_Upgrade, EVENT_PLAYER_UNIT_CONSTRUCT_FINISH )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Teir_Upgrade, EVENT_PLAYER_UNIT_UPGRADE_FINISH )
call TriggerAddCondition( gg_trg_Teir_Upgrade, Condition( function Trig_Teir_Upgrade_Conditions ) )
call TriggerAddAction( gg_trg_Teir_Upgrade, function Trig_Teir_Upgrade_Actions )
endfunction
function Trig_Music_Actions takes nothing returns nothing
call PlaySoundBJ( gg_snd_OrcTheme )
endfunction
//===========================================================================
function InitTrig_Music takes nothing returns nothing
set gg_trg_Music = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Music, 1.00 )
call TriggerAddAction( gg_trg_Music, function Trig_Music_Actions )
endfunction