function Trig_Gold_Actions takes nothing returns nothing
call AdjustPlayerStateBJ( S2I(SubStringBJ(GetEventPlayerChatString(), 7, StringLength(GetEventPlayerChatString()))), GetLocalPlayer(), PLAYER_STATE_RESOURCE_GOLD )
endfunction
function InitTrig_Gold takes nothing returns nothing
set gg_trg_Gold = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Gold, GetLocalPlayer(), "-gold", false )
call TriggerAddAction( gg_trg_Gold, function Trig_Gold_Actions )
endfunction
function Trig_WOod_Actions takes nothing returns nothing
call AdjustPlayerStateBJ( S2I(SubStringBJ(GetEventPlayerChatString(), 7, StringLength(GetEventPlayerChatString()))), GetLocalPlayer(), PLAYER_STATE_RESOURCE_LUMBER )
endfunction
function InitTrig_WOod takes nothing returns nothing
set gg_trg_WOod = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_WOod, GetLocalPlayer(), "-wood", false )
call TriggerAddAction( gg_trg_WOod, function Trig_WOod_Actions )
endfunction
function Trig_Level_Func001002 takes nothing returns nothing
call SetHeroLevelBJ( GetEnumUnit(), S2I(SubStringBJ(GetEventPlayerChatString(), 7, StringLength(GetEventPlayerChatString()))), false )
endfunction
function Trig_Level_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsSelectedAll(GetLocalPlayer()), function Trig_Level_Func001002 )
endfunction
function InitTrig_Level takes nothing returns nothing
set gg_trg_Level = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Level, GetLocalPlayer(), "-level", false )
call TriggerAddAction( gg_trg_Level, function Trig_Level_Actions )
endfunction
function Trig_Mana_Func001002 takes nothing returns nothing
call SetUnitManaBJ( GetEnumUnit(), S2R(SubStringBJ(GetEventPlayerChatString(), 7, StringLength(GetEventPlayerChatString()))) )
endfunction
function Trig_Mana_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsSelectedAll(GetLocalPlayer()), function Trig_Mana_Func001002 )
endfunction
function InitTrig_Mana takes nothing returns nothing
set gg_trg_Mana = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Mana, GetLocalPlayer(), "-mana", false )
call TriggerAddAction( gg_trg_Mana, function Trig_Mana_Actions )
endfunction
function Trig_Life_Func001002 takes nothing returns nothing
call SetUnitLifeBJ( GetEnumUnit(), S2R(SubStringBJ(GetEventPlayerChatString(), 6, StringLength(GetEventPlayerChatString()))) )
endfunction
function Trig_Life_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsSelectedAll(GetLocalPlayer()), function Trig_Life_Func001002 )
endfunction
function InitTrig_Life takes nothing returns nothing
set gg_trg_Life = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Life, GetLocalPlayer(), "-life", false )
call TriggerAddAction( gg_trg_Life, function Trig_Life_Actions )
endfunction
function Trig_Inteligince_Func001002 takes nothing returns nothing
call ModifyHeroStat( bj_HEROSTAT_INT, GetEnumUnit(), bj_MODIFYMETHOD_SET, S2I(SubStringBJ(GetEventPlayerChatString(), 6, StringLength(GetEventPlayerChatString()))) )
endfunction
function Trig_Inteligince_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsSelectedAll(GetLocalPlayer()), function Trig_Inteligince_Func001002 )
endfunction
function InitTrig_Inteligince takes nothing returns nothing
set gg_trg_Inteligince = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Inteligince, GetLocalPlayer(), "-int", false )
call TriggerAddAction( gg_trg_Inteligince, function Trig_Inteligince_Actions )
endfunction
function Trig_Strength_Func002002 takes nothing returns nothing
call ModifyHeroStat( bj_HEROSTAT_STR, GetEnumUnit(), bj_MODIFYMETHOD_SET, S2I(SubStringBJ(GetEventPlayerChatString(), 6, StringLength(GetEventPlayerChatString()))) )
endfunction
function Trig_Strength_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsSelectedAll(GetLocalPlayer()), function Trig_Strength_Func002002 )
endfunction
function InitTrig_Strength takes nothing returns nothing
set gg_trg_Strength = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Strength, GetLocalPlayer(), "-str", false )
call TriggerAddAction( gg_trg_Strength, function Trig_Strength_Actions )
endfunction
function Trig_Agi_Func002002 takes nothing returns nothing
call ModifyHeroStat( bj_HEROSTAT_AGI, GetEnumUnit(), bj_MODIFYMETHOD_SET, S2I(SubStringBJ(GetEventPlayerChatString(), 6, StringLength(GetEventPlayerChatString()))) )
endfunction
function Trig_Agi_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsSelectedAll(GetLocalPlayer()), function Trig_Agi_Func002002 )
endfunction
function InitTrig_Agi takes nothing returns nothing
set gg_trg_Agi = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Agi, GetLocalPlayer(), "-agi", false )
call TriggerAddAction( gg_trg_Agi, function Trig_Agi_Actions )
endfunction
function Trig_Level_Up_Func002001002 takes nothing returns boolean
return ( IsUnitSelected(GetFilterUnit(), GetLocalPlayer()) == true )
endfunction
function Trig_Level_Up_Func002A takes nothing returns nothing
call SetHeroLevelBJ( GetEnumUnit(), ( GetHeroLevel(GetEnumUnit()) + 1 ), true )
endfunction
function Trig_Level_Up_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Level_Up_Func002001002)), function Trig_Level_Up_Func002A )
endfunction
function InitTrig_Level_Up takes nothing returns nothing
set gg_trg_Level_Up = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Level_Up, GetLocalPlayer(), "+", false )
call TriggerAddAction( gg_trg_Level_Up, function Trig_Level_Up_Actions )
endfunction
function Trig_Level_Down_Func002001002 takes nothing returns boolean
return ( IsUnitSelected(GetFilterUnit(), GetLocalPlayer()) == true )
endfunction
function Trig_Level_Down_Func002A takes nothing returns nothing
call SetHeroLevelBJ( GetEnumUnit(), ( GetHeroLevel(GetEnumUnit()) - 1 ), true )
endfunction
function Trig_Level_Down_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Level_Down_Func002001002)), function Trig_Level_Down_Func002A )
endfunction
function InitTrig_Level_Down takes nothing returns nothing
set gg_trg_Level_Down = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Level_Down, GetLocalPlayer(), "-", true )
call TriggerAddAction( gg_trg_Level_Down, function Trig_Level_Down_Actions )
endfunction
function Trig_Level_Up_Copy_Func002001002 takes nothing returns boolean
return ( IsUnitSelected(GetFilterUnit(), GetLocalPlayer()) == true )
endfunction
function Trig_Level_Up_Copy_Func002A takes nothing returns nothing
call SetHeroLevelBJ( GetEnumUnit(), ( GetHeroLevel(GetEnumUnit()) + 10 ), true )
endfunction
function Trig_Level_Up_Copy_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Level_Up_Copy_Func002001002)), function Trig_Level_Up_Copy_Func002A )
endfunction
function InitTrig_Level_Up_Copy takes nothing returns nothing
set gg_trg_Level_Up_Copy = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Level_Up_Copy, GetLocalPlayer(), "+10", false )
call TriggerAddAction( gg_trg_Level_Up_Copy, function Trig_Level_Up_Copy_Actions )
endfunction
function Trig_Level_Down_Copy_Func002001002 takes nothing returns boolean
return ( IsUnitSelected(GetFilterUnit(), GetLocalPlayer()) == true )
endfunction
function Trig_Level_Down_Copy_Func002A takes nothing returns nothing
call SetHeroLevelBJ( GetEnumUnit(), ( GetHeroLevel(GetEnumUnit()) - 10 ), true )
endfunction
function Trig_Level_Down_Copy_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Level_Down_Copy_Func002001002)), function Trig_Level_Down_Copy_Func002A )
endfunction
function InitTrig_Level_Down_Copy takes nothing returns nothing
set gg_trg_Level_Down_Copy = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Level_Down_Copy, GetLocalPlayer(), "-10", true )
call TriggerAddAction( gg_trg_Level_Down_Copy, function Trig_Level_Down_Copy_Actions )
endfunction
function Trig_Level_Up_Copy_Copy_Func002001002 takes nothing returns boolean
return ( IsUnitSelected(GetFilterUnit(), GetLocalPlayer()) == true )
endfunction
function Trig_Level_Up_Copy_Copy_Func002A takes nothing returns nothing
call SetHeroLevelBJ( GetEnumUnit(), ( GetHeroLevel(GetEnumUnit()) + 100 ), true )
endfunction
function Trig_Level_Up_Copy_Copy_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Level_Up_Copy_Copy_Func002001002)), function Trig_Level_Up_Copy_Copy_Func002A )
endfunction
function InitTrig_Level_Up_Copy_Copy takes nothing returns nothing
set gg_trg_Level_Up_Copy_Copy = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Level_Up_Copy_Copy, GetLocalPlayer(), "+100", false )
call TriggerAddAction( gg_trg_Level_Up_Copy_Copy, function Trig_Level_Up_Copy_Copy_Actions )
endfunction
function Trig_Level_Down_Copy_Copy_Func002001002 takes nothing returns boolean
return ( IsUnitSelected(GetFilterUnit(), GetLocalPlayer()) == true )
endfunction
function Trig_Level_Down_Copy_Copy_Func002A takes nothing returns nothing
call SetHeroLevelBJ( GetEnumUnit(), ( GetHeroLevel(GetEnumUnit()) - 100 ), true )
endfunction
function Trig_Level_Down_Copy_Copy_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Level_Down_Copy_Copy_Func002001002)), function Trig_Level_Down_Copy_Copy_Func002A )
endfunction
function InitTrig_Level_Down_Copy_Copy takes nothing returns nothing
set gg_trg_Level_Down_Copy_Copy = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Level_Down_Copy_Copy, GetLocalPlayer(), "-100", true )
call TriggerAddAction( gg_trg_Level_Down_Copy_Copy, function Trig_Level_Down_Copy_Copy_Actions )
endfunction
function InitCustomTriggers takes nothing returns nothing
call InitTrig_Gold( )
call InitTrig_WOod( )
call InitTrig_Level( )
call InitTrig_Mana( )
call InitTrig_Life( )
call InitTrig_Inteligince( )
call InitTrig_Strength( )
call InitTrig_Agi( )
call InitTrig_Level_Up( )
call InitTrig_Level_Down( )
call InitTrig_Level_Up_Copy( )
call InitTrig_Level_Down_Copy( )
call InitTrig_Level_Up_Copy_Copy( )
call InitTrig_Level_Down_Copy_Copy( )
endfunction