Name | Type | is_array | initial_value |
AeroAnimation | unit | No | |
AlreadyCarryingEquip | integer | No | 0 |
Angeliceffect | effect | No | |
Angeliceffect2 | effect | No | |
AngelicRing | integer | No | 0 |
AngelicUnit | unit | No | |
AntiCheat | integer | No | 0 |
AntiCheat_Copy | integer | No | 0 |
ArrowsEquiped | integer | No | 0 |
Assassin_Lord | player | No | |
Base10Convert | integer | No | 0 |
Base10Input | integer | No | 0 |
Base10Output | integer | No | 0 |
Base32Input | string | No | |
Base32Int | integer | Yes | 0 |
Base32String | string | Yes | |
Blueban | player | Yes | |
Bowequiped | integer | No | 0 |
CarriedItems | integer | Yes | 0 |
ClassAbilityGained | integer | Yes | 0 |
CleanFloatingText | texttag | Yes | |
colors | string | Yes | |
CutsceneisOn | boolean | No | false |
DealDamage | integer | No | 0 |
Debug | string | No | |
debugColor | string | No | |
DebugLevel | integer | No | 0 |
debugLeveler | integer | No | 0 |
DebugLevelNumber | string | No | |
debugPlayer | player | No | |
DemonSlayerBowPlayer | unit | No | |
DemonSlayerWarriorPlayer | unit | No | |
DiceDrop | integer | No | 0 |
DiceRoll | integer | No | 0 |
DukatiAssassin | unit | No | |
DukatiEffectLeft | effect | No | |
DukatiEffectRight | effect | No | |
ElfDefense | dialog | No | |
EmeraldRing | integer | No | 0 |
FinalCode | string | No | |
GoldPlayers | force | No | |
HasQuestItem | boolean | No | false |
HasShuriken | boolean | Yes | false |
HeroName | string | Yes | |
HigherCamera | boolean | Yes | false |
HumanPlayers | force | No | |
InitializeItems | unitcode | Yes | |
InvalidJob | boolean | No | false |
ItemBeingManipulated | item | No | |
ItemNumber | integer | No | 0 |
ItemvalueNone | item | No | |
JumpingUnit | unit | No | |
JursachianUnit | unit | No | |
JursachiEffect | effect | No | |
JursachiEffect2 | effect | No | |
KefkaCount | integer | No | 0 |
KefkaQuest | boolean | No | false |
LevelCode | integer | No | 0 |
LevelRange | dialog | No | |
LevelRangeButton | button | Yes | |
Life | unitcode | No | e007 |
LoadCharAttempts | integer | Yes | 0 |
LoadLevel | integer | No | 0 |
LoadLevelCode | string | No | |
LoadString | string | No | |
LoopInteger | integer | No | 0 |
LoopIntegerPlayer | integer | Yes | 0 |
MacSpiffy117 | player | Yes | |
MagicalOrb | unit | No | |
MagicalOrbDonor | unit | No | |
MakerisHere | boolean | No | false |
MateriaPick | button | Yes | |
Mathmo | integer | No | 0 |
Meteor | unit | No | |
MorbLoadAttempts | integer | Yes | 0 |
MysticRing | integer | No | 0 |
NoButton | button | No | |
NumberOfPlayers | integer | No | 0 |
NumberofRepicks | integer | Yes | 0 |
OnionKid | unit | No | |
OnyxRing | integer | No | 0 |
Part1 | string | No | |
PirateDefense | dialog | No | |
PirateEffectLeft | effect | No | |
PirateEffectRight | effect | No | |
PiratePlayer | unit | No | |
PlayerHasAlreadyEnteredCode | boolean | Yes | false |
PlayerHasAlreadyEnteredCodeOrb | boolean | Yes | false |
PlayerLoadingCode | player | No | |
PlayerLoadingMorb | player | No | |
Playername | string | No | |
PlayersWhoHaveChosen | integer | No | 0 |
PlayerWhoSummoned | player | No | |
QuestAdamontoise | boolean | No | false |
QuestAle | boolean | No | false |
QuestCactuar | boolean | No | false |
QuestLetter | boolean | No | false |
QuestMarkSpecialEffect | effect | Yes | |
Quests | quest | Yes | |
QuestSatyrPrisoner | boolean | No | false |
QuestSatyrShop | boolean | No | false |
RandomizeCode | integer | No | 0 |
RandomPotion | integer | No | 0 |
RandomSteal | integer | No | 0 |
SaveCode | string | Yes | |
SavingHero | unit | No | |
SelectItem | dialog | No | |
SortTempInt | integer | No | 0 |
SpecialEffectsClear | effect | Yes | |
StartGameButton | button | No | |
StealingPlayer | force | No | |
SwampDefense | dialog | No | |
TheRealUnit | unit | No | |
TutorialCounter | integer | No | 0 |
TutorialDialog | dialog | No | |
UnitNumber | integer | No | 0 |
UnitToRecieveItem | unit | Yes | |
VakorDefense | dialog | No | |
VakorLeaderBoard | leaderboard | No | |
VakorTimer | timer | No | |
WarriorSetEffectLeft | effect | No | |
WarriorSetEffectRight | effect | No | |
WhileLoop | integer | No | 0 |
WizardPlayer | unit | No | |
Xmagix | integer | Yes | 1 |
YesButton | button | No |
function Trig_Level_Fire_Conditions takes nothing returns boolean
if ( not ( GetItemCharges(GetManipulatedItem()) == 1 ) ) then
return false
endif
if ( not ( 'I00Q' == GetItemTypeId(GetManipulatedItem()) ) ) then
return false
endif
return true
endfunction
function Trig_Level_Fire_Actions takes nothing returns nothing
call RemoveItem( GetManipulatedItem() )
call UnitAddItemByIdSwapped( 'I00U', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Level_Fire takes nothing returns nothing
set gg_trg_Level_Fire = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Level_Fire, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_Level_Fire, Condition( function Trig_Level_Fire_Conditions ) )
call TriggerAddAction( gg_trg_Level_Fire, function Trig_Level_Fire_Actions )
endfunction
function Trig_Level_Fira_Conditions takes nothing returns boolean
if ( not ( GetItemCharges(GetManipulatedItem()) == 1 ) ) then
return false
endif
if ( not ( 'I00U' == GetItemTypeId(GetManipulatedItem()) ) ) then
return false
endif
return true
endfunction
function Trig_Level_Fira_Actions takes nothing returns nothing
call RemoveItem( GetManipulatedItem() )
call UnitAddItemByIdSwapped( 'I00S', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Level_Fira takes nothing returns nothing
set gg_trg_Level_Fira = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Level_Fira, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_Level_Fira, Condition( function Trig_Level_Fira_Conditions ) )
call TriggerAddAction( gg_trg_Level_Fira, function Trig_Level_Fira_Actions )
endfunction
function Trig_Level_Thunder_Conditions takes nothing returns boolean
if ( not ( GetItemCharges(GetManipulatedItem()) == 1 ) ) then
return false
endif
if ( not ( 'I00V' == GetItemTypeId(GetManipulatedItem()) ) ) then
return false
endif
return true
endfunction
function Trig_Level_Thunder_Actions takes nothing returns nothing
call RemoveItem( GetManipulatedItem() )
call UnitAddItemByIdSwapped( 'I00W', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Level_Thunder takes nothing returns nothing
set gg_trg_Level_Thunder = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Level_Thunder, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_Level_Thunder, Condition( function Trig_Level_Thunder_Conditions ) )
call TriggerAddAction( gg_trg_Level_Thunder, function Trig_Level_Thunder_Actions )
endfunction
function Trig_Level_Thundara_Conditions takes nothing returns boolean
if ( not ( GetItemCharges(GetManipulatedItem()) == 1 ) ) then
return false
endif
if ( not ( 'I00W' == GetItemTypeId(GetManipulatedItem()) ) ) then
return false
endif
return true
endfunction
function Trig_Level_Thundara_Actions takes nothing returns nothing
call RemoveItem( GetManipulatedItem() )
call UnitAddItemByIdSwapped( 'I00X', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Level_Thundara takes nothing returns nothing
set gg_trg_Level_Thundara = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Level_Thundara, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_Level_Thundara, Condition( function Trig_Level_Thundara_Conditions ) )
call TriggerAddAction( gg_trg_Level_Thundara, function Trig_Level_Thundara_Actions )
endfunction
function Trig_Level_Blizzard_Conditions takes nothing returns boolean
if ( not ( GetItemCharges(GetManipulatedItem()) == 1 ) ) then
return false
endif
if ( not ( 'I00T' == GetItemTypeId(GetManipulatedItem()) ) ) then
return false
endif
return true
endfunction
function Trig_Level_Blizzard_Actions takes nothing returns nothing
call RemoveItem( GetManipulatedItem() )
call UnitAddItemByIdSwapped( 'I00P', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Level_Blizzard takes nothing returns nothing
set gg_trg_Level_Blizzard = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Level_Blizzard, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_Level_Blizzard, Condition( function Trig_Level_Blizzard_Conditions ) )
call TriggerAddAction( gg_trg_Level_Blizzard, function Trig_Level_Blizzard_Actions )
endfunction
function Trig_Level_Blizzara_Conditions takes nothing returns boolean
if ( not ( GetItemCharges(GetManipulatedItem()) == 1 ) ) then
return false
endif
if ( not ( 'I00P' == GetItemTypeId(GetManipulatedItem()) ) ) then
return false
endif
return true
endfunction
function Trig_Level_Blizzara_Actions takes nothing returns nothing
call RemoveItem( GetManipulatedItem() )
call UnitAddItemByIdSwapped( 'I00R', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Level_Blizzara takes nothing returns nothing
set gg_trg_Level_Blizzara = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Level_Blizzara, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_Level_Blizzara, Condition( function Trig_Level_Blizzara_Conditions ) )
call TriggerAddAction( gg_trg_Level_Blizzara, function Trig_Level_Blizzara_Actions )
endfunction
function Trig_Level_Cure_Conditions takes nothing returns boolean
if ( not ( GetItemCharges(GetManipulatedItem()) == 1 ) ) then
return false
endif
if ( not ( 'I01L' == GetItemTypeId(GetManipulatedItem()) ) ) then
return false
endif
return true
endfunction
function Trig_Level_Cure_Actions takes nothing returns nothing
call RemoveItem( GetManipulatedItem() )
call UnitAddItemByIdSwapped( 'I01K', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Level_Cure takes nothing returns nothing
set gg_trg_Level_Cure = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Level_Cure, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_Level_Cure, Condition( function Trig_Level_Cure_Conditions ) )
call TriggerAddAction( gg_trg_Level_Cure, function Trig_Level_Cure_Actions )
endfunction
function Trig_Level_Cura_Conditions takes nothing returns boolean
if ( not ( GetItemCharges(GetManipulatedItem()) == 1 ) ) then
return false
endif
if ( not ( 'I01K' == GetItemTypeId(GetManipulatedItem()) ) ) then
return false
endif
return true
endfunction
function Trig_Level_Cura_Actions takes nothing returns nothing
call RemoveItem( GetManipulatedItem() )
call UnitAddItemByIdSwapped( 'I01J', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Level_Cura takes nothing returns nothing
set gg_trg_Level_Cura = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Level_Cura, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_Level_Cura, Condition( function Trig_Level_Cura_Conditions ) )
call TriggerAddAction( gg_trg_Level_Cura, function Trig_Level_Cura_Actions )
endfunction
function Trig_Level_Curaga_Conditions takes nothing returns boolean
if ( not ( GetItemCharges(GetManipulatedItem()) == 1 ) ) then
return false
endif
if ( not ( 'I01J' == GetItemTypeId(GetManipulatedItem()) ) ) then
return false
endif
return true
endfunction
function Trig_Level_Curaga_Actions takes nothing returns nothing
call RemoveItem( GetManipulatedItem() )
call UnitAddItemByIdSwapped( 'I04K', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Level_Curaga takes nothing returns nothing
set gg_trg_Level_Curaga = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Level_Curaga, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_Level_Curaga, Condition( function Trig_Level_Curaga_Conditions ) )
call TriggerAddAction( gg_trg_Level_Curaga, function Trig_Level_Curaga_Actions )
endfunction
function Trig_Level_Aero_Conditions takes nothing returns boolean
if ( not ( GetItemCharges(GetManipulatedItem()) == 1 ) ) then
return false
endif
if ( not ( 'I044' == GetItemTypeId(GetManipulatedItem()) ) ) then
return false
endif
return true
endfunction
function Trig_Level_Aero_Actions takes nothing returns nothing
call RemoveItem( GetManipulatedItem() )
call UnitAddItemByIdSwapped( 'I045', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Level_Aero takes nothing returns nothing
set gg_trg_Level_Aero = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Level_Aero, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_Level_Aero, Condition( function Trig_Level_Aero_Conditions ) )
call TriggerAddAction( gg_trg_Level_Aero, function Trig_Level_Aero_Actions )
endfunction
function Trig_Level_Tornado_Conditions takes nothing returns boolean
if ( not ( GetItemCharges(GetManipulatedItem()) == 1 ) ) then
return false
endif
if ( not ( 'I045' == GetItemTypeId(GetManipulatedItem()) ) ) then
return false
endif
return true
endfunction
function Trig_Level_Tornado_Actions takes nothing returns nothing
call RemoveItem( GetManipulatedItem() )
call UnitAddItemByIdSwapped( 'I046', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Level_Tornado takes nothing returns nothing
set gg_trg_Level_Tornado = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Level_Tornado, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_Level_Tornado, Condition( function Trig_Level_Tornado_Conditions ) )
call TriggerAddAction( gg_trg_Level_Tornado, function Trig_Level_Tornado_Actions )
endfunction
function Trig_Level_Comet_Conditions takes nothing returns boolean
if ( not ( GetItemCharges(GetManipulatedItem()) == 1 ) ) then
return false
endif
if ( not ( 'I022' == GetItemTypeId(GetManipulatedItem()) ) ) then
return false
endif
return true
endfunction
function Trig_Level_Comet_Actions takes nothing returns nothing
call RemoveItem( GetManipulatedItem() )
call UnitAddItemByIdSwapped( 'I024', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Level_Comet takes nothing returns nothing
set gg_trg_Level_Comet = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Level_Comet, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_Level_Comet, Condition( function Trig_Level_Comet_Conditions ) )
call TriggerAddAction( gg_trg_Level_Comet, function Trig_Level_Comet_Actions )
endfunction
function Trig_Level_Meteo_Conditions takes nothing returns boolean
if ( not ( GetItemCharges(GetManipulatedItem()) == 1 ) ) then
return false
endif
if ( not ( 'I024' == GetItemTypeId(GetManipulatedItem()) ) ) then
return false
endif
return true
endfunction
function Trig_Level_Meteo_Actions takes nothing returns nothing
call RemoveItem( GetManipulatedItem() )
call UnitAddItemByIdSwapped( 'I023', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Level_Meteo takes nothing returns nothing
set gg_trg_Level_Meteo = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Level_Meteo, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_Level_Meteo, Condition( function Trig_Level_Meteo_Conditions ) )
call TriggerAddAction( gg_trg_Level_Meteo, function Trig_Level_Meteo_Actions )
endfunction
function Trig_Level_Slow_Conditions takes nothing returns boolean
if ( not ( GetItemCharges(GetManipulatedItem()) == 1 ) ) then
return false
endif
if ( not ( 'I01V' == GetItemTypeId(GetManipulatedItem()) ) ) then
return false
endif
return true
endfunction
function Trig_Level_Slow_Actions takes nothing returns nothing
call RemoveItem( GetManipulatedItem() )
call UnitAddItemByIdSwapped( 'I01Z', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Level_Slow takes nothing returns nothing
set gg_trg_Level_Slow = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Level_Slow, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_Level_Slow, Condition( function Trig_Level_Slow_Conditions ) )
call TriggerAddAction( gg_trg_Level_Slow, function Trig_Level_Slow_Actions )
endfunction
function Trig_Level_Slowga_Conditions takes nothing returns boolean
if ( not ( GetItemCharges(GetManipulatedItem()) == 1 ) ) then
return false
endif
if ( not ( 'I01Z' == GetItemTypeId(GetManipulatedItem()) ) ) then
return false
endif
return true
endfunction
function Trig_Level_Slowga_Actions takes nothing returns nothing
call RemoveItem( GetManipulatedItem() )
call UnitAddItemByIdSwapped( 'I01U', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Level_Slowga takes nothing returns nothing
set gg_trg_Level_Slowga = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Level_Slowga, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_Level_Slowga, Condition( function Trig_Level_Slowga_Conditions ) )
call TriggerAddAction( gg_trg_Level_Slowga, function Trig_Level_Slowga_Actions )
endfunction
function Trig_Level_Shell_Conditions takes nothing returns boolean
if ( not ( GetItemCharges(GetManipulatedItem()) == 1 ) ) then
return false
endif
if ( not ( 'I01Q' == GetItemTypeId(GetManipulatedItem()) ) ) then
return false
endif
return true
endfunction
function Trig_Level_Shell_Actions takes nothing returns nothing
call RemoveItem( GetManipulatedItem() )
call UnitAddItemByIdSwapped( 'I01M', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Level_Shell takes nothing returns nothing
set gg_trg_Level_Shell = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Level_Shell, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_Level_Shell, Condition( function Trig_Level_Shell_Conditions ) )
call TriggerAddAction( gg_trg_Level_Shell, function Trig_Level_Shell_Actions )
endfunction
function Trig_Level_Demi_Conditions takes nothing returns boolean
if ( not ( GetItemCharges(GetManipulatedItem()) == 1 ) ) then
return false
endif
if ( not ( 'I01W' == GetItemTypeId(GetManipulatedItem()) ) ) then
return false
endif
return true
endfunction
function Trig_Level_Demi_Actions takes nothing returns nothing
call RemoveItem( GetManipulatedItem() )
call UnitAddItemByIdSwapped( 'I01Y', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Level_Demi takes nothing returns nothing
set gg_trg_Level_Demi = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Level_Demi, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_Level_Demi, Condition( function Trig_Level_Demi_Conditions ) )
call TriggerAddAction( gg_trg_Level_Demi, function Trig_Level_Demi_Actions )
endfunction
function Trig_Level_Drain_Conditions takes nothing returns boolean
if ( not ( GetItemCharges(GetManipulatedItem()) == 1 ) ) then
return false
endif
if ( not ( 'I047' == GetItemTypeId(GetManipulatedItem()) ) ) then
return false
endif
return true
endfunction
function Trig_Level_Drain_Actions takes nothing returns nothing
call RemoveItem( GetManipulatedItem() )
call UnitAddItemByIdSwapped( 'I048', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Level_Drain takes nothing returns nothing
set gg_trg_Level_Drain = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Level_Drain, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_Level_Drain, Condition( function Trig_Level_Drain_Conditions ) )
call TriggerAddAction( gg_trg_Level_Drain, function Trig_Level_Drain_Actions )
endfunction
function Trig_Level_Life_Conditions takes nothing returns boolean
if ( not ( GetItemCharges(GetManipulatedItem()) == 1 ) ) then
return false
endif
if ( not ( 'I01O' == GetItemTypeId(GetManipulatedItem()) ) ) then
return false
endif
return true
endfunction
function Trig_Level_Life_Actions takes nothing returns nothing
call RemoveItem( GetManipulatedItem() )
call UnitAddItemByIdSwapped( 'I01P', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Level_Life takes nothing returns nothing
set gg_trg_Level_Life = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Level_Life, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_Level_Life, Condition( function Trig_Level_Life_Conditions ) )
call TriggerAddAction( gg_trg_Level_Life, function Trig_Level_Life_Actions )
endfunction
function Trig_Level_Dia_Conditions takes nothing returns boolean
if ( not ( GetItemCharges(GetManipulatedItem()) == 1 ) ) then
return false
endif
if ( not ( 'I041' == GetItemTypeId(GetManipulatedItem()) ) ) then
return false
endif
return true
endfunction
function Trig_Level_Dia_Actions takes nothing returns nothing
call RemoveItem( GetManipulatedItem() )
call UnitAddItemByIdSwapped( 'I043', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Level_Dia takes nothing returns nothing
set gg_trg_Level_Dia = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Level_Dia, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_Level_Dia, Condition( function Trig_Level_Dia_Conditions ) )
call TriggerAddAction( gg_trg_Level_Dia, function Trig_Level_Dia_Actions )
endfunction
function Trig_COTW_Func001Func001Func002C takes nothing returns boolean
if ( ( SubStringBJ(GetPlayerName(GetTriggerPlayer()), 1, 4) == "CotW" ) ) then
return true
endif
if ( ( SubStringBJ(GetPlayerName(GetTriggerPlayer()), 1, 4) == "cotw" ) ) then
return true
endif
if ( ( SubStringBJ(GetPlayerName(GetTriggerPlayer()), 1, 4) == "Cotw" ) ) then
return true
endif
if ( ( SubStringBJ(GetPlayerName(GetTriggerPlayer()), 1, 4) == "CoTW" ) ) then
return true
endif
if ( ( SubStringBJ(GetPlayerName(GetTriggerPlayer()), 1, 4) == "COtw" ) ) then
return true
endif
if ( ( StringCase(SubStringBJ(GetPlayerName(GetEnumPlayer()), 1, 4), false) == "cotw" ) ) then
return true
endif
return false
endfunction
function Trig_COTW_Func001Func001C takes nothing returns boolean
if ( not Trig_COTW_Func001Func001Func002C() ) then
return false
endif
return true
endfunction
function Trig_COTW_Func001A takes nothing returns nothing
if ( Trig_COTW_Func001Func001C() ) then
call CustomDefeatBJ( GetEnumPlayer(), "TRIGSTR_1142" )
else
endif
endfunction
function Trig_COTW_Actions takes nothing returns nothing
call ForForce( GetPlayersAll(), function Trig_COTW_Func001A )
endfunction
//===========================================================================
function InitTrig_COTW takes nothing returns nothing
set gg_trg_COTW = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_COTW, 5 )
call TriggerAddAction( gg_trg_COTW, function Trig_COTW_Actions )
endfunction
function Trig_Credits_Actions takes nothing returns nothing
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_1232" )
endfunction
//===========================================================================
function InitTrig_Credits takes nothing returns nothing
set gg_trg_Credits = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Credits, 60.00 )
call TriggerAddAction( gg_trg_Credits, function Trig_Credits_Actions )
endfunction
function Trig_Select_levels_Actions takes nothing returns nothing
call UnitAddAbilityBJ( 'Aneu', gg_unit_n01L_0025 )
call UnitAddAbilityBJ( 'Aneu', gg_unit_hshy_0272 )
endfunction
//===========================================================================
function InitTrig_Select_levels takes nothing returns nothing
set gg_trg_Select_levels = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Select_levels, 30.00 )
call TriggerAddAction( gg_trg_Select_levels, function Trig_Select_levels_Actions )
endfunction
function Trig_Levels_1to50_Conditions takes nothing returns boolean
if ( not ( GetClickedButtonBJ() == udg_LevelRangeButton[1] ) ) then
return false
endif
return true
endfunction
function Trig_Levels_1to50_Func001Func001Func001Func001Func001001002 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) != 'e007' )
endfunction
function Trig_Levels_1to50_Func001Func001Func001Func001Func001002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Levels_1to50_Func001Func001Func001Func001Func003C takes nothing returns boolean
if ( not ( GetHeroLevel(GetEnumUnit()) > 50 ) ) then
return false
endif
return true
endfunction
function Trig_Levels_1to50_Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetHeroLevel(GetEnumUnit()) < 1 ) ) then
return false
endif
return true
endfunction
function Trig_Levels_1to50_Func001Func001Func001C takes nothing returns boolean
if ( not ( IsUnitType(GetEnumUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'ewsp' ) ) then
return false
endif
return true
endfunction
function Trig_Levels_1to50_Func001Func001A takes nothing returns nothing
if ( Trig_Levels_1to50_Func001Func001Func001C() ) then
if ( Trig_Levels_1to50_Func001Func001Func001Func001C() ) then
call ForGroupBJ( GetUnitsOfPlayerMatching(GetEnumPlayer(), Condition(function Trig_Levels_1to50_Func001Func001Func001Func001Func001001002)), function Trig_Levels_1to50_Func001Func001Func001Func001Func001002 )
call ForceRemovePlayerSimple( GetEnumPlayer(), GetPlayersAll() )
call CustomDefeatBJ( GetOwningPlayer(GetEnumUnit()), "TRIGSTR_1101" )
else
if ( Trig_Levels_1to50_Func001Func001Func001Func001Func003C() ) then
call SetHeroLevelBJ( GetEnumUnit(), 50, true )
else
endif
endif
else
endif
endfunction
function Trig_Levels_1to50_Func001A takes nothing returns nothing
call ForGroupBJ( GetUnitsOfPlayerAll(GetEnumPlayer()), function Trig_Levels_1to50_Func001Func001A )
endfunction
function Trig_Levels_1to50_Actions takes nothing returns nothing
call ForForce( GetPlayersByMapControl(MAP_CONTROL_USER), function Trig_Levels_1to50_Func001A )
call PauseAllUnitsBJ( false )
endfunction
//===========================================================================
function InitTrig_Levels_1to50 takes nothing returns nothing
set gg_trg_Levels_1to50 = CreateTrigger( )
call TriggerRegisterDialogEventBJ( gg_trg_Levels_1to50, udg_LevelRange )
call TriggerAddCondition( gg_trg_Levels_1to50, Condition( function Trig_Levels_1to50_Conditions ) )
call TriggerAddAction( gg_trg_Levels_1to50, function Trig_Levels_1to50_Actions )
endfunction
function Trig_Levels_50to120_Conditions takes nothing returns boolean
if ( not ( GetClickedButtonBJ() == udg_LevelRangeButton[2] ) ) then
return false
endif
return true
endfunction
function Trig_Levels_50to120_Func001Func001Func001Func001Func001001002 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) != 'e007' )
endfunction
function Trig_Levels_50to120_Func001Func001Func001Func001Func001002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Levels_50to120_Func001Func001Func001Func001Func003C takes nothing returns boolean
if ( not ( GetHeroLevel(GetEnumUnit()) > 120 ) ) then
return false
endif
return true
endfunction
function Trig_Levels_50to120_Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetHeroLevel(GetEnumUnit()) < 50 ) ) then
return false
endif
return true
endfunction
function Trig_Levels_50to120_Func001Func001Func001C takes nothing returns boolean
if ( not ( IsUnitType(GetEnumUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'ewsp' ) ) then
return false
endif
return true
endfunction
function Trig_Levels_50to120_Func001Func001A takes nothing returns nothing
if ( Trig_Levels_50to120_Func001Func001Func001C() ) then
if ( Trig_Levels_50to120_Func001Func001Func001Func001C() ) then
call ForGroupBJ( GetUnitsOfPlayerMatching(GetEnumPlayer(), Condition(function Trig_Levels_50to120_Func001Func001Func001Func001Func001001002)), function Trig_Levels_50to120_Func001Func001Func001Func001Func001002 )
call ForceRemovePlayerSimple( GetEnumPlayer(), GetPlayersAll() )
call CustomDefeatBJ( GetOwningPlayer(GetEnumUnit()), "TRIGSTR_1107" )
else
if ( Trig_Levels_50to120_Func001Func001Func001Func001Func003C() ) then
call SetHeroLevelBJ( GetEnumUnit(), 120, true )
else
endif
endif
else
endif
endfunction
function Trig_Levels_50to120_Func001A takes nothing returns nothing
call ForGroupBJ( GetUnitsOfPlayerAll(GetEnumPlayer()), function Trig_Levels_50to120_Func001Func001A )
endfunction
function Trig_Levels_50to120_Actions takes nothing returns nothing
call ForForce( GetPlayersByMapControl(MAP_CONTROL_USER), function Trig_Levels_50to120_Func001A )
call PauseAllUnitsBJ( false )
endfunction
//===========================================================================
function InitTrig_Levels_50to120 takes nothing returns nothing
set gg_trg_Levels_50to120 = CreateTrigger( )
call TriggerRegisterDialogEventBJ( gg_trg_Levels_50to120, udg_LevelRange )
call TriggerAddCondition( gg_trg_Levels_50to120, Condition( function Trig_Levels_50to120_Conditions ) )
call TriggerAddAction( gg_trg_Levels_50to120, function Trig_Levels_50to120_Actions )
endfunction
function Trig_Levels_120_Conditions takes nothing returns boolean
if ( not ( GetClickedButtonBJ() == udg_LevelRangeButton[3] ) ) then
return false
endif
return true
endfunction
function Trig_Levels_120_Func001Func001Func001Func001Func001001002 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) != 'e007' )
endfunction
function Trig_Levels_120_Func001Func001Func001Func001Func001002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Levels_120_Func001Func001Func001Func001Func003C takes nothing returns boolean
if ( not ( GetHeroLevel(GetEnumUnit()) > 275 ) ) then
return false
endif
return true
endfunction
function Trig_Levels_120_Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetHeroLevel(GetEnumUnit()) < 120 ) ) then
return false
endif
return true
endfunction
function Trig_Levels_120_Func001Func001Func001C takes nothing returns boolean
if ( not ( IsUnitType(GetEnumUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'ewsp' ) ) then
return false
endif
return true
endfunction
function Trig_Levels_120_Func001Func001A takes nothing returns nothing
if ( Trig_Levels_120_Func001Func001Func001C() ) then
if ( Trig_Levels_120_Func001Func001Func001Func001C() ) then
call ForGroupBJ( GetUnitsOfPlayerMatching(GetEnumPlayer(), Condition(function Trig_Levels_120_Func001Func001Func001Func001Func001001002)), function Trig_Levels_120_Func001Func001Func001Func001Func001002 )
call ForceRemovePlayerSimple( GetEnumPlayer(), GetPlayersAll() )
call CustomDefeatBJ( GetOwningPlayer(GetEnumUnit()), "TRIGSTR_1108" )
else
if ( Trig_Levels_120_Func001Func001Func001Func001Func003C() ) then
call SetHeroLevelBJ( GetEnumUnit(), 275, true )
else
endif
endif
else
endif
endfunction
function Trig_Levels_120_Func001A takes nothing returns nothing
call ForGroupBJ( GetUnitsOfPlayerAll(GetEnumPlayer()), function Trig_Levels_120_Func001Func001A )
endfunction
function Trig_Levels_120_Actions takes nothing returns nothing
call ForForce( GetPlayersByMapControl(MAP_CONTROL_USER), function Trig_Levels_120_Func001A )
call PauseAllUnitsBJ( false )
endfunction
//===========================================================================
function InitTrig_Levels_120 takes nothing returns nothing
set gg_trg_Levels_120 = CreateTrigger( )
call TriggerRegisterDialogEventBJ( gg_trg_Levels_120, udg_LevelRange )
call TriggerAddCondition( gg_trg_Levels_120, Condition( function Trig_Levels_120_Conditions ) )
call TriggerAddAction( gg_trg_Levels_120, function Trig_Levels_120_Actions )
endfunction
function Trig_Final_Boss_Kefka_Pre_Conditions takes nothing returns boolean
if ( not ( udg_KefkaCount == 4 ) ) then
return false
endif
return true
endfunction
function Trig_Final_Boss_Kefka_Pre_Func003Func001Func003C takes nothing returns boolean
if ( ( GetOwningPlayer(GetEnumUnit()) == Player(0) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetEnumUnit()) == Player(1) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetEnumUnit()) == Player(2) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetEnumUnit()) == Player(3) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetEnumUnit()) == Player(4) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetEnumUnit()) == Player(5) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetEnumUnit()) == Player(6) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetEnumUnit()) == Player(7) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetEnumUnit()) == Player(8) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetEnumUnit()) == Player(9) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetEnumUnit()) == Player(10) ) ) then
return true
endif
return false
endfunction
function Trig_Final_Boss_Kefka_Pre_Func003Func001C takes nothing returns boolean
if ( not ( IsUnitType(GetEnumUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not Trig_Final_Boss_Kefka_Pre_Func003Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Final_Boss_Kefka_Pre_Func003A takes nothing returns nothing
if ( Trig_Final_Boss_Kefka_Pre_Func003Func001C() ) then
call SetUnitPositionLocFacingLocBJ( GetEnumUnit(), GetRectCenter(gg_rct_Cid_Cutscene), GetUnitLoc(gg_unit_N002_0092) )
else
endif
endfunction
function Trig_Final_Boss_Kefka_Pre_Func005A takes nothing returns nothing
call CameraSetupApplyForPlayer( true, gg_cam_cid_talk, GetEnumPlayer(), 8.00 )
endfunction
function Trig_Final_Boss_Kefka_Pre_Func010A takes nothing returns nothing
call ResetToGameCameraForPlayer( GetEnumPlayer(), 2.00 )
endfunction
function Trig_Final_Boss_Kefka_Pre_Actions takes nothing returns nothing
call TriggerSleepAction( 2 )
call ForGroupBJ( GetUnitsInRectAll(GetPlayableMapRect()), function Trig_Final_Boss_Kefka_Pre_Func003A )
call CinematicModeExBJ( true, GetPlayersAll(), 8.00 )
call ForForce( GetPlayersAll(), function Trig_Final_Boss_Kefka_Pre_Func005A )
call TriggerSleepAction( 8.00 )
call TransmissionFromUnitTypeWithNameBJ( GetPlayersAll(), Player(PLAYER_NEUTRAL_PASSIVE), 'N002', "TRIGSTR_1059", GetRectCenter(GetPlayableMapRect()), null, "TRIGSTR_1060", bj_TIMETYPE_ADD, 12.00, false )
call TriggerSleepAction( 12.00 )
call CinematicModeExBJ( false, GetPlayersAll(), 2.00 )
call ForForce( GetPlayersAll(), function Trig_Final_Boss_Kefka_Pre_Func010A )
set udg_KefkaQuest = true
call DisableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Final_Boss_Kefka_Pre takes nothing returns nothing
set gg_trg_Final_Boss_Kefka_Pre = CreateTrigger( )
call TriggerAddCondition( gg_trg_Final_Boss_Kefka_Pre, Condition( function Trig_Final_Boss_Kefka_Pre_Conditions ) )
call TriggerAddAction( gg_trg_Final_Boss_Kefka_Pre, function Trig_Final_Boss_Kefka_Pre_Actions )
endfunction
function Trig_Final_Boss_Kefka_Pre2_Actions takes nothing returns nothing
set udg_KefkaCount = ( udg_KefkaCount + 1 )
call ConditionalTriggerExecute( gg_trg_Final_Boss_Kefka_Pre )
endfunction
//===========================================================================
function InitTrig_Final_Boss_Kefka_Pre2 takes nothing returns nothing
set gg_trg_Final_Boss_Kefka_Pre2 = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_Final_Boss_Kefka_Pre2, gg_unit_n01Y_0096, EVENT_UNIT_DEATH )
call TriggerRegisterUnitEvent( gg_trg_Final_Boss_Kefka_Pre2, gg_unit_n02Q_0399, EVENT_UNIT_DEATH )
call TriggerRegisterUnitEvent( gg_trg_Final_Boss_Kefka_Pre2, gg_unit_n01X_0016, EVENT_UNIT_DEATH )
call TriggerRegisterUnitEvent( gg_trg_Final_Boss_Kefka_Pre2, gg_unit_n02I_0005, EVENT_UNIT_DEATH )
call TriggerRegisterUnitEvent( gg_trg_Final_Boss_Kefka_Pre2, gg_unit_n02P_0377, EVENT_UNIT_DEATH )
call TriggerAddAction( gg_trg_Final_Boss_Kefka_Pre2, function Trig_Final_Boss_Kefka_Pre2_Actions )
endfunction
function Trig_Battle_Kefka_Cutscene_Conditions takes nothing returns boolean
if ( not ( udg_KefkaQuest == true ) ) then
return false
endif
return true
endfunction
function Trig_Battle_Kefka_Cutscene_Func003A takes nothing returns nothing
call ResetToGameCameraForPlayer( GetEnumPlayer(), 0.00 )
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), GetUnitLoc(gg_unit_h00K_0395), 0 )
endfunction
function Trig_Battle_Kefka_Cutscene_Func004Func001Func004C takes nothing returns boolean
if ( ( GetOwningPlayer(GetEnumUnit()) == Player(0) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetEnumUnit()) == Player(1) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetEnumUnit()) == Player(2) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetEnumUnit()) == Player(3) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetEnumUnit()) == Player(4) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetEnumUnit()) == Player(5) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetEnumUnit()) == Player(6) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetEnumUnit()) == Player(7) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetEnumUnit()) == Player(8) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetEnumUnit()) == Player(9) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetEnumUnit()) == Player(10) ) ) then
return true
endif
return false
endfunction
function Trig_Battle_Kefka_Cutscene_Func004Func001C takes nothing returns boolean
if ( not ( IsUnitType(GetEnumUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not Trig_Battle_Kefka_Cutscene_Func004Func001Func004C() ) then
return false
endif
return true
endfunction
function Trig_Battle_Kefka_Cutscene_Func004A takes nothing returns nothing
if ( Trig_Battle_Kefka_Cutscene_Func004Func001C() ) then
call SetUnitPositionLoc( GetEnumUnit(), GetRandomLocInRect(gg_rct_battle_kefka) )
call SetUnitFacingToFaceUnitTimed( GetEnumUnit(), gg_unit_h00K_0395, 0 )
else
endif
endfunction
function Trig_Battle_Kefka_Cutscene_Actions takes nothing returns nothing
call CinematicFadeBJ( bj_CINEFADETYPE_FADEOUTIN, 5.00, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 0, 0, 0, 0 )
call TriggerSleepAction( 2 )
call ForForce( GetPlayersAll(), function Trig_Battle_Kefka_Cutscene_Func003A )
call ForGroupBJ( GetUnitsInRectAll(GetPlayableMapRect()), function Trig_Battle_Kefka_Cutscene_Func004A )
call PauseAllUnitsBJ( true )
call CinematicModeBJ( true, GetPlayersAll() )
call TransmissionFromUnitTypeWithNameBJ( GetPlayersAll(), Player(PLAYER_NEUTRAL_PASSIVE), 'hsor', "TRIGSTR_051", GetRectCenter(GetPlayableMapRect()), null, "TRIGSTR_959", bj_TIMETYPE_ADD, 7.00, false )
call PolledWait( 6.00 )
call CinematicModeBJ( false, GetPlayersAll() )
call PauseAllUnitsBJ( false )
call PlayMusicBJ( gg_snd_Liberi_Fatali )
endfunction
//===========================================================================
function InitTrig_Battle_Kefka_Cutscene takes nothing returns nothing
set gg_trg_Battle_Kefka_Cutscene = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Battle_Kefka_Cutscene, gg_rct_Kefkas_Stronghold )
call TriggerAddCondition( gg_trg_Battle_Kefka_Cutscene, Condition( function Trig_Battle_Kefka_Cutscene_Conditions ) )
call TriggerAddAction( gg_trg_Battle_Kefka_Cutscene, function Trig_Battle_Kefka_Cutscene_Actions )
endfunction
function Trig_Supernova_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'AHtc' ) ) then
return false
endif
return true
endfunction
function Trig_Supernova_Actions takes nothing returns nothing
call TerrainDeformationRippleBJ( 4, false, GetRectCenter(RectFromCenterSizeBJ(GetUnitLoc(GetSpellAbilityUnit()), 1000.00, 1000.00)), 1024, 1024, 64, 1, 512 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 50
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call AddSpecialEffectLocBJ( GetRandomLocInRect(RectFromCenterSizeBJ(GetUnitLoc(GetSpellAbilityUnit()), 1000.00, 1000.00)), "Abilities\\Spells\\Human\\Resurrect\\ResurrectTarget.mdl" )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Supernova takes nothing returns nothing
set gg_trg_Supernova = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Supernova, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Supernova, Condition( function Trig_Supernova_Conditions ) )
call TriggerAddAction( gg_trg_Supernova, function Trig_Supernova_Actions )
endfunction
function Trig_Shadow_Flare_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A052' ) ) then
return false
endif
return true
endfunction
function Trig_Shadow_Flare_Actions takes nothing returns nothing
call TerrainDeformationRippleBJ( 1.00, true, GetRectCenter(RectFromCenterSizeBJ(GetUnitLoc(GetSpellAbilityUnit()), 400.00, 400.00)), 1024, 1024, 64, 1, 512 )
call CinematicFadeBJ( bj_CINEFADETYPE_FADEOUTIN, 1.00, "ReplaceableTextures\\CameraMasks\\DreamFilter_Mask.blp", 0, 0, 0, 0.00 )
endfunction
//===========================================================================
function InitTrig_Shadow_Flare takes nothing returns nothing
set gg_trg_Shadow_Flare = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Shadow_Flare, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Shadow_Flare, Condition( function Trig_Shadow_Flare_Conditions ) )
call TriggerAddAction( gg_trg_Shadow_Flare, function Trig_Shadow_Flare_Actions )
endfunction
function Trig_Select_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'Eevi' ) ) then
return false
endif
return true
endfunction
function Trig_Select_Actions takes nothing returns nothing
call PlaySoundOnUnitBJ( gg_snd_IllidanWhat4, 100, GetTriggerUnit() )
endfunction
//===========================================================================
function InitTrig_Select takes nothing returns nothing
set gg_trg_Select = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Select, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Select, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Select, Player(2), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Select, Player(3), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Select, Player(4), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Select, Player(5), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Select, Player(6), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Select, Player(7), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Select, Player(8), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Select, Player(9), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Select, Player(10), true )
call TriggerAddCondition( gg_trg_Select, Condition( function Trig_Select_Conditions ) )
call TriggerAddAction( gg_trg_Select, function Trig_Select_Actions )
endfunction
function Trig_Move_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'Eevi' ) ) then
return false
endif
return true
endfunction
function Trig_Move_Actions takes nothing returns nothing
call PlaySoundOnUnitBJ( gg_snd_IllidanYes1, 100, GetTriggerUnit() )
endfunction
//===========================================================================
function InitTrig_Move takes nothing returns nothing
set gg_trg_Move = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Move, EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerAddCondition( gg_trg_Move, Condition( function Trig_Move_Conditions ) )
call TriggerAddAction( gg_trg_Move, function Trig_Move_Actions )
endfunction
function Trig_Attack_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'Eevi' ) ) then
return false
endif
return true
endfunction
function Trig_Attack_Actions takes nothing returns nothing
call PlaySoundOnUnitBJ( gg_snd_IllidanYesAttack3, 100, GetTriggerUnit() )
endfunction
//===========================================================================
function InitTrig_Attack takes nothing returns nothing
set gg_trg_Attack = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Attack, EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER )
call TriggerAddCondition( gg_trg_Attack, Condition( function Trig_Attack_Conditions ) )
call TriggerAddAction( gg_trg_Attack, function Trig_Attack_Actions )
endfunction
function Trig_Animals_Func002C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I02X' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I02Y' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I02Z' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I030' ) ) then
return true
endif
return false
endfunction
function Trig_Animals_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'ewsp' ) ) then
return false
endif
if ( not Trig_Animals_Func002C() ) then
return false
endif
return true
endfunction
function Trig_Animals_Actions takes nothing returns nothing
call UnitAddAbilityBJ( 'A027', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Animals takes nothing returns nothing
set gg_trg_Animals = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Animals, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Animals, Condition( function Trig_Animals_Conditions ) )
call TriggerAddAction( gg_trg_Animals, function Trig_Animals_Actions )
endfunction
function Trig_Animals_Lose_Func001C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I02X' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I02Y' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I02Z' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I030' ) ) then
return true
endif
return false
endfunction
function Trig_Animals_Lose_Conditions takes nothing returns boolean
if ( not Trig_Animals_Lose_Func001C() ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H00W' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H00O' ) ) then
return false
endif
return true
endfunction
function Trig_Animals_Lose_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'A027', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Animals_Lose takes nothing returns nothing
set gg_trg_Animals_Lose = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Animals_Lose, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_Animals_Lose, Condition( function Trig_Animals_Lose_Conditions ) )
call TriggerAddAction( gg_trg_Animals_Lose, function Trig_Animals_Lose_Actions )
endfunction
function Trig_Aim_Func002C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I02Y' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I02Z' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I030' ) ) then
return true
endif
return false
endfunction
function Trig_Aim_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'ewsp' ) ) then
return false
endif
if ( not Trig_Aim_Func002C() ) then
return false
endif
return true
endfunction
function Trig_Aim_Actions takes nothing returns nothing
call UnitAddAbilityBJ( 'A028', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Aim takes nothing returns nothing
set gg_trg_Aim = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Aim, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Aim, Condition( function Trig_Aim_Conditions ) )
call TriggerAddAction( gg_trg_Aim, function Trig_Aim_Actions )
endfunction
function Trig_Aim_Lose_Func001C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I02Y' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I02Z' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I030' ) ) then
return true
endif
return false
endfunction
function Trig_Aim_Lose_Conditions takes nothing returns boolean
if ( not Trig_Aim_Lose_Func001C() ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H00W' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H00O' ) ) then
return false
endif
return true
endfunction
function Trig_Aim_Lose_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'A028', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Aim_Lose takes nothing returns nothing
set gg_trg_Aim_Lose = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Aim_Lose, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_Aim_Lose, Condition( function Trig_Aim_Lose_Conditions ) )
call TriggerAddAction( gg_trg_Aim_Lose, function Trig_Aim_Lose_Actions )
endfunction
function Trig_Xfight_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I030' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'ewsp' ) ) then
return false
endif
return true
endfunction
function Trig_Xfight_Actions takes nothing returns nothing
call UnitAddAbilityBJ( 'A029', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Xfight takes nothing returns nothing
set gg_trg_Xfight = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Xfight, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Xfight, Condition( function Trig_Xfight_Conditions ) )
call TriggerAddAction( gg_trg_Xfight, function Trig_Xfight_Actions )
endfunction
function Trig_Xfight_Lose_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I030' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H00W' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H00O' ) ) then
return false
endif
return true
endfunction
function Trig_Xfight_Lose_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'A029', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Xfight_Lose takes nothing returns nothing
set gg_trg_Xfight_Lose = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Xfight_Lose, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_Xfight_Lose, Condition( function Trig_Xfight_Lose_Conditions ) )
call TriggerAddAction( gg_trg_Xfight_Lose, function Trig_Xfight_Lose_Actions )
endfunction
function Trig_Charm_Func001C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I02Q' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I03F' ) ) then
return true
endif
return false
endfunction
function Trig_Charm_Conditions takes nothing returns boolean
if ( not Trig_Charm_Func001C() ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'ewsp' ) ) then
return false
endif
return true
endfunction
function Trig_Charm_Actions takes nothing returns nothing
call UnitAddAbilityBJ( 'A020', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Charm takes nothing returns nothing
set gg_trg_Charm = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Charm, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Charm, Condition( function Trig_Charm_Conditions ) )
call TriggerAddAction( gg_trg_Charm, function Trig_Charm_Actions )
endfunction
function Trig_Charm_Lose_Func001C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I02Q' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I03F' ) ) then
return true
endif
return false
endfunction
function Trig_Charm_Lose_Conditions takes nothing returns boolean
if ( not Trig_Charm_Lose_Func001C() ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H00P' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H013' ) ) then
return false
endif
return true
endfunction
function Trig_Charm_Lose_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'A020', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Charm_Lose takes nothing returns nothing
set gg_trg_Charm_Lose = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Charm_Lose, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_Charm_Lose, Condition( function Trig_Charm_Lose_Conditions ) )
call TriggerAddAction( gg_trg_Charm_Lose, function Trig_Charm_Lose_Actions )
endfunction
function Trig_Berzerker_lvl_2_Bonus_Func004C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01A' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01B' ) ) then
return true
endif
return false
endfunction
function Trig_Berzerker_lvl_2_Bonus_Conditions takes nothing returns boolean
if ( not Trig_Berzerker_lvl_2_Bonus_Func004C() ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'ewsp' ) ) then
return false
endif
return true
endfunction
function Trig_Berzerker_lvl_2_Bonus_Actions takes nothing returns nothing
call UnitAddAbilityBJ( 'AIs2', GetManipulatingUnit() )
call UnitAddAbilityBJ( 'AIms', GetManipulatingUnit() )
call UnitAddAbilityBJ( 'AIl2', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Berzerker_lvl_2_Bonus takes nothing returns nothing
set gg_trg_Berzerker_lvl_2_Bonus = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Berzerker_lvl_2_Bonus, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Berzerker_lvl_2_Bonus, Condition( function Trig_Berzerker_lvl_2_Bonus_Conditions ) )
call TriggerAddAction( gg_trg_Berzerker_lvl_2_Bonus, function Trig_Berzerker_lvl_2_Bonus_Actions )
endfunction
function Trig_Berzerker_lvl_2_Bonus_Lose_Func004C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01A' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01B' ) ) then
return true
endif
return false
endfunction
function Trig_Berzerker_lvl_2_Bonus_Lose_Conditions takes nothing returns boolean
if ( not Trig_Berzerker_lvl_2_Bonus_Lose_Func004C() ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H022' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H006' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H01B' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H01L' ) ) then
return false
endif
return true
endfunction
function Trig_Berzerker_lvl_2_Bonus_Lose_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'AIs2', GetManipulatingUnit() )
call UnitRemoveAbilityBJ( 'AIl2', GetManipulatingUnit() )
call UnitRemoveAbilityBJ( 'AIms', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Berzerker_lvl_2_Bonus_Lose takes nothing returns nothing
set gg_trg_Berzerker_lvl_2_Bonus_Lose = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Berzerker_lvl_2_Bonus_Lose, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_Berzerker_lvl_2_Bonus_Lose, Condition( function Trig_Berzerker_lvl_2_Bonus_Lose_Conditions ) )
call TriggerAddAction( gg_trg_Berzerker_lvl_2_Bonus_Lose, function Trig_Berzerker_lvl_2_Bonus_Lose_Actions )
endfunction
function Trig_Bash_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I01B' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'ewsp' ) ) then
return false
endif
return true
endfunction
function Trig_Bash_Actions takes nothing returns nothing
call UnitAddAbilityBJ( 'A036', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Bash takes nothing returns nothing
set gg_trg_Bash = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Bash, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Bash, Condition( function Trig_Bash_Conditions ) )
call TriggerAddAction( gg_trg_Bash, function Trig_Bash_Actions )
endfunction
function Trig_Bash_Lose_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I01B' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H022' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H006' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H01B' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H01L' ) ) then
return false
endif
return true
endfunction
function Trig_Bash_Lose_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'A036', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Bash_Lose takes nothing returns nothing
set gg_trg_Bash_Lose = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Bash_Lose, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_Bash_Lose, Condition( function Trig_Bash_Lose_Conditions ) )
call TriggerAddAction( gg_trg_Bash_Lose, function Trig_Bash_Lose_Actions )
endfunction
function Trig_Black_Belt_Evasion_Func001C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05U' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05V' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05W' ) ) then
return true
endif
return false
endfunction
function Trig_Black_Belt_Evasion_Conditions takes nothing returns boolean
if ( not Trig_Black_Belt_Evasion_Func001C() ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'ewsp' ) ) then
return false
endif
return true
endfunction
function Trig_Black_Belt_Evasion_Func003C takes nothing returns boolean
if ( not ( GetHeroLevel(GetManipulatingUnit()) >= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Black_Belt_Evasion_Actions takes nothing returns nothing
if ( Trig_Black_Belt_Evasion_Func003C() ) then
call UnitAddAbilityBJ( 'A04M', GetManipulatingUnit() )
else
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
endif
endfunction
//===========================================================================
function InitTrig_Black_Belt_Evasion takes nothing returns nothing
set gg_trg_Black_Belt_Evasion = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Black_Belt_Evasion, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Black_Belt_Evasion, Condition( function Trig_Black_Belt_Evasion_Conditions ) )
call TriggerAddAction( gg_trg_Black_Belt_Evasion, function Trig_Black_Belt_Evasion_Actions )
endfunction
function Trig_Black_Belt_Evasion_lose_Func001C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05U' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05V' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05W' ) ) then
return true
endif
return false
endfunction
function Trig_Black_Belt_Evasion_lose_Conditions takes nothing returns boolean
if ( not Trig_Black_Belt_Evasion_lose_Func001C() ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H01F' ) ) then
return false
endif
return true
endfunction
function Trig_Black_Belt_Evasion_lose_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'A04M', GetManipulatingUnit() )
call TriggerSleepAction( 0.20 )
call UnitRemoveAbilityBJ( 'A04M', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Black_Belt_Evasion_lose takes nothing returns nothing
set gg_trg_Black_Belt_Evasion_lose = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Black_Belt_Evasion_lose, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_Black_Belt_Evasion_lose, Condition( function Trig_Black_Belt_Evasion_lose_Conditions ) )
call TriggerAddAction( gg_trg_Black_Belt_Evasion_lose, function Trig_Black_Belt_Evasion_lose_Actions )
endfunction
function Trig_Black_Belt_Aura_Func001C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05V' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05W' ) ) then
return true
endif
return false
endfunction
function Trig_Black_Belt_Aura_Conditions takes nothing returns boolean
if ( not Trig_Black_Belt_Aura_Func001C() ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'ewsp' ) ) then
return false
endif
return true
endfunction
function Trig_Black_Belt_Aura_Func003C takes nothing returns boolean
if ( not ( GetHeroLevel(GetManipulatingUnit()) >= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Black_Belt_Aura_Actions takes nothing returns nothing
if ( Trig_Black_Belt_Aura_Func003C() ) then
call UnitAddAbilityBJ( 'A04J', GetManipulatingUnit() )
else
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
endif
endfunction
//===========================================================================
function InitTrig_Black_Belt_Aura takes nothing returns nothing
set gg_trg_Black_Belt_Aura = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Black_Belt_Aura, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Black_Belt_Aura, Condition( function Trig_Black_Belt_Aura_Conditions ) )
call TriggerAddAction( gg_trg_Black_Belt_Aura, function Trig_Black_Belt_Aura_Actions )
endfunction
function Trig_Black_Belt_Aura_Lose_Func001C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05V' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05W' ) ) then
return true
endif
return false
endfunction
function Trig_Black_Belt_Aura_Lose_Conditions takes nothing returns boolean
if ( not Trig_Black_Belt_Aura_Lose_Func001C() ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H01F' ) ) then
return false
endif
return true
endfunction
function Trig_Black_Belt_Aura_Lose_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'A04J', GetManipulatingUnit() )
call TriggerSleepAction( 0.20 )
call UnitRemoveAbilityBJ( 'A04J', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Black_Belt_Aura_Lose takes nothing returns nothing
set gg_trg_Black_Belt_Aura_Lose = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Black_Belt_Aura_Lose, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_Black_Belt_Aura_Lose, Condition( function Trig_Black_Belt_Aura_Lose_Conditions ) )
call TriggerAddAction( gg_trg_Black_Belt_Aura_Lose, function Trig_Black_Belt_Aura_Lose_Actions )
endfunction
function Trig_Black_Belt_Battle_Call_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I05W' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'ewsp' ) ) then
return false
endif
return true
endfunction
function Trig_Black_Belt_Battle_Call_Func001C takes nothing returns boolean
if ( not ( GetHeroLevel(GetManipulatingUnit()) >= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Black_Belt_Battle_Call_Actions takes nothing returns nothing
if ( Trig_Black_Belt_Battle_Call_Func001C() ) then
call UnitAddAbilityBJ( 'A04N', GetManipulatingUnit() )
else
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
endif
endfunction
//===========================================================================
function InitTrig_Black_Belt_Battle_Call takes nothing returns nothing
set gg_trg_Black_Belt_Battle_Call = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Black_Belt_Battle_Call, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Black_Belt_Battle_Call, Condition( function Trig_Black_Belt_Battle_Call_Conditions ) )
call TriggerAddAction( gg_trg_Black_Belt_Battle_Call, function Trig_Black_Belt_Battle_Call_Actions )
endfunction
function Trig_Black_Belt_Battle_Call_Lose_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I05W' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H01F' ) ) then
return false
endif
return true
endfunction
function Trig_Black_Belt_Battle_Call_Lose_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'A04N', GetManipulatingUnit() )
call TriggerSleepAction( 0.20 )
call UnitRemoveAbilityBJ( 'A04N', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Black_Belt_Battle_Call_Lose takes nothing returns nothing
set gg_trg_Black_Belt_Battle_Call_Lose = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Black_Belt_Battle_Call_Lose, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_Black_Belt_Battle_Call_Lose, Condition( function Trig_Black_Belt_Battle_Call_Lose_Conditions ) )
call TriggerAddAction( gg_trg_Black_Belt_Battle_Call_Lose, function Trig_Black_Belt_Battle_Call_Lose_Actions )
endfunction
function Trig_Black_Mage_Bonus_Func002C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I010' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I011' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05Y' ) ) then
return true
endif
return false
endfunction
function Trig_Black_Mage_Bonus_Conditions takes nothing returns boolean
if ( not Trig_Black_Mage_Bonus_Func002C() ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'ewsp' ) ) then
return false
endif
return true
endfunction
function Trig_Black_Mage_Bonus_Func001C takes nothing returns boolean
if ( not ( GetHeroLevel(GetManipulatingUnit()) >= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Black_Mage_Bonus_Actions takes nothing returns nothing
if ( Trig_Black_Mage_Bonus_Func001C() ) then
call UnitAddAbilityBJ( 'AIrm', GetManipulatingUnit() )
call UnitAddAbilityBJ( 'AIbm', GetManipulatingUnit() )
else
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
endif
endfunction
//===========================================================================
function InitTrig_Black_Mage_Bonus takes nothing returns nothing
set gg_trg_Black_Mage_Bonus = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Black_Mage_Bonus, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Black_Mage_Bonus, Condition( function Trig_Black_Mage_Bonus_Conditions ) )
call TriggerAddAction( gg_trg_Black_Mage_Bonus, function Trig_Black_Mage_Bonus_Actions )
endfunction
function Trig_Black_Mage_Bonus_Lose_Func003C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I010' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I011' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05Y' ) ) then
return true
endif
return false
endfunction
function Trig_Black_Mage_Bonus_Lose_Conditions takes nothing returns boolean
if ( not Trig_Black_Mage_Bonus_Lose_Func003C() ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H002' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H010' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H01S' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H00T' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H01D' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H01I' ) ) then
return false
endif
return true
endfunction
function Trig_Black_Mage_Bonus_Lose_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'AIbm', GetManipulatingUnit() )
call UnitRemoveAbilityBJ( 'AIrm', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Black_Mage_Bonus_Lose takes nothing returns nothing
set gg_trg_Black_Mage_Bonus_Lose = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Black_Mage_Bonus_Lose, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_Black_Mage_Bonus_Lose, Condition( function Trig_Black_Mage_Bonus_Lose_Conditions ) )
call TriggerAddAction( gg_trg_Black_Mage_Bonus_Lose, function Trig_Black_Mage_Bonus_Lose_Actions )
endfunction
function Trig_Black_Mage_Death_Aura_Func002C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05Y' ) ) then
return true
endif
return false
endfunction
function Trig_Black_Mage_Death_Aura_Conditions takes nothing returns boolean
if ( not Trig_Black_Mage_Death_Aura_Func002C() ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'ewsp' ) ) then
return false
endif
return true
endfunction
function Trig_Black_Mage_Death_Aura_Func001C takes nothing returns boolean
if ( not ( GetHeroLevel(GetManipulatingUnit()) >= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Black_Mage_Death_Aura_Actions takes nothing returns nothing
if ( Trig_Black_Mage_Death_Aura_Func001C() ) then
call UnitAddAbilityBJ( 'A04P', GetManipulatingUnit() )
else
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
endif
endfunction
//===========================================================================
function InitTrig_Black_Mage_Death_Aura takes nothing returns nothing
set gg_trg_Black_Mage_Death_Aura = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Black_Mage_Death_Aura, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Black_Mage_Death_Aura, Condition( function Trig_Black_Mage_Death_Aura_Conditions ) )
call TriggerAddAction( gg_trg_Black_Mage_Death_Aura, function Trig_Black_Mage_Death_Aura_Actions )
endfunction
function Trig_Black_Mage_Death_Aura_Lose_Func004C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05Y' ) ) then
return true
endif
return false
endfunction
function Trig_Black_Mage_Death_Aura_Lose_Conditions takes nothing returns boolean
if ( not Trig_Black_Mage_Death_Aura_Lose_Func004C() ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H002' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H010' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H01S' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H00T' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H01D' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H01I' ) ) then
return false
endif
return true
endfunction
function Trig_Black_Mage_Death_Aura_Lose_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'A04P', GetManipulatingUnit() )
call TriggerSleepAction( 0.02 )
call UnitRemoveAbilityBJ( 'A04P', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Black_Mage_Death_Aura_Lose takes nothing returns nothing
set gg_trg_Black_Mage_Death_Aura_Lose = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Black_Mage_Death_Aura_Lose, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_Black_Mage_Death_Aura_Lose, Condition( function Trig_Black_Mage_Death_Aura_Lose_Conditions ) )
call TriggerAddAction( gg_trg_Black_Mage_Death_Aura_Lose, function Trig_Black_Mage_Death_Aura_Lose_Actions )
endfunction
function Trig_Create_Potion_Func002C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I02R' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05T' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05X' ) ) then
return true
endif
return false
endfunction
function Trig_Create_Potion_Conditions takes nothing returns boolean
if ( not Trig_Create_Potion_Func002C() ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'ewsp' ) ) then
return false
endif
return true
endfunction
function Trig_Create_Potion_Func001C takes nothing returns boolean
if ( not ( GetHeroLevel(GetTriggerUnit()) >= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Create_Potion_Actions takes nothing returns nothing
if ( Trig_Create_Potion_Func001C() ) then
call UnitAddAbilityBJ( 'A02B', GetManipulatingUnit() )
else
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
endif
endfunction
//===========================================================================
function InitTrig_Create_Potion takes nothing returns nothing
set gg_trg_Create_Potion = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Create_Potion, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Create_Potion, Condition( function Trig_Create_Potion_Conditions ) )
call TriggerAddAction( gg_trg_Create_Potion, function Trig_Create_Potion_Actions )
endfunction
function Trig_Create_Potion_Lose_Func001C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I02R' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05T' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05X' ) ) then
return true
endif
return false
endfunction
function Trig_Create_Potion_Lose_Conditions takes nothing returns boolean
if ( not Trig_Create_Potion_Lose_Func001C() ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H014' ) ) then
return false
endif
return true
endfunction
function Trig_Create_Potion_Lose_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'A02B', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Create_Potion_Lose takes nothing returns nothing
set gg_trg_Create_Potion_Lose = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Create_Potion_Lose, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_Create_Potion_Lose, Condition( function Trig_Create_Potion_Lose_Conditions ) )
call TriggerAddAction( gg_trg_Create_Potion_Lose, function Trig_Create_Potion_Lose_Actions )
endfunction
function Trig_Molotov_Cocktail_Func001C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05T' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05X' ) ) then
return true
endif
return false
endfunction
function Trig_Molotov_Cocktail_Conditions takes nothing returns boolean
if ( not Trig_Molotov_Cocktail_Func001C() ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'ewsp' ) ) then
return false
endif
return true
endfunction
function Trig_Molotov_Cocktail_Func003C takes nothing returns boolean
if ( not ( GetHeroLevel(GetManipulatingUnit()) >= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Molotov_Cocktail_Actions takes nothing returns nothing
if ( Trig_Molotov_Cocktail_Func003C() ) then
call UnitAddAbilityBJ( 'A04L', GetManipulatingUnit() )
else
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
endif
endfunction
//===========================================================================
function InitTrig_Molotov_Cocktail takes nothing returns nothing
set gg_trg_Molotov_Cocktail = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Molotov_Cocktail, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Molotov_Cocktail, Condition( function Trig_Molotov_Cocktail_Conditions ) )
call TriggerAddAction( gg_trg_Molotov_Cocktail, function Trig_Molotov_Cocktail_Actions )
endfunction
function Trig_Molotov_Cocktail_Lose_Func001C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05T' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05X' ) ) then
return true
endif
return false
endfunction
function Trig_Molotov_Cocktail_Lose_Conditions takes nothing returns boolean
if ( not Trig_Molotov_Cocktail_Lose_Func001C() ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H014' ) ) then
return false
endif
return true
endfunction
function Trig_Molotov_Cocktail_Lose_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'A04L', GetManipulatingUnit() )
call TriggerSleepAction( 0.20 )
call UnitRemoveAbilityBJ( 'A04L', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Molotov_Cocktail_Lose takes nothing returns nothing
set gg_trg_Molotov_Cocktail_Lose = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Molotov_Cocktail_Lose, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_Molotov_Cocktail_Lose, Condition( function Trig_Molotov_Cocktail_Lose_Conditions ) )
call TriggerAddAction( gg_trg_Molotov_Cocktail_Lose, function Trig_Molotov_Cocktail_Lose_Actions )
endfunction
function Trig_Shizer_Geyser_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I05X' ) ) then
return false
endif
return true
endfunction
function Trig_Shizer_Geyser_Func001C takes nothing returns boolean
if ( not ( GetHeroLevel(GetManipulatingUnit()) >= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Shizer_Geyser_Actions takes nothing returns nothing
if ( Trig_Shizer_Geyser_Func001C() ) then
call UnitAddAbilityBJ( 'A04O', GetManipulatingUnit() )
else
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
endif
endfunction
//===========================================================================
function InitTrig_Shizer_Geyser takes nothing returns nothing
set gg_trg_Shizer_Geyser = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Shizer_Geyser, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Shizer_Geyser, Condition( function Trig_Shizer_Geyser_Conditions ) )
call TriggerAddAction( gg_trg_Shizer_Geyser, function Trig_Shizer_Geyser_Actions )
endfunction
function Trig_Shizer_Geyser_Lose_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I05X' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H014' ) ) then
return false
endif
return true
endfunction
function Trig_Shizer_Geyser_Lose_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'A04O', GetManipulatingUnit() )
call TriggerSleepAction( 0.20 )
call UnitRemoveAbilityBJ( 'A04O', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Shizer_Geyser_Lose takes nothing returns nothing
set gg_trg_Shizer_Geyser_Lose = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Shizer_Geyser_Lose, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_Shizer_Geyser_Lose, Condition( function Trig_Shizer_Geyser_Lose_Conditions ) )
call TriggerAddAction( gg_trg_Shizer_Geyser_Lose, function Trig_Shizer_Geyser_Lose_Actions )
endfunction
function Trig_Dark_Wave_Func001C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I02U' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I02T' ) ) then
return true
endif
return false
endfunction
function Trig_Dark_Wave_Conditions takes nothing returns boolean
if ( not Trig_Dark_Wave_Func001C() ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'ewsp' ) ) then
return false
endif
return true
endfunction
function Trig_Dark_Wave_Actions takes nothing returns nothing
call UnitAddAbilityBJ( 'A02A', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Dark_Wave takes nothing returns nothing
set gg_trg_Dark_Wave = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Dark_Wave, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Dark_Wave, Condition( function Trig_Dark_Wave_Conditions ) )
call TriggerAddAction( gg_trg_Dark_Wave, function Trig_Dark_Wave_Actions )
endfunction
function Trig_Dark_Wave_Lose_Func001C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I02U' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I02T' ) ) then
return true
endif
return false
endfunction
function Trig_Dark_Wave_Lose_Conditions takes nothing returns boolean
if ( not Trig_Dark_Wave_Lose_Func001C() ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H024' ) ) then
return false
endif
return true
endfunction
function Trig_Dark_Wave_Lose_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'A02A', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Dark_Wave_Lose takes nothing returns nothing
set gg_trg_Dark_Wave_Lose = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Dark_Wave_Lose, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_Dark_Wave_Lose, Condition( function Trig_Dark_Wave_Lose_Conditions ) )
call TriggerAddAction( gg_trg_Dark_Wave_Lose, function Trig_Dark_Wave_Lose_Actions )
endfunction
function Trig_Jump_Func001C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I02V' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I02W' ) ) then
return true
endif
return false
endfunction
function Trig_Jump_Conditions takes nothing returns boolean
if ( not Trig_Jump_Func001C() ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'ewsp' ) ) then
return false
endif
return true
endfunction
function Trig_Jump_Actions takes nothing returns nothing
call UnitAddAbilityBJ( 'A02C', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Jump takes nothing returns nothing
set gg_trg_Jump = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Jump, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Jump, Condition( function Trig_Jump_Conditions ) )
call TriggerAddAction( gg_trg_Jump, function Trig_Jump_Actions )
endfunction
function Trig_Jump_Lose_Func001C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I02V' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I02W' ) ) then
return true
endif
return false
endfunction
function Trig_Jump_Lose_Conditions takes nothing returns boolean
if ( not Trig_Jump_Lose_Func001C() ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H023' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H01K' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H01C' ) ) then
return false
endif
return true
endfunction
function Trig_Jump_Lose_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'A02C', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Jump_Lose takes nothing returns nothing
set gg_trg_Jump_Lose = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Jump_Lose, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_Jump_Lose, Condition( function Trig_Jump_Lose_Conditions ) )
call TriggerAddAction( gg_trg_Jump_Lose, function Trig_Jump_Lose_Actions )
endfunction
function Trig_Taunt_Func002C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I001' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I002' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I009' ) ) then
return true
endif
return false
endfunction
function Trig_Taunt_Conditions takes nothing returns boolean
if ( not Trig_Taunt_Func002C() ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'ewsp' ) ) then
return false
endif
return true
endfunction
function Trig_Taunt_Func001C takes nothing returns boolean
if ( not ( GetHeroLevel(GetManipulatingUnit()) >= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Taunt_Actions takes nothing returns nothing
if ( Trig_Taunt_Func001C() ) then
call UnitAddAbilityBJ( 'A035', GetManipulatingUnit() )
else
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
endif
endfunction
//===========================================================================
function InitTrig_Taunt takes nothing returns nothing
set gg_trg_Taunt = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Taunt, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Taunt, Condition( function Trig_Taunt_Conditions ) )
call TriggerAddAction( gg_trg_Taunt, function Trig_Taunt_Actions )
endfunction
function Trig_Taunt_Lose_Func001C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I009' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I002' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I001' ) ) then
return true
endif
return false
endfunction
function Trig_Taunt_Lose_Conditions takes nothing returns boolean
if ( not Trig_Taunt_Lose_Func001C() ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H021' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H01Q' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H01H' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H00Y' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H01A' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H001' ) ) then
return false
endif
return true
endfunction
function Trig_Taunt_Lose_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'A035', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Taunt_Lose takes nothing returns nothing
set gg_trg_Taunt_Lose = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Taunt_Lose, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_Taunt_Lose, Condition( function Trig_Taunt_Lose_Conditions ) )
call TriggerAddAction( gg_trg_Taunt_Lose, function Trig_Taunt_Lose_Actions )
endfunction
function Trig_Protect_Func002C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I009' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I002' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I001' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I032' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I031' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I064' ) ) then
return true
endif
return false
endfunction
function Trig_Protect_Conditions takes nothing returns boolean
if ( not Trig_Protect_Func002C() ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H02D' ) ) then
return false
endif
return true
endfunction
function Trig_Protect_Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'ewsp' ) ) then
return false
endif
return true
endfunction
function Trig_Protect_Actions takes nothing returns nothing
if ( Trig_Protect_Func001C() ) then
call UnitAddAbilityBJ( 'A000', GetManipulatingUnit() )
else
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
endif
endfunction
//===========================================================================
function InitTrig_Protect takes nothing returns nothing
set gg_trg_Protect = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Protect, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Protect, Condition( function Trig_Protect_Conditions ) )
call TriggerAddAction( gg_trg_Protect, function Trig_Protect_Actions )
endfunction
function Trig_Protect_Lose_Func001C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I009' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I002' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I001' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I032' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I031' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I064' ) ) then
return true
endif
return false
endfunction
function Trig_Protect_Lose_Conditions takes nothing returns boolean
if ( not Trig_Protect_Lose_Func001C() ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H025' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H00R' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H021' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H01Q' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H01H' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H00Y' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H01A' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H001' ) ) then
return false
endif
return true
endfunction
function Trig_Protect_Lose_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'A000', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Protect_Lose takes nothing returns nothing
set gg_trg_Protect_Lose = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Protect_Lose, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_Protect_Lose, Condition( function Trig_Protect_Lose_Conditions ) )
call TriggerAddAction( gg_trg_Protect_Lose, function Trig_Protect_Lose_Actions )
endfunction
function Trig_Ensnare_Func002C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I064' ) ) then
return true
endif
return false
endfunction
function Trig_Ensnare_Conditions takes nothing returns boolean
if ( not Trig_Ensnare_Func002C() ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'ewsp' ) ) then
return false
endif
return true
endfunction
function Trig_Ensnare_Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'ewsp' ) ) then
return false
endif
return true
endfunction
function Trig_Ensnare_Actions takes nothing returns nothing
if ( Trig_Ensnare_Func001C() ) then
call UnitAddAbilityBJ( 'A04V', GetManipulatingUnit() )
else
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
endif
endfunction
//===========================================================================
function InitTrig_Ensnare takes nothing returns nothing
set gg_trg_Ensnare = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Ensnare, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Ensnare, Condition( function Trig_Ensnare_Conditions ) )
call TriggerAddAction( gg_trg_Ensnare, function Trig_Ensnare_Actions )
endfunction
function Trig_Ensnare_Lose_Func001C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I064' ) ) then
return true
endif
return false
endfunction
function Trig_Ensnare_Lose_Conditions takes nothing returns boolean
if ( not Trig_Ensnare_Lose_Func001C() ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H025' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H00R' ) ) then
return false
endif
return true
endfunction
function Trig_Ensnare_Lose_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'A04V', GetManipulatingUnit() )
call TriggerSleepAction( 0.02 )
call UnitRemoveAbilityBJ( 'A04V', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Ensnare_Lose takes nothing returns nothing
set gg_trg_Ensnare_Lose = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Ensnare_Lose, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_Ensnare_Lose, Condition( function Trig_Ensnare_Lose_Conditions ) )
call TriggerAddAction( gg_trg_Ensnare_Lose, function Trig_Ensnare_Lose_Actions )
endfunction
function Trig_Smoke_Func001C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I033' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I035' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I034' ) ) then
return true
endif
return false
endfunction
function Trig_Smoke_Conditions takes nothing returns boolean
if ( not Trig_Smoke_Func001C() ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'ewsp' ) ) then
return false
endif
return true
endfunction
function Trig_Smoke_Actions takes nothing returns nothing
call UnitAddAbilityBJ( 'A02E', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Smoke takes nothing returns nothing
set gg_trg_Smoke = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Smoke, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Smoke, Condition( function Trig_Smoke_Conditions ) )
call TriggerAddAction( gg_trg_Smoke, function Trig_Smoke_Actions )
endfunction
function Trig_Smoke_Lose_Func001C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I033' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I035' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I034' ) ) then
return true
endif
return false
endfunction
function Trig_Smoke_Lose_Conditions takes nothing returns boolean
if ( not Trig_Smoke_Lose_Func001C() ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H018' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H012' ) ) then
return false
endif
return true
endfunction
function Trig_Smoke_Lose_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'A02E', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Smoke_Lose takes nothing returns nothing
set gg_trg_Smoke_Lose = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Smoke_Lose, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_Smoke_Lose, Condition( function Trig_Smoke_Lose_Conditions ) )
call TriggerAddAction( gg_trg_Smoke_Lose, function Trig_Smoke_Lose_Actions )
endfunction
function Trig_Throw_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I03Z' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'ewsp' ) ) then
return false
endif
return true
endfunction
function Trig_Throw_Func001Func001Func001001001 takes nothing returns boolean
return ( GetUnitTypeId(GetManipulatingUnit()) == 'H018' )
endfunction
function Trig_Throw_Func001Func001Func001001002 takes nothing returns boolean
return ( GetUnitTypeId(GetManipulatingUnit()) == 'H012' )
endfunction
function Trig_Throw_Func001Func001Func001001 takes nothing returns boolean
return GetBooleanOr( Trig_Throw_Func001Func001Func001001001(), Trig_Throw_Func001Func001Func001001002() )
endfunction
function Trig_Throw_Func001Func001Func001002 takes nothing returns boolean
return ( GetHeroLevel(GetManipulatingUnit()) >= 20 )
endfunction
function Trig_Throw_Func001Func001C takes nothing returns boolean
if ( GetBooleanAnd( Trig_Throw_Func001Func001Func001001(), Trig_Throw_Func001Func001Func001002() ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I034') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I035') == true ) ) then
return true
endif
return false
endfunction
function Trig_Throw_Func001C takes nothing returns boolean
if ( not Trig_Throw_Func001Func001C() ) then
return false
endif
if ( not ( udg_HasShuriken[GetConvertedPlayerId(GetOwningPlayer(GetManipulatingUnit()))] == false ) ) then
return false
endif
return true
endfunction
function Trig_Throw_Actions takes nothing returns nothing
if ( Trig_Throw_Func001C() ) then
call UnitAddAbilityBJ( 'A02H', GetManipulatingUnit() )
set udg_HasShuriken[GetConvertedPlayerId(GetOwningPlayer(GetManipulatingUnit()))] = true
else
endif
endfunction
//===========================================================================
function InitTrig_Throw takes nothing returns nothing
set gg_trg_Throw = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Throw, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Throw, Condition( function Trig_Throw_Conditions ) )
call TriggerAddAction( gg_trg_Throw, function Trig_Throw_Actions )
endfunction
function Trig_Throw_Lose_Func001C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I035' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I034' ) ) then
return true
endif
return false
endfunction
function Trig_Throw_Lose_Conditions takes nothing returns boolean
if ( not Trig_Throw_Lose_Func001C() ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H018' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H012' ) ) then
return false
endif
return true
endfunction
function Trig_Throw_Lose_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'A02H', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Throw_Lose takes nothing returns nothing
set gg_trg_Throw_Lose = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Throw_Lose, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_Throw_Lose, Condition( function Trig_Throw_Lose_Conditions ) )
call TriggerAddAction( gg_trg_Throw_Lose, function Trig_Throw_Lose_Actions )
endfunction
function Trig_Spell_Immunity_Func002C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01G' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01H' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05Z' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01C' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I012' ) ) then
return true
endif
return false
endfunction
function Trig_Spell_Immunity_Conditions takes nothing returns boolean
if ( not Trig_Spell_Immunity_Func002C() ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'ewsp' ) ) then
return false
endif
return true
endfunction
function Trig_Spell_Immunity_Func001C takes nothing returns boolean
if ( not ( GetHeroLevel(GetManipulatingUnit()) >= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Spell_Immunity_Actions takes nothing returns nothing
if ( Trig_Spell_Immunity_Func001C() ) then
call UnitAddAbilityBJ( 'A037', GetManipulatingUnit() )
else
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
endif
endfunction
//===========================================================================
function InitTrig_Spell_Immunity takes nothing returns nothing
set gg_trg_Spell_Immunity = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Spell_Immunity, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Spell_Immunity, Condition( function Trig_Spell_Immunity_Conditions ) )
call TriggerAddAction( gg_trg_Spell_Immunity, function Trig_Spell_Immunity_Actions )
endfunction
function Trig_Spell_Immunity_Lose_Func002C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01G' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01H' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05Z' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01C' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I012' ) ) then
return true
endif
return false
endfunction
function Trig_Spell_Immunity_Lose_Conditions takes nothing returns boolean
if ( not Trig_Spell_Immunity_Lose_Func002C() ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H007' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H01M' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H01X' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H01Z' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H00U' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H01R' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H01N' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H00Z' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H003' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H017' ) ) then
return false
endif
return true
endfunction
function Trig_Spell_Immunity_Lose_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'A037', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Spell_Immunity_Lose takes nothing returns nothing
set gg_trg_Spell_Immunity_Lose = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Spell_Immunity_Lose, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_Spell_Immunity_Lose, Condition( function Trig_Spell_Immunity_Lose_Conditions ) )
call TriggerAddAction( gg_trg_Spell_Immunity_Lose, function Trig_Spell_Immunity_Lose_Actions )
endfunction
function Trig_Reflect_Func002C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01H' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05Z' ) ) then
return true
endif
return false
endfunction
function Trig_Reflect_Conditions takes nothing returns boolean
if ( not Trig_Reflect_Func002C() ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'ewsp' ) ) then
return false
endif
return true
endfunction
function Trig_Reflect_Func001C takes nothing returns boolean
if ( not ( GetHeroLevel(GetManipulatingUnit()) >= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Reflect_Actions takes nothing returns nothing
if ( Trig_Reflect_Func001C() ) then
call UnitAddAbilityBJ( 'A01O', GetManipulatingUnit() )
else
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
endif
endfunction
//===========================================================================
function InitTrig_Reflect takes nothing returns nothing
set gg_trg_Reflect = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Reflect, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Reflect, Condition( function Trig_Reflect_Conditions ) )
call TriggerAddAction( gg_trg_Reflect, function Trig_Reflect_Actions )
endfunction
function Trig_Reflect_Lose_Func001C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01H' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05Z' ) ) then
return true
endif
return false
endfunction
function Trig_Reflect_Lose_Conditions takes nothing returns boolean
if ( not Trig_Reflect_Lose_Func001C() ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H007' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H01M' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H01X' ) ) then
return false
endif
return true
endfunction
function Trig_Reflect_Lose_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'A01O', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Reflect_Lose takes nothing returns nothing
set gg_trg_Reflect_Lose = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Reflect_Lose, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_Reflect_Lose, Condition( function Trig_Reflect_Lose_Conditions ) )
call TriggerAddAction( gg_trg_Reflect_Lose, function Trig_Reflect_Lose_Actions )
endfunction
function Trig_Divine_Intervention_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I05Z' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'ewsp' ) ) then
return false
endif
return true
endfunction
function Trig_Divine_Intervention_Func001C takes nothing returns boolean
if ( not ( GetHeroLevel(GetManipulatingUnit()) >= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Divine_Intervention_Actions takes nothing returns nothing
if ( Trig_Divine_Intervention_Func001C() ) then
call UnitAddAbilityBJ( 'A04Q', GetManipulatingUnit() )
else
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
endif
endfunction
//===========================================================================
function InitTrig_Divine_Intervention takes nothing returns nothing
set gg_trg_Divine_Intervention = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Divine_Intervention, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Divine_Intervention, Condition( function Trig_Divine_Intervention_Conditions ) )
call TriggerAddAction( gg_trg_Divine_Intervention, function Trig_Divine_Intervention_Actions )
endfunction
function Trig_Divine_Intervention_Lose_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I05Z' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H007' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H01M' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H01X' ) ) then
return false
endif
return true
endfunction
function Trig_Divine_Intervention_Lose_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'A04Q', GetManipulatingUnit() )
call TriggerSleepAction( 0.02 )
call UnitRemoveAbilityBJ( 'A04Q', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Divine_Intervention_Lose takes nothing returns nothing
set gg_trg_Divine_Intervention_Lose = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Divine_Intervention_Lose, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_Divine_Intervention_Lose, Condition( function Trig_Divine_Intervention_Lose_Conditions ) )
call TriggerAddAction( gg_trg_Divine_Intervention_Lose, function Trig_Divine_Intervention_Lose_Actions )
endfunction
function Trig_Xmagic_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I015' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'ewsp' ) ) then
return false
endif
return true
endfunction
function Trig_Xmagic_Actions takes nothing returns nothing
call UnitAddAbilityBJ( 'A01Q', GetManipulatingUnit() )
set udg_Xmagix[GetConvertedPlayerId(GetOwningPlayer(GetManipulatingUnit()))] = 2
endfunction
//===========================================================================
function InitTrig_Xmagic takes nothing returns nothing
set gg_trg_Xmagic = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Xmagic, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Xmagic, Condition( function Trig_Xmagic_Conditions ) )
call TriggerAddAction( gg_trg_Xmagic, function Trig_Xmagic_Actions )
endfunction
function Trig_Xmagic_Lose_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I015' ) ) then
return false
endif
return true
endfunction
function Trig_Xmagic_Lose_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'A01Q', GetManipulatingUnit() )
set udg_Xmagix[GetConvertedPlayerId(GetOwningPlayer(GetManipulatingUnit()))] = 1
endfunction
//===========================================================================
function InitTrig_Xmagic_Lose takes nothing returns nothing
set gg_trg_Xmagic_Lose = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Xmagic_Lose, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_Xmagic_Lose, Condition( function Trig_Xmagic_Lose_Conditions ) )
call TriggerAddAction( gg_trg_Xmagic_Lose, function Trig_Xmagic_Lose_Actions )
endfunction
function Trig_Evasion_Func002C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01D' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01E' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01F' ) ) then
return true
endif
return false
endfunction
function Trig_Evasion_Conditions takes nothing returns boolean
if ( not Trig_Evasion_Func002C() ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'ewsp' ) ) then
return false
endif
return true
endfunction
function Trig_Evasion_Actions takes nothing returns nothing
call UnitAddAbilityBJ( 'A038', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Evasion takes nothing returns nothing
set gg_trg_Evasion = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Evasion, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Evasion, Condition( function Trig_Evasion_Conditions ) )
call TriggerAddAction( gg_trg_Evasion, function Trig_Evasion_Actions )
endfunction
function Trig_Evasion_Lose_Func002C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01D' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01E' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01F' ) ) then
return true
endif
return false
endfunction
function Trig_Evasion_Lose_Conditions takes nothing returns boolean
if ( not Trig_Evasion_Lose_Func002C() ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H008' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H016' ) ) then
return false
endif
return true
endfunction
function Trig_Evasion_Lose_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'A038', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Evasion_Lose takes nothing returns nothing
set gg_trg_Evasion_Lose = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Evasion_Lose, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_Evasion_Lose, Condition( function Trig_Evasion_Lose_Conditions ) )
call TriggerAddAction( gg_trg_Evasion_Lose, function Trig_Evasion_Lose_Actions )
endfunction
function Trig_Gil_Toss_Func001C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01E' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01F' ) ) then
return true
endif
return false
endfunction
function Trig_Gil_Toss_Conditions takes nothing returns boolean
if ( not Trig_Gil_Toss_Func001C() ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'ewsp' ) ) then
return false
endif
return true
endfunction
function Trig_Gil_Toss_Actions takes nothing returns nothing
call UnitAddAbilityBJ( 'AEfk', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Gil_Toss takes nothing returns nothing
set gg_trg_Gil_Toss = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Gil_Toss, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Gil_Toss, Condition( function Trig_Gil_Toss_Conditions ) )
call TriggerAddAction( gg_trg_Gil_Toss, function Trig_Gil_Toss_Actions )
endfunction
function Trig_Gil_Toss_Lose_Func001C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01E' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01F' ) ) then
return true
endif
return false
endfunction
function Trig_Gil_Toss_Lose_Conditions takes nothing returns boolean
if ( not Trig_Gil_Toss_Lose_Func001C() ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H008' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H016' ) ) then
return false
endif
return true
endfunction
function Trig_Gil_Toss_Lose_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'AEfk', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Gil_Toss_Lose takes nothing returns nothing
set gg_trg_Gil_Toss_Lose = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Gil_Toss_Lose, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_Gil_Toss_Lose, Condition( function Trig_Gil_Toss_Lose_Conditions ) )
call TriggerAddAction( gg_trg_Gil_Toss_Lose, function Trig_Gil_Toss_Lose_Actions )
endfunction
function Trig_Slash_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I01F' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'ewsp' ) ) then
return false
endif
return true
endfunction
function Trig_Slash_Actions takes nothing returns nothing
call UnitAddAbilityBJ( 'A01P', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Slash takes nothing returns nothing
set gg_trg_Slash = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Slash, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Slash, Condition( function Trig_Slash_Conditions ) )
call TriggerAddAction( gg_trg_Slash, function Trig_Slash_Actions )
endfunction
function Trig_Slash_Lose_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I01F' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H008' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H016' ) ) then
return false
endif
return true
endfunction
function Trig_Slash_Lose_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'A01P', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Slash_Lose takes nothing returns nothing
set gg_trg_Slash_Lose = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Slash_Lose, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_Slash_Lose, Condition( function Trig_Slash_Lose_Conditions ) )
call TriggerAddAction( gg_trg_Slash_Lose, function Trig_Slash_Lose_Actions )
endfunction
function Trig_Summoner_Bonus_Func002C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I039' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I038' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I03A' ) ) then
return true
endif
return false
endfunction
function Trig_Summoner_Bonus_Conditions takes nothing returns boolean
if ( not Trig_Summoner_Bonus_Func002C() ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'ewsp' ) ) then
return false
endif
return true
endfunction
function Trig_Summoner_Bonus_Actions takes nothing returns nothing
call UnitAddAbilityBJ( 'AI2m', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Summoner_Bonus takes nothing returns nothing
set gg_trg_Summoner_Bonus = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Summoner_Bonus, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Summoner_Bonus, Condition( function Trig_Summoner_Bonus_Conditions ) )
call TriggerAddAction( gg_trg_Summoner_Bonus, function Trig_Summoner_Bonus_Actions )
endfunction
function Trig_Summoner_Bonus_Lose_Func001C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I039' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I038' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I03A' ) ) then
return true
endif
return false
endfunction
function Trig_Summoner_Bonus_Lose_Conditions takes nothing returns boolean
if ( not Trig_Summoner_Bonus_Lose_Func001C() ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H00Q' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H011' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H01W' ) ) then
return false
endif
return true
endfunction
function Trig_Summoner_Bonus_Lose_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'AI2m', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Summoner_Bonus_Lose takes nothing returns nothing
set gg_trg_Summoner_Bonus_Lose = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Summoner_Bonus_Lose, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_Summoner_Bonus_Lose, Condition( function Trig_Summoner_Bonus_Lose_Conditions ) )
call TriggerAddAction( gg_trg_Summoner_Bonus_Lose, function Trig_Summoner_Bonus_Lose_Actions )
endfunction
function Trig_Dash_Func001C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I03C' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I03D' ) ) then
return true
endif
return false
endfunction
function Trig_Dash_Conditions takes nothing returns boolean
if ( not Trig_Dash_Func001C() ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'ewsp' ) ) then
return false
endif
return true
endfunction
function Trig_Dash_Actions takes nothing returns nothing
call UnitAddAbilityBJ( 'A02K', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Dash takes nothing returns nothing
set gg_trg_Dash = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Dash, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Dash, Condition( function Trig_Dash_Conditions ) )
call TriggerAddAction( gg_trg_Dash, function Trig_Dash_Actions )
endfunction
function Trig_Dash_Lose_Func001C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I03C' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I03D' ) ) then
return true
endif
return false
endfunction
function Trig_Dash_Lose_Conditions takes nothing returns boolean
if ( not Trig_Dash_Lose_Func001C() ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H015' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H01P' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H00N' ) ) then
return false
endif
return true
endfunction
function Trig_Dash_Lose_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'A02K', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Dash_Lose takes nothing returns nothing
set gg_trg_Dash_Lose = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Dash_Lose, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_Dash_Lose, Condition( function Trig_Dash_Lose_Conditions ) )
call TriggerAddAction( gg_trg_Dash_Lose, function Trig_Dash_Lose_Actions )
endfunction
function Trig_Steal_Func001C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I03B' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I03C' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I03D' ) ) then
return true
endif
return false
endfunction
function Trig_Steal_Conditions takes nothing returns boolean
if ( not Trig_Steal_Func001C() ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'ewsp' ) ) then
return false
endif
return true
endfunction
function Trig_Steal_Actions takes nothing returns nothing
call UnitAddAbilityBJ( 'A02I', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Steal takes nothing returns nothing
set gg_trg_Steal = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Steal, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Steal, Condition( function Trig_Steal_Conditions ) )
call TriggerAddAction( gg_trg_Steal, function Trig_Steal_Actions )
endfunction
function Trig_Steal_Lose_Func001C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I03B' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I03C' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I03D' ) ) then
return true
endif
return false
endfunction
function Trig_Steal_Lose_Conditions takes nothing returns boolean
if ( not Trig_Steal_Lose_Func001C() ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H015' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H01P' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H00N' ) ) then
return false
endif
return true
endfunction
function Trig_Steal_Lose_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'A02I', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Steal_Lose takes nothing returns nothing
set gg_trg_Steal_Lose = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Steal_Lose, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_Steal_Lose, Condition( function Trig_Steal_Lose_Conditions ) )
call TriggerAddAction( gg_trg_Steal_Lose, function Trig_Steal_Lose_Actions )
endfunction
function Trig_Footwork_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I03E' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'ewsp' ) ) then
return false
endif
return true
endfunction
function Trig_Footwork_Actions takes nothing returns nothing
call UnitAddAbilityBJ( 'A02L', GetManipulatingUnit() )
call UnitRemoveAbilityBJ( 'A02K', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Footwork takes nothing returns nothing
set gg_trg_Footwork = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Footwork, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Footwork, Condition( function Trig_Footwork_Conditions ) )
call TriggerAddAction( gg_trg_Footwork, function Trig_Footwork_Actions )
endfunction
function Trig_Footwork_Lose_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I03E' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H015' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H01P' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H00N' ) ) then
return false
endif
return true
endfunction
function Trig_Footwork_Lose_Func006Func002001 takes nothing returns boolean
return ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I03C') == true )
endfunction
function Trig_Footwork_Lose_Func006Func002002 takes nothing returns boolean
return ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I03D') == true )
endfunction
function Trig_Footwork_Lose_Func006C takes nothing returns boolean
if ( not GetBooleanOr( Trig_Footwork_Lose_Func006Func002001(), Trig_Footwork_Lose_Func006Func002002() ) ) then
return false
endif
return true
endfunction
function Trig_Footwork_Lose_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'A02L', GetManipulatingUnit() )
if ( Trig_Footwork_Lose_Func006C() ) then
call UnitAddAbilityBJ( 'A02K', GetManipulatingUnit() )
else
endif
endfunction
//===========================================================================
function InitTrig_Footwork_Lose takes nothing returns nothing
set gg_trg_Footwork_Lose = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Footwork_Lose, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_Footwork_Lose, Condition( function Trig_Footwork_Lose_Conditions ) )
call TriggerAddAction( gg_trg_Footwork_Lose, function Trig_Footwork_Lose_Actions )
endfunction
function Trig_Mug_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I03E' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'ewsp' ) ) then
return false
endif
return true
endfunction
function Trig_Mug_Actions takes nothing returns nothing
call UnitAddAbilityBJ( 'A02J', GetManipulatingUnit() )
call UnitRemoveAbilityBJ( 'A02I', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Mug takes nothing returns nothing
set gg_trg_Mug = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Mug, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Mug, Condition( function Trig_Mug_Conditions ) )
call TriggerAddAction( gg_trg_Mug, function Trig_Mug_Actions )
endfunction
function Trig_Mug_Lose_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I03E' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H015' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H01P' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H00N' ) ) then
return false
endif
return true
endfunction
function Trig_Mug_Lose_Func006Func002001 takes nothing returns boolean
return ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I03D') == true )
endfunction
function Trig_Mug_Lose_Func006Func002002001 takes nothing returns boolean
return ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I03C') == true )
endfunction
function Trig_Mug_Lose_Func006Func002002002 takes nothing returns boolean
return ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I03B') == true )
endfunction
function Trig_Mug_Lose_Func006Func002002 takes nothing returns boolean
return GetBooleanOr( Trig_Mug_Lose_Func006Func002002001(), Trig_Mug_Lose_Func006Func002002002() )
endfunction
function Trig_Mug_Lose_Func006C takes nothing returns boolean
if ( not GetBooleanOr( Trig_Mug_Lose_Func006Func002001(), Trig_Mug_Lose_Func006Func002002() ) ) then
return false
endif
return true
endfunction
function Trig_Mug_Lose_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'A02J', GetManipulatingUnit() )
if ( Trig_Mug_Lose_Func006C() ) then
call UnitAddAbilityBJ( 'A02I', GetManipulatingUnit() )
else
endif
endfunction
//===========================================================================
function InitTrig_Mug_Lose takes nothing returns nothing
set gg_trg_Mug_Lose = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Mug_Lose, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_Mug_Lose, Condition( function Trig_Mug_Lose_Conditions ) )
call TriggerAddAction( gg_trg_Mug_Lose, function Trig_Mug_Lose_Actions )
endfunction
function Trig_Time_Phase_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I065' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'ewsp' ) ) then
return false
endif
return true
endfunction
function Trig_Time_Phase_Func001C takes nothing returns boolean
if ( not ( GetHeroLevel(GetManipulatingUnit()) >= 150 ) ) then
return false
endif
return true
endfunction
function Trig_Time_Phase_Actions takes nothing returns nothing
if ( Trig_Time_Phase_Func001C() ) then
call UnitAddAbilityBJ( 'A04W', GetManipulatingUnit() )
else
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
endif
endfunction
//===========================================================================
function InitTrig_Time_Phase takes nothing returns nothing
set gg_trg_Time_Phase = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Time_Phase, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Time_Phase, Condition( function Trig_Time_Phase_Conditions ) )
call TriggerAddAction( gg_trg_Time_Phase, function Trig_Time_Phase_Actions )
endfunction
function Trig_Time_Phase_Lose_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I065' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H01J' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H005' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H01T' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H019' ) ) then
return false
endif
return true
endfunction
function Trig_Time_Phase_Lose_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'A04W', GetManipulatingUnit() )
call TriggerSleepAction( 0.02 )
call UnitRemoveAbilityBJ( 'A04W', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Time_Phase_Lose takes nothing returns nothing
set gg_trg_Time_Phase_Lose = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Time_Phase_Lose, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_Time_Phase_Lose, Condition( function Trig_Time_Phase_Lose_Conditions ) )
call TriggerAddAction( gg_trg_Time_Phase_Lose, function Trig_Time_Phase_Lose_Actions )
endfunction
function Trig_Archer_Levelup_Abilities_Func001C takes nothing returns boolean
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H00W' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H00O' ) ) then
return true
endif
return false
endfunction
function Trig_Archer_Levelup_Abilities_Conditions takes nothing returns boolean
if ( not Trig_Archer_Levelup_Abilities_Func001C() ) then
return false
endif
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 4 ) ) then
return false
endif
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 10 ) ) then
return false
endif
return true
endfunction
function Trig_Archer_Levelup_Abilities_Func004Func001Func001Func002C takes nothing returns boolean
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 1 ) ) then
return false
endif
return true
endfunction
function Trig_Archer_Levelup_Abilities_Func004Func001Func001C takes nothing returns boolean
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 20 ) ) then
return false
endif
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 2 ) ) then
return false
endif
return true
endfunction
function Trig_Archer_Levelup_Abilities_Func004Func001C takes nothing returns boolean
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 30 ) ) then
return false
endif
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 3 ) ) then
return false
endif
return true
endfunction
function Trig_Archer_Levelup_Abilities_Func004C takes nothing returns boolean
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 45 ) ) then
return false
endif
return true
endfunction
function Trig_Archer_Levelup_Abilities_Actions takes nothing returns nothing
if ( Trig_Archer_Levelup_Abilities_Func004C() ) then
call UnitAddAbilityBJ( 'A029', GetTriggerUnit() )
call UnitAddItemByIdSwapped( 'I030', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 4
else
if ( Trig_Archer_Levelup_Abilities_Func004Func001C() ) then
call UnitAddItemByIdSwapped( 'I02Z', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 3
else
if ( Trig_Archer_Levelup_Abilities_Func004Func001Func001C() ) then
call UnitAddAbilityBJ( 'A028', GetTriggerUnit() )
call UnitAddItemByIdSwapped( 'I02Y', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 2
else
if ( Trig_Archer_Levelup_Abilities_Func004Func001Func001Func002C() ) then
call UnitAddAbilityBJ( 'A027', GetTriggerUnit() )
call UnitAddItemByIdSwapped( 'I02X', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 1
else
endif
endif
endif
endif
endfunction
//===========================================================================
function InitTrig_Archer_Levelup_Abilities takes nothing returns nothing
set gg_trg_Archer_Levelup_Abilities = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Archer_Levelup_Abilities, EVENT_PLAYER_HERO_LEVEL )
call TriggerAddCondition( gg_trg_Archer_Levelup_Abilities, Condition( function Trig_Archer_Levelup_Abilities_Conditions ) )
call TriggerAddAction( gg_trg_Archer_Levelup_Abilities, function Trig_Archer_Levelup_Abilities_Actions )
endfunction
function Trig_Beastmaster_Levelup_Abilities_Func001C takes nothing returns boolean
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H00P' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H013' ) ) then
return true
endif
return false
endfunction
function Trig_Beastmaster_Levelup_Abilities_Conditions takes nothing returns boolean
if ( not Trig_Beastmaster_Levelup_Abilities_Func001C() ) then
return false
endif
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 4 ) ) then
return false
endif
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 15 ) ) then
return false
endif
return true
endfunction
function Trig_Beastmaster_Levelup_Abilities_Func004Func002C takes nothing returns boolean
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 2 ) ) then
return false
endif
return true
endfunction
function Trig_Beastmaster_Levelup_Abilities_Func004C takes nothing returns boolean
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 20 ) ) then
return false
endif
return true
endfunction
function Trig_Beastmaster_Levelup_Abilities_Actions takes nothing returns nothing
if ( Trig_Beastmaster_Levelup_Abilities_Func004C() ) then
call UnitAddItemByIdSwapped( 'I03F', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 4
else
if ( Trig_Beastmaster_Levelup_Abilities_Func004Func002C() ) then
call UnitAddAbilityBJ( 'A020', GetLevelingUnit() )
call UnitAddItemByIdSwapped( 'I02Q', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 2
else
endif
endif
endfunction
//===========================================================================
function InitTrig_Beastmaster_Levelup_Abilities takes nothing returns nothing
set gg_trg_Beastmaster_Levelup_Abilities = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Beastmaster_Levelup_Abilities, EVENT_PLAYER_HERO_LEVEL )
call TriggerAddCondition( gg_trg_Beastmaster_Levelup_Abilities, Condition( function Trig_Beastmaster_Levelup_Abilities_Conditions ) )
call TriggerAddAction( gg_trg_Beastmaster_Levelup_Abilities, function Trig_Beastmaster_Levelup_Abilities_Actions )
endfunction
function Trig_Berserker_Levelup_Abilities_Func001C takes nothing returns boolean
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H022' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H006' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H01B' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H01L' ) ) then
return true
endif
return false
endfunction
function Trig_Berserker_Levelup_Abilities_Conditions takes nothing returns boolean
if ( not Trig_Berserker_Levelup_Abilities_Func001C() ) then
return false
endif
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 4 ) ) then
return false
endif
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 8 ) ) then
return false
endif
return true
endfunction
function Trig_Berserker_Levelup_Abilities_Func004Func002Func004C takes nothing returns boolean
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 2 ) ) then
return false
endif
return true
endfunction
function Trig_Berserker_Levelup_Abilities_Func004Func002C takes nothing returns boolean
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 15 ) ) then
return false
endif
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 3 ) ) then
return false
endif
return true
endfunction
function Trig_Berserker_Levelup_Abilities_Func004C takes nothing returns boolean
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 25 ) ) then
return false
endif
return true
endfunction
function Trig_Berserker_Levelup_Abilities_Actions takes nothing returns nothing
if ( Trig_Berserker_Levelup_Abilities_Func004C() ) then
call UnitAddAbilityBJ( 'A036', GetLevelingUnit() )
call UnitAddItemByIdSwapped( 'I01B', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 4
else
if ( Trig_Berserker_Levelup_Abilities_Func004Func002C() ) then
call UnitAddAbilityBJ( 'AIs2', GetLevelingUnit() )
call UnitAddAbilityBJ( 'AIms', GetLevelingUnit() )
call UnitAddAbilityBJ( 'AIl2', GetLevelingUnit() )
call UnitAddItemByIdSwapped( 'I01A', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 3
else
if ( Trig_Berserker_Levelup_Abilities_Func004Func002Func004C() ) then
call UnitAddItemByIdSwapped( 'I019', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 2
else
endif
endif
endif
endfunction
//===========================================================================
function InitTrig_Berserker_Levelup_Abilities takes nothing returns nothing
set gg_trg_Berserker_Levelup_Abilities = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Berserker_Levelup_Abilities, EVENT_PLAYER_HERO_LEVEL )
call TriggerAddCondition( gg_trg_Berserker_Levelup_Abilities, Condition( function Trig_Berserker_Levelup_Abilities_Conditions ) )
call TriggerAddAction( gg_trg_Berserker_Levelup_Abilities, function Trig_Berserker_Levelup_Abilities_Actions )
endfunction
function Trig_Black_Belt_Levelup_Abilities_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetLevelingUnit()) == 'H01F' ) ) then
return false
endif
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 4 ) ) then
return false
endif
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 50 ) ) then
return false
endif
return true
endfunction
function Trig_Black_Belt_Levelup_Abilities_Func001Func005Func001C takes nothing returns boolean
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 2 ) ) then
return false
endif
return true
endfunction
function Trig_Black_Belt_Levelup_Abilities_Func001Func005C takes nothing returns boolean
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 100 ) ) then
return false
endif
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 3 ) ) then
return false
endif
return true
endfunction
function Trig_Black_Belt_Levelup_Abilities_Func001C takes nothing returns boolean
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 150 ) ) then
return false
endif
return true
endfunction
function Trig_Black_Belt_Levelup_Abilities_Actions takes nothing returns nothing
if ( Trig_Black_Belt_Levelup_Abilities_Func001C() ) then
call UnitAddAbilityBJ( 'A04N', GetLevelingUnit() )
call UnitAddItemByIdSwapped( 'I05W', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 4
else
if ( Trig_Black_Belt_Levelup_Abilities_Func001Func005C() ) then
call UnitAddAbilityBJ( 'A04J', GetLevelingUnit() )
call UnitAddItemByIdSwapped( 'I05V', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 3
else
if ( Trig_Black_Belt_Levelup_Abilities_Func001Func005Func001C() ) then
call UnitAddAbilityBJ( 'A04M', GetLevelingUnit() )
call UnitAddItemByIdSwapped( 'I05U', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 2
else
endif
endif
endif
endfunction
//===========================================================================
function InitTrig_Black_Belt_Levelup_Abilities takes nothing returns nothing
set gg_trg_Black_Belt_Levelup_Abilities = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Black_Belt_Levelup_Abilities, EVENT_PLAYER_HERO_LEVEL )
call TriggerAddCondition( gg_trg_Black_Belt_Levelup_Abilities, Condition( function Trig_Black_Belt_Levelup_Abilities_Conditions ) )
call TriggerAddAction( gg_trg_Black_Belt_Levelup_Abilities, function Trig_Black_Belt_Levelup_Abilities_Actions )
endfunction
function Trig_Black_Mage_Levelup_Abilities_Func002C takes nothing returns boolean
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H002' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H010' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H01S' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H00T' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H01D' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H01I' ) ) then
return true
endif
return false
endfunction
function Trig_Black_Mage_Levelup_Abilities_Conditions takes nothing returns boolean
if ( not Trig_Black_Mage_Levelup_Abilities_Func002C() ) then
return false
endif
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 4 ) ) then
return false
endif
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 15 ) ) then
return false
endif
return true
endfunction
function Trig_Black_Mage_Levelup_Abilities_Func001Func004Func001C takes nothing returns boolean
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 2 ) ) then
return false
endif
return true
endfunction
function Trig_Black_Mage_Levelup_Abilities_Func001Func004C takes nothing returns boolean
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 25 ) ) then
return false
endif
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 3 ) ) then
return false
endif
return true
endfunction
function Trig_Black_Mage_Levelup_Abilities_Func001C takes nothing returns boolean
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 150 ) ) then
return false
endif
return true
endfunction
function Trig_Black_Mage_Levelup_Abilities_Actions takes nothing returns nothing
if ( Trig_Black_Mage_Levelup_Abilities_Func001C() ) then
call UnitAddAbilityBJ( 'A04P', GetLevelingUnit() )
call UnitAddItemByIdSwapped( 'I05Y', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 4
else
if ( Trig_Black_Mage_Levelup_Abilities_Func001Func004C() ) then
call UnitAddItemByIdSwapped( 'I011', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 3
else
if ( Trig_Black_Mage_Levelup_Abilities_Func001Func004Func001C() ) then
call UnitAddAbilityBJ( 'AIrm', GetLevelingUnit() )
call UnitAddAbilityBJ( 'AIbm', GetLevelingUnit() )
call UnitAddItemByIdSwapped( 'I010', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 2
else
endif
endif
endif
endfunction
//===========================================================================
function InitTrig_Black_Mage_Levelup_Abilities takes nothing returns nothing
set gg_trg_Black_Mage_Levelup_Abilities = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Black_Mage_Levelup_Abilities, EVENT_PLAYER_HERO_LEVEL )
call TriggerAddCondition( gg_trg_Black_Mage_Levelup_Abilities, Condition( function Trig_Black_Mage_Levelup_Abilities_Conditions ) )
call TriggerAddAction( gg_trg_Black_Mage_Levelup_Abilities, function Trig_Black_Mage_Levelup_Abilities_Actions )
endfunction
function Trig_Chemist_Levelup_Abilities_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetLevelingUnit()) == 'H014' ) ) then
return false
endif
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 15 ) ) then
return false
endif
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 4 ) ) then
return false
endif
return true
endfunction
function Trig_Chemist_Levelup_Abilities_Func001Func006Func001C takes nothing returns boolean
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 2 ) ) then
return false
endif
return true
endfunction
function Trig_Chemist_Levelup_Abilities_Func001Func006C takes nothing returns boolean
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 100 ) ) then
return false
endif
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 3 ) ) then
return false
endif
return true
endfunction
function Trig_Chemist_Levelup_Abilities_Func001C takes nothing returns boolean
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 150 ) ) then
return false
endif
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 4 ) ) then
return false
endif
return true
endfunction
function Trig_Chemist_Levelup_Abilities_Actions takes nothing returns nothing
if ( Trig_Chemist_Levelup_Abilities_Func001C() ) then
call UnitAddAbilityBJ( 'A04O', GetLevelingUnit() )
call UnitAddItemByIdSwapped( 'I05X', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 4
else
if ( Trig_Chemist_Levelup_Abilities_Func001Func006C() ) then
call UnitAddAbilityBJ( 'A04L', GetLevelingUnit() )
call UnitAddItemByIdSwapped( 'I05T', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 3
else
if ( Trig_Chemist_Levelup_Abilities_Func001Func006Func001C() ) then
call UnitAddAbilityBJ( 'A02B', GetLevelingUnit() )
call UnitAddItemByIdSwapped( 'I02R', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 2
else
endif
endif
endif
endfunction
//===========================================================================
function InitTrig_Chemist_Levelup_Abilities takes nothing returns nothing
set gg_trg_Chemist_Levelup_Abilities = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Chemist_Levelup_Abilities, EVENT_PLAYER_HERO_LEVEL )
call TriggerAddCondition( gg_trg_Chemist_Levelup_Abilities, Condition( function Trig_Chemist_Levelup_Abilities_Conditions ) )
call TriggerAddAction( gg_trg_Chemist_Levelup_Abilities, function Trig_Chemist_Levelup_Abilities_Actions )
endfunction
function Trig_Dark_Knight_Levelup_Abilities_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetLevelingUnit()) == 'H024' ) ) then
return false
endif
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 4 ) ) then
return false
endif
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 15 ) ) then
return false
endif
return true
endfunction
function Trig_Dark_Knight_Levelup_Abilities_Func004Func002C takes nothing returns boolean
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 2 ) ) then
return false
endif
return true
endfunction
function Trig_Dark_Knight_Levelup_Abilities_Func004C takes nothing returns boolean
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 30 ) ) then
return false
endif
return true
endfunction
function Trig_Dark_Knight_Levelup_Abilities_Actions takes nothing returns nothing
if ( Trig_Dark_Knight_Levelup_Abilities_Func004C() ) then
call UnitAddItemByIdSwapped( 'I02T', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 4
else
if ( Trig_Dark_Knight_Levelup_Abilities_Func004Func002C() ) then
call UnitAddItemByIdSwapped( 'I02U', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 2
else
endif
endif
endfunction
//===========================================================================
function InitTrig_Dark_Knight_Levelup_Abilities takes nothing returns nothing
set gg_trg_Dark_Knight_Levelup_Abilities = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Dark_Knight_Levelup_Abilities, EVENT_PLAYER_HERO_LEVEL )
call TriggerAddCondition( gg_trg_Dark_Knight_Levelup_Abilities, Condition( function Trig_Dark_Knight_Levelup_Abilities_Conditions ) )
call TriggerAddAction( gg_trg_Dark_Knight_Levelup_Abilities, function Trig_Dark_Knight_Levelup_Abilities_Actions )
endfunction
function Trig_Dragoon_Levelup_Abilities_Func001C takes nothing returns boolean
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H023' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H01K' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H01C' ) ) then
return true
endif
return false
endfunction
function Trig_Dragoon_Levelup_Abilities_Conditions takes nothing returns boolean
if ( not Trig_Dragoon_Levelup_Abilities_Func001C() ) then
return false
endif
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 4 ) ) then
return false
endif
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 15 ) ) then
return false
endif
return true
endfunction
function Trig_Dragoon_Levelup_Abilities_Func004Func002C takes nothing returns boolean
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 2 ) ) then
return false
endif
return true
endfunction
function Trig_Dragoon_Levelup_Abilities_Func004C takes nothing returns boolean
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 25 ) ) then
return false
endif
return true
endfunction
function Trig_Dragoon_Levelup_Abilities_Actions takes nothing returns nothing
if ( Trig_Dragoon_Levelup_Abilities_Func004C() ) then
call UnitAddItemByIdSwapped( 'I02W', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 4
else
if ( Trig_Dragoon_Levelup_Abilities_Func004Func002C() ) then
call UnitAddItemByIdSwapped( 'I02V', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 2
else
endif
endif
endfunction
//===========================================================================
function InitTrig_Dragoon_Levelup_Abilities takes nothing returns nothing
set gg_trg_Dragoon_Levelup_Abilities = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Dragoon_Levelup_Abilities, EVENT_PLAYER_HERO_LEVEL )
call TriggerAddCondition( gg_trg_Dragoon_Levelup_Abilities, Condition( function Trig_Dragoon_Levelup_Abilities_Conditions ) )
call TriggerAddAction( gg_trg_Dragoon_Levelup_Abilities, function Trig_Dragoon_Levelup_Abilities_Actions )
endfunction
function Trig_Fighter_Levelup_Abilities_Func001C takes nothing returns boolean
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H021' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H01Q' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H01H' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H00Y' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H01A' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H001' ) ) then
return true
endif
return false
endfunction
function Trig_Fighter_Levelup_Abilities_Conditions takes nothing returns boolean
if ( not Trig_Fighter_Levelup_Abilities_Func001C() ) then
return false
endif
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 4 ) ) then
return false
endif
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 10 ) ) then
return false
endif
return true
endfunction
function Trig_Fighter_Levelup_Abilities_Func004Func001Func001C takes nothing returns boolean
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 2 ) ) then
return false
endif
return true
endfunction
function Trig_Fighter_Levelup_Abilities_Func004Func001C takes nothing returns boolean
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 15 ) ) then
return false
endif
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 3 ) ) then
return false
endif
return true
endfunction
function Trig_Fighter_Levelup_Abilities_Func004C takes nothing returns boolean
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 30 ) ) then
return false
endif
return true
endfunction
function Trig_Fighter_Levelup_Abilities_Actions takes nothing returns nothing
if ( Trig_Fighter_Levelup_Abilities_Func004C() ) then
call UnitAddItemByIdSwapped( 'I001', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 4
else
if ( Trig_Fighter_Levelup_Abilities_Func004Func001C() ) then
call UnitAddItemByIdSwapped( 'I002', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 3
else
if ( Trig_Fighter_Levelup_Abilities_Func004Func001Func001C() ) then
call UnitAddItemByIdSwapped( 'I009', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 2
else
endif
endif
endif
endfunction
//===========================================================================
function InitTrig_Fighter_Levelup_Abilities takes nothing returns nothing
set gg_trg_Fighter_Levelup_Abilities = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Fighter_Levelup_Abilities, EVENT_PLAYER_HERO_LEVEL )
call TriggerAddCondition( gg_trg_Fighter_Levelup_Abilities, Condition( function Trig_Fighter_Levelup_Abilities_Conditions ) )
call TriggerAddAction( gg_trg_Fighter_Levelup_Abilities, function Trig_Fighter_Levelup_Abilities_Actions )
endfunction
function Trig_Hunter_Levelup_Abilities_Func002C takes nothing returns boolean
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H025' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H00R' ) ) then
return true
endif
return false
endfunction
function Trig_Hunter_Levelup_Abilities_Conditions takes nothing returns boolean
if ( not Trig_Hunter_Levelup_Abilities_Func002C() ) then
return false
endif
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 4 ) ) then
return false
endif
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 10 ) ) then
return false
endif
return true
endfunction
function Trig_Hunter_Levelup_Abilities_Func001Func003Func002C takes nothing returns boolean
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 2 ) ) then
return false
endif
return true
endfunction
function Trig_Hunter_Levelup_Abilities_Func001Func003C takes nothing returns boolean
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 25 ) ) then
return false
endif
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 3 ) ) then
return false
endif
return true
endfunction
function Trig_Hunter_Levelup_Abilities_Func001C takes nothing returns boolean
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 150 ) ) then
return false
endif
return true
endfunction
function Trig_Hunter_Levelup_Abilities_Actions takes nothing returns nothing
if ( Trig_Hunter_Levelup_Abilities_Func001C() ) then
call UnitAddAbilityBJ( 'A04V', GetLevelingUnit() )
call UnitAddItemByIdSwapped( 'I064', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 4
else
if ( Trig_Hunter_Levelup_Abilities_Func001Func003C() ) then
call UnitAddItemByIdSwapped( 'I031', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 3
else
if ( Trig_Hunter_Levelup_Abilities_Func001Func003Func002C() ) then
call UnitAddAbilityBJ( 'A000', GetLevelingUnit() )
call UnitAddItemByIdSwapped( 'I032', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 2
else
endif
endif
endif
endfunction
//===========================================================================
function InitTrig_Hunter_Levelup_Abilities takes nothing returns nothing
set gg_trg_Hunter_Levelup_Abilities = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Hunter_Levelup_Abilities, EVENT_PLAYER_HERO_LEVEL )
call TriggerAddCondition( gg_trg_Hunter_Levelup_Abilities, Condition( function Trig_Hunter_Levelup_Abilities_Conditions ) )
call TriggerAddAction( gg_trg_Hunter_Levelup_Abilities, function Trig_Hunter_Levelup_Abilities_Actions )
endfunction
function Trig_Ninja_Levelup_Abilities_Func001C takes nothing returns boolean
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H018' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H012' ) ) then
return true
endif
return false
endfunction
function Trig_Ninja_Levelup_Abilities_Conditions takes nothing returns boolean
if ( not Trig_Ninja_Levelup_Abilities_Func001C() ) then
return false
endif
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 4 ) ) then
return false
endif
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 10 ) ) then
return false
endif
return true
endfunction
function Trig_Ninja_Levelup_Abilities_Func004Func001Func001C takes nothing returns boolean
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 2 ) ) then
return false
endif
return true
endfunction
function Trig_Ninja_Levelup_Abilities_Func004Func001C takes nothing returns boolean
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 20 ) ) then
return false
endif
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 3 ) ) then
return false
endif
return true
endfunction
function Trig_Ninja_Levelup_Abilities_Func004C takes nothing returns boolean
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 35 ) ) then
return false
endif
return true
endfunction
function Trig_Ninja_Levelup_Abilities_Actions takes nothing returns nothing
if ( Trig_Ninja_Levelup_Abilities_Func004C() ) then
call UnitAddItemByIdSwapped( 'I034', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 4
else
if ( Trig_Ninja_Levelup_Abilities_Func004Func001C() ) then
call UnitAddItemByIdSwapped( 'I035', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 3
else
if ( Trig_Ninja_Levelup_Abilities_Func004Func001Func001C() ) then
call UnitAddItemByIdSwapped( 'I033', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 2
else
endif
endif
endif
endfunction
//===========================================================================
function InitTrig_Ninja_Levelup_Abilities takes nothing returns nothing
set gg_trg_Ninja_Levelup_Abilities = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Ninja_Levelup_Abilities, EVENT_PLAYER_HERO_LEVEL )
call TriggerAddCondition( gg_trg_Ninja_Levelup_Abilities, Condition( function Trig_Ninja_Levelup_Abilities_Conditions ) )
call TriggerAddAction( gg_trg_Ninja_Levelup_Abilities, function Trig_Ninja_Levelup_Abilities_Actions )
endfunction
function Trig_Paladin_Levelup_Abilities_Func002C takes nothing returns boolean
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H007' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H01M' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H01X' ) ) then
return true
endif
return false
endfunction
function Trig_Paladin_Levelup_Abilities_Conditions takes nothing returns boolean
if ( not Trig_Paladin_Levelup_Abilities_Func002C() ) then
return false
endif
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 4 ) ) then
return false
endif
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 15 ) ) then
return false
endif
return true
endfunction
function Trig_Paladin_Levelup_Abilities_Func001Func003Func003C takes nothing returns boolean
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 2 ) ) then
return false
endif
return true
endfunction
function Trig_Paladin_Levelup_Abilities_Func001Func003C takes nothing returns boolean
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 25 ) ) then
return false
endif
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 3 ) ) then
return false
endif
return true
endfunction
function Trig_Paladin_Levelup_Abilities_Func001C takes nothing returns boolean
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 150 ) ) then
return false
endif
return true
endfunction
function Trig_Paladin_Levelup_Abilities_Actions takes nothing returns nothing
if ( Trig_Paladin_Levelup_Abilities_Func001C() ) then
call UnitAddAbilityBJ( 'A04Q', GetLevelingUnit() )
call UnitAddItemByIdSwapped( 'I05Z', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 4
else
if ( Trig_Paladin_Levelup_Abilities_Func001Func003C() ) then
call UnitAddAbilityBJ( 'A01O', GetLevelingUnit() )
call UnitAddItemByIdSwapped( 'I01H', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 3
else
if ( Trig_Paladin_Levelup_Abilities_Func001Func003Func003C() ) then
call UnitAddAbilityBJ( 'A037', GetLevelingUnit() )
call UnitAddItemByIdSwapped( 'I01G', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 2
else
endif
endif
endif
endfunction
//===========================================================================
function InitTrig_Paladin_Levelup_Abilities takes nothing returns nothing
set gg_trg_Paladin_Levelup_Abilities = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Paladin_Levelup_Abilities, EVENT_PLAYER_HERO_LEVEL )
call TriggerAddCondition( gg_trg_Paladin_Levelup_Abilities, Condition( function Trig_Paladin_Levelup_Abilities_Conditions ) )
call TriggerAddAction( gg_trg_Paladin_Levelup_Abilities, function Trig_Paladin_Levelup_Abilities_Actions )
endfunction
function Trig_Red_Mage_Levelup_Abilities_Func001C takes nothing returns boolean
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H01U' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H004' ) ) then
return true
endif
return false
endfunction
function Trig_Red_Mage_Levelup_Abilities_Conditions takes nothing returns boolean
if ( not Trig_Red_Mage_Levelup_Abilities_Func001C() ) then
return false
endif
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 4 ) ) then
return false
endif
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 10 ) ) then
return false
endif
return true
endfunction
function Trig_Red_Mage_Levelup_Abilities_Func004Func001Func001C takes nothing returns boolean
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 2 ) ) then
return false
endif
return true
endfunction
function Trig_Red_Mage_Levelup_Abilities_Func004Func001C takes nothing returns boolean
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 20 ) ) then
return false
endif
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 3 ) ) then
return false
endif
return true
endfunction
function Trig_Red_Mage_Levelup_Abilities_Func004C takes nothing returns boolean
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 30 ) ) then
return false
endif
return true
endfunction
function Trig_Red_Mage_Levelup_Abilities_Actions takes nothing returns nothing
if ( Trig_Red_Mage_Levelup_Abilities_Func004C() ) then
call UnitAddItemByIdSwapped( 'I015', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 4
else
if ( Trig_Red_Mage_Levelup_Abilities_Func004Func001C() ) then
call UnitAddItemByIdSwapped( 'I016', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 3
else
if ( Trig_Red_Mage_Levelup_Abilities_Func004Func001Func001C() ) then
call UnitAddItemByIdSwapped( 'I018', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 2
else
endif
endif
endif
endfunction
//===========================================================================
function InitTrig_Red_Mage_Levelup_Abilities takes nothing returns nothing
set gg_trg_Red_Mage_Levelup_Abilities = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Red_Mage_Levelup_Abilities, EVENT_PLAYER_HERO_LEVEL )
call TriggerAddCondition( gg_trg_Red_Mage_Levelup_Abilities, Condition( function Trig_Red_Mage_Levelup_Abilities_Conditions ) )
call TriggerAddAction( gg_trg_Red_Mage_Levelup_Abilities, function Trig_Red_Mage_Levelup_Abilities_Actions )
endfunction
function Trig_Sage_Levelup_Abilities_Func001C takes nothing returns boolean
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H020' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H00V' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H01V' ) ) then
return true
endif
return false
endfunction
function Trig_Sage_Levelup_Abilities_Conditions takes nothing returns boolean
if ( not Trig_Sage_Levelup_Abilities_Func001C() ) then
return false
endif
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 4 ) ) then
return false
endif
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 25 ) ) then
return false
endif
return true
endfunction
function Trig_Sage_Levelup_Abilities_Func004Func002C takes nothing returns boolean
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 2 ) ) then
return false
endif
return true
endfunction
function Trig_Sage_Levelup_Abilities_Func004C takes nothing returns boolean
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 35 ) ) then
return false
endif
return true
endfunction
function Trig_Sage_Levelup_Abilities_Actions takes nothing returns nothing
if ( Trig_Sage_Levelup_Abilities_Func004C() ) then
call UnitAddItemByIdSwapped( 'I036', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 4
else
if ( Trig_Sage_Levelup_Abilities_Func004Func002C() ) then
call UnitAddItemByIdSwapped( 'I037', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 2
else
endif
endif
endfunction
//===========================================================================
function InitTrig_Sage_Levelup_Abilities takes nothing returns nothing
set gg_trg_Sage_Levelup_Abilities = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Sage_Levelup_Abilities, EVENT_PLAYER_HERO_LEVEL )
call TriggerAddCondition( gg_trg_Sage_Levelup_Abilities, Condition( function Trig_Sage_Levelup_Abilities_Conditions ) )
call TriggerAddAction( gg_trg_Sage_Levelup_Abilities, function Trig_Sage_Levelup_Abilities_Actions )
endfunction
function Trig_Samurai_Levelup_Abilities_Func001C takes nothing returns boolean
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H008' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H016' ) ) then
return true
endif
return false
endfunction
function Trig_Samurai_Levelup_Abilities_Conditions takes nothing returns boolean
if ( not Trig_Samurai_Levelup_Abilities_Func001C() ) then
return false
endif
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 4 ) ) then
return false
endif
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 10 ) ) then
return false
endif
return true
endfunction
function Trig_Samurai_Levelup_Abilities_Func004Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 1 ) ) then
return false
endif
return true
endfunction
function Trig_Samurai_Levelup_Abilities_Func004Func001Func001C takes nothing returns boolean
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 20 ) ) then
return false
endif
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 2 ) ) then
return false
endif
return true
endfunction
function Trig_Samurai_Levelup_Abilities_Func004Func001C takes nothing returns boolean
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 25 ) ) then
return false
endif
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 3 ) ) then
return false
endif
return true
endfunction
function Trig_Samurai_Levelup_Abilities_Func004C takes nothing returns boolean
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 35 ) ) then
return false
endif
return true
endfunction
function Trig_Samurai_Levelup_Abilities_Actions takes nothing returns nothing
if ( Trig_Samurai_Levelup_Abilities_Func004C() ) then
call UnitAddItemByIdSwapped( 'I01F', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 4
else
if ( Trig_Samurai_Levelup_Abilities_Func004Func001C() ) then
call UnitAddItemByIdSwapped( 'I01E', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 3
else
if ( Trig_Samurai_Levelup_Abilities_Func004Func001Func001C() ) then
call UnitAddItemByIdSwapped( 'I01D', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 2
else
if ( Trig_Samurai_Levelup_Abilities_Func004Func001Func001Func001C() ) then
call UnitAddItemByIdSwapped( 'I014', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 1
else
endif
endif
endif
endif
endfunction
//===========================================================================
function InitTrig_Samurai_Levelup_Abilities takes nothing returns nothing
set gg_trg_Samurai_Levelup_Abilities = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Samurai_Levelup_Abilities, EVENT_PLAYER_HERO_LEVEL )
call TriggerAddCondition( gg_trg_Samurai_Levelup_Abilities, Condition( function Trig_Samurai_Levelup_Abilities_Conditions ) )
call TriggerAddAction( gg_trg_Samurai_Levelup_Abilities, function Trig_Samurai_Levelup_Abilities_Actions )
endfunction
function Trig_Summoner_Levelup_Abilities_Func001C takes nothing returns boolean
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H00Q' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H011' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H01W' ) ) then
return true
endif
return false
endfunction
function Trig_Summoner_Levelup_Abilities_Conditions takes nothing returns boolean
if ( not Trig_Summoner_Levelup_Abilities_Func001C() ) then
return false
endif
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 4 ) ) then
return false
endif
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 8 ) ) then
return false
endif
return true
endfunction
function Trig_Summoner_Levelup_Abilities_Func004Func001Func001C takes nothing returns boolean
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 2 ) ) then
return false
endif
return true
endfunction
function Trig_Summoner_Levelup_Abilities_Func004Func001C takes nothing returns boolean
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 15 ) ) then
return false
endif
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 3 ) ) then
return false
endif
return true
endfunction
function Trig_Summoner_Levelup_Abilities_Func004C takes nothing returns boolean
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 25 ) ) then
return false
endif
return true
endfunction
function Trig_Summoner_Levelup_Abilities_Actions takes nothing returns nothing
if ( Trig_Summoner_Levelup_Abilities_Func004C() ) then
call UnitAddItemByIdSwapped( 'I03A', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 4
else
if ( Trig_Summoner_Levelup_Abilities_Func004Func001C() ) then
call UnitAddItemByIdSwapped( 'I038', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 3
else
if ( Trig_Summoner_Levelup_Abilities_Func004Func001Func001C() ) then
call UnitAddItemByIdSwapped( 'I039', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 2
else
endif
endif
endif
endfunction
//===========================================================================
function InitTrig_Summoner_Levelup_Abilities takes nothing returns nothing
set gg_trg_Summoner_Levelup_Abilities = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Summoner_Levelup_Abilities, EVENT_PLAYER_HERO_LEVEL )
call TriggerAddCondition( gg_trg_Summoner_Levelup_Abilities, Condition( function Trig_Summoner_Levelup_Abilities_Conditions ) )
call TriggerAddAction( gg_trg_Summoner_Levelup_Abilities, function Trig_Summoner_Levelup_Abilities_Actions )
endfunction
function Trig_Time_Mage_Levelup_Abilities_Func002C takes nothing returns boolean
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H005' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H01J' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H01T' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H019' ) ) then
return true
endif
return false
endfunction
function Trig_Time_Mage_Levelup_Abilities_Conditions takes nothing returns boolean
if ( not Trig_Time_Mage_Levelup_Abilities_Func002C() ) then
return false
endif
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 4 ) ) then
return false
endif
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 15 ) ) then
return false
endif
return true
endfunction
function Trig_Time_Mage_Levelup_Abilities_Func001Func003Func002C takes nothing returns boolean
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 2 ) ) then
return false
endif
return true
endfunction
function Trig_Time_Mage_Levelup_Abilities_Func001Func003C takes nothing returns boolean
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 25 ) ) then
return false
endif
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 3 ) ) then
return false
endif
return true
endfunction
function Trig_Time_Mage_Levelup_Abilities_Func001C takes nothing returns boolean
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 150 ) ) then
return false
endif
return true
endfunction
function Trig_Time_Mage_Levelup_Abilities_Actions takes nothing returns nothing
if ( Trig_Time_Mage_Levelup_Abilities_Func001C() ) then
call UnitAddAbilityBJ( 'A04W', GetLevelingUnit() )
call UnitAddItemByIdSwapped( 'I065', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 2
else
if ( Trig_Time_Mage_Levelup_Abilities_Func001Func003C() ) then
call UnitAddItemByIdSwapped( 'I017', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 3
else
if ( Trig_Time_Mage_Levelup_Abilities_Func001Func003Func002C() ) then
call UnitAddItemByIdSwapped( 'I013', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 2
else
endif
endif
endif
endfunction
//===========================================================================
function InitTrig_Time_Mage_Levelup_Abilities takes nothing returns nothing
set gg_trg_Time_Mage_Levelup_Abilities = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Time_Mage_Levelup_Abilities, EVENT_PLAYER_HERO_LEVEL )
call TriggerAddCondition( gg_trg_Time_Mage_Levelup_Abilities, Condition( function Trig_Time_Mage_Levelup_Abilities_Conditions ) )
call TriggerAddAction( gg_trg_Time_Mage_Levelup_Abilities, function Trig_Time_Mage_Levelup_Abilities_Actions )
endfunction
function Trig_Thief_Levelup_Abilities_Func001C takes nothing returns boolean
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H015' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H01P' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H00N' ) ) then
return true
endif
return false
endfunction
function Trig_Thief_Levelup_Abilities_Conditions takes nothing returns boolean
if ( not Trig_Thief_Levelup_Abilities_Func001C() ) then
return false
endif
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 4 ) ) then
return false
endif
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 5 ) ) then
return false
endif
return true
endfunction
function Trig_Thief_Levelup_Abilities_Func004Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 1 ) ) then
return false
endif
return true
endfunction
function Trig_Thief_Levelup_Abilities_Func004Func001Func001C takes nothing returns boolean
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 10 ) ) then
return false
endif
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 2 ) ) then
return false
endif
return true
endfunction
function Trig_Thief_Levelup_Abilities_Func004Func001C takes nothing returns boolean
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 15 ) ) then
return false
endif
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 3 ) ) then
return false
endif
return true
endfunction
function Trig_Thief_Levelup_Abilities_Func004C takes nothing returns boolean
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 20 ) ) then
return false
endif
return true
endfunction
function Trig_Thief_Levelup_Abilities_Actions takes nothing returns nothing
if ( Trig_Thief_Levelup_Abilities_Func004C() ) then
call UnitAddItemByIdSwapped( 'I03E', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 4
else
if ( Trig_Thief_Levelup_Abilities_Func004Func001C() ) then
call UnitAddItemByIdSwapped( 'I03D', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 3
else
if ( Trig_Thief_Levelup_Abilities_Func004Func001Func001C() ) then
call UnitAddItemByIdSwapped( 'I03C', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 2
else
if ( Trig_Thief_Levelup_Abilities_Func004Func001Func001Func001C() ) then
call UnitAddItemByIdSwapped( 'I03B', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 1
else
endif
endif
endif
endif
endfunction
//===========================================================================
function InitTrig_Thief_Levelup_Abilities takes nothing returns nothing
set gg_trg_Thief_Levelup_Abilities = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Thief_Levelup_Abilities, EVENT_PLAYER_HERO_LEVEL )
call TriggerAddCondition( gg_trg_Thief_Levelup_Abilities, Condition( function Trig_Thief_Levelup_Abilities_Conditions ) )
call TriggerAddAction( gg_trg_Thief_Levelup_Abilities, function Trig_Thief_Levelup_Abilities_Actions )
endfunction
function Trig_White_Mage_Levelup_Abilities_Func001C takes nothing returns boolean
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H01Z' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H00U' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H01R' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H01N' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H00Z' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H003' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H017' ) ) then
return true
endif
return false
endfunction
function Trig_White_Mage_Levelup_Abilities_Conditions takes nothing returns boolean
if ( not Trig_White_Mage_Levelup_Abilities_Func001C() ) then
return false
endif
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 4 ) ) then
return false
endif
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 15 ) ) then
return false
endif
return true
endfunction
function Trig_White_Mage_Levelup_Abilities_Func004Func002C takes nothing returns boolean
if ( not ( udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] < 2 ) ) then
return false
endif
return true
endfunction
function Trig_White_Mage_Levelup_Abilities_Func004C takes nothing returns boolean
if ( not ( GetHeroLevel(GetLevelingUnit()) >= 25 ) ) then
return false
endif
return true
endfunction
function Trig_White_Mage_Levelup_Abilities_Actions takes nothing returns nothing
if ( Trig_White_Mage_Levelup_Abilities_Func004C() ) then
call UnitAddItemByIdSwapped( 'I012', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 4
else
if ( Trig_White_Mage_Levelup_Abilities_Func004Func002C() ) then
call UnitAddItemByIdSwapped( 'I01C', GetLevelingUnit() )
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetLevelingUnit()))] = 2
else
endif
endif
endfunction
//===========================================================================
function InitTrig_White_Mage_Levelup_Abilities takes nothing returns nothing
set gg_trg_White_Mage_Levelup_Abilities = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_White_Mage_Levelup_Abilities, EVENT_PLAYER_HERO_LEVEL )
call TriggerAddCondition( gg_trg_White_Mage_Levelup_Abilities, Condition( function Trig_White_Mage_Levelup_Abilities_Conditions ) )
call TriggerAddAction( gg_trg_White_Mage_Levelup_Abilities, function Trig_White_Mage_Levelup_Abilities_Actions )
endfunction
function Trig_Archer_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'H00O' ) ) then
return false
endif
return true
endfunction
function Trig_Archer_Func001001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'ewsp' )
endfunction
function Trig_Archer_Func002001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Quistis" )
endfunction
function Trig_Archer_Func003001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Terra" )
endfunction
function Trig_Archer_Func004001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Leonhart" )
endfunction
function Trig_Archer_Func005001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Tellah" )
endfunction
function Trig_Archer_Func006001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Butz" )
endfunction
function Trig_Archer_Func007001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Amarant" )
endfunction
function Trig_Archer_Func008001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Kimari" )
endfunction
function Trig_Archer_Func009Func002002001001 takes nothing returns boolean
return ( GetEnumUnit() == GetSummonedUnit() )
endfunction
function Trig_Archer_Func009Func002002001002 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) != 'ewsp' )
endfunction
function Trig_Archer_Func009Func002002001 takes nothing returns boolean
return GetBooleanAnd( Trig_Archer_Func009Func002002001001(), Trig_Archer_Func009Func002002001002() )
endfunction
function Trig_Archer_Func009Func002002 takes nothing returns nothing
if ( Trig_Archer_Func009Func002002001() ) then
call RemoveUnit( GetSummonedUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_Archer_Func009Func004Func001C takes nothing returns boolean
if ( not ( GetEnumUnit() != GetLastCreatedUnit() ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'ewsp' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'e007' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'hbot' ) ) then
return false
endif
return true
endfunction
function Trig_Archer_Func009Func004A takes nothing returns nothing
if ( Trig_Archer_Func009Func004Func001C() ) then
call RemoveUnit( GetEnumUnit() )
else
endif
endfunction
function Trig_Archer_Func009C takes nothing returns boolean
if ( not ( udg_InvalidJob == true ) ) then
return false
endif
return true
endfunction
function Trig_Archer_Actions takes nothing returns nothing
if ( Trig_Archer_Func001001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Archer_Func002001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H00O', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Archer_Func003001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H00W', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Archer_Func004001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Archer_Func005001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Archer_Func006001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Archer_Func007001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Archer_Func008001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Archer_Func009C() ) then
call ForGroupBJ( GetUnitsOfPlayerAll(GetOwningPlayer(GetSummonedUnit())), function Trig_Archer_Func009Func002002 )
set udg_InvalidJob = false
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetSummoningUnit())), "TRIGSTR_1270" )
else
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] = 0
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetSummoningUnit(), GetForLoopIndexA()), GetSummoningUnit() )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForGroupBJ( GetUnitsOfPlayerAll(GetOwningPlayer(GetSummonedUnit())), function Trig_Archer_Func009Func004A )
endif
endfunction
//===========================================================================
function InitTrig_Archer takes nothing returns nothing
set gg_trg_Archer = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Archer, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Archer, Condition( function Trig_Archer_Conditions ) )
call TriggerAddAction( gg_trg_Archer, function Trig_Archer_Actions )
endfunction
function Trig_Berserker_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'H006' ) ) then
return false
endif
return true
endfunction
function Trig_Berserker_Func001001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'ewsp' )
endfunction
function Trig_Berserker_Func002001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummoningUnit()))] == "Tellah" )
endfunction
function Trig_Berserker_Func003001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Terra" )
endfunction
function Trig_Berserker_Func004001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Quistis" )
endfunction
function Trig_Berserker_Func005001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Leonhart" )
endfunction
function Trig_Berserker_Func006001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Amarant" )
endfunction
function Trig_Berserker_Func007001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Kimari" )
endfunction
function Trig_Berserker_Func008001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Butz" )
endfunction
function Trig_Berserker_Func009Func003Func001C takes nothing returns boolean
if ( not ( GetEnumUnit() != GetLastCreatedUnit() ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'ewsp' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'e007' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'hbot' ) ) then
return false
endif
return true
endfunction
function Trig_Berserker_Func009Func003A takes nothing returns nothing
if ( Trig_Berserker_Func009Func003Func001C() ) then
call RemoveUnit( GetEnumUnit() )
else
endif
endfunction
function Trig_Berserker_Func009Func004002001001 takes nothing returns boolean
return ( GetEnumUnit() == GetSummonedUnit() )
endfunction
function Trig_Berserker_Func009Func004002001002 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) != 'ewsp' )
endfunction
function Trig_Berserker_Func009Func004002001 takes nothing returns boolean
return GetBooleanAnd( Trig_Berserker_Func009Func004002001001(), Trig_Berserker_Func009Func004002001002() )
endfunction
function Trig_Berserker_Func009Func004002 takes nothing returns nothing
if ( Trig_Berserker_Func009Func004002001() ) then
call RemoveUnit( GetSummonedUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_Berserker_Func009C takes nothing returns boolean
if ( not ( udg_InvalidJob == true ) ) then
return false
endif
return true
endfunction
function Trig_Berserker_Actions takes nothing returns nothing
if ( Trig_Berserker_Func001001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Berserker_Func002001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Berserker_Func003001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Berserker_Func004001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Berserker_Func005001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H006', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Berserker_Func006001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H01B', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Berserker_Func007001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H01L', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Berserker_Func008001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H022', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Berserker_Func009C() ) then
call ForGroupBJ( GetUnitsOfPlayerAll(GetOwningPlayer(GetSummonedUnit())), function Trig_Berserker_Func009Func004002 )
set udg_InvalidJob = false
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetSummoningUnit())), "TRIGSTR_1271" )
else
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetSummoningUnit()))] = 0
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetSummoningUnit(), GetForLoopIndexA()), GetSummoningUnit() )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForGroupBJ( GetUnitsOfPlayerAll(GetOwningPlayer(GetSummonedUnit())), function Trig_Berserker_Func009Func003A )
endif
endfunction
//===========================================================================
function InitTrig_Berserker takes nothing returns nothing
set gg_trg_Berserker = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Berserker, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Berserker, Condition( function Trig_Berserker_Conditions ) )
call TriggerAddAction( gg_trg_Berserker, function Trig_Berserker_Actions )
endfunction
function Trig_Beastmaster_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'H00P' ) ) then
return false
endif
return true
endfunction
function Trig_Beastmaster_Func001001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'ewsp' )
endfunction
function Trig_Beastmaster_Func002001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Leonhart" )
endfunction
function Trig_Beastmaster_Func003001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Tellah" )
endfunction
function Trig_Beastmaster_Func004001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Butz" )
endfunction
function Trig_Beastmaster_Func005001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Amarant" )
endfunction
function Trig_Beastmaster_Func006001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Kimari" )
endfunction
function Trig_Beastmaster_Func007001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Quistis" )
endfunction
function Trig_Beastmaster_Func008001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Terra" )
endfunction
function Trig_Beastmaster_Func009Func003Func001C takes nothing returns boolean
if ( not ( GetEnumUnit() != GetLastCreatedUnit() ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'ewsp' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'e007' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'hbot' ) ) then
return false
endif
return true
endfunction
function Trig_Beastmaster_Func009Func003A takes nothing returns nothing
if ( Trig_Beastmaster_Func009Func003Func001C() ) then
call RemoveUnit( GetEnumUnit() )
else
endif
endfunction
function Trig_Beastmaster_Func009Func004002001001 takes nothing returns boolean
return ( GetEnumUnit() == GetSummonedUnit() )
endfunction
function Trig_Beastmaster_Func009Func004002001002 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) != 'ewsp' )
endfunction
function Trig_Beastmaster_Func009Func004002001 takes nothing returns boolean
return GetBooleanAnd( Trig_Beastmaster_Func009Func004002001001(), Trig_Beastmaster_Func009Func004002001002() )
endfunction
function Trig_Beastmaster_Func009Func004002 takes nothing returns nothing
if ( Trig_Beastmaster_Func009Func004002001() ) then
call RemoveUnit( GetSummonedUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_Beastmaster_Func009C takes nothing returns boolean
if ( not ( udg_InvalidJob == true ) ) then
return false
endif
return true
endfunction
function Trig_Beastmaster_Actions takes nothing returns nothing
if ( Trig_Beastmaster_Func001001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Beastmaster_Func002001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Beastmaster_Func003001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Beastmaster_Func004001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Beastmaster_Func005001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Beastmaster_Func006001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Beastmaster_Func007001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H00P', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Beastmaster_Func008001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H013', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Beastmaster_Func009C() ) then
call ForGroupBJ( GetUnitsOfPlayerAll(GetOwningPlayer(GetSummonedUnit())), function Trig_Beastmaster_Func009Func004002 )
set udg_InvalidJob = false
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetSummoningUnit())), "TRIGSTR_1272" )
else
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] = 0
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetSummoningUnit(), GetForLoopIndexA()), GetSummoningUnit() )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForGroupBJ( GetUnitsOfPlayerAll(GetOwningPlayer(GetSummonedUnit())), function Trig_Beastmaster_Func009Func003A )
endif
endfunction
//===========================================================================
function InitTrig_Beastmaster takes nothing returns nothing
set gg_trg_Beastmaster = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Beastmaster, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Beastmaster, Condition( function Trig_Beastmaster_Conditions ) )
call TriggerAddAction( gg_trg_Beastmaster, function Trig_Beastmaster_Actions )
endfunction
function Trig_Black_Belt_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'H01F' ) ) then
return false
endif
return true
endfunction
function Trig_Black_Belt_Func001001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'ewsp' )
endfunction
function Trig_Black_Belt_Func002001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Leonhart" )
endfunction
function Trig_Black_Belt_Func003001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Tellah" )
endfunction
function Trig_Black_Belt_Func004001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Butz" )
endfunction
function Trig_Black_Belt_Func005001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Terra" )
endfunction
function Trig_Black_Belt_Func006001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Quistis" )
endfunction
function Trig_Black_Belt_Func007001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Amarant" )
endfunction
function Trig_Black_Belt_Func008001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Kimari" )
endfunction
function Trig_Black_Belt_Func009Func001002001001 takes nothing returns boolean
return ( GetEnumUnit() == GetSummonedUnit() )
endfunction
function Trig_Black_Belt_Func009Func001002001002 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) != 'ewsp' )
endfunction
function Trig_Black_Belt_Func009Func001002001 takes nothing returns boolean
return GetBooleanAnd( Trig_Black_Belt_Func009Func001002001001(), Trig_Black_Belt_Func009Func001002001002() )
endfunction
function Trig_Black_Belt_Func009Func001002 takes nothing returns nothing
if ( Trig_Black_Belt_Func009Func001002001() ) then
call RemoveUnit( GetSummonedUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_Black_Belt_Func009Func004Func001C takes nothing returns boolean
if ( not ( GetEnumUnit() != GetLastCreatedUnit() ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'ewsp' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'e007' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'hbot' ) ) then
return false
endif
return true
endfunction
function Trig_Black_Belt_Func009Func004A takes nothing returns nothing
if ( Trig_Black_Belt_Func009Func004Func001C() ) then
call RemoveUnit( GetEnumUnit() )
else
endif
endfunction
function Trig_Black_Belt_Func009C takes nothing returns boolean
if ( not ( udg_InvalidJob == true ) ) then
return false
endif
return true
endfunction
function Trig_Black_Belt_Actions takes nothing returns nothing
if ( Trig_Black_Belt_Func001001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Black_Belt_Func002001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Black_Belt_Func003001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Black_Belt_Func004001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Black_Belt_Func005001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Black_Belt_Func006001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Black_Belt_Func007001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Black_Belt_Func008001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H01F', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Black_Belt_Func009C() ) then
call ForGroupBJ( GetUnitsOfPlayerAll(GetOwningPlayer(GetSummonedUnit())), function Trig_Black_Belt_Func009Func001002 )
set udg_InvalidJob = false
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetSummoningUnit())), "TRIGSTR_1273" )
else
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] = 0
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetSummoningUnit(), GetForLoopIndexA()), GetSummoningUnit() )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForGroupBJ( GetUnitsOfPlayerAll(GetOwningPlayer(GetSummonedUnit())), function Trig_Black_Belt_Func009Func004A )
endif
endfunction
//===========================================================================
function InitTrig_Black_Belt takes nothing returns nothing
set gg_trg_Black_Belt = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Black_Belt, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Black_Belt, Condition( function Trig_Black_Belt_Conditions ) )
call TriggerAddAction( gg_trg_Black_Belt, function Trig_Black_Belt_Actions )
endfunction
function Trig_Black_Mage_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'H002' ) ) then
return false
endif
return true
endfunction
function Trig_Black_Mage_Func001001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'ewsp' )
endfunction
function Trig_Black_Mage_Func002001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Butz" )
endfunction
function Trig_Black_Mage_Func003001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Leonhart" )
endfunction
function Trig_Black_Mage_Func004001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Tellah" )
endfunction
function Trig_Black_Mage_Func005001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Terra" )
endfunction
function Trig_Black_Mage_Func006001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Quistis" )
endfunction
function Trig_Black_Mage_Func007001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Amarant" )
endfunction
function Trig_Black_Mage_Func008001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Kimari" )
endfunction
function Trig_Black_Mage_Func009Func001002001001 takes nothing returns boolean
return ( GetEnumUnit() == GetSummonedUnit() )
endfunction
function Trig_Black_Mage_Func009Func001002001002 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) != 'ewsp' )
endfunction
function Trig_Black_Mage_Func009Func001002001 takes nothing returns boolean
return GetBooleanAnd( Trig_Black_Mage_Func009Func001002001001(), Trig_Black_Mage_Func009Func001002001002() )
endfunction
function Trig_Black_Mage_Func009Func001002 takes nothing returns nothing
if ( Trig_Black_Mage_Func009Func001002001() ) then
call RemoveUnit( GetSummonedUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_Black_Mage_Func009Func004Func001C takes nothing returns boolean
if ( not ( GetEnumUnit() != GetLastCreatedUnit() ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'ewsp' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'e007' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'hbot' ) ) then
return false
endif
return true
endfunction
function Trig_Black_Mage_Func009Func004A takes nothing returns nothing
if ( Trig_Black_Mage_Func009Func004Func001C() ) then
call RemoveUnit( GetEnumUnit() )
else
endif
endfunction
function Trig_Black_Mage_Func009C takes nothing returns boolean
if ( not ( udg_InvalidJob == true ) ) then
return false
endif
return true
endfunction
function Trig_Black_Mage_Actions takes nothing returns nothing
if ( Trig_Black_Mage_Func001001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Black_Mage_Func002001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Black_Mage_Func003001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H002', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Black_Mage_Func004001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H01S', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Black_Mage_Func005001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H010', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Black_Mage_Func006001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H00T', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Black_Mage_Func007001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H01D', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Black_Mage_Func008001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H01I', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Black_Mage_Func009C() ) then
call ForGroupBJ( GetUnitsOfPlayerAll(GetOwningPlayer(GetSummonedUnit())), function Trig_Black_Mage_Func009Func001002 )
set udg_InvalidJob = false
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetSummoningUnit())), "TRIGSTR_1274" )
else
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] = 0
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetSummoningUnit(), GetForLoopIndexA()), GetSummoningUnit() )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForGroupBJ( GetUnitsOfPlayerAll(GetOwningPlayer(GetSummonedUnit())), function Trig_Black_Mage_Func009Func004A )
endif
endfunction
//===========================================================================
function InitTrig_Black_Mage takes nothing returns nothing
set gg_trg_Black_Mage = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Black_Mage, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Black_Mage, Condition( function Trig_Black_Mage_Conditions ) )
call TriggerAddAction( gg_trg_Black_Mage, function Trig_Black_Mage_Actions )
endfunction
function Trig_Chemist_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'H014' ) ) then
return false
endif
return true
endfunction
function Trig_Chemist_Func001001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'ewsp' )
endfunction
function Trig_Chemist_Func002001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Leonhart" )
endfunction
function Trig_Chemist_Func003001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Leonhart" )
endfunction
function Trig_Chemist_Func004001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Tellah" )
endfunction
function Trig_Chemist_Func005001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Butz" )
endfunction
function Trig_Chemist_Func006001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Quistis" )
endfunction
function Trig_Chemist_Func007001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Amarant" )
endfunction
function Trig_Chemist_Func008001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Kimari" )
endfunction
function Trig_Chemist_Func009001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Terra" )
endfunction
function Trig_Chemist_Func010Func001002001001 takes nothing returns boolean
return ( GetEnumUnit() == GetSummonedUnit() )
endfunction
function Trig_Chemist_Func010Func001002001002 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) != 'ewsp' )
endfunction
function Trig_Chemist_Func010Func001002001 takes nothing returns boolean
return GetBooleanAnd( Trig_Chemist_Func010Func001002001001(), Trig_Chemist_Func010Func001002001002() )
endfunction
function Trig_Chemist_Func010Func001002 takes nothing returns nothing
if ( Trig_Chemist_Func010Func001002001() ) then
call RemoveUnit( GetSummonedUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_Chemist_Func010Func004Func001C takes nothing returns boolean
if ( not ( GetEnumUnit() != GetLastCreatedUnit() ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'ewsp' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'e007' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'hbot' ) ) then
return false
endif
return true
endfunction
function Trig_Chemist_Func010Func004A takes nothing returns nothing
if ( Trig_Chemist_Func010Func004Func001C() ) then
call RemoveUnit( GetEnumUnit() )
else
endif
endfunction
function Trig_Chemist_Func010C takes nothing returns boolean
if ( not ( udg_InvalidJob == true ) ) then
return false
endif
return true
endfunction
function Trig_Chemist_Actions takes nothing returns nothing
if ( Trig_Chemist_Func001001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Chemist_Func002001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Chemist_Func003001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Chemist_Func004001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Chemist_Func005001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Chemist_Func006001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Chemist_Func007001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Chemist_Func008001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Chemist_Func009001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H014', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Chemist_Func010C() ) then
call ForGroupBJ( GetUnitsOfPlayerAll(GetOwningPlayer(GetSummonedUnit())), function Trig_Chemist_Func010Func001002 )
set udg_InvalidJob = false
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetSummoningUnit())), "TRIGSTR_1275" )
else
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] = 0
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetSummoningUnit(), GetForLoopIndexA()), GetSummoningUnit() )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForGroupBJ( GetUnitsOfPlayerAll(GetOwningPlayer(GetSummonedUnit())), function Trig_Chemist_Func010Func004A )
endif
endfunction
//===========================================================================
function InitTrig_Chemist takes nothing returns nothing
set gg_trg_Chemist = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Chemist, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Chemist, Condition( function Trig_Chemist_Conditions ) )
call TriggerAddAction( gg_trg_Chemist, function Trig_Chemist_Actions )
endfunction
function Trig_Dark_Knight_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'H024' ) ) then
return false
endif
return true
endfunction
function Trig_Dark_Knight_Func001001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'ewsp' )
endfunction
function Trig_Dark_Knight_Func002001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Leonhart" )
endfunction
function Trig_Dark_Knight_Func003001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Tellah" )
endfunction
function Trig_Dark_Knight_Func004001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Terra" )
endfunction
function Trig_Dark_Knight_Func005001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Quistis" )
endfunction
function Trig_Dark_Knight_Func006001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Amarant" )
endfunction
function Trig_Dark_Knight_Func007001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Kimari" )
endfunction
function Trig_Dark_Knight_Func008001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Butz" )
endfunction
function Trig_Dark_Knight_Func009Func001002001001 takes nothing returns boolean
return ( GetEnumUnit() == GetSummonedUnit() )
endfunction
function Trig_Dark_Knight_Func009Func001002001002 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) != 'ewsp' )
endfunction
function Trig_Dark_Knight_Func009Func001002001 takes nothing returns boolean
return GetBooleanAnd( Trig_Dark_Knight_Func009Func001002001001(), Trig_Dark_Knight_Func009Func001002001002() )
endfunction
function Trig_Dark_Knight_Func009Func001002 takes nothing returns nothing
if ( Trig_Dark_Knight_Func009Func001002001() ) then
call RemoveUnit( GetSummonedUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_Dark_Knight_Func009Func004Func001C takes nothing returns boolean
if ( not ( GetEnumUnit() != GetLastCreatedUnit() ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'ewsp' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'e007' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'hbot' ) ) then
return false
endif
return true
endfunction
function Trig_Dark_Knight_Func009Func004A takes nothing returns nothing
if ( Trig_Dark_Knight_Func009Func004Func001C() ) then
call RemoveUnit( GetEnumUnit() )
else
endif
endfunction
function Trig_Dark_Knight_Func009C takes nothing returns boolean
if ( not ( udg_InvalidJob == true ) ) then
return false
endif
return true
endfunction
function Trig_Dark_Knight_Actions takes nothing returns nothing
if ( Trig_Dark_Knight_Func001001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Dark_Knight_Func002001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Dark_Knight_Func003001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Dark_Knight_Func004001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Dark_Knight_Func005001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Dark_Knight_Func006001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Dark_Knight_Func007001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Dark_Knight_Func008001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H024', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Dark_Knight_Func009C() ) then
call ForGroupBJ( GetUnitsOfPlayerAll(GetOwningPlayer(GetSummonedUnit())), function Trig_Dark_Knight_Func009Func001002 )
set udg_InvalidJob = false
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetSummoningUnit())), "TRIGSTR_1276" )
else
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] = 0
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetSummoningUnit(), GetForLoopIndexA()), GetSummoningUnit() )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForGroupBJ( GetUnitsOfPlayerAll(GetOwningPlayer(GetSummonedUnit())), function Trig_Dark_Knight_Func009Func004A )
endif
endfunction
//===========================================================================
function InitTrig_Dark_Knight takes nothing returns nothing
set gg_trg_Dark_Knight = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Dark_Knight, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Dark_Knight, Condition( function Trig_Dark_Knight_Conditions ) )
call TriggerAddAction( gg_trg_Dark_Knight, function Trig_Dark_Knight_Actions )
endfunction
function Trig_Dragoon_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'H023' ) ) then
return false
endif
return true
endfunction
function Trig_Dragoon_Func001001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'ewsp' )
endfunction
function Trig_Dragoon_Func002001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Leonhart" )
endfunction
function Trig_Dragoon_Func003001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Tellah" )
endfunction
function Trig_Dragoon_Func004001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Terra" )
endfunction
function Trig_Dragoon_Func005001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Quistis" )
endfunction
function Trig_Dragoon_Func006001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Butz" )
endfunction
function Trig_Dragoon_Func007001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Kimari" )
endfunction
function Trig_Dragoon_Func008001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Amarant" )
endfunction
function Trig_Dragoon_Func009Func001002001001 takes nothing returns boolean
return ( GetEnumUnit() == GetSummonedUnit() )
endfunction
function Trig_Dragoon_Func009Func001002001002 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) != 'ewsp' )
endfunction
function Trig_Dragoon_Func009Func001002001 takes nothing returns boolean
return GetBooleanAnd( Trig_Dragoon_Func009Func001002001001(), Trig_Dragoon_Func009Func001002001002() )
endfunction
function Trig_Dragoon_Func009Func001002 takes nothing returns nothing
if ( Trig_Dragoon_Func009Func001002001() ) then
call RemoveUnit( GetSummonedUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_Dragoon_Func009Func004Func001C takes nothing returns boolean
if ( not ( GetEnumUnit() != GetLastCreatedUnit() ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'ewsp' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'e007' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'hbot' ) ) then
return false
endif
return true
endfunction
function Trig_Dragoon_Func009Func004A takes nothing returns nothing
if ( Trig_Dragoon_Func009Func004Func001C() ) then
call RemoveUnit( GetEnumUnit() )
else
endif
endfunction
function Trig_Dragoon_Func009C takes nothing returns boolean
if ( not ( udg_InvalidJob == true ) ) then
return false
endif
return true
endfunction
function Trig_Dragoon_Actions takes nothing returns nothing
if ( Trig_Dragoon_Func001001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Dragoon_Func002001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Dragoon_Func003001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Dragoon_Func004001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Dragoon_Func005001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Dragoon_Func006001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H023', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Dragoon_Func007001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H01K', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Dragoon_Func008001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H01C', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Dragoon_Func009C() ) then
call ForGroupBJ( GetUnitsOfPlayerAll(GetOwningPlayer(GetSummonedUnit())), function Trig_Dragoon_Func009Func001002 )
set udg_InvalidJob = false
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetSummoningUnit())), "TRIGSTR_1277" )
else
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] = 0
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetSummoningUnit(), GetForLoopIndexA()), GetSummoningUnit() )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForGroupBJ( GetUnitsOfPlayerAll(GetOwningPlayer(GetSummonedUnit())), function Trig_Dragoon_Func009Func004A )
call UnitAddAbilityBJ( 'A02C', GetLastCreatedUnit() )
endif
endfunction
//===========================================================================
function InitTrig_Dragoon takes nothing returns nothing
set gg_trg_Dragoon = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Dragoon, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Dragoon, Condition( function Trig_Dragoon_Conditions ) )
call TriggerAddAction( gg_trg_Dragoon, function Trig_Dragoon_Actions )
endfunction
function Trig_Hunter_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'H00R' ) ) then
return false
endif
return true
endfunction
function Trig_Hunter_Func001001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'ewsp' )
endfunction
function Trig_Hunter_Func002001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Leonhart" )
endfunction
function Trig_Hunter_Func003001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Tellah" )
endfunction
function Trig_Hunter_Func004001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Terra" )
endfunction
function Trig_Hunter_Func005001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Amarant" )
endfunction
function Trig_Hunter_Func006001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Kimari" )
endfunction
function Trig_Hunter_Func007001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Quistis" )
endfunction
function Trig_Hunter_Func008001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Butz" )
endfunction
function Trig_Hunter_Func009Func001002001001 takes nothing returns boolean
return ( GetEnumUnit() == GetSummonedUnit() )
endfunction
function Trig_Hunter_Func009Func001002001002 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) != 'ewsp' )
endfunction
function Trig_Hunter_Func009Func001002001 takes nothing returns boolean
return GetBooleanAnd( Trig_Hunter_Func009Func001002001001(), Trig_Hunter_Func009Func001002001002() )
endfunction
function Trig_Hunter_Func009Func001002 takes nothing returns nothing
if ( Trig_Hunter_Func009Func001002001() ) then
call RemoveUnit( GetSummonedUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_Hunter_Func009Func004Func001C takes nothing returns boolean
if ( not ( GetEnumUnit() != GetLastCreatedUnit() ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'ewsp' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'e007' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'hbot' ) ) then
return false
endif
return true
endfunction
function Trig_Hunter_Func009Func004A takes nothing returns nothing
if ( Trig_Hunter_Func009Func004Func001C() ) then
call RemoveUnit( GetEnumUnit() )
else
endif
endfunction
function Trig_Hunter_Func009C takes nothing returns boolean
if ( not ( udg_InvalidJob == true ) ) then
return false
endif
return true
endfunction
function Trig_Hunter_Actions takes nothing returns nothing
if ( Trig_Hunter_Func001001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Hunter_Func002001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Hunter_Func003001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Hunter_Func004001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Hunter_Func005001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Hunter_Func006001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Hunter_Func007001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H00R', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Hunter_Func008001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H025', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Hunter_Func009C() ) then
call ForGroupBJ( GetUnitsOfPlayerAll(GetOwningPlayer(GetSummonedUnit())), function Trig_Hunter_Func009Func001002 )
set udg_InvalidJob = false
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetSummoningUnit())), "TRIGSTR_1278" )
else
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] = 0
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetSummoningUnit(), GetForLoopIndexA()), GetSummoningUnit() )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForGroupBJ( GetUnitsOfPlayerAll(GetOwningPlayer(GetSummonedUnit())), function Trig_Hunter_Func009Func004A )
endif
endfunction
//===========================================================================
function InitTrig_Hunter takes nothing returns nothing
set gg_trg_Hunter = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Hunter, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Hunter, Condition( function Trig_Hunter_Conditions ) )
call TriggerAddAction( gg_trg_Hunter, function Trig_Hunter_Actions )
endfunction
function Trig_Fighter_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'H001' ) ) then
return false
endif
return true
endfunction
function Trig_Fighter_Func001001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'ewsp' )
endfunction
function Trig_Fighter_Func002001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Leonhart" )
endfunction
function Trig_Fighter_Func003001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Amarant" )
endfunction
function Trig_Fighter_Func004001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Tellah" )
endfunction
function Trig_Fighter_Func005001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Kimari" )
endfunction
function Trig_Fighter_Func006001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Butz" )
endfunction
function Trig_Fighter_Func007001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Terra" )
endfunction
function Trig_Fighter_Func008001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Quistis" )
endfunction
function Trig_Fighter_Func009Func003002001001 takes nothing returns boolean
return ( GetEnumUnit() == GetSummonedUnit() )
endfunction
function Trig_Fighter_Func009Func003002001002 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) != 'ewsp' )
endfunction
function Trig_Fighter_Func009Func003002001 takes nothing returns boolean
return GetBooleanAnd( Trig_Fighter_Func009Func003002001001(), Trig_Fighter_Func009Func003002001002() )
endfunction
function Trig_Fighter_Func009Func003002 takes nothing returns nothing
if ( Trig_Fighter_Func009Func003002001() ) then
call RemoveUnit( GetSummonedUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_Fighter_Func009Func004Func001C takes nothing returns boolean
if ( not ( GetEnumUnit() != GetLastCreatedUnit() ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'ewsp' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'e007' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'hbot' ) ) then
return false
endif
return true
endfunction
function Trig_Fighter_Func009Func004A takes nothing returns nothing
if ( Trig_Fighter_Func009Func004Func001C() ) then
call RemoveUnit( GetEnumUnit() )
else
endif
endfunction
function Trig_Fighter_Func009C takes nothing returns boolean
if ( not ( udg_InvalidJob == true ) ) then
return false
endif
return true
endfunction
function Trig_Fighter_Actions takes nothing returns nothing
if ( Trig_Fighter_Func001001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Fighter_Func002001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H001', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Fighter_Func003001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H01A', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Fighter_Func004001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H01Q', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Fighter_Func005001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H01H', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Fighter_Func006001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H021', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Fighter_Func007001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H00Y', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Fighter_Func008001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Fighter_Func009C() ) then
call ForGroupBJ( GetUnitsOfPlayerAll(GetOwningPlayer(GetSummonedUnit())), function Trig_Fighter_Func009Func003002 )
set udg_InvalidJob = false
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetSummoningUnit())), "TRIGSTR_1279" )
else
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] = 0
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetSummoningUnit(), GetForLoopIndexA()), GetSummoningUnit() )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForGroupBJ( GetUnitsOfPlayerAll(GetOwningPlayer(GetSummonedUnit())), function Trig_Fighter_Func009Func004A )
call UnitAddAbilityBJ( 'A000', GetLastCreatedUnit() )
endif
endfunction
//===========================================================================
function InitTrig_Fighter takes nothing returns nothing
set gg_trg_Fighter = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Fighter, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Fighter, Condition( function Trig_Fighter_Conditions ) )
call TriggerAddAction( gg_trg_Fighter, function Trig_Fighter_Actions )
endfunction
function Trig_Ninja_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'H018' ) ) then
return false
endif
return true
endfunction
function Trig_Ninja_Func001001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'ewsp' )
endfunction
function Trig_Ninja_Func002001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Leonhart" )
endfunction
function Trig_Ninja_Func003001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Tellah" )
endfunction
function Trig_Ninja_Func004001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Butz" )
endfunction
function Trig_Ninja_Func005001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Quistis" )
endfunction
function Trig_Ninja_Func006001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Kimari" )
endfunction
function Trig_Ninja_Func007001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Terra" )
endfunction
function Trig_Ninja_Func008001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Amarant" )
endfunction
function Trig_Ninja_Func009Func003Func001C takes nothing returns boolean
if ( not ( GetEnumUnit() != GetLastCreatedUnit() ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'ewsp' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'e007' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'hbot' ) ) then
return false
endif
return true
endfunction
function Trig_Ninja_Func009Func003A takes nothing returns nothing
if ( Trig_Ninja_Func009Func003Func001C() ) then
call RemoveUnit( GetEnumUnit() )
else
endif
endfunction
function Trig_Ninja_Func009Func004002001001 takes nothing returns boolean
return ( GetEnumUnit() == GetSummonedUnit() )
endfunction
function Trig_Ninja_Func009Func004002001002 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) != 'ewsp' )
endfunction
function Trig_Ninja_Func009Func004002001 takes nothing returns boolean
return GetBooleanAnd( Trig_Ninja_Func009Func004002001001(), Trig_Ninja_Func009Func004002001002() )
endfunction
function Trig_Ninja_Func009Func004002 takes nothing returns nothing
if ( Trig_Ninja_Func009Func004002001() ) then
call RemoveUnit( GetSummonedUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_Ninja_Func009C takes nothing returns boolean
if ( not ( udg_InvalidJob == true ) ) then
return false
endif
return true
endfunction
function Trig_Ninja_Actions takes nothing returns nothing
if ( Trig_Ninja_Func001001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Ninja_Func002001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Ninja_Func003001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Ninja_Func004001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Ninja_Func005001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Ninja_Func006001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Ninja_Func007001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H012', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Ninja_Func008001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H018', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Ninja_Func009C() ) then
call ForGroupBJ( GetUnitsOfPlayerAll(GetOwningPlayer(GetSummonedUnit())), function Trig_Ninja_Func009Func004002 )
set udg_InvalidJob = false
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetSummoningUnit())), "TRIGSTR_1280" )
else
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] = 0
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetSummoningUnit(), GetForLoopIndexA()), GetSummoningUnit() )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForGroupBJ( GetUnitsOfPlayerAll(GetOwningPlayer(GetSummonedUnit())), function Trig_Ninja_Func009Func003A )
endif
endfunction
//===========================================================================
function InitTrig_Ninja takes nothing returns nothing
set gg_trg_Ninja = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Ninja, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Ninja, Condition( function Trig_Ninja_Conditions ) )
call TriggerAddAction( gg_trg_Ninja, function Trig_Ninja_Actions )
endfunction
function Trig_Paladin_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'H007' ) ) then
return false
endif
return true
endfunction
function Trig_Paladin_Func001001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'ewsp' )
endfunction
function Trig_Paladin_Func002001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Butz" )
endfunction
function Trig_Paladin_Func003001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Terra" )
endfunction
function Trig_Paladin_Func004001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Quistis" )
endfunction
function Trig_Paladin_Func005001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Amarant" )
endfunction
function Trig_Paladin_Func006001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Leonhart" )
endfunction
function Trig_Paladin_Func007001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Kimari" )
endfunction
function Trig_Paladin_Func008001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Tellah" )
endfunction
function Trig_Paladin_Func009Func003Func001C takes nothing returns boolean
if ( not ( GetEnumUnit() != GetLastCreatedUnit() ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'ewsp' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'e007' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'hbot' ) ) then
return false
endif
return true
endfunction
function Trig_Paladin_Func009Func003A takes nothing returns nothing
if ( Trig_Paladin_Func009Func003Func001C() ) then
call RemoveUnit( GetEnumUnit() )
else
endif
endfunction
function Trig_Paladin_Func009Func004002001001 takes nothing returns boolean
return ( GetEnumUnit() == GetSummonedUnit() )
endfunction
function Trig_Paladin_Func009Func004002001002 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) != 'ewsp' )
endfunction
function Trig_Paladin_Func009Func004002001 takes nothing returns boolean
return GetBooleanAnd( Trig_Paladin_Func009Func004002001001(), Trig_Paladin_Func009Func004002001002() )
endfunction
function Trig_Paladin_Func009Func004002 takes nothing returns nothing
if ( Trig_Paladin_Func009Func004002001() ) then
call RemoveUnit( GetSummonedUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_Paladin_Func009C takes nothing returns boolean
if ( not ( udg_InvalidJob == true ) ) then
return false
endif
return true
endfunction
function Trig_Paladin_Actions takes nothing returns nothing
if ( Trig_Paladin_Func001001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Paladin_Func002001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Paladin_Func003001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Paladin_Func004001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Paladin_Func005001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Paladin_Func006001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H007', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Paladin_Func007001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H01M', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Paladin_Func008001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H01X', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Paladin_Func009C() ) then
call ForGroupBJ( GetUnitsOfPlayerAll(GetOwningPlayer(GetSummonedUnit())), function Trig_Paladin_Func009Func004002 )
set udg_InvalidJob = false
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetSummoningUnit())), "TRIGSTR_1281" )
else
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] = 0
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetSummoningUnit(), GetForLoopIndexA()), GetSummoningUnit() )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForGroupBJ( GetUnitsOfPlayerAll(GetOwningPlayer(GetSummonedUnit())), function Trig_Paladin_Func009Func003A )
endif
endfunction
//===========================================================================
function InitTrig_Paladin takes nothing returns nothing
set gg_trg_Paladin = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Paladin, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Paladin, Condition( function Trig_Paladin_Conditions ) )
call TriggerAddAction( gg_trg_Paladin, function Trig_Paladin_Actions )
endfunction
function Trig_Red_Mage_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'H004' ) ) then
return false
endif
return true
endfunction
function Trig_Red_Mage_Func001001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'ewsp' )
endfunction
function Trig_Red_Mage_Func002001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Butz" )
endfunction
function Trig_Red_Mage_Func003001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Terra" )
endfunction
function Trig_Red_Mage_Func004001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Quistis" )
endfunction
function Trig_Red_Mage_Func005001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Amarant" )
endfunction
function Trig_Red_Mage_Func006001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Kimari" )
endfunction
function Trig_Red_Mage_Func007001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Leonhart" )
endfunction
function Trig_Red_Mage_Func008001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Tellah" )
endfunction
function Trig_Red_Mage_Func009Func001002001001 takes nothing returns boolean
return ( GetEnumUnit() == GetSummonedUnit() )
endfunction
function Trig_Red_Mage_Func009Func001002001002 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) != 'ewsp' )
endfunction
function Trig_Red_Mage_Func009Func001002001 takes nothing returns boolean
return GetBooleanAnd( Trig_Red_Mage_Func009Func001002001001(), Trig_Red_Mage_Func009Func001002001002() )
endfunction
function Trig_Red_Mage_Func009Func001002 takes nothing returns nothing
if ( Trig_Red_Mage_Func009Func001002001() ) then
call RemoveUnit( GetSummonedUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_Red_Mage_Func009Func004Func001C takes nothing returns boolean
if ( not ( GetEnumUnit() != GetLastCreatedUnit() ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'ewsp' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'e007' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'hbot' ) ) then
return false
endif
return true
endfunction
function Trig_Red_Mage_Func009Func004A takes nothing returns nothing
if ( Trig_Red_Mage_Func009Func004Func001C() ) then
call RemoveUnit( GetEnumUnit() )
else
endif
endfunction
function Trig_Red_Mage_Func009C takes nothing returns boolean
if ( not ( udg_InvalidJob == true ) ) then
return false
endif
return true
endfunction
function Trig_Red_Mage_Actions takes nothing returns nothing
if ( Trig_Red_Mage_Func001001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Red_Mage_Func002001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Red_Mage_Func003001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Red_Mage_Func004001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Red_Mage_Func005001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Red_Mage_Func006001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Red_Mage_Func007001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H004', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Red_Mage_Func008001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H01U', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Red_Mage_Func009C() ) then
call ForGroupBJ( GetUnitsOfPlayerAll(GetOwningPlayer(GetSummonedUnit())), function Trig_Red_Mage_Func009Func001002 )
set udg_InvalidJob = false
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetSummoningUnit())), "TRIGSTR_1282" )
else
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] = 0
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetSummoningUnit(), GetForLoopIndexA()), GetSummoningUnit() )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForGroupBJ( GetUnitsOfPlayerAll(GetOwningPlayer(GetSummonedUnit())), function Trig_Red_Mage_Func009Func004A )
endif
endfunction
//===========================================================================
function InitTrig_Red_Mage takes nothing returns nothing
set gg_trg_Red_Mage = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Red_Mage, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Red_Mage, Condition( function Trig_Red_Mage_Conditions ) )
call TriggerAddAction( gg_trg_Red_Mage, function Trig_Red_Mage_Actions )
endfunction
function Trig_Sage_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'H00V' ) ) then
return false
endif
return true
endfunction
function Trig_Sage_Func001001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'ewsp' )
endfunction
function Trig_Sage_Func002001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Leonhart" )
endfunction
function Trig_Sage_Func003001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Terra" )
endfunction
function Trig_Sage_Func004001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Amarant" )
endfunction
function Trig_Sage_Func005001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Kimari" )
endfunction
function Trig_Sage_Func006001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Quistis" )
endfunction
function Trig_Sage_Func007001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Butz" )
endfunction
function Trig_Sage_Func008001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Tellah" )
endfunction
function Trig_Sage_Func009Func001002001001 takes nothing returns boolean
return ( GetEnumUnit() == GetSummonedUnit() )
endfunction
function Trig_Sage_Func009Func001002001002 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) != 'ewsp' )
endfunction
function Trig_Sage_Func009Func001002001 takes nothing returns boolean
return GetBooleanAnd( Trig_Sage_Func009Func001002001001(), Trig_Sage_Func009Func001002001002() )
endfunction
function Trig_Sage_Func009Func001002 takes nothing returns nothing
if ( Trig_Sage_Func009Func001002001() ) then
call RemoveUnit( GetSummonedUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_Sage_Func009Func004Func001C takes nothing returns boolean
if ( not ( GetEnumUnit() != GetLastCreatedUnit() ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'ewsp' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'e007' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'hbot' ) ) then
return false
endif
return true
endfunction
function Trig_Sage_Func009Func004A takes nothing returns nothing
if ( Trig_Sage_Func009Func004Func001C() ) then
call RemoveUnit( GetEnumUnit() )
else
endif
endfunction
function Trig_Sage_Func009C takes nothing returns boolean
if ( not ( udg_InvalidJob == true ) ) then
return false
endif
return true
endfunction
function Trig_Sage_Actions takes nothing returns nothing
if ( Trig_Sage_Func001001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Sage_Func002001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Sage_Func003001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Sage_Func004001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Sage_Func005001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Sage_Func006001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H00V', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Sage_Func007001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H020', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Sage_Func008001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H01V', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Sage_Func009C() ) then
call ForGroupBJ( GetUnitsOfPlayerAll(GetOwningPlayer(GetSummonedUnit())), function Trig_Sage_Func009Func001002 )
set udg_InvalidJob = false
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetSummoningUnit())), "TRIGSTR_1283" )
else
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] = 0
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetSummoningUnit(), GetForLoopIndexA()), GetSummoningUnit() )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForGroupBJ( GetUnitsOfPlayerAll(GetOwningPlayer(GetSummonedUnit())), function Trig_Sage_Func009Func004A )
endif
endfunction
//===========================================================================
function InitTrig_Sage takes nothing returns nothing
set gg_trg_Sage = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Sage, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Sage, Condition( function Trig_Sage_Conditions ) )
call TriggerAddAction( gg_trg_Sage, function Trig_Sage_Actions )
endfunction
function Trig_Samurai_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'H008' ) ) then
return false
endif
return true
endfunction
function Trig_Samurai_Func001001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'ewsp' )
endfunction
function Trig_Samurai_Func002001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Tellah" )
endfunction
function Trig_Samurai_Func003001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Butz" )
endfunction
function Trig_Samurai_Func004001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Terra" )
endfunction
function Trig_Samurai_Func005001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Quistis" )
endfunction
function Trig_Samurai_Func006001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Kimari" )
endfunction
function Trig_Samurai_Func007001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Leonhart" )
endfunction
function Trig_Samurai_Func008001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Amarant" )
endfunction
function Trig_Samurai_Func009Func001002001001 takes nothing returns boolean
return ( GetEnumUnit() == GetSummonedUnit() )
endfunction
function Trig_Samurai_Func009Func001002001002 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) != 'ewsp' )
endfunction
function Trig_Samurai_Func009Func001002001 takes nothing returns boolean
return GetBooleanAnd( Trig_Samurai_Func009Func001002001001(), Trig_Samurai_Func009Func001002001002() )
endfunction
function Trig_Samurai_Func009Func001002 takes nothing returns nothing
if ( Trig_Samurai_Func009Func001002001() ) then
call RemoveUnit( GetSummonedUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_Samurai_Func009Func004Func001C takes nothing returns boolean
if ( not ( GetEnumUnit() != GetLastCreatedUnit() ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'ewsp' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'e007' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'hbot' ) ) then
return false
endif
return true
endfunction
function Trig_Samurai_Func009Func004A takes nothing returns nothing
if ( Trig_Samurai_Func009Func004Func001C() ) then
call RemoveUnit( GetEnumUnit() )
else
endif
endfunction
function Trig_Samurai_Func009C takes nothing returns boolean
if ( not ( udg_InvalidJob == true ) ) then
return false
endif
return true
endfunction
function Trig_Samurai_Actions takes nothing returns nothing
if ( Trig_Samurai_Func001001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Samurai_Func002001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Samurai_Func003001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Samurai_Func004001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Samurai_Func005001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Samurai_Func006001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Samurai_Func007001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H008', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Samurai_Func008001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H016', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Samurai_Func009C() ) then
call ForGroupBJ( GetUnitsOfPlayerAll(GetOwningPlayer(GetSummonedUnit())), function Trig_Samurai_Func009Func001002 )
set udg_InvalidJob = false
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetSummoningUnit())), "TRIGSTR_1284" )
else
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] = 0
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetSummoningUnit(), GetForLoopIndexA()), GetSummoningUnit() )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForGroupBJ( GetUnitsOfPlayerAll(GetOwningPlayer(GetSummonedUnit())), function Trig_Samurai_Func009Func004A )
endif
endfunction
//===========================================================================
function InitTrig_Samurai takes nothing returns nothing
set gg_trg_Samurai = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Samurai, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Samurai, Condition( function Trig_Samurai_Conditions ) )
call TriggerAddAction( gg_trg_Samurai, function Trig_Samurai_Actions )
endfunction
function Trig_Summoner_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'H00Q' ) ) then
return false
endif
return true
endfunction
function Trig_Summoner_Func001001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'ewsp' )
endfunction
function Trig_Summoner_Func002001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Leonhart" )
endfunction
function Trig_Summoner_Func003001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Butz" )
endfunction
function Trig_Summoner_Func004001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Amarant" )
endfunction
function Trig_Summoner_Func005001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Kimari" )
endfunction
function Trig_Summoner_Func006001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Quistis" )
endfunction
function Trig_Summoner_Func007001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Tellah" )
endfunction
function Trig_Summoner_Func008001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Terra" )
endfunction
function Trig_Summoner_Func009Func001002001001 takes nothing returns boolean
return ( GetEnumUnit() == GetSummonedUnit() )
endfunction
function Trig_Summoner_Func009Func001002001002 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) != 'ewsp' )
endfunction
function Trig_Summoner_Func009Func001002001 takes nothing returns boolean
return GetBooleanAnd( Trig_Summoner_Func009Func001002001001(), Trig_Summoner_Func009Func001002001002() )
endfunction
function Trig_Summoner_Func009Func001002 takes nothing returns nothing
if ( Trig_Summoner_Func009Func001002001() ) then
call RemoveUnit( GetSummonedUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_Summoner_Func009Func004Func001C takes nothing returns boolean
if ( not ( GetEnumUnit() != GetLastCreatedUnit() ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'ewsp' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'e007' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'hbot' ) ) then
return false
endif
return true
endfunction
function Trig_Summoner_Func009Func004A takes nothing returns nothing
if ( Trig_Summoner_Func009Func004Func001C() ) then
call RemoveUnit( GetEnumUnit() )
else
endif
endfunction
function Trig_Summoner_Func009C takes nothing returns boolean
if ( not ( udg_InvalidJob == true ) ) then
return false
endif
return true
endfunction
function Trig_Summoner_Actions takes nothing returns nothing
if ( Trig_Summoner_Func001001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Summoner_Func002001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Summoner_Func003001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Summoner_Func004001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Summoner_Func005001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Summoner_Func006001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H00Q', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Summoner_Func007001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H01W', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Summoner_Func008001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H011', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Summoner_Func009C() ) then
call ForGroupBJ( GetUnitsOfPlayerAll(GetOwningPlayer(GetSummonedUnit())), function Trig_Summoner_Func009Func001002 )
set udg_InvalidJob = false
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetSummoningUnit())), "TRIGSTR_1285" )
else
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] = 0
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetSummoningUnit(), GetForLoopIndexA()), GetSummoningUnit() )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForGroupBJ( GetUnitsOfPlayerAll(GetOwningPlayer(GetSummonedUnit())), function Trig_Summoner_Func009Func004A )
endif
endfunction
//===========================================================================
function InitTrig_Summoner takes nothing returns nothing
set gg_trg_Summoner = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Summoner, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Summoner, Condition( function Trig_Summoner_Conditions ) )
call TriggerAddAction( gg_trg_Summoner, function Trig_Summoner_Actions )
endfunction
function Trig_Thief_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'H00N' ) ) then
return false
endif
return true
endfunction
function Trig_Thief_Func001001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'ewsp' )
endfunction
function Trig_Thief_Func002001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Leonhart" )
endfunction
function Trig_Thief_Func003001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Tellah" )
endfunction
function Trig_Thief_Func004001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Terra" )
endfunction
function Trig_Thief_Func005001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Kimari" )
endfunction
function Trig_Thief_Func006001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Quistis" )
endfunction
function Trig_Thief_Func007001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Amarant" )
endfunction
function Trig_Thief_Func008001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Butz" )
endfunction
function Trig_Thief_Func009Func001002001001 takes nothing returns boolean
return ( GetEnumUnit() == GetSummonedUnit() )
endfunction
function Trig_Thief_Func009Func001002001002 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) != 'ewsp' )
endfunction
function Trig_Thief_Func009Func001002001 takes nothing returns boolean
return GetBooleanAnd( Trig_Thief_Func009Func001002001001(), Trig_Thief_Func009Func001002001002() )
endfunction
function Trig_Thief_Func009Func001002 takes nothing returns nothing
if ( Trig_Thief_Func009Func001002001() ) then
call RemoveUnit( GetSummonedUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_Thief_Func009Func004Func001C takes nothing returns boolean
if ( not ( GetEnumUnit() != GetLastCreatedUnit() ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'ewsp' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'e007' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'hbot' ) ) then
return false
endif
return true
endfunction
function Trig_Thief_Func009Func004A takes nothing returns nothing
if ( Trig_Thief_Func009Func004Func001C() ) then
call RemoveUnit( GetEnumUnit() )
else
endif
endfunction
function Trig_Thief_Func009C takes nothing returns boolean
if ( not ( udg_InvalidJob == true ) ) then
return false
endif
return true
endfunction
function Trig_Thief_Actions takes nothing returns nothing
if ( Trig_Thief_Func001001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Thief_Func002001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Thief_Func003001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Thief_Func004001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Thief_Func005001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Thief_Func006001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H00N', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Thief_Func007001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H015', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Thief_Func008001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H01P', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Thief_Func009C() ) then
call ForGroupBJ( GetUnitsOfPlayerAll(GetOwningPlayer(GetSummonedUnit())), function Trig_Thief_Func009Func001002 )
set udg_InvalidJob = false
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetSummoningUnit())), "TRIGSTR_1286" )
else
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] = 0
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetSummoningUnit(), GetForLoopIndexA()), GetSummoningUnit() )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForGroupBJ( GetUnitsOfPlayerAll(GetOwningPlayer(GetSummonedUnit())), function Trig_Thief_Func009Func004A )
endif
endfunction
//===========================================================================
function InitTrig_Thief takes nothing returns nothing
set gg_trg_Thief = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Thief, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Thief, Condition( function Trig_Thief_Conditions ) )
call TriggerAddAction( gg_trg_Thief, function Trig_Thief_Actions )
endfunction
function Trig_Time_Mage_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'H005' ) ) then
return false
endif
return true
endfunction
function Trig_Time_Mage_Func001001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'ewsp' )
endfunction
function Trig_Time_Mage_Func002001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Butz" )
endfunction
function Trig_Time_Mage_Func003001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Terra" )
endfunction
function Trig_Time_Mage_Func004001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Quistis" )
endfunction
function Trig_Time_Mage_Func005001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Leonhart" )
endfunction
function Trig_Time_Mage_Func006001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Kimari" )
endfunction
function Trig_Time_Mage_Func007001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Tellah" )
endfunction
function Trig_Time_Mage_Func008001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Amarant" )
endfunction
function Trig_Time_Mage_Func009Func001002001001 takes nothing returns boolean
return ( GetEnumUnit() == GetSummonedUnit() )
endfunction
function Trig_Time_Mage_Func009Func001002001002 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) != 'ewsp' )
endfunction
function Trig_Time_Mage_Func009Func001002001 takes nothing returns boolean
return GetBooleanAnd( Trig_Time_Mage_Func009Func001002001001(), Trig_Time_Mage_Func009Func001002001002() )
endfunction
function Trig_Time_Mage_Func009Func001002 takes nothing returns nothing
if ( Trig_Time_Mage_Func009Func001002001() ) then
call RemoveUnit( GetSummonedUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_Time_Mage_Func009Func004Func001C takes nothing returns boolean
if ( not ( GetEnumUnit() != GetLastCreatedUnit() ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'ewsp' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'e007' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'hbot' ) ) then
return false
endif
return true
endfunction
function Trig_Time_Mage_Func009Func004A takes nothing returns nothing
if ( Trig_Time_Mage_Func009Func004Func001C() ) then
call RemoveUnit( GetEnumUnit() )
else
endif
endfunction
function Trig_Time_Mage_Func009C takes nothing returns boolean
if ( not ( udg_InvalidJob == true ) ) then
return false
endif
return true
endfunction
function Trig_Time_Mage_Actions takes nothing returns nothing
if ( Trig_Time_Mage_Func001001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Time_Mage_Func002001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Time_Mage_Func003001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Time_Mage_Func004001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Time_Mage_Func005001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H005', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Time_Mage_Func006001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H01J', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Time_Mage_Func007001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H01T', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Time_Mage_Func008001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H019', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Time_Mage_Func009C() ) then
call ForGroupBJ( GetUnitsOfPlayerAll(GetOwningPlayer(GetSummonedUnit())), function Trig_Time_Mage_Func009Func001002 )
set udg_InvalidJob = false
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetSummoningUnit())), "TRIGSTR_1287" )
else
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] = 0
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetSummoningUnit(), GetForLoopIndexA()), GetSummoningUnit() )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForGroupBJ( GetUnitsOfPlayerAll(GetOwningPlayer(GetSummonedUnit())), function Trig_Time_Mage_Func009Func004A )
endif
endfunction
//===========================================================================
function InitTrig_Time_Mage takes nothing returns nothing
set gg_trg_Time_Mage = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Time_Mage, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Time_Mage, Condition( function Trig_Time_Mage_Conditions ) )
call TriggerAddAction( gg_trg_Time_Mage, function Trig_Time_Mage_Actions )
endfunction
function Trig_White_Mage_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'H003' ) ) then
return false
endif
return true
endfunction
function Trig_White_Mage_Func001001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'ewsp' )
endfunction
function Trig_White_Mage_Func002001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Leonhart" )
endfunction
function Trig_White_Mage_Func003001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Amarant" )
endfunction
function Trig_White_Mage_Func004001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Tellah" )
endfunction
function Trig_White_Mage_Func005001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Kimari" )
endfunction
function Trig_White_Mage_Func006001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Butz" )
endfunction
function Trig_White_Mage_Func007001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Terra" )
endfunction
function Trig_White_Mage_Func008001 takes nothing returns boolean
return ( udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] == "Quistis" )
endfunction
function Trig_White_Mage_Func009Func001002001001 takes nothing returns boolean
return ( GetEnumUnit() == GetSummonedUnit() )
endfunction
function Trig_White_Mage_Func009Func001002001002 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) != 'ewsp' )
endfunction
function Trig_White_Mage_Func009Func001002001 takes nothing returns boolean
return GetBooleanAnd( Trig_White_Mage_Func009Func001002001001(), Trig_White_Mage_Func009Func001002001002() )
endfunction
function Trig_White_Mage_Func009Func001002 takes nothing returns nothing
if ( Trig_White_Mage_Func009Func001002001() ) then
call RemoveUnit( GetSummonedUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_White_Mage_Func009Func004Func001C takes nothing returns boolean
if ( not ( GetEnumUnit() != GetLastCreatedUnit() ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'ewsp' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'e007' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'hbot' ) ) then
return false
endif
return true
endfunction
function Trig_White_Mage_Func009Func004A takes nothing returns nothing
if ( Trig_White_Mage_Func009Func004Func001C() ) then
call RemoveUnit( GetEnumUnit() )
else
endif
endfunction
function Trig_White_Mage_Func009C takes nothing returns boolean
if ( not ( udg_InvalidJob == true ) ) then
return false
endif
return true
endfunction
function Trig_White_Mage_Actions takes nothing returns nothing
if ( Trig_White_Mage_Func001001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_White_Mage_Func002001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H003', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_White_Mage_Func003001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H017', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_White_Mage_Func004001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H01R', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_White_Mage_Func005001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H01N', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_White_Mage_Func006001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H01Z', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_White_Mage_Func007001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H00Z', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_White_Mage_Func008001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H00U', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_White_Mage_Func009C() ) then
call ForGroupBJ( GetUnitsOfPlayerAll(GetOwningPlayer(GetSummonedUnit())), function Trig_White_Mage_Func009Func001002 )
set udg_InvalidJob = false
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetSummoningUnit())), "TRIGSTR_1288" )
else
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] = 0
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetSummoningUnit(), GetForLoopIndexA()), GetSummoningUnit() )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForGroupBJ( GetUnitsOfPlayerAll(GetOwningPlayer(GetSummonedUnit())), function Trig_White_Mage_Func009Func004A )
endif
endfunction
//===========================================================================
function InitTrig_White_Mage takes nothing returns nothing
set gg_trg_White_Mage = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_White_Mage, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_White_Mage, Condition( function Trig_White_Mage_Conditions ) )
call TriggerAddAction( gg_trg_White_Mage, function Trig_White_Mage_Actions )
endfunction
function Trig_Sephiroth_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'E00J' ) ) then
return false
endif
return true
endfunction
function Trig_Sephiroth_Func001001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'ewsp' )
endfunction
function Trig_Sephiroth_Func002001 takes nothing returns boolean
return ( "s" == "s" )
endfunction
function Trig_Sephiroth_Func003Func001002001001 takes nothing returns boolean
return ( GetEnumUnit() == GetSummonedUnit() )
endfunction
function Trig_Sephiroth_Func003Func001002001002 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) != 'ewsp' )
endfunction
function Trig_Sephiroth_Func003Func001002001 takes nothing returns boolean
return GetBooleanAnd( Trig_Sephiroth_Func003Func001002001001(), Trig_Sephiroth_Func003Func001002001002() )
endfunction
function Trig_Sephiroth_Func003Func001002 takes nothing returns nothing
if ( Trig_Sephiroth_Func003Func001002001() ) then
call RemoveUnit( GetSummonedUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_Sephiroth_Func003Func004Func001C takes nothing returns boolean
if ( not ( GetEnumUnit() != GetLastCreatedUnit() ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'ewsp' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'e007' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'hbot' ) ) then
return false
endif
return true
endfunction
function Trig_Sephiroth_Func003Func004A takes nothing returns nothing
if ( Trig_Sephiroth_Func003Func004Func001C() ) then
call RemoveUnit( GetEnumUnit() )
else
endif
endfunction
function Trig_Sephiroth_Func003C takes nothing returns boolean
if ( not ( udg_InvalidJob == true ) ) then
return false
endif
return true
endfunction
function Trig_Sephiroth_Actions takes nothing returns nothing
if ( Trig_Sephiroth_Func001001() ) then
set udg_InvalidJob = true
else
call DoNothing( )
endif
if ( Trig_Sephiroth_Func002001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'E00J', GetOwningPlayer(GetSummonedUnit()), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Sephiroth_Func003C() ) then
call ForGroupBJ( GetUnitsOfPlayerAll(GetOwningPlayer(GetSummonedUnit())), function Trig_Sephiroth_Func003Func001002 )
set udg_InvalidJob = false
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetSummoningUnit())), "TRIGSTR_1092" )
else
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] = 0
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetSummoningUnit(), GetForLoopIndexA()), GetSummoningUnit() )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForGroupBJ( GetUnitsOfPlayerAll(GetOwningPlayer(GetSummonedUnit())), function Trig_Sephiroth_Func003Func004A )
endif
endfunction
//===========================================================================
function InitTrig_Sephiroth takes nothing returns nothing
set gg_trg_Sephiroth = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Sephiroth, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Sephiroth, Condition( function Trig_Sephiroth_Conditions ) )
call TriggerAddAction( gg_trg_Sephiroth, function Trig_Sephiroth_Actions )
endfunction
function Trig_Use_Heavy_Armor_Condition_Func002C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I008' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I007' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I006' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I003' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I005' ) ) then
return true
endif
return false
endfunction
function Trig_Use_Heavy_Armor_Condition_Conditions takes nothing returns boolean
if ( not Trig_Use_Heavy_Armor_Condition_Func002C() ) then
return false
endif
return true
endfunction
function Trig_Use_Heavy_Armor_Condition_Func001Func003Func002001 takes nothing returns boolean
return ( GetUnitName(GetManipulatingUnit()) == "Red Mage" )
endfunction
function Trig_Use_Heavy_Armor_Condition_Func001Func003Func002002 takes nothing returns boolean
return ( GetItemTypeId(GetManipulatedItem()) == 'I005' )
endfunction
function Trig_Use_Heavy_Armor_Condition_Func001Func003Func003001 takes nothing returns boolean
return ( GetUnitName(GetManipulatingUnit()) == "Red Mage" )
endfunction
function Trig_Use_Heavy_Armor_Condition_Func001Func003Func003002 takes nothing returns boolean
return ( GetItemTypeId(GetManipulatedItem()) == 'I003' )
endfunction
function Trig_Use_Heavy_Armor_Condition_Func001Func003C takes nothing returns boolean
if ( ( GetUnitTypeId(GetManipulatingUnit()) == 'H02D' ) ) then
return true
endif
if ( GetBooleanAnd( Trig_Use_Heavy_Armor_Condition_Func001Func003Func002001(), Trig_Use_Heavy_Armor_Condition_Func001Func003Func002002() ) ) then
return true
endif
if ( GetBooleanAnd( Trig_Use_Heavy_Armor_Condition_Func001Func003Func003001(), Trig_Use_Heavy_Armor_Condition_Func001Func003Func003002() ) ) then
return true
endif
if ( ( GetUnitTypeId(GetManipulatingUnit()) == 'ewsp' ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Fighter" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Samurai" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Paladin" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Dark Knight" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Dragoon" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Hunter" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Beastmaster" ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I002') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I001') == true ) ) then
return true
endif
return false
endfunction
function Trig_Use_Heavy_Armor_Condition_Func001C takes nothing returns boolean
if ( not Trig_Use_Heavy_Armor_Condition_Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Use_Heavy_Armor_Condition_Actions takes nothing returns nothing
if ( Trig_Use_Heavy_Armor_Condition_Func001C() ) then
call DoNothing( )
else
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
endif
endfunction
//===========================================================================
function InitTrig_Use_Heavy_Armor_Condition takes nothing returns nothing
set gg_trg_Use_Heavy_Armor_Condition = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Use_Heavy_Armor_Condition, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Use_Heavy_Armor_Condition, Condition( function Trig_Use_Heavy_Armor_Condition_Conditions ) )
call TriggerAddAction( gg_trg_Use_Heavy_Armor_Condition, function Trig_Use_Heavy_Armor_Condition_Actions )
endfunction
function Trig_Use_Onion_Armor_Func002C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I04R' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I04O' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I04Q' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I04T' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I04P' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I04S' ) ) then
return true
endif
return false
endfunction
function Trig_Use_Onion_Armor_Conditions takes nothing returns boolean
if ( not Trig_Use_Onion_Armor_Func002C() ) then
return false
endif
return true
endfunction
function Trig_Use_Onion_Armor_Func001Func003C takes nothing returns boolean
if ( ( GetUnitName(GetManipulatingUnit()) == "Onion Knight" ) ) then
return true
endif
return false
endfunction
function Trig_Use_Onion_Armor_Func001C takes nothing returns boolean
if ( not Trig_Use_Onion_Armor_Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Use_Onion_Armor_Actions takes nothing returns nothing
if ( Trig_Use_Onion_Armor_Func001C() ) then
call DoNothing( )
else
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
endif
endfunction
//===========================================================================
function InitTrig_Use_Onion_Armor takes nothing returns nothing
set gg_trg_Use_Onion_Armor = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Use_Onion_Armor, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Use_Onion_Armor, Condition( function Trig_Use_Onion_Armor_Conditions ) )
call TriggerAddAction( gg_trg_Use_Onion_Armor, function Trig_Use_Onion_Armor_Actions )
endfunction
function Trig_Full_Onion_Set_Func001C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I04R' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I04O' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I04Q' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I04P' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I04S' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I04T' ) ) then
return true
endif
return false
endfunction
function Trig_Full_Onion_Set_Conditions takes nothing returns boolean
if ( not Trig_Full_Onion_Set_Func001C() ) then
return false
endif
return true
endfunction
function Trig_Full_Onion_Set_Func003C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(udg_OnionKid, 'I04R') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(udg_OnionKid, 'I04O') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(udg_OnionKid, 'I04Q') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(udg_OnionKid, 'I04T') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(udg_OnionKid, 'I04P') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(udg_OnionKid, 'I04S') == true ) ) then
return false
endif
return true
endfunction
function Trig_Full_Onion_Set_Actions takes nothing returns nothing
set udg_OnionKid = GetManipulatingUnit()
if ( Trig_Full_Onion_Set_Func003C() ) then
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(udg_OnionKid)), "TRIGSTR_089" )
call ModifyHeroStat( bj_HEROSTAT_STR, udg_OnionKid, bj_MODIFYMETHOD_ADD, 39615 )
call ModifyHeroStat( bj_HEROSTAT_AGI, udg_OnionKid, bj_MODIFYMETHOD_ADD, 39615 )
call ModifyHeroStat( bj_HEROSTAT_INT, udg_OnionKid, bj_MODIFYMETHOD_ADD, 39615 )
else
endif
endfunction
//===========================================================================
function InitTrig_Full_Onion_Set takes nothing returns nothing
set gg_trg_Full_Onion_Set = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Full_Onion_Set, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Full_Onion_Set, Condition( function Trig_Full_Onion_Set_Conditions ) )
call TriggerAddAction( gg_trg_Full_Onion_Set, function Trig_Full_Onion_Set_Actions )
endfunction
function Trig_Use_Sword_Condition_Func002C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I00L' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I00M' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I00J' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I054' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I00K' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I00I' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I00O' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I00N' ) ) then
return true
endif
return false
endfunction
function Trig_Use_Sword_Condition_Conditions takes nothing returns boolean
if ( not Trig_Use_Sword_Condition_Func002C() ) then
return false
endif
return true
endfunction
function Trig_Use_Sword_Condition_Func001Func003Func006001 takes nothing returns boolean
return ( GetUnitName(GetManipulatingUnit()) == "Red Mage" )
endfunction
function Trig_Use_Sword_Condition_Func001Func003Func006002 takes nothing returns boolean
return ( GetItemTypeId(GetManipulatedItem()) == 'I00K' )
endfunction
function Trig_Use_Sword_Condition_Func001Func003Func007001 takes nothing returns boolean
return ( GetUnitName(GetManipulatingUnit()) == "Red Mage" )
endfunction
function Trig_Use_Sword_Condition_Func001Func003Func007002 takes nothing returns boolean
return ( GetItemTypeId(GetManipulatedItem()) == 'I00N' )
endfunction
function Trig_Use_Sword_Condition_Func001Func003Func008001 takes nothing returns boolean
return ( GetUnitName(GetManipulatingUnit()) == "Red Mage" )
endfunction
function Trig_Use_Sword_Condition_Func001Func003Func008002 takes nothing returns boolean
return ( GetItemTypeId(GetManipulatedItem()) == 'I00I' )
endfunction
function Trig_Use_Sword_Condition_Func001Func003Func009001 takes nothing returns boolean
return ( GetUnitName(GetManipulatingUnit()) == "Red Mage" )
endfunction
function Trig_Use_Sword_Condition_Func001Func003Func009002 takes nothing returns boolean
return ( GetItemTypeId(GetManipulatedItem()) == 'I00O' )
endfunction
function Trig_Use_Sword_Condition_Func001Func003C takes nothing returns boolean
if ( ( GetUnitName(GetManipulatingUnit()) == "Fighter" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Samurai" ) ) then
return true
endif
if ( ( GetUnitTypeId(GetManipulatingUnit()) == 'ewsp' ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Dark Knight" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Ninja" ) ) then
return true
endif
if ( GetBooleanAnd( Trig_Use_Sword_Condition_Func001Func003Func006001(), Trig_Use_Sword_Condition_Func001Func003Func006002() ) ) then
return true
endif
if ( GetBooleanAnd( Trig_Use_Sword_Condition_Func001Func003Func007001(), Trig_Use_Sword_Condition_Func001Func003Func007002() ) ) then
return true
endif
if ( GetBooleanAnd( Trig_Use_Sword_Condition_Func001Func003Func008001(), Trig_Use_Sword_Condition_Func001Func003Func008002() ) ) then
return true
endif
if ( GetBooleanAnd( Trig_Use_Sword_Condition_Func001Func003Func009001(), Trig_Use_Sword_Condition_Func001Func003Func009002() ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I001') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I034') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I014') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I01D') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I01E') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I01F') == true ) ) then
return true
endif
return false
endfunction
function Trig_Use_Sword_Condition_Func001C takes nothing returns boolean
if ( not Trig_Use_Sword_Condition_Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Use_Sword_Condition_Actions takes nothing returns nothing
if ( Trig_Use_Sword_Condition_Func001C() ) then
call DoNothing( )
else
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
endif
endfunction
//===========================================================================
function InitTrig_Use_Sword_Condition takes nothing returns nothing
set gg_trg_Use_Sword_Condition = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Use_Sword_Condition, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Use_Sword_Condition, Condition( function Trig_Use_Sword_Condition_Conditions ) )
call TriggerAddAction( gg_trg_Use_Sword_Condition, function Trig_Use_Sword_Condition_Actions )
endfunction
function Trig_Use_Bow_Condition_Func002C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I03T' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I03V' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I03W' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I03U' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I03X' ) ) then
return true
endif
return false
endfunction
function Trig_Use_Bow_Condition_Conditions takes nothing returns boolean
if ( not Trig_Use_Bow_Condition_Func002C() ) then
return false
endif
return true
endfunction
function Trig_Use_Bow_Condition_Func001Func003C takes nothing returns boolean
if ( ( GetUnitTypeId(GetManipulatingUnit()) == 'ewsp' ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Archer" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Beastmaster" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Hunter" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Chemist" ) ) then
return true
endif
if ( ( GetUnitTypeId(GetManipulatingUnit()) == 'H00T' ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I02Z') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I030') == true ) ) then
return true
endif
return false
endfunction
function Trig_Use_Bow_Condition_Func001C takes nothing returns boolean
if ( not Trig_Use_Bow_Condition_Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Use_Bow_Condition_Actions takes nothing returns nothing
if ( Trig_Use_Bow_Condition_Func001C() ) then
call DoNothing( )
else
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
endif
endfunction
//===========================================================================
function InitTrig_Use_Bow_Condition takes nothing returns nothing
set gg_trg_Use_Bow_Condition = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Use_Bow_Condition, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Use_Bow_Condition, Condition( function Trig_Use_Bow_Condition_Conditions ) )
call TriggerAddAction( gg_trg_Use_Bow_Condition, function Trig_Use_Bow_Condition_Actions )
endfunction
function Trig_Use_Spear_Condition_Func002C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I03M' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I03K' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I03L' ) ) then
return true
endif
return false
endfunction
function Trig_Use_Spear_Condition_Conditions takes nothing returns boolean
if ( not Trig_Use_Spear_Condition_Func002C() ) then
return false
endif
return true
endfunction
function Trig_Use_Spear_Condition_Func001Func003C takes nothing returns boolean
if ( ( GetUnitName(GetManipulatingUnit()) == "Dragoon" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Ninja" ) ) then
return true
endif
if ( ( GetUnitTypeId(GetManipulatingUnit()) == 'ewsp' ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I034') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I02W') == true ) ) then
return true
endif
return false
endfunction
function Trig_Use_Spear_Condition_Func001C takes nothing returns boolean
if ( not Trig_Use_Spear_Condition_Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Use_Spear_Condition_Actions takes nothing returns nothing
if ( Trig_Use_Spear_Condition_Func001C() ) then
call DoNothing( )
else
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
endif
endfunction
//===========================================================================
function InitTrig_Use_Spear_Condition takes nothing returns nothing
set gg_trg_Use_Spear_Condition = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Use_Spear_Condition, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Use_Spear_Condition, Condition( function Trig_Use_Spear_Condition_Conditions ) )
call TriggerAddAction( gg_trg_Use_Spear_Condition, function Trig_Use_Spear_Condition_Actions )
endfunction
function Trig_Use_Knife_Condition_Func002C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I03J' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I03I' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I03G' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I03H' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I04N' ) ) then
return true
endif
return false
endfunction
function Trig_Use_Knife_Condition_Conditions takes nothing returns boolean
if ( not Trig_Use_Knife_Condition_Func002C() ) then
return false
endif
return true
endfunction
function Trig_Use_Knife_Condition_Func001Func003C takes nothing returns boolean
if ( ( GetUnitTypeId(GetManipulatingUnit()) == 'ewsp' ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Thief" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Ninja" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Black Mage" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Red Mage" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Samurai" ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I034') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I03D') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I03E') == true ) ) then
return true
endif
return false
endfunction
function Trig_Use_Knife_Condition_Func001C takes nothing returns boolean
if ( not Trig_Use_Knife_Condition_Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Use_Knife_Condition_Actions takes nothing returns nothing
if ( Trig_Use_Knife_Condition_Func001C() ) then
call DoNothing( )
else
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
endif
endfunction
//===========================================================================
function InitTrig_Use_Knife_Condition takes nothing returns nothing
set gg_trg_Use_Knife_Condition = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Use_Knife_Condition, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Use_Knife_Condition, Condition( function Trig_Use_Knife_Condition_Conditions ) )
call TriggerAddAction( gg_trg_Use_Knife_Condition, function Trig_Use_Knife_Condition_Actions )
endfunction
function Trig_Use_Axe_Func002C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I026' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I028' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I027' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05S' ) ) then
return true
endif
return false
endfunction
function Trig_Use_Axe_Conditions takes nothing returns boolean
if ( not Trig_Use_Axe_Func002C() ) then
return false
endif
return true
endfunction
function Trig_Use_Axe_Func001Func003C takes nothing returns boolean
if ( ( GetUnitTypeId(GetManipulatingUnit()) == 'ewsp' ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I034') == true ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Ninja" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Berserker" ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I019') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I01A') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I01B') == true ) ) then
return true
endif
return false
endfunction
function Trig_Use_Axe_Func001C takes nothing returns boolean
if ( not Trig_Use_Axe_Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Use_Axe_Actions takes nothing returns nothing
if ( Trig_Use_Axe_Func001C() ) then
call DoNothing( )
else
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
endif
endfunction
//===========================================================================
function InitTrig_Use_Axe takes nothing returns nothing
set gg_trg_Use_Axe = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Use_Axe, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Use_Axe, Condition( function Trig_Use_Axe_Conditions ) )
call TriggerAddAction( gg_trg_Use_Axe, function Trig_Use_Axe_Actions )
endfunction
function Trig_Use_Staff_Func002C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I02D' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I02C' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I02F' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I02E' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I02G' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I063' ) ) then
return true
endif
return false
endfunction
function Trig_Use_Staff_Conditions takes nothing returns boolean
if ( not Trig_Use_Staff_Func002C() ) then
return false
endif
return true
endfunction
function Trig_Use_Staff_Func001Func003C takes nothing returns boolean
if ( ( GetUnitTypeId(GetManipulatingUnit()) == 'ewsp' ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Ninja" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "White Mage" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Black Mage" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Red Mage" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Time Mage" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Summoner" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Paladin" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Sage" ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I034') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I013') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I017') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I065') == true ) ) then
return true
endif
return false
endfunction
function Trig_Use_Staff_Func001C takes nothing returns boolean
if ( not Trig_Use_Staff_Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Use_Staff_Actions takes nothing returns nothing
if ( Trig_Use_Staff_Func001C() ) then
call DoNothing( )
else
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
endif
endfunction
//===========================================================================
function InitTrig_Use_Staff takes nothing returns nothing
set gg_trg_Use_Staff = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Use_Staff, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Use_Staff, Condition( function Trig_Use_Staff_Conditions ) )
call TriggerAddAction( gg_trg_Use_Staff, function Trig_Use_Staff_Actions )
endfunction
function Trig_Use_Robes_Func002C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I02A' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I029' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I02B' ) ) then
return true
endif
return false
endfunction
function Trig_Use_Robes_Conditions takes nothing returns boolean
if ( not Trig_Use_Robes_Func002C() ) then
return false
endif
return true
endfunction
function Trig_Use_Robes_Func001Func003C takes nothing returns boolean
if ( ( GetUnitName(GetManipulatingUnit()) == "White Mage" ) ) then
return true
endif
if ( ( GetUnitTypeId(GetManipulatingUnit()) == 'ewsp' ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Black Mage" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Red Mage" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Time Mage" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Summoner" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Paladin" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Sage" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Thief" ) ) then
return true
endif
return false
endfunction
function Trig_Use_Robes_Func001C takes nothing returns boolean
if ( not Trig_Use_Robes_Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Use_Robes_Actions takes nothing returns nothing
if ( Trig_Use_Robes_Func001C() ) then
call DoNothing( )
else
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
endif
endfunction
//===========================================================================
function InitTrig_Use_Robes takes nothing returns nothing
set gg_trg_Use_Robes = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Use_Robes, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Use_Robes, Condition( function Trig_Use_Robes_Conditions ) )
call TriggerAddAction( gg_trg_Use_Robes, function Trig_Use_Robes_Actions )
endfunction
function Trig_Use_Black_Magic_Condition_Func002C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I044' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I00Z' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I00R' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I00P' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I00T' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I047' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I00U' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I00S' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I00Q' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01I' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I048' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I046' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I00Y' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I00X' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I00W' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I00V' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I045' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I049' ) ) then
return true
endif
return false
endfunction
function Trig_Use_Black_Magic_Condition_Conditions takes nothing returns boolean
if ( not Trig_Use_Black_Magic_Condition_Func002C() ) then
return false
endif
return true
endfunction
function Trig_Use_Black_Magic_Condition_Func001Func003Func009Func001C takes nothing returns boolean
if ( ( GetUnitName(GetManipulatingUnit()) == "Red Mage" ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I015') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I016') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I018') == true ) ) then
return true
endif
return false
endfunction
function Trig_Use_Black_Magic_Condition_Func001Func003Func009Func002C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I044' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I00Z' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I00T' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I047' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I00Q' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I048' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I00Y' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I00V' ) ) then
return true
endif
return false
endfunction
function Trig_Use_Black_Magic_Condition_Func001Func003Func009C takes nothing returns boolean
if ( not Trig_Use_Black_Magic_Condition_Func001Func003Func009Func001C() ) then
return false
endif
if ( not Trig_Use_Black_Magic_Condition_Func001Func003Func009Func002C() ) then
return false
endif
return true
endfunction
function Trig_Use_Black_Magic_Condition_Func001Func003Func010Func001Func001001 takes nothing returns boolean
return ( GetUnitName(GetManipulatingUnit()) == "Red Mage" )
endfunction
function Trig_Use_Black_Magic_Condition_Func001Func003Func010Func001Func001002 takes nothing returns boolean
return ( GetHeroLevel(GetManipulatingUnit()) >= 20 )
endfunction
function Trig_Use_Black_Magic_Condition_Func001Func003Func010Func001C takes nothing returns boolean
if ( GetBooleanAnd( Trig_Use_Black_Magic_Condition_Func001Func003Func010Func001Func001001(), Trig_Use_Black_Magic_Condition_Func001Func003Func010Func001Func001002() ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I015') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I016') == true ) ) then
return true
endif
return false
endfunction
function Trig_Use_Black_Magic_Condition_Func001Func003Func010Func002C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I00P' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I00U' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I00W' ) ) then
return true
endif
return false
endfunction
function Trig_Use_Black_Magic_Condition_Func001Func003Func010C takes nothing returns boolean
if ( not Trig_Use_Black_Magic_Condition_Func001Func003Func010Func001C() ) then
return false
endif
if ( not Trig_Use_Black_Magic_Condition_Func001Func003Func010Func002C() ) then
return false
endif
return true
endfunction
function Trig_Use_Black_Magic_Condition_Func001Func003C takes nothing returns boolean
if ( ( GetUnitName(GetManipulatingUnit()) == "Black Mage" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Dark Knight" ) ) then
return true
endif
if ( ( GetUnitTypeId(GetManipulatingUnit()) == 'ewsp' ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Sage" ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I011') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I05Y') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I02T') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I036') == true ) ) then
return true
endif
if ( Trig_Use_Black_Magic_Condition_Func001Func003Func009C() ) then
return true
endif
if ( Trig_Use_Black_Magic_Condition_Func001Func003Func010C() ) then
return true
endif
return false
endfunction
function Trig_Use_Black_Magic_Condition_Func001C takes nothing returns boolean
if ( not Trig_Use_Black_Magic_Condition_Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Use_Black_Magic_Condition_Actions takes nothing returns nothing
if ( Trig_Use_Black_Magic_Condition_Func001C() ) then
return
else
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
endif
endfunction
//===========================================================================
function InitTrig_Use_Black_Magic_Condition takes nothing returns nothing
set gg_trg_Use_Black_Magic_Condition = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Use_Black_Magic_Condition, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Use_Black_Magic_Condition, Condition( function Trig_Use_Black_Magic_Condition_Conditions ) )
call TriggerAddAction( gg_trg_Use_Black_Magic_Condition, function Trig_Use_Black_Magic_Condition_Actions )
endfunction
function Trig_Use_Summon_Magic_Condition_Func002C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I03S' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I021' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I03R' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I02H' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I04B' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01T' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I03Q' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I04A' ) ) then
return true
endif
return false
endfunction
function Trig_Use_Summon_Magic_Condition_Conditions takes nothing returns boolean
if ( not Trig_Use_Summon_Magic_Condition_Func002C() ) then
return false
endif
return true
endfunction
function Trig_Use_Summon_Magic_Condition_Func001Func003Func004001 takes nothing returns boolean
return ( GetUnitName(GetManipulatingUnit()) == "Beastmaster" )
endfunction
function Trig_Use_Summon_Magic_Condition_Func001Func003Func004002 takes nothing returns boolean
return ( GetHeroLevel(GetManipulatingUnit()) >= 20 )
endfunction
function Trig_Use_Summon_Magic_Condition_Func001Func003Func007001 takes nothing returns boolean
return ( GetUnitName(GetManipulatingUnit()) == "Sage" )
endfunction
function Trig_Use_Summon_Magic_Condition_Func001Func003Func007002 takes nothing returns boolean
return ( GetHeroLevel(GetManipulatingUnit()) >= 25 )
endfunction
function Trig_Use_Summon_Magic_Condition_Func001Func003C takes nothing returns boolean
if ( ( GetUnitName(GetManipulatingUnit()) == "Summoner" ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I03A') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I038') == true ) ) then
return true
endif
if ( GetBooleanAnd( Trig_Use_Summon_Magic_Condition_Func001Func003Func004001(), Trig_Use_Summon_Magic_Condition_Func001Func003Func004002() ) ) then
return true
endif
if ( ( GetUnitTypeId(GetManipulatingUnit()) == 'ewsp' ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I03F') == true ) ) then
return true
endif
if ( GetBooleanAnd( Trig_Use_Summon_Magic_Condition_Func001Func003Func007001(), Trig_Use_Summon_Magic_Condition_Func001Func003Func007002() ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I036') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I037') == true ) ) then
return true
endif
return false
endfunction
function Trig_Use_Summon_Magic_Condition_Func001C takes nothing returns boolean
if ( not Trig_Use_Summon_Magic_Condition_Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Use_Summon_Magic_Condition_Actions takes nothing returns nothing
if ( Trig_Use_Summon_Magic_Condition_Func001C() ) then
call DoNothing( )
else
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
endif
endfunction
//===========================================================================
function InitTrig_Use_Summon_Magic_Condition takes nothing returns nothing
set gg_trg_Use_Summon_Magic_Condition = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Use_Summon_Magic_Condition, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Use_Summon_Magic_Condition, Condition( function Trig_Use_Summon_Magic_Condition_Conditions ) )
call TriggerAddAction( gg_trg_Use_Summon_Magic_Condition, function Trig_Use_Summon_Magic_Condition_Actions )
endfunction
function Trig_Use_White_Magic_Condition_Func002C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01K' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01J' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01L' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I041' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I043' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I040' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01N' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01R' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01M' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01Q' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01S' ) ) then
return true
endif
return false
endfunction
function Trig_Use_White_Magic_Condition_Conditions takes nothing returns boolean
if ( not Trig_Use_White_Magic_Condition_Func002C() ) then
return false
endif
return true
endfunction
function Trig_Use_White_Magic_Condition_Func001Func003Func012Func001C takes nothing returns boolean
if ( ( GetUnitName(GetManipulatingUnit()) == "Red Mage" ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I015') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I016') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I018') == true ) ) then
return true
endif
return false
endfunction
function Trig_Use_White_Magic_Condition_Func001Func003Func012Func002C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01L' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I041' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01R' ) ) then
return true
endif
return false
endfunction
function Trig_Use_White_Magic_Condition_Func001Func003Func012C takes nothing returns boolean
if ( not Trig_Use_White_Magic_Condition_Func001Func003Func012Func001C() ) then
return false
endif
if ( not Trig_Use_White_Magic_Condition_Func001Func003Func012Func002C() ) then
return false
endif
return true
endfunction
function Trig_Use_White_Magic_Condition_Func001Func003Func013Func001Func001001 takes nothing returns boolean
return ( GetUnitName(GetManipulatingUnit()) == "Red Mage" )
endfunction
function Trig_Use_White_Magic_Condition_Func001Func003Func013Func001Func001002 takes nothing returns boolean
return ( GetHeroLevel(GetManipulatingUnit()) >= 20 )
endfunction
function Trig_Use_White_Magic_Condition_Func001Func003Func013Func001C takes nothing returns boolean
if ( GetBooleanAnd( Trig_Use_White_Magic_Condition_Func001Func003Func013Func001Func001001(), Trig_Use_White_Magic_Condition_Func001Func003Func013Func001Func001002() ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I015') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I016') == true ) ) then
return true
endif
return false
endfunction
function Trig_Use_White_Magic_Condition_Func001Func003Func013Func002C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01K' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I040' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01M' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01Q' ) ) then
return true
endif
return false
endfunction
function Trig_Use_White_Magic_Condition_Func001Func003Func013C takes nothing returns boolean
if ( not Trig_Use_White_Magic_Condition_Func001Func003Func013Func001C() ) then
return false
endif
if ( not Trig_Use_White_Magic_Condition_Func001Func003Func013Func002C() ) then
return false
endif
return true
endfunction
function Trig_Use_White_Magic_Condition_Func001Func003C takes nothing returns boolean
if ( ( GetUnitName(GetManipulatingUnit()) == "Hunter" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Paladin" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Sage" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "White Mage" ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I031') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I064') == true ) ) then
return true
endif
if ( ( GetUnitTypeId(GetManipulatingUnit()) == 'ewsp' ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I01H') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I01G') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I036') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I012') == true ) ) then
return true
endif
if ( Trig_Use_White_Magic_Condition_Func001Func003Func012C() ) then
return true
endif
if ( Trig_Use_White_Magic_Condition_Func001Func003Func013C() ) then
return true
endif
return false
endfunction
function Trig_Use_White_Magic_Condition_Func001C takes nothing returns boolean
if ( not Trig_Use_White_Magic_Condition_Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Use_White_Magic_Condition_Actions takes nothing returns nothing
if ( Trig_Use_White_Magic_Condition_Func001C() ) then
call DoNothing( )
else
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
endif
endfunction
//===========================================================================
function InitTrig_Use_White_Magic_Condition takes nothing returns nothing
set gg_trg_Use_White_Magic_Condition = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Use_White_Magic_Condition, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Use_White_Magic_Condition, Condition( function Trig_Use_White_Magic_Condition_Conditions ) )
call TriggerAddAction( gg_trg_Use_White_Magic_Condition, function Trig_Use_White_Magic_Condition_Actions )
endfunction
function Trig_Use_Time_Magic_Func002C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I022' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01W' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01U' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I024' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I023' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01Y' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01X' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01V' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01Z' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I020' ) ) then
return true
endif
return false
endfunction
function Trig_Use_Time_Magic_Conditions takes nothing returns boolean
if ( not Trig_Use_Time_Magic_Func002C() ) then
return false
endif
return true
endfunction
function Trig_Use_Time_Magic_Func001Func003Func005001 takes nothing returns boolean
return ( GetUnitName(GetManipulatingUnit()) == "Sage" )
endfunction
function Trig_Use_Time_Magic_Func001Func003Func005002 takes nothing returns boolean
return ( GetHeroLevel(GetManipulatingUnit()) >= 25 )
endfunction
function Trig_Use_Time_Magic_Func001Func003C takes nothing returns boolean
if ( ( GetUnitName(GetManipulatingUnit()) == "Time Mage" ) ) then
return true
endif
if ( ( GetUnitTypeId(GetManipulatingUnit()) == 'ewsp' ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I017') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I065') == true ) ) then
return true
endif
if ( GetBooleanAnd( Trig_Use_Time_Magic_Func001Func003Func005001(), Trig_Use_Time_Magic_Func001Func003Func005002() ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I036') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I037') == true ) ) then
return true
endif
return false
endfunction
function Trig_Use_Time_Magic_Func001C takes nothing returns boolean
if ( not Trig_Use_Time_Magic_Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Use_Time_Magic_Actions takes nothing returns nothing
if ( Trig_Use_Time_Magic_Func001C() ) then
call DoNothing( )
else
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
endif
endfunction
//===========================================================================
function InitTrig_Use_Time_Magic takes nothing returns nothing
set gg_trg_Use_Time_Magic = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Use_Time_Magic, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Use_Time_Magic, Condition( function Trig_Use_Time_Magic_Conditions ) )
call TriggerAddAction( gg_trg_Use_Time_Magic, function Trig_Use_Time_Magic_Actions )
endfunction
function Trig_Drop_Armor_Condition_Func004C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I008' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I04Z' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I007' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I006' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I003' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I005' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I00A' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I029' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I02B' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I02A' ) ) then
return true
endif
return false
endfunction
function Trig_Drop_Armor_Condition_Conditions takes nothing returns boolean
if ( not Trig_Drop_Armor_Condition_Func004C() ) then
return false
endif
return true
endfunction
function Trig_Drop_Armor_Condition_Func001Func001Func001C takes nothing returns boolean
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I008' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I04Z' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I007' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I006' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I003' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I005' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I00A' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I029' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I02B' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I02A' ) ) then
return true
endif
return false
endfunction
function Trig_Drop_Armor_Condition_Func001Func001C takes nothing returns boolean
if ( not Trig_Drop_Armor_Condition_Func001Func001Func001C() ) then
return false
endif
return true
endfunction
function Trig_Drop_Armor_Condition_Func002001 takes nothing returns boolean
return ( udg_AlreadyCarryingEquip > 1 )
endfunction
function Trig_Drop_Armor_Condition_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Drop_Armor_Condition_Func001Func001C() ) then
set udg_AlreadyCarryingEquip = ( udg_AlreadyCarryingEquip + 1 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
if ( Trig_Drop_Armor_Condition_Func002001() ) then
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
else
call DoNothing( )
endif
set udg_AlreadyCarryingEquip = 0
endfunction
//===========================================================================
function InitTrig_Drop_Armor_Condition takes nothing returns nothing
set gg_trg_Drop_Armor_Condition = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Drop_Armor_Condition, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Drop_Armor_Condition, Condition( function Trig_Drop_Armor_Condition_Conditions ) )
call TriggerAddAction( gg_trg_Drop_Armor_Condition, function Trig_Drop_Armor_Condition_Actions )
endfunction
function Trig_Follow_Move_Func001Func001C takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsOfPlayerAndTypeId(GetEnumPlayer(), 'ewsp')) >= 2 ) ) then
return false
endif
return true
endfunction
function Trig_Follow_Move_Func001A takes nothing returns nothing
if ( Trig_Follow_Move_Func001Func001C() ) then
call RemoveUnit( GroupPickRandomUnit(GetUnitsOfPlayerAndTypeId(GetEnumPlayer(), 'ewsp')) )
else
endif
endfunction
function Trig_Follow_Move_Func002001002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'H02D' )
endfunction
function Trig_Follow_Move_Func002Func001003001002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Follow_Move_Func002A takes nothing returns nothing
call IssueTargetOrderBJ( GetEnumUnit(), "move", GroupPickRandomUnit(GetUnitsOfPlayerMatching(GetOwningPlayer(GetEnumUnit()), Condition(function Trig_Follow_Move_Func002Func001003001002))) )
endfunction
function Trig_Follow_Move_Actions takes nothing returns nothing
call ForForce( GetPlayersAll(), function Trig_Follow_Move_Func001A )
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Follow_Move_Func002001002)), function Trig_Follow_Move_Func002A )
endfunction
//===========================================================================
function InitTrig_Follow_Move takes nothing returns nothing
set gg_trg_Follow_Move = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Follow_Move, 1.00 )
call TriggerAddAction( gg_trg_Follow_Move, function Trig_Follow_Move_Actions )
endfunction
function Trig_Enforce_Region_Func001Func001001001001001001002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Enforce_Region_Func001Func001Func001Func001Func001002001001002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Enforce_Region_Func001Func001Func001Func001A takes nothing returns nothing
call SetUnitPositionLoc( GetEnumUnit(), GetUnitLoc(GroupPickRandomUnit(GetUnitsOfPlayerMatching(GetEnumPlayer(), Condition(function Trig_Enforce_Region_Func001Func001Func001Func001Func001002001001002)))) )
endfunction
function Trig_Enforce_Region_Func001Func001Func001C takes nothing returns boolean
if ( not ( RectContainsUnit(RectFromCenterSizeBJ(GetUnitLoc(GetEnumUnit()), 500.00, 500.00), GroupPickRandomUnit(GetUnitsOfPlayerAndTypeId(GetEnumPlayer(), 'ewsp'))) == true ) ) then
return false
endif
return true
endfunction
function Trig_Enforce_Region_Func001Func001A takes nothing returns nothing
if ( Trig_Enforce_Region_Func001Func001Func001C() ) then
call DoNothing( )
else
call ForGroupBJ( GetUnitsOfPlayerAndTypeId(GetEnumPlayer(), 'ewsp'), function Trig_Enforce_Region_Func001Func001Func001Func001A )
endif
endfunction
function Trig_Enforce_Region_Func001A takes nothing returns nothing
call ForGroupBJ( GetUnitsInRectAll(RectFromCenterSizeBJ(GetUnitLoc(GroupPickRandomUnit(GetUnitsOfPlayerMatching(GetEnumPlayer(), Condition(function Trig_Enforce_Region_Func001Func001001001001001001002)))), 500.00, 500.00)), function Trig_Enforce_Region_Func001Func001A )
endfunction
function Trig_Enforce_Region_Actions takes nothing returns nothing
call ForForce( GetPlayersAll(), function Trig_Enforce_Region_Func001A )
endfunction
//===========================================================================
function InitTrig_Enforce_Region takes nothing returns nothing
set gg_trg_Enforce_Region = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Enforce_Region, 3.00 )
call TriggerAddAction( gg_trg_Enforce_Region, function Trig_Enforce_Region_Actions )
endfunction
function Trig_Pause_Orb_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetDyingUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( GetPlayerController(GetOwningPlayer(GetDyingUnit())) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_Pause_Orb_Func001A takes nothing returns nothing
call PauseUnitBJ( true, GetEnumUnit() )
endfunction
function Trig_Pause_Orb_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsOfPlayerAndTypeId(GetOwningPlayer(GetDyingUnit()), 'ewsp'), function Trig_Pause_Orb_Func001A )
endfunction
//===========================================================================
function InitTrig_Pause_Orb takes nothing returns nothing
set gg_trg_Pause_Orb = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Pause_Orb, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Pause_Orb, Condition( function Trig_Pause_Orb_Conditions ) )
call TriggerAddAction( gg_trg_Pause_Orb, function Trig_Pause_Orb_Actions )
endfunction
function Trig_Unpause_Orb_Func001A takes nothing returns nothing
call PauseUnitBJ( false, GetEnumUnit() )
endfunction
function Trig_Unpause_Orb_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsOfPlayerAndTypeId(GetOwningPlayer(GetRevivingUnit()), 'ewsp'), function Trig_Unpause_Orb_Func001A )
endfunction
//===========================================================================
function InitTrig_Unpause_Orb takes nothing returns nothing
set gg_trg_Unpause_Orb = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Unpause_Orb, EVENT_PLAYER_HERO_REVIVE_FINISH )
call TriggerAddAction( gg_trg_Unpause_Orb, function Trig_Unpause_Orb_Actions )
endfunction
function Trig_Shiva_Diamond_Dust_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'n00B' ) ) then
return false
endif
return true
endfunction
function Trig_Shiva_Diamond_Dust_Actions takes nothing returns nothing
call UnitAddAbilityBJ( 'A03A', GetSummonedUnit() )
endfunction
//===========================================================================
function InitTrig_Shiva_Diamond_Dust takes nothing returns nothing
set gg_trg_Shiva_Diamond_Dust = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Shiva_Diamond_Dust, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Shiva_Diamond_Dust, Condition( function Trig_Shiva_Diamond_Dust_Conditions ) )
call TriggerAddAction( gg_trg_Shiva_Diamond_Dust, function Trig_Shiva_Diamond_Dust_Actions )
endfunction
function Trig_Cleansing_Fire_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A03B' ) ) then
return false
endif
return true
endfunction
function Trig_Cleansing_Fire_Func002Func001002 takes nothing returns nothing
call UnitAddAbilityBJ( 'A03E', GetEnumUnit() )
endfunction
function Trig_Cleansing_Fire_Func002A takes nothing returns nothing
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Large_Medium_Area, GetEnumPlayer()), function Trig_Cleansing_Fire_Func002Func001002 )
endfunction
function Trig_Cleansing_Fire_Actions takes nothing returns nothing
call MoveRectToLoc( gg_rct_Large_Medium_Area, GetUnitLoc(GetSpellAbilityUnit()) )
call ForForce( udg_HumanPlayers, function Trig_Cleansing_Fire_Func002A )
endfunction
//===========================================================================
function InitTrig_Cleansing_Fire takes nothing returns nothing
set gg_trg_Cleansing_Fire = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Cleansing_Fire, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Cleansing_Fire, Condition( function Trig_Cleansing_Fire_Conditions ) )
call TriggerAddAction( gg_trg_Cleansing_Fire, function Trig_Cleansing_Fire_Actions )
endfunction
function Trig_Remove_Autolife_Actions takes nothing returns nothing
set udg_TheRealUnit = GetDyingUnit()
call PolledWait( 10.00 )
call UnitRemoveAbilityBJ( 'A03E', udg_TheRealUnit )
endfunction
//===========================================================================
function InitTrig_Remove_Autolife takes nothing returns nothing
set gg_trg_Remove_Autolife = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Remove_Autolife, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddAction( gg_trg_Remove_Autolife, function Trig_Remove_Autolife_Actions )
endfunction
function Trig_Break_Func002C takes nothing returns boolean
if ( ( GetUnitTypeId(GetAttackedUnitBJ()) == 'n00B' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetAttackedUnitBJ()) == 'n01N' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetAttackedUnitBJ()) == 'n00D' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetAttackedUnitBJ()) == 'n00F' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetAttackedUnitBJ()) == 'n00A' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetAttackedUnitBJ()) == 'n00C' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetAttackedUnitBJ()) == 'n00E' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetAttackedUnitBJ()) == 'n009' ) ) then
return true
endif
return false
endfunction
function Trig_Break_Conditions takes nothing returns boolean
if ( not Trig_Break_Func002C() ) then
return false
endif
return true
endfunction
function Trig_Break_Func001C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_LIFE, GetAttackedUnitBJ()) < ( GetUnitStateSwap(UNIT_STATE_MAX_LIFE, GetAttackedUnitBJ()) / 8.00 ) ) ) then
return false
endif
return true
endfunction
function Trig_Break_Actions takes nothing returns nothing
if ( Trig_Break_Func001C() ) then
call SetUnitManaBJ( GetAttackedUnitBJ(), 100.00 )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Break takes nothing returns nothing
set gg_trg_Break = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Break, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Break, Condition( function Trig_Break_Conditions ) )
call TriggerAddAction( gg_trg_Break, function Trig_Break_Actions )
endfunction
function Trig_Steel_Cutting_Sword_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A02Q' ) ) then
return false
endif
return true
endfunction
function Trig_Steel_Cutting_Sword_Func002Func001002 takes nothing returns nothing
call ExplodeUnitBJ( GetEnumUnit() )
endfunction
function Trig_Steel_Cutting_Sword_Func002A takes nothing returns nothing
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Odin, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Steel_Cutting_Sword_Func002Func001002 )
endfunction
function Trig_Steel_Cutting_Sword_Actions takes nothing returns nothing
call MoveRectToLoc( gg_rct_Odin, GetUnitLoc(GetSpellAbilityUnit()) )
call ForForce( udg_HumanPlayers, function Trig_Steel_Cutting_Sword_Func002A )
endfunction
//===========================================================================
function InitTrig_Steel_Cutting_Sword takes nothing returns nothing
set gg_trg_Steel_Cutting_Sword = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Steel_Cutting_Sword, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Steel_Cutting_Sword, Condition( function Trig_Steel_Cutting_Sword_Conditions ) )
call TriggerAddAction( gg_trg_Steel_Cutting_Sword, function Trig_Steel_Cutting_Sword_Actions )
endfunction
function Trig_Pick_Leonhart_Conditions takes nothing returns boolean
if ( not ( IsUnitEnemy(GetEnteringUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Pick_Leonhart_Actions takes nothing returns nothing
set udg_PlayersWhoHaveChosen = ( udg_PlayersWhoHaveChosen + 1 )
set udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit()))] = "Leonhart"
set udg_HigherCamera[GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit()))] = false
set udg_PlayerHasAlreadyEnteredCode[GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit()))] = false
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] = 0
call RemoveUnit( GetEnteringUnit() )
call CreateNUnitsAtLocFacingLocBJ( 1, 'H000', GetOwningPlayer(GetEnteringUnit()), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(gg_unit_N002_0092) )
call ResetToGameCameraForPlayer( GetOwningPlayer(GetEnteringUnit()), 0 )
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetEnteringUnit()), GetRectCenter(gg_rct_Enter_the_World), 0 )
call SetUnitUserData( GetEnteringUnit(), GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit())) )
endfunction
//===========================================================================
function InitTrig_Pick_Leonhart takes nothing returns nothing
set gg_trg_Pick_Leonhart = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Pick_Leonhart, gg_rct_Choose_Leonhart )
call TriggerAddCondition( gg_trg_Pick_Leonhart, Condition( function Trig_Pick_Leonhart_Conditions ) )
call TriggerAddAction( gg_trg_Pick_Leonhart, function Trig_Pick_Leonhart_Actions )
endfunction
function Trig_Pick_Quistis_Conditions takes nothing returns boolean
if ( not ( IsUnitEnemy(GetEnteringUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Pick_Quistis_Actions takes nothing returns nothing
set udg_PlayersWhoHaveChosen = ( udg_PlayersWhoHaveChosen + 1 )
set udg_HigherCamera[GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit()))] = false
set udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit()))] = "Quistis"
set udg_PlayerHasAlreadyEnteredCode[GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit()))] = false
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] = 0
call RemoveUnit( GetEnteringUnit() )
call CreateNUnitsAtLocFacingLocBJ( 1, 'H00S', GetOwningPlayer(GetEnteringUnit()), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(gg_unit_N002_0092) )
call ResetToGameCameraForPlayer( GetOwningPlayer(GetEnteringUnit()), 0 )
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetEnteringUnit()), GetRectCenter(gg_rct_Enter_the_World), 0 )
call SetUnitUserData( GetEnteringUnit(), GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit())) )
endfunction
//===========================================================================
function InitTrig_Pick_Quistis takes nothing returns nothing
set gg_trg_Pick_Quistis = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Pick_Quistis, gg_rct_Choose_Quistis )
call TriggerAddCondition( gg_trg_Pick_Quistis, Condition( function Trig_Pick_Quistis_Conditions ) )
call TriggerAddAction( gg_trg_Pick_Quistis, function Trig_Pick_Quistis_Actions )
endfunction
function Trig_Pick_Amarant_Conditions takes nothing returns boolean
if ( not ( IsUnitEnemy(GetEnteringUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Pick_Amarant_Actions takes nothing returns nothing
set udg_PlayersWhoHaveChosen = ( udg_PlayersWhoHaveChosen + 1 )
set udg_HigherCamera[GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit()))] = false
set udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit()))] = "Amarant"
set udg_PlayerHasAlreadyEnteredCode[GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit()))] = false
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] = 0
call RemoveUnit( GetEnteringUnit() )
call CreateNUnitsAtLocFacingLocBJ( 1, 'H01E', GetOwningPlayer(GetEnteringUnit()), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(gg_unit_N002_0092) )
call ResetToGameCameraForPlayer( GetOwningPlayer(GetEnteringUnit()), 0 )
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetEnteringUnit()), GetRectCenter(gg_rct_Enter_the_World), 0 )
call SetUnitUserData( GetEnteringUnit(), GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit())) )
endfunction
//===========================================================================
function InitTrig_Pick_Amarant takes nothing returns nothing
set gg_trg_Pick_Amarant = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Pick_Amarant, gg_rct_Choose_Amarant )
call TriggerAddCondition( gg_trg_Pick_Amarant, Condition( function Trig_Pick_Amarant_Conditions ) )
call TriggerAddAction( gg_trg_Pick_Amarant, function Trig_Pick_Amarant_Actions )
endfunction
function Trig_Pick_Kimari_Conditions takes nothing returns boolean
if ( not ( IsUnitEnemy(GetEnteringUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Pick_Kimari_Actions takes nothing returns nothing
set udg_PlayersWhoHaveChosen = ( udg_PlayersWhoHaveChosen + 1 )
set udg_HigherCamera[GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit()))] = false
set udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit()))] = "Kimari"
set udg_PlayerHasAlreadyEnteredCode[GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit()))] = false
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] = 0
call RemoveUnit( GetEnteringUnit() )
call CreateNUnitsAtLocFacingLocBJ( 1, 'H01G', GetOwningPlayer(GetEnteringUnit()), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(gg_unit_N002_0092) )
call ResetToGameCameraForPlayer( GetOwningPlayer(GetEnteringUnit()), 0 )
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetEnteringUnit()), GetRectCenter(gg_rct_Enter_the_World), 0 )
call SetUnitUserData( GetEnteringUnit(), GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit())) )
endfunction
//===========================================================================
function InitTrig_Pick_Kimari takes nothing returns nothing
set gg_trg_Pick_Kimari = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Pick_Kimari, gg_rct_Choose_Kimari )
call TriggerAddCondition( gg_trg_Pick_Kimari, Condition( function Trig_Pick_Kimari_Conditions ) )
call TriggerAddAction( gg_trg_Pick_Kimari, function Trig_Pick_Kimari_Actions )
endfunction
function Trig_Pick_Butz_Conditions takes nothing returns boolean
if ( not ( IsUnitEnemy(GetEnteringUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Pick_Butz_Actions takes nothing returns nothing
set udg_PlayersWhoHaveChosen = ( udg_PlayersWhoHaveChosen + 1 )
set udg_HigherCamera[GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit()))] = false
set udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit()))] = "Butz"
set udg_PlayerHasAlreadyEnteredCode[GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit()))] = false
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] = 0
call RemoveUnit( GetEnteringUnit() )
call CreateNUnitsAtLocFacingLocBJ( 1, 'H01O', GetOwningPlayer(GetEnteringUnit()), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(gg_unit_N002_0092) )
call ResetToGameCameraForPlayer( GetOwningPlayer(GetEnteringUnit()), 0 )
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetEnteringUnit()), GetRectCenter(gg_rct_Enter_the_World), 0 )
call SetUnitUserData( GetEnteringUnit(), GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit())) )
endfunction
//===========================================================================
function InitTrig_Pick_Butz takes nothing returns nothing
set gg_trg_Pick_Butz = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Pick_Butz, gg_rct_Choose_Butz )
call TriggerAddCondition( gg_trg_Pick_Butz, Condition( function Trig_Pick_Butz_Conditions ) )
call TriggerAddAction( gg_trg_Pick_Butz, function Trig_Pick_Butz_Actions )
endfunction
function Trig_Pick_Tellah_Conditions takes nothing returns boolean
if ( not ( IsUnitEnemy(GetEnteringUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Pick_Tellah_Actions takes nothing returns nothing
set udg_PlayersWhoHaveChosen = ( udg_PlayersWhoHaveChosen + 1 )
set udg_HigherCamera[GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit()))] = false
set udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit()))] = "Tellah"
set udg_PlayerHasAlreadyEnteredCode[GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit()))] = false
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] = 0
call RemoveUnit( GetEnteringUnit() )
call CreateNUnitsAtLocFacingLocBJ( 1, 'H01Y', GetOwningPlayer(GetEnteringUnit()), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(gg_unit_N002_0092) )
call ResetToGameCameraForPlayer( GetOwningPlayer(GetEnteringUnit()), 0 )
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetEnteringUnit()), GetRectCenter(gg_rct_Enter_the_World), 0 )
call SetUnitUserData( GetEnteringUnit(), GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit())) )
endfunction
//===========================================================================
function InitTrig_Pick_Tellah takes nothing returns nothing
set gg_trg_Pick_Tellah = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Pick_Tellah, gg_rct_Choose_Tellah )
call TriggerAddCondition( gg_trg_Pick_Tellah, Condition( function Trig_Pick_Tellah_Conditions ) )
call TriggerAddAction( gg_trg_Pick_Tellah, function Trig_Pick_Tellah_Actions )
endfunction
function Trig_Pick_Terra_Conditions takes nothing returns boolean
if ( not ( IsUnitEnemy(GetEnteringUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Pick_Terra_Actions takes nothing returns nothing
set udg_PlayersWhoHaveChosen = ( udg_PlayersWhoHaveChosen + 1 )
set udg_HigherCamera[GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit()))] = false
set udg_HeroName[GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit()))] = "Terra"
set udg_PlayerHasAlreadyEnteredCode[GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit()))] = false
set udg_ClassAbilityGained[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))] = 0
call RemoveUnit( GetEnteringUnit() )
call CreateNUnitsAtLocFacingLocBJ( 1, 'H00X', GetOwningPlayer(GetEnteringUnit()), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(gg_unit_N002_0092) )
call ResetToGameCameraForPlayer( GetOwningPlayer(GetEnteringUnit()), 0 )
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetEnteringUnit()), GetRectCenter(gg_rct_Enter_the_World), 0 )
call SetUnitUserData( GetEnteringUnit(), GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit())) )
endfunction
//===========================================================================
function InitTrig_Pick_Terra takes nothing returns nothing
set gg_trg_Pick_Terra = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Pick_Terra, gg_rct_Choose_Terra )
call TriggerAddCondition( gg_trg_Pick_Terra, Condition( function Trig_Pick_Terra_Conditions ) )
call TriggerAddAction( gg_trg_Pick_Terra, function Trig_Pick_Terra_Actions )
endfunction
function Trig_Pick_Sephiroth_Conditions takes nothing returns boolean
if ( not ( IsUnitEnemy(GetEnteringUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Pick_Sephiroth_Actions takes nothing returns nothing
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1091" )
endfunction
//===========================================================================
function InitTrig_Pick_Sephiroth takes nothing returns nothing
set gg_trg_Pick_Sephiroth = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Pick_Sephiroth, gg_rct_Choose_Sephiroth )
call TriggerAddCondition( gg_trg_Pick_Sephiroth, Condition( function Trig_Pick_Sephiroth_Conditions ) )
call TriggerAddAction( gg_trg_Pick_Sephiroth, function Trig_Pick_Sephiroth_Actions )
endfunction
function Trig_Odin_Summon_Copy_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'n009' ) ) then
return false
endif
return true
endfunction
function Trig_Odin_Summon_Copy_Func004Func001C takes nothing returns boolean
if ( ( UnitHasItemOfTypeBJ(udg_TheRealUnit, 'I03A') == false ) ) then
return true
endif
if ( ( GetUnitTypeId(udg_TheRealUnit) != 'H011' ) ) then
return true
endif
if ( ( GetUnitTypeId(udg_TheRealUnit) != 'H00Q' ) ) then
return true
endif
if ( ( GetUnitTypeId(udg_TheRealUnit) != 'H01W' ) ) then
return true
endif
return false
endfunction
function Trig_Odin_Summon_Copy_Func004Func006Func001Func002C takes nothing returns boolean
if ( ( GetEnumUnit() == GetSummoningUnit() ) ) then
return true
endif
if ( ( GetUnitTypeId(GetEnumUnit()) == 'n009' ) ) then
return true
endif
return false
endfunction
function Trig_Odin_Summon_Copy_Func004Func006Func001C takes nothing returns boolean
if ( not Trig_Odin_Summon_Copy_Func004Func006Func001Func002C() ) then
return false
endif
return true
endfunction
function Trig_Odin_Summon_Copy_Func004Func006A takes nothing returns nothing
if ( Trig_Odin_Summon_Copy_Func004Func006Func001C() ) then
call ExplodeUnitBJ( GetEnumUnit() )
else
endif
endfunction
function Trig_Odin_Summon_Copy_Func004C takes nothing returns boolean
if ( not Trig_Odin_Summon_Copy_Func004Func001C() ) then
return false
endif
return true
endfunction
function Trig_Odin_Summon_Copy_Actions takes nothing returns nothing
call SetUnitColor( GetSummonedUnit(), ConvertPlayerColor(12) )
set udg_TheRealUnit = GetSummoningUnit()
call MoveRectToLoc( gg_rct_Odin, GetUnitLoc(udg_TheRealUnit) )
if ( Trig_Odin_Summon_Copy_Func004C() ) then
call PlaySoundOnUnitBJ( gg_snd_IllidanMorphedWhat4, 100, GetSummonedUnit() )
call PolledWait( 3.00 )
call PlaySoundOnUnitBJ( gg_snd_IllidanMorphedYesAttack2, 100, GetSummonedUnit() )
call PolledWait( 1.00 )
call ForGroupBJ( GetUnitsInRectAll(gg_rct_Odin), function Trig_Odin_Summon_Copy_Func004Func006A )
else
endif
endfunction
//===========================================================================
function InitTrig_Odin_Summon_Copy takes nothing returns nothing
set gg_trg_Odin_Summon_Copy = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Odin_Summon_Copy, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Odin_Summon_Copy, Condition( function Trig_Odin_Summon_Copy_Conditions ) )
call TriggerAddAction( gg_trg_Odin_Summon_Copy, function Trig_Odin_Summon_Copy_Actions )
endfunction
function Trig_Dark_Wave_Effect_Conditions takes nothing returns boolean
if ( not ( 'A02A' == GetSpellAbilityId() ) ) then
return false
endif
return true
endfunction
function Trig_Dark_Wave_Effect_Actions takes nothing returns nothing
call SetUnitLifeBJ( GetSpellAbilityUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetSpellAbilityUnit()) - 500.00 ) )
endfunction
//===========================================================================
function InitTrig_Dark_Wave_Effect takes nothing returns nothing
set gg_trg_Dark_Wave_Effect = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Dark_Wave_Effect, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Dark_Wave_Effect, Condition( function Trig_Dark_Wave_Effect_Conditions ) )
call TriggerAddAction( gg_trg_Dark_Wave_Effect, function Trig_Dark_Wave_Effect_Actions )
endfunction
function Trig_Gil_Toss_Effect_Conditions takes nothing returns boolean
if ( not ( 'AEfk' == GetSpellAbilityId() ) ) then
return false
endif
return true
endfunction
function Trig_Gil_Toss_Effect_Actions takes nothing returns nothing
call AdjustPlayerStateBJ( -1000, GetOwningPlayer(GetSpellAbilityUnit()), PLAYER_STATE_RESOURCE_GOLD )
endfunction
//===========================================================================
function InitTrig_Gil_Toss_Effect takes nothing returns nothing
set gg_trg_Gil_Toss_Effect = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Gil_Toss_Effect, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Gil_Toss_Effect, Condition( function Trig_Gil_Toss_Effect_Conditions ) )
call TriggerAddAction( gg_trg_Gil_Toss_Effect, function Trig_Gil_Toss_Effect_Actions )
endfunction
function Trig_Slash_Effect_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'e00E' ) ) then
return false
endif
return true
endfunction
function Trig_Slash_Effect_Func011Func003001 takes nothing returns boolean
return ( udg_DealDamage >= R2I(GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit())) )
endfunction
function Trig_Slash_Effect_Func011A takes nothing returns nothing
set udg_LoopInteger = ( udg_LoopInteger + 1 )
set udg_DealDamage = GetRandomInt(3000, 15200)
if ( Trig_Slash_Effect_Func011Func003001() ) then
call AddHeroXPSwapped( GetUnitPointValue(GetEnumUnit()), GroupPickRandomUnit(GetUnitsOfPlayerAll(udg_PlayerWhoSummoned)), true )
else
call DoNothing( )
endif
call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) - I2R(udg_DealDamage) ) )
call CreateTextTagUnitBJ( ( I2S(udg_DealDamage) + "!" ), GetEnumUnit(), 0, 10, 50.00, 50.00, 50.00, 0 )
set udg_CleanFloatingText[udg_LoopInteger] = GetLastCreatedTextTag()
endfunction
function Trig_Slash_Effect_Func012C takes nothing returns boolean
return true
endfunction
function Trig_Slash_Effect_Actions takes nothing returns nothing
call RemoveUnit( GetSummonedUnit() )
call MoveRectToLoc( gg_rct_Small_Casting_Area, GetUnitLoc(GetSummonedUnit()) )
call AddSpecialEffectLocBJ( GetRandomLocInRect(gg_rct_Small_Casting_Area), "Objects\\Spawnmodels\\NightElf\\NightElfBlood\\NightElfBloodDruidRaven.mdl" )
call AddSpecialEffectLocBJ( GetRandomLocInRect(gg_rct_Small_Casting_Area), "Objects\\Spawnmodels\\NightElf\\NightElfBlood\\NightElfBloodDruidRaven.mdl" )
call AddSpecialEffectLocBJ( GetRandomLocInRect(gg_rct_Small_Casting_Area), "Objects\\Spawnmodels\\NightElf\\NightElfBlood\\NightElfBloodDruidRaven.mdl" )
call AddSpecialEffectLocBJ( GetRandomLocInRect(gg_rct_Small_Casting_Area), "Objects\\Spawnmodels\\NightElf\\NightElfBlood\\NightElfBloodDruidRaven.mdl" )
call AddSpecialEffectLocBJ( GetRandomLocInRect(gg_rct_Small_Casting_Area), "Objects\\Spawnmodels\\NightElf\\NightElfBlood\\NightElfBloodDruidRaven.mdl" )
call AddSpecialEffectLocBJ( GetRandomLocInRect(gg_rct_Small_Casting_Area), "Objects\\Spawnmodels\\NightElf\\NightElfBlood\\NightElfBloodDruidRaven.mdl" )
call AddSpecialEffectLocBJ( GetRandomLocInRect(gg_rct_Small_Casting_Area), "Objects\\Spawnmodels\\NightElf\\NightElfBlood\\NightElfBloodDruidRaven.mdl" )
set udg_PlayerWhoSummoned = GetOwningPlayer(GetSummonedUnit())
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Small_Casting_Area, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Slash_Effect_Func011A )
if ( Trig_Slash_Effect_Func012C() ) then
call TriggerSleepAction( 2 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = udg_LoopInteger
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call DestroyTextTagBJ( udg_CleanFloatingText[GetForLoopIndexA()] )
call ShowTextTagForceBJ( false, udg_CleanFloatingText[GetForLoopIndexA()], GetPlayersAll() )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set udg_LoopInteger = 0
else
endif
endfunction
//===========================================================================
function InitTrig_Slash_Effect takes nothing returns nothing
set gg_trg_Slash_Effect = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Slash_Effect, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Slash_Effect, Condition( function Trig_Slash_Effect_Conditions ) )
call TriggerAddAction( gg_trg_Slash_Effect, function Trig_Slash_Effect_Actions )
endfunction
function Trig_Jump_Animation_Conditions takes nothing returns boolean
if ( not ( 'A02C' == GetSpellAbilityId() ) ) then
return false
endif
return true
endfunction
function Trig_Jump_Animation_Actions takes nothing returns nothing
set udg_JumpingUnit = GetSpellAbilityUnit()
call SetUnitVertexColorBJ( udg_JumpingUnit, 100, 100, 100, 100.00 )
call SetUnitInvulnerable( udg_JumpingUnit, true )
call TriggerSleepAction( 1.00 )
call PauseUnitBJ( true, udg_JumpingUnit )
call TriggerSleepAction( 4.00 )
call PauseUnitBJ( false, udg_JumpingUnit )
call SetUnitVertexColorBJ( udg_JumpingUnit, 100, 100, 100, 0.00 )
call UnitAddAbilityBJ( 'A02D', udg_JumpingUnit )
call TriggerSleepAction( 1.00 )
call UnitRemoveAbilityBJ( 'A02D', udg_JumpingUnit )
call SetUnitInvulnerable( udg_JumpingUnit, false )
endfunction
//===========================================================================
function InitTrig_Jump_Animation takes nothing returns nothing
set gg_trg_Jump_Animation = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Jump_Animation, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Jump_Animation, Condition( function Trig_Jump_Animation_Conditions ) )
call TriggerAddAction( gg_trg_Jump_Animation, function Trig_Jump_Animation_Actions )
endfunction
function Trig_Steal_Effect_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A02I' ) ) then
return false
endif
return true
endfunction
function Trig_Steal_Effect_Func003Func001C takes nothing returns boolean
if ( not ( udg_RandomSteal > 40 ) ) then
return false
endif
if ( not ( udg_RandomSteal < 420 ) ) then
return false
endif
return true
endfunction
function Trig_Steal_Effect_Func003Func002001 takes nothing returns boolean
return ( udg_RandomSteal == 1 )
endfunction
function Trig_Steal_Effect_Func003Func003001 takes nothing returns boolean
return ( udg_RandomSteal == 2 )
endfunction
function Trig_Steal_Effect_Func003Func004001 takes nothing returns boolean
return ( udg_RandomSteal == 3 )
endfunction
function Trig_Steal_Effect_Func003Func005001 takes nothing returns boolean
return ( udg_RandomSteal == 4 )
endfunction
function Trig_Steal_Effect_Func003Func006001 takes nothing returns boolean
return ( udg_RandomSteal == 5 )
endfunction
function Trig_Steal_Effect_Func003Func007001 takes nothing returns boolean
return ( udg_RandomSteal == 6 )
endfunction
function Trig_Steal_Effect_Func003Func008001 takes nothing returns boolean
return ( udg_RandomSteal == 7 )
endfunction
function Trig_Steal_Effect_Func003Func009C takes nothing returns boolean
if ( not ( udg_RandomSteal > 430 ) ) then
return false
endif
if ( not ( udg_RandomSteal < 450 ) ) then
return false
endif
return true
endfunction
function Trig_Steal_Effect_Func003Func010C takes nothing returns boolean
if ( not ( udg_RandomSteal > 450 ) ) then
return false
endif
return true
endfunction
function Trig_Steal_Effect_Func003Func011C takes nothing returns boolean
if ( not ( udg_RandomSteal > 420 ) ) then
return false
endif
if ( not ( udg_RandomSteal < 430 ) ) then
return false
endif
return true
endfunction
function Trig_Steal_Effect_Func003C takes nothing returns boolean
if ( not ( GetHeroLevel(GetSpellAbilityUnit()) > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Steal_Effect_Func004Func001001 takes nothing returns boolean
return ( udg_RandomSteal == 8 )
endfunction
function Trig_Steal_Effect_Func004Func002001 takes nothing returns boolean
return ( udg_RandomSteal == 9 )
endfunction
function Trig_Steal_Effect_Func004Func003001 takes nothing returns boolean
return ( udg_RandomSteal == 10 )
endfunction
function Trig_Steal_Effect_Func004Func004001 takes nothing returns boolean
return ( udg_RandomSteal == 11 )
endfunction
function Trig_Steal_Effect_Func004Func005001 takes nothing returns boolean
return ( udg_RandomSteal == 12 )
endfunction
function Trig_Steal_Effect_Func004Func006001 takes nothing returns boolean
return ( udg_RandomSteal == 13 )
endfunction
function Trig_Steal_Effect_Func004Func007001 takes nothing returns boolean
return ( udg_RandomSteal == 14 )
endfunction
function Trig_Steal_Effect_Func004C takes nothing returns boolean
if ( not ( GetHeroLevel(GetSpellAbilityUnit()) > 10 ) ) then
return false
endif
return true
endfunction
function Trig_Steal_Effect_Func005Func001001 takes nothing returns boolean
return ( udg_RandomSteal == 15 )
endfunction
function Trig_Steal_Effect_Func005Func002001 takes nothing returns boolean
return ( udg_RandomSteal == 16 )
endfunction
function Trig_Steal_Effect_Func005Func003001 takes nothing returns boolean
return ( udg_RandomSteal == 17 )
endfunction
function Trig_Steal_Effect_Func005Func004001 takes nothing returns boolean
return ( udg_RandomSteal == 18 )
endfunction
function Trig_Steal_Effect_Func005Func005001 takes nothing returns boolean
return ( udg_RandomSteal == 19 )
endfunction
function Trig_Steal_Effect_Func005Func006001 takes nothing returns boolean
return ( udg_RandomSteal == 20 )
endfunction
function Trig_Steal_Effect_Func005Func007001 takes nothing returns boolean
return ( udg_RandomSteal == 21 )
endfunction
function Trig_Steal_Effect_Func005Func008001 takes nothing returns boolean
return ( udg_RandomSteal == 22 )
endfunction
function Trig_Steal_Effect_Func005Func009001 takes nothing returns boolean
return ( udg_RandomSteal == 23 )
endfunction
function Trig_Steal_Effect_Func005Func010001 takes nothing returns boolean
return ( udg_RandomSteal == 24 )
endfunction
function Trig_Steal_Effect_Func005C takes nothing returns boolean
if ( not ( GetHeroLevel(GetSpellAbilityUnit()) > 20 ) ) then
return false
endif
return true
endfunction
function Trig_Steal_Effect_Func006Func001001 takes nothing returns boolean
return ( udg_RandomSteal == 25 )
endfunction
function Trig_Steal_Effect_Func006Func002001 takes nothing returns boolean
return ( udg_RandomSteal == 26 )
endfunction
function Trig_Steal_Effect_Func006Func003001 takes nothing returns boolean
return ( udg_RandomSteal == 27 )
endfunction
function Trig_Steal_Effect_Func006Func004001 takes nothing returns boolean
return ( udg_RandomSteal == 28 )
endfunction
function Trig_Steal_Effect_Func006Func005001 takes nothing returns boolean
return ( udg_RandomSteal == 29 )
endfunction
function Trig_Steal_Effect_Func006Func006001 takes nothing returns boolean
return ( udg_RandomSteal == 30 )
endfunction
function Trig_Steal_Effect_Func006Func007001 takes nothing returns boolean
return ( udg_RandomSteal == 31 )
endfunction
function Trig_Steal_Effect_Func006Func008001 takes nothing returns boolean
return ( udg_RandomSteal == 32 )
endfunction
function Trig_Steal_Effect_Func006Func009001 takes nothing returns boolean
return ( udg_RandomSteal == 33 )
endfunction
function Trig_Steal_Effect_Func006Func010001 takes nothing returns boolean
return ( udg_RandomSteal == 34 )
endfunction
function Trig_Steal_Effect_Func006Func011001 takes nothing returns boolean
return ( udg_RandomSteal == 35 )
endfunction
function Trig_Steal_Effect_Func006Func012001 takes nothing returns boolean
return ( udg_RandomSteal == 36 )
endfunction
function Trig_Steal_Effect_Func006C takes nothing returns boolean
if ( not ( GetHeroLevel(GetSpellAbilityUnit()) > 30 ) ) then
return false
endif
return true
endfunction
function Trig_Steal_Effect_Actions takes nothing returns nothing
set udg_RandomSteal = GetRandomInt(1, 500)
set udg_StealingPlayer = GetForceOfPlayer(GetOwningPlayer(GetSpellAbilityUnit()))
if ( Trig_Steal_Effect_Func003C() ) then
if ( Trig_Steal_Effect_Func003Func001C() ) then
call DisplayTimedTextToForce( udg_StealingPlayer, 1.00, "TRIGSTR_1297" )
else
endif
if ( Trig_Steal_Effect_Func003Func002001() ) then
call CreateItemLoc( 'I004', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Steal_Effect_Func003Func003001() ) then
call CreateItemLoc( 'I00N', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Steal_Effect_Func003Func004001() ) then
call CreateItemLoc( 'I00I', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Steal_Effect_Func003Func005001() ) then
call CreateItemLoc( 'I003', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Steal_Effect_Func003Func006001() ) then
call CreateItemLoc( 'I00K', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Steal_Effect_Func003Func007001() ) then
call CreateItemLoc( 'I02K', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Steal_Effect_Func003Func008001() ) then
call CreateItemLoc( 'I02I', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Steal_Effect_Func003Func009C() ) then
call CreateItemLoc( 'I03P', GetUnitLoc(GetSpellAbilityUnit()) )
call DisplayTimedTextToForce( udg_StealingPlayer, 5.00, "TRIGSTR_1298" )
else
endif
if ( Trig_Steal_Effect_Func003Func010C() ) then
call CreateItemLoc( 'I03N', GetUnitLoc(GetSpellAbilityUnit()) )
call DisplayTimedTextToForce( udg_StealingPlayer, 5.00, "TRIGSTR_1299" )
else
endif
if ( Trig_Steal_Effect_Func003Func011C() ) then
call CreateItemLoc( 'I03O', GetUnitLoc(GetSpellAbilityUnit()) )
call DisplayTimedTextToForce( udg_StealingPlayer, 5.00, "TRIGSTR_1300" )
else
endif
else
endif
if ( Trig_Steal_Effect_Func004C() ) then
if ( Trig_Steal_Effect_Func004Func001001() ) then
call CreateItemLoc( 'I02P', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Steal_Effect_Func004Func002001() ) then
call CreateItemLoc( 'I006', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Steal_Effect_Func004Func003001() ) then
call CreateItemLoc( 'I02A', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Steal_Effect_Func004Func004001() ) then
call CreateItemLoc( 'I01S', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Steal_Effect_Func004Func005001() ) then
call CreateItemLoc( 'I03L', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Steal_Effect_Func004Func006001() ) then
call CreateItemLoc( 'I00G', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Steal_Effect_Func004Func007001() ) then
call CreateItemLoc( 'I02O', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
else
endif
if ( Trig_Steal_Effect_Func005C() ) then
if ( Trig_Steal_Effect_Func005Func001001() ) then
call CreateItemLoc( 'I01I', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Steal_Effect_Func005Func002001() ) then
call CreateItemLoc( 'I01N', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Steal_Effect_Func005Func003001() ) then
call CreateItemLoc( 'I03M', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Steal_Effect_Func005Func004001() ) then
call CreateItemLoc( 'I03J', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Steal_Effect_Func005Func005001() ) then
call CreateItemLoc( 'I03X', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Steal_Effect_Func005Func006001() ) then
call CreateItemLoc( 'I02F', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Steal_Effect_Func005Func007001() ) then
call CreateItemLoc( 'I00O', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Steal_Effect_Func005Func008001() ) then
call CreateItemLoc( 'I02L', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Steal_Effect_Func005Func009001() ) then
call CreateItemLoc( 'I02N', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Steal_Effect_Func005Func010001() ) then
call CreateItemLoc( 'I00H', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
else
endif
if ( Trig_Steal_Effect_Func006C() ) then
if ( Trig_Steal_Effect_Func006Func001001() ) then
call CreateItemLoc( 'I023', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Steal_Effect_Func006Func002001() ) then
call CreateItemLoc( 'I025', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Steal_Effect_Func006Func003001() ) then
call CreateItemLoc( 'I01Y', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Steal_Effect_Func006Func004001() ) then
call CreateItemLoc( 'I02M', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Steal_Effect_Func006Func005001() ) then
call CreateItemLoc( 'I02S', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Steal_Effect_Func006Func006001() ) then
call CreateItemLoc( 'I00J', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Steal_Effect_Func006Func007001() ) then
call CreateItemLoc( 'I008', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Steal_Effect_Func006Func008001() ) then
call CreateItemLoc( 'I027', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Steal_Effect_Func006Func009001() ) then
call CreateItemLoc( 'I02H', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Steal_Effect_Func006Func010001() ) then
call CreateItemLoc( 'I03J', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Steal_Effect_Func006Func011001() ) then
call CreateItemLoc( 'I00G', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Steal_Effect_Func006Func012001() ) then
call CreateItemLoc( 'I03S', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
else
endif
endfunction
//===========================================================================
function InitTrig_Steal_Effect takes nothing returns nothing
set gg_trg_Steal_Effect = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Steal_Effect, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Steal_Effect, Condition( function Trig_Steal_Effect_Conditions ) )
call TriggerAddAction( gg_trg_Steal_Effect, function Trig_Steal_Effect_Actions )
endfunction
function Trig_Mug_Effect_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A02J' ) ) then
return false
endif
return true
endfunction
function Trig_Mug_Effect_Func003Func001C takes nothing returns boolean
if ( not ( udg_RandomSteal > 40 ) ) then
return false
endif
if ( not ( udg_RandomSteal < 420 ) ) then
return false
endif
return true
endfunction
function Trig_Mug_Effect_Func003Func002001 takes nothing returns boolean
return ( udg_RandomSteal == 1 )
endfunction
function Trig_Mug_Effect_Func003Func003001 takes nothing returns boolean
return ( udg_RandomSteal == 2 )
endfunction
function Trig_Mug_Effect_Func003Func004001 takes nothing returns boolean
return ( udg_RandomSteal == 3 )
endfunction
function Trig_Mug_Effect_Func003Func005001 takes nothing returns boolean
return ( udg_RandomSteal == 4 )
endfunction
function Trig_Mug_Effect_Func003Func006001 takes nothing returns boolean
return ( udg_RandomSteal == 5 )
endfunction
function Trig_Mug_Effect_Func003Func007001 takes nothing returns boolean
return ( udg_RandomSteal == 6 )
endfunction
function Trig_Mug_Effect_Func003Func008001 takes nothing returns boolean
return ( udg_RandomSteal == 7 )
endfunction
function Trig_Mug_Effect_Func003Func009C takes nothing returns boolean
if ( not ( udg_RandomSteal > 430 ) ) then
return false
endif
if ( not ( udg_RandomSteal < 450 ) ) then
return false
endif
return true
endfunction
function Trig_Mug_Effect_Func003Func010C takes nothing returns boolean
if ( not ( udg_RandomSteal > 450 ) ) then
return false
endif
return true
endfunction
function Trig_Mug_Effect_Func003Func011C takes nothing returns boolean
if ( not ( udg_RandomSteal > 420 ) ) then
return false
endif
if ( not ( udg_RandomSteal < 430 ) ) then
return false
endif
return true
endfunction
function Trig_Mug_Effect_Func003C takes nothing returns boolean
if ( not ( GetHeroLevel(GetSpellAbilityUnit()) > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Mug_Effect_Func004Func001001 takes nothing returns boolean
return ( udg_RandomSteal == 8 )
endfunction
function Trig_Mug_Effect_Func004Func002001 takes nothing returns boolean
return ( udg_RandomSteal == 9 )
endfunction
function Trig_Mug_Effect_Func004Func003001 takes nothing returns boolean
return ( udg_RandomSteal == 10 )
endfunction
function Trig_Mug_Effect_Func004Func004001 takes nothing returns boolean
return ( udg_RandomSteal == 11 )
endfunction
function Trig_Mug_Effect_Func004Func005001 takes nothing returns boolean
return ( udg_RandomSteal == 12 )
endfunction
function Trig_Mug_Effect_Func004Func006001 takes nothing returns boolean
return ( udg_RandomSteal == 13 )
endfunction
function Trig_Mug_Effect_Func004Func007001 takes nothing returns boolean
return ( udg_RandomSteal == 14 )
endfunction
function Trig_Mug_Effect_Func004C takes nothing returns boolean
if ( not ( GetHeroLevel(GetSpellAbilityUnit()) > 10 ) ) then
return false
endif
return true
endfunction
function Trig_Mug_Effect_Func005Func001001 takes nothing returns boolean
return ( udg_RandomSteal == 15 )
endfunction
function Trig_Mug_Effect_Func005Func002001 takes nothing returns boolean
return ( udg_RandomSteal == 16 )
endfunction
function Trig_Mug_Effect_Func005Func003001 takes nothing returns boolean
return ( udg_RandomSteal == 17 )
endfunction
function Trig_Mug_Effect_Func005Func004001 takes nothing returns boolean
return ( udg_RandomSteal == 18 )
endfunction
function Trig_Mug_Effect_Func005Func005001 takes nothing returns boolean
return ( udg_RandomSteal == 19 )
endfunction
function Trig_Mug_Effect_Func005Func006001 takes nothing returns boolean
return ( udg_RandomSteal == 20 )
endfunction
function Trig_Mug_Effect_Func005Func007001 takes nothing returns boolean
return ( udg_RandomSteal == 21 )
endfunction
function Trig_Mug_Effect_Func005Func008001 takes nothing returns boolean
return ( udg_RandomSteal == 22 )
endfunction
function Trig_Mug_Effect_Func005Func009001 takes nothing returns boolean
return ( udg_RandomSteal == 23 )
endfunction
function Trig_Mug_Effect_Func005Func010001 takes nothing returns boolean
return ( udg_RandomSteal == 24 )
endfunction
function Trig_Mug_Effect_Func005C takes nothing returns boolean
if ( not ( GetHeroLevel(GetSpellAbilityUnit()) > 20 ) ) then
return false
endif
return true
endfunction
function Trig_Mug_Effect_Func006Func001001 takes nothing returns boolean
return ( udg_RandomSteal == 25 )
endfunction
function Trig_Mug_Effect_Func006Func002001 takes nothing returns boolean
return ( udg_RandomSteal == 26 )
endfunction
function Trig_Mug_Effect_Func006Func003001 takes nothing returns boolean
return ( udg_RandomSteal == 27 )
endfunction
function Trig_Mug_Effect_Func006Func004001 takes nothing returns boolean
return ( udg_RandomSteal == 28 )
endfunction
function Trig_Mug_Effect_Func006Func005001 takes nothing returns boolean
return ( udg_RandomSteal == 29 )
endfunction
function Trig_Mug_Effect_Func006Func006001 takes nothing returns boolean
return ( udg_RandomSteal == 30 )
endfunction
function Trig_Mug_Effect_Func006Func007001 takes nothing returns boolean
return ( udg_RandomSteal == 31 )
endfunction
function Trig_Mug_Effect_Func006Func008001 takes nothing returns boolean
return ( udg_RandomSteal == 32 )
endfunction
function Trig_Mug_Effect_Func006Func009001 takes nothing returns boolean
return ( udg_RandomSteal == 33 )
endfunction
function Trig_Mug_Effect_Func006Func010001 takes nothing returns boolean
return ( udg_RandomSteal == 34 )
endfunction
function Trig_Mug_Effect_Func006Func011001 takes nothing returns boolean
return ( udg_RandomSteal == 35 )
endfunction
function Trig_Mug_Effect_Func006Func012001 takes nothing returns boolean
return ( udg_RandomSteal == 36 )
endfunction
function Trig_Mug_Effect_Func006C takes nothing returns boolean
if ( not ( GetHeroLevel(GetSpellAbilityUnit()) > 30 ) ) then
return false
endif
return true
endfunction
function Trig_Mug_Effect_Actions takes nothing returns nothing
set udg_RandomSteal = GetRandomInt(1, 500)
set udg_StealingPlayer = GetForceOfPlayer(GetOwningPlayer(GetSpellAbilityUnit()))
if ( Trig_Mug_Effect_Func003C() ) then
if ( Trig_Mug_Effect_Func003Func001C() ) then
call DisplayTimedTextToForce( udg_StealingPlayer, 1.00, "TRIGSTR_1301" )
else
endif
if ( Trig_Mug_Effect_Func003Func002001() ) then
call CreateItemLoc( 'I004', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Mug_Effect_Func003Func003001() ) then
call CreateItemLoc( 'I00N', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Mug_Effect_Func003Func004001() ) then
call CreateItemLoc( 'I00I', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Mug_Effect_Func003Func005001() ) then
call CreateItemLoc( 'I003', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Mug_Effect_Func003Func006001() ) then
call CreateItemLoc( 'I00K', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Mug_Effect_Func003Func007001() ) then
call CreateItemLoc( 'I02K', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Mug_Effect_Func003Func008001() ) then
call CreateItemLoc( 'I02I', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Mug_Effect_Func003Func009C() ) then
call CreateItemLoc( 'I03P', GetUnitLoc(GetSpellAbilityUnit()) )
call DisplayTimedTextToForce( udg_StealingPlayer, 5.00, "TRIGSTR_1302" )
else
endif
if ( Trig_Mug_Effect_Func003Func010C() ) then
call CreateItemLoc( 'I03N', GetUnitLoc(GetSpellAbilityUnit()) )
call DisplayTimedTextToForce( udg_StealingPlayer, 5.00, "TRIGSTR_1303" )
else
endif
if ( Trig_Mug_Effect_Func003Func011C() ) then
call CreateItemLoc( 'I03O', GetUnitLoc(GetSpellAbilityUnit()) )
call DisplayTimedTextToForce( udg_StealingPlayer, 5.00, "TRIGSTR_1304" )
else
endif
else
endif
if ( Trig_Mug_Effect_Func004C() ) then
if ( Trig_Mug_Effect_Func004Func001001() ) then
call CreateItemLoc( 'I02P', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Mug_Effect_Func004Func002001() ) then
call CreateItemLoc( 'I006', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Mug_Effect_Func004Func003001() ) then
call CreateItemLoc( 'I02A', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Mug_Effect_Func004Func004001() ) then
call CreateItemLoc( 'I01S', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Mug_Effect_Func004Func005001() ) then
call CreateItemLoc( 'I03L', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Mug_Effect_Func004Func006001() ) then
call CreateItemLoc( 'I00G', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Mug_Effect_Func004Func007001() ) then
call CreateItemLoc( 'I02O', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
else
endif
if ( Trig_Mug_Effect_Func005C() ) then
if ( Trig_Mug_Effect_Func005Func001001() ) then
call CreateItemLoc( 'I01I', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Mug_Effect_Func005Func002001() ) then
call CreateItemLoc( 'I01N', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Mug_Effect_Func005Func003001() ) then
call CreateItemLoc( 'I03M', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Mug_Effect_Func005Func004001() ) then
call CreateItemLoc( 'I03J', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Mug_Effect_Func005Func005001() ) then
call CreateItemLoc( 'I03X', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Mug_Effect_Func005Func006001() ) then
call CreateItemLoc( 'I02F', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Mug_Effect_Func005Func007001() ) then
call CreateItemLoc( 'I00O', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Mug_Effect_Func005Func008001() ) then
call CreateItemLoc( 'I02L', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Mug_Effect_Func005Func009001() ) then
call CreateItemLoc( 'I02N', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Mug_Effect_Func005Func010001() ) then
call CreateItemLoc( 'I00H', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
else
endif
if ( Trig_Mug_Effect_Func006C() ) then
if ( Trig_Mug_Effect_Func006Func001001() ) then
call CreateItemLoc( 'I023', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Mug_Effect_Func006Func002001() ) then
call CreateItemLoc( 'I025', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Mug_Effect_Func006Func003001() ) then
call CreateItemLoc( 'I01Y', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Mug_Effect_Func006Func004001() ) then
call CreateItemLoc( 'I02M', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Mug_Effect_Func006Func005001() ) then
call CreateItemLoc( 'I02S', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Mug_Effect_Func006Func006001() ) then
call CreateItemLoc( 'I00J', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Mug_Effect_Func006Func007001() ) then
call CreateItemLoc( 'I008', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Mug_Effect_Func006Func008001() ) then
call CreateItemLoc( 'I027', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Mug_Effect_Func006Func009001() ) then
call CreateItemLoc( 'I02H', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Mug_Effect_Func006Func010001() ) then
call CreateItemLoc( 'I03J', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Mug_Effect_Func006Func011001() ) then
call CreateItemLoc( 'I00G', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
if ( Trig_Mug_Effect_Func006Func012001() ) then
call CreateItemLoc( 'I03S', GetUnitLoc(GetSpellAbilityUnit()) )
else
call DoNothing( )
endif
else
endif
endfunction
//===========================================================================
function InitTrig_Mug_Effect takes nothing returns nothing
set gg_trg_Mug_Effect = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Mug_Effect, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Mug_Effect, Condition( function Trig_Mug_Effect_Conditions ) )
call TriggerAddAction( gg_trg_Mug_Effect, function Trig_Mug_Effect_Actions )
endfunction
function Trig_Throw_Effect_Conditions takes nothing returns boolean
if ( not ( 'A02H' == GetSpellAbilityId() ) ) then
return false
endif
return true
endfunction
function Trig_Throw_Effect_Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetSpellAbilityUnit(), GetForLoopIndexA())) == 'I03Z' ) ) then
return false
endif
return true
endfunction
function Trig_Throw_Effect_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Throw_Effect_Func001Func001C() ) then
call RemoveItem( UnitItemInSlotBJ(GetSpellAbilityUnit(), GetForLoopIndexA()) )
set udg_HasShuriken[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))] = false
return
else
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Throw_Effect takes nothing returns nothing
set gg_trg_Throw_Effect = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Throw_Effect, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Throw_Effect, Condition( function Trig_Throw_Effect_Conditions ) )
call TriggerAddAction( gg_trg_Throw_Effect, function Trig_Throw_Effect_Actions )
endfunction
function Trig_Throw_Drop_Shuriken_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I03Z' ) ) then
return false
endif
return true
endfunction
function Trig_Throw_Drop_Shuriken_Func003Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I03Z' ) ) then
return false
endif
return true
endfunction
function Trig_Throw_Drop_Shuriken_Func004001 takes nothing returns boolean
return ( udg_HasShuriken[GetConvertedPlayerId(GetOwningPlayer(GetManipulatingUnit()))] == false )
endfunction
function Trig_Throw_Drop_Shuriken_Actions takes nothing returns nothing
set udg_HasShuriken[GetConvertedPlayerId(GetOwningPlayer(GetManipulatingUnit()))] = false
call TriggerSleepAction( 1.00 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Throw_Drop_Shuriken_Func003Func001C() ) then
set udg_HasShuriken[GetConvertedPlayerId(GetOwningPlayer(GetManipulatingUnit()))] = true
else
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
if ( Trig_Throw_Drop_Shuriken_Func004001() ) then
call UnitRemoveAbilityBJ( 'A02H', GetManipulatingUnit() )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Throw_Drop_Shuriken takes nothing returns nothing
set gg_trg_Throw_Drop_Shuriken = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Throw_Drop_Shuriken, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_Throw_Drop_Shuriken, Condition( function Trig_Throw_Drop_Shuriken_Conditions ) )
call TriggerAddAction( gg_trg_Throw_Drop_Shuriken, function Trig_Throw_Drop_Shuriken_Actions )
endfunction
function Trig_Chemist_Mix_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'H026' ) ) then
return false
endif
return true
endfunction
function Trig_Chemist_Mix_Func002001 takes nothing returns boolean
return ( udg_RandomPotion == 1 )
endfunction
function Trig_Chemist_Mix_Func003001 takes nothing returns boolean
return ( udg_RandomPotion == 2 )
endfunction
function Trig_Chemist_Mix_Func004001 takes nothing returns boolean
return ( udg_RandomPotion == 3 )
endfunction
function Trig_Chemist_Mix_Func005001 takes nothing returns boolean
return ( udg_RandomPotion == 4 )
endfunction
function Trig_Chemist_Mix_Func006001 takes nothing returns boolean
return ( udg_RandomPotion == 5 )
endfunction
function Trig_Chemist_Mix_Func007001 takes nothing returns boolean
return ( udg_RandomPotion == 6 )
endfunction
function Trig_Chemist_Mix_Func008001 takes nothing returns boolean
return ( udg_RandomPotion == 7 )
endfunction
function Trig_Chemist_Mix_Func009001 takes nothing returns boolean
return ( udg_RandomPotion == 8 )
endfunction
function Trig_Chemist_Mix_Func010001 takes nothing returns boolean
return ( udg_RandomPotion == 9 )
endfunction
function Trig_Chemist_Mix_Func011001 takes nothing returns boolean
return ( udg_RandomPotion == 10 )
endfunction
function Trig_Chemist_Mix_Actions takes nothing returns nothing
set udg_RandomPotion = GetRandomInt(1, 10)
if ( Trig_Chemist_Mix_Func002001() ) then
call CreateItemLoc( 'I03N', GetUnitLoc(GetSummonedUnit()) )
else
call DoNothing( )
endif
if ( Trig_Chemist_Mix_Func003001() ) then
call CreateItemLoc( 'I03P', GetUnitLoc(GetSummonedUnit()) )
else
call DoNothing( )
endif
if ( Trig_Chemist_Mix_Func004001() ) then
call CreateItemLoc( 'I03O', GetUnitLoc(GetSummonedUnit()) )
else
call DoNothing( )
endif
if ( Trig_Chemist_Mix_Func005001() ) then
call CreateItemLoc( 'I04Y', GetUnitLoc(GetSummonedUnit()) )
else
call DoNothing( )
endif
if ( Trig_Chemist_Mix_Func006001() ) then
call CreateItemLoc( 'I04V', GetUnitLoc(GetSummonedUnit()) )
else
call DoNothing( )
endif
if ( Trig_Chemist_Mix_Func007001() ) then
call CreateItemLoc( 'I04U', GetUnitLoc(GetSummonedUnit()) )
else
call DoNothing( )
endif
if ( Trig_Chemist_Mix_Func008001() ) then
call CreateItemLoc( 'I04W', GetUnitLoc(GetSummonedUnit()) )
else
call DoNothing( )
endif
if ( Trig_Chemist_Mix_Func009001() ) then
call CreateItemLoc( 'I04X', GetUnitLoc(GetSummonedUnit()) )
else
call DoNothing( )
endif
if ( Trig_Chemist_Mix_Func010001() ) then
call CreateItemLoc( 'I03N', GetUnitLoc(GetSummonedUnit()) )
else
call DoNothing( )
endif
if ( Trig_Chemist_Mix_Func011001() ) then
call CreateItemLoc( 'I03P', GetUnitLoc(GetSummonedUnit()) )
else
call DoNothing( )
endif
call RemoveUnit( GetSummonedUnit() )
endfunction
//===========================================================================
function InitTrig_Chemist_Mix takes nothing returns nothing
set gg_trg_Chemist_Mix = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Chemist_Mix, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Chemist_Mix, Condition( function Trig_Chemist_Mix_Conditions ) )
call TriggerAddAction( gg_trg_Chemist_Mix, function Trig_Chemist_Mix_Actions )
endfunction
function Trig_Clean_Up_Aero_Func001002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Clean_Up_Aero_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsOfTypeIdAll('H02C'), function Trig_Clean_Up_Aero_Func001002 )
endfunction
//===========================================================================
function InitTrig_Clean_Up_Aero takes nothing returns nothing
set gg_trg_Clean_Up_Aero = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Clean_Up_Aero, 30.00 )
call TriggerAddAction( gg_trg_Clean_Up_Aero, function Trig_Clean_Up_Aero_Actions )
endfunction
function Trig_Aero_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'H029' ) ) then
return false
endif
return true
endfunction
function Trig_Aero_Func008A takes nothing returns nothing
set udg_LoopInteger = ( udg_LoopInteger + 1 )
set udg_DealDamage = GetRandomInt(15, 25)
set udg_DealDamage = ( udg_DealDamage * udg_Xmagix[GetConvertedPlayerId(GetOwningPlayer(GetSummoningUnit()))] )
call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) - I2R(udg_DealDamage) ) )
call CreateTextTagUnitBJ( ( I2S(udg_DealDamage) + "!" ), GetEnumUnit(), 0, 10, 100.00, 100.00, 80.00, 0 )
set udg_CleanFloatingText[udg_LoopInteger] = GetLastCreatedTextTag()
endfunction
function Trig_Aero_Func011A takes nothing returns nothing
set udg_LoopInteger = ( udg_LoopInteger + 1 )
set udg_DealDamage = GetRandomInt(15, 25)
set udg_DealDamage = ( udg_DealDamage * udg_Xmagix[GetConvertedPlayerId(GetOwningPlayer(GetSummoningUnit()))] )
call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) - I2R(udg_DealDamage) ) )
call CreateTextTagUnitBJ( ( I2S(udg_DealDamage) + "!" ), GetEnumUnit(), 0, 10, 100.00, 100.00, 80.00, 0 )
set udg_CleanFloatingText[udg_LoopInteger] = GetLastCreatedTextTag()
endfunction
function Trig_Aero_Func014A takes nothing returns nothing
set udg_LoopInteger = ( udg_LoopInteger + 1 )
set udg_DealDamage = GetRandomInt(15, 25)
set udg_DealDamage = ( udg_DealDamage * udg_Xmagix[GetConvertedPlayerId(GetOwningPlayer(GetSummoningUnit()))] )
call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) - I2R(udg_DealDamage) ) )
call CreateTextTagUnitBJ( ( I2S(udg_DealDamage) + "!" ), GetEnumUnit(), 0, 10, 100.00, 100.00, 80.00, 0 )
set udg_CleanFloatingText[udg_LoopInteger] = GetLastCreatedTextTag()
endfunction
function Trig_Aero_Func017A takes nothing returns nothing
set udg_LoopInteger = ( udg_LoopInteger + 1 )
set udg_DealDamage = GetRandomInt(50, 100)
set udg_DealDamage = ( udg_DealDamage * udg_Xmagix[GetConvertedPlayerId(GetOwningPlayer(GetSummoningUnit()))] )
call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) - I2R(udg_DealDamage) ) )
call CreateTextTagUnitBJ( ( I2S(udg_DealDamage) + "!" ), GetEnumUnit(), 0, 10, 100.00, 100.00, 80.00, 0 )
set udg_CleanFloatingText[udg_LoopInteger] = GetLastCreatedTextTag()
endfunction
function Trig_Aero_Func020A takes nothing returns nothing
set udg_LoopInteger = ( udg_LoopInteger + 1 )
set udg_DealDamage = GetRandomInt(15, 25)
set udg_DealDamage = ( udg_DealDamage * udg_Xmagix[GetConvertedPlayerId(GetOwningPlayer(GetSummoningUnit()))] )
call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) - I2R(udg_DealDamage) ) )
call CreateTextTagUnitBJ( ( I2S(udg_DealDamage) + "!" ), GetEnumUnit(), 0, 10, 100.00, 100.00, 80.00, 0 )
set udg_CleanFloatingText[udg_LoopInteger] = GetLastCreatedTextTag()
endfunction
function Trig_Aero_Func023A takes nothing returns nothing
set udg_LoopInteger = ( udg_LoopInteger + 1 )
set udg_DealDamage = GetRandomInt(15, 25)
set udg_DealDamage = ( udg_DealDamage * udg_Xmagix[GetConvertedPlayerId(GetOwningPlayer(GetSummoningUnit()))] )
call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) - I2R(udg_DealDamage) ) )
call CreateTextTagUnitBJ( ( I2S(udg_DealDamage) + "!" ), GetEnumUnit(), 0, 10, 100.00, 100.00, 80.00, 0 )
set udg_CleanFloatingText[udg_LoopInteger] = GetLastCreatedTextTag()
endfunction
function Trig_Aero_Func026A takes nothing returns nothing
set udg_LoopInteger = ( udg_LoopInteger + 1 )
set udg_DealDamage = GetRandomInt(15, 25)
set udg_DealDamage = ( udg_DealDamage * udg_Xmagix[GetConvertedPlayerId(GetOwningPlayer(GetSummoningUnit()))] )
call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) - I2R(udg_DealDamage) ) )
call CreateTextTagUnitBJ( ( I2S(udg_DealDamage) + "!" ), GetEnumUnit(), 0, 10, 100.00, 100.00, 80.00, 0 )
set udg_CleanFloatingText[udg_LoopInteger] = GetLastCreatedTextTag()
endfunction
function Trig_Aero_Actions takes nothing returns nothing
call CreateNUnitsAtLocFacingLocBJ( 1, 'H02C', Player(PLAYER_NEUTRAL_PASSIVE), GetUnitLoc(GetSummoningUnit()), GetUnitLoc(GetTriggerUnit()) )
set udg_AeroAnimation = GetLastCreatedUnit()
call SetUnitOwner( GetSummonedUnit(), Player(PLAYER_NEUTRAL_PASSIVE), true )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "move", GetSummonedUnit() )
call MoveRectToLoc( gg_rct_Medium_Casting_Area, GetUnitLoc(GetLastCreatedUnit()) )
call MoveRectToLoc( gg_rct_Large_Medium_Area, GetUnitLoc(GetLastCreatedUnit()) )
call AddWeatherEffectSaveLast( gg_rct_Large_Medium_Area, 'WNcw' )
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Medium_Casting_Area, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Aero_Func008A )
call TriggerSleepAction( 0.40 )
call MoveRectToLoc( gg_rct_Medium_Casting_Area, GetUnitLoc(GetLastCreatedUnit()) )
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Medium_Casting_Area, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Aero_Func011A )
call TriggerSleepAction( 0.40 )
call MoveRectToLoc( gg_rct_Medium_Casting_Area, GetUnitLoc(GetLastCreatedUnit()) )
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Medium_Casting_Area, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Aero_Func014A )
call TriggerSleepAction( 0.40 )
call MoveRectToLoc( gg_rct_Medium_Casting_Area, GetUnitLoc(GetLastCreatedUnit()) )
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Medium_Casting_Area, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Aero_Func017A )
call TriggerSleepAction( 0.40 )
call MoveRectToLoc( gg_rct_Medium_Casting_Area, GetUnitLoc(GetLastCreatedUnit()) )
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Medium_Casting_Area, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Aero_Func020A )
call TriggerSleepAction( 0.40 )
call MoveRectToLoc( gg_rct_Medium_Casting_Area, GetUnitLoc(GetLastCreatedUnit()) )
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Medium_Casting_Area, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Aero_Func023A )
call TriggerSleepAction( 0.40 )
call MoveRectToLoc( gg_rct_Medium_Casting_Area, GetUnitLoc(GetLastCreatedUnit()) )
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Medium_Casting_Area, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Aero_Func026A )
call TriggerSleepAction( 0.40 )
call RemoveUnit( GetSummonedUnit() )
call RemoveUnit( udg_AeroAnimation )
call RemoveWeatherEffectBJ( GetLastCreatedWeatherEffect() )
call TriggerSleepAction( 2.00 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = udg_LoopInteger
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call DestroyTextTagBJ( udg_CleanFloatingText[GetForLoopIndexA()] )
call ShowTextTagForceBJ( false, udg_CleanFloatingText[GetForLoopIndexA()], GetPlayersAll() )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set udg_LoopInteger = 0
endfunction
//===========================================================================
function InitTrig_Aero takes nothing returns nothing
set gg_trg_Aero = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Aero, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Aero, Condition( function Trig_Aero_Conditions ) )
call TriggerAddAction( gg_trg_Aero, function Trig_Aero_Actions )
endfunction
function Trig_Tornado_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'H02B' ) ) then
return false
endif
return true
endfunction
function Trig_Tornado_Func007A takes nothing returns nothing
set udg_LoopInteger = ( udg_LoopInteger + 1 )
set udg_DealDamage = GetRandomInt(120, 500)
set udg_DealDamage = ( udg_DealDamage * udg_Xmagix[GetConvertedPlayerId(GetOwningPlayer(GetSummoningUnit()))] )
call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) - I2R(udg_DealDamage) ) )
call CreateTextTagUnitBJ( ( I2S(udg_DealDamage) + "!" ), GetEnumUnit(), 0, 10, 100.00, 100.00, 80.00, 0 )
set udg_CleanFloatingText[udg_LoopInteger] = GetLastCreatedTextTag()
endfunction
function Trig_Tornado_Func010A takes nothing returns nothing
set udg_LoopInteger = ( udg_LoopInteger + 1 )
set udg_DealDamage = GetRandomInt(500, 2500)
set udg_DealDamage = ( udg_DealDamage * udg_Xmagix[GetConvertedPlayerId(GetOwningPlayer(GetSummoningUnit()))] )
call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) - I2R(udg_DealDamage) ) )
call CreateTextTagUnitBJ( ( I2S(udg_DealDamage) + "!" ), GetEnumUnit(), 0, 10, 100.00, 100.00, 80.00, 0 )
set udg_CleanFloatingText[udg_LoopInteger] = GetLastCreatedTextTag()
endfunction
function Trig_Tornado_Func013A takes nothing returns nothing
set udg_LoopInteger = ( udg_LoopInteger + 1 )
set udg_DealDamage = GetRandomInt(200, 400)
set udg_DealDamage = ( udg_DealDamage * udg_Xmagix[GetConvertedPlayerId(GetOwningPlayer(GetSummoningUnit()))] )
call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) - I2R(udg_DealDamage) ) )
call CreateTextTagUnitBJ( ( I2S(udg_DealDamage) + "!" ), GetEnumUnit(), 0, 10, 100.00, 100.00, 80.00, 0 )
set udg_CleanFloatingText[udg_LoopInteger] = GetLastCreatedTextTag()
endfunction
function Trig_Tornado_Func016A takes nothing returns nothing
set udg_LoopInteger = ( udg_LoopInteger + 1 )
set udg_DealDamage = GetRandomInt(65, 125)
set udg_DealDamage = ( udg_DealDamage * udg_Xmagix[GetConvertedPlayerId(GetOwningPlayer(GetSummoningUnit()))] )
call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) - I2R(udg_DealDamage) ) )
call CreateTextTagUnitBJ( ( I2S(udg_DealDamage) + "!" ), GetEnumUnit(), 0, 10, 100.00, 100.00, 80.00, 0 )
set udg_CleanFloatingText[udg_LoopInteger] = GetLastCreatedTextTag()
endfunction
function Trig_Tornado_Func019A takes nothing returns nothing
set udg_LoopInteger = ( udg_LoopInteger + 1 )
set udg_DealDamage = GetRandomInt(65, 125)
set udg_DealDamage = ( udg_DealDamage * udg_Xmagix[GetConvertedPlayerId(GetOwningPlayer(GetSummoningUnit()))] )
call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) - I2R(udg_DealDamage) ) )
call CreateTextTagUnitBJ( ( I2S(udg_DealDamage) + "!" ), GetEnumUnit(), 0, 10, 100.00, 100.00, 80.00, 0 )
set udg_CleanFloatingText[udg_LoopInteger] = GetLastCreatedTextTag()
endfunction
function Trig_Tornado_Func022A takes nothing returns nothing
set udg_LoopInteger = ( udg_LoopInteger + 1 )
set udg_DealDamage = GetRandomInt(65, 125)
set udg_DealDamage = ( udg_DealDamage * udg_Xmagix[GetConvertedPlayerId(GetOwningPlayer(GetSummoningUnit()))] )
call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) - I2R(udg_DealDamage) ) )
call CreateTextTagUnitBJ( ( I2S(udg_DealDamage) + "!" ), GetEnumUnit(), 0, 10, 100.00, 100.00, 80.00, 0 )
set udg_CleanFloatingText[udg_LoopInteger] = GetLastCreatedTextTag()
endfunction
function Trig_Tornado_Func025A takes nothing returns nothing
set udg_LoopInteger = ( udg_LoopInteger + 1 )
set udg_DealDamage = GetRandomInt(65, 125)
call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) - I2R(udg_DealDamage) ) )
call CreateTextTagUnitBJ( ( I2S(udg_DealDamage) + "!" ), GetEnumUnit(), 0, 10, 100.00, 100.00, 80.00, 0 )
set udg_CleanFloatingText[udg_LoopInteger] = GetLastCreatedTextTag()
endfunction
function Trig_Tornado_Actions takes nothing returns nothing
call CreateNUnitsAtLocFacingLocBJ( 1, 'H02C', Player(PLAYER_NEUTRAL_PASSIVE), GetUnitLoc(GetSummoningUnit()), GetUnitLoc(GetTriggerUnit()) )
call SetUnitOwner( GetSummonedUnit(), Player(PLAYER_NEUTRAL_PASSIVE), true )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "move", GetSummonedUnit() )
call MoveRectToLoc( gg_rct_Medium_Casting_Area, GetUnitLoc(GetLastCreatedUnit()) )
call MoveRectToLoc( gg_rct_Large_Medium_Area, GetUnitLoc(GetLastCreatedUnit()) )
call AddWeatherEffectSaveLast( gg_rct_Large_Medium_Area, 'WNcw' )
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Medium_Casting_Area, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Tornado_Func007A )
call TriggerSleepAction( 0.40 )
call MoveRectToLoc( gg_rct_Medium_Casting_Area, GetUnitLoc(GetLastCreatedUnit()) )
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Medium_Casting_Area, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Tornado_Func010A )
call TriggerSleepAction( 0.40 )
call MoveRectToLoc( gg_rct_Medium_Casting_Area, GetUnitLoc(GetLastCreatedUnit()) )
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Medium_Casting_Area, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Tornado_Func013A )
call TriggerSleepAction( 0.40 )
call MoveRectToLoc( gg_rct_Medium_Casting_Area, GetUnitLoc(GetLastCreatedUnit()) )
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Medium_Casting_Area, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Tornado_Func016A )
call TriggerSleepAction( 0.40 )
call MoveRectToLoc( gg_rct_Medium_Casting_Area, GetUnitLoc(GetLastCreatedUnit()) )
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Medium_Casting_Area, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Tornado_Func019A )
call TriggerSleepAction( 0.40 )
call MoveRectToLoc( gg_rct_Medium_Casting_Area, GetUnitLoc(GetLastCreatedUnit()) )
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Medium_Casting_Area, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Tornado_Func022A )
call TriggerSleepAction( 0.40 )
call MoveRectToLoc( gg_rct_Medium_Casting_Area, GetUnitLoc(GetLastCreatedUnit()) )
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Medium_Casting_Area, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Tornado_Func025A )
call TriggerSleepAction( 0.40 )
call RemoveUnit( GetSummonedUnit() )
call RemoveUnit( GetLastCreatedUnit() )
call RemoveWeatherEffectBJ( GetLastCreatedWeatherEffect() )
call TriggerSleepAction( 2.00 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = udg_LoopInteger
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call DestroyTextTagBJ( udg_CleanFloatingText[GetForLoopIndexA()] )
call ShowTextTagForceBJ( false, udg_CleanFloatingText[GetForLoopIndexA()], GetPlayersAll() )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set udg_LoopInteger = 0
endfunction
//===========================================================================
function InitTrig_Tornado takes nothing returns nothing
set gg_trg_Tornado = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Tornado, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Tornado, Condition( function Trig_Tornado_Conditions ) )
call TriggerAddAction( gg_trg_Tornado, function Trig_Tornado_Actions )
endfunction
function Trig_Maelstrom_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A02V' ) ) then
return false
endif
return true
endfunction
function Trig_Maelstrom_Func001Func004Func001Func002C takes nothing returns boolean
if ( ( GetOwningPlayer(GetEnumUnit()) == Player(11) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetEnumUnit()) == Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return true
endif
return false
endfunction
function Trig_Maelstrom_Func001Func004Func001Func005Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'H02C' ) ) then
return false
endif
return true
endfunction
function Trig_Maelstrom_Func001Func004Func001Func005A takes nothing returns nothing
if ( Trig_Maelstrom_Func001Func004Func001Func005Func001C() ) then
call KillUnit( GetEnumUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_Maelstrom_Func001Func004Func001C takes nothing returns boolean
if ( not Trig_Maelstrom_Func001Func004Func001Func002C() ) then
return false
endif
return true
endfunction
function Trig_Maelstrom_Func001Func004Func002C takes nothing returns boolean
if ( ( GetOwningPlayer(GetEnumUnit()) == Player(PLAYER_NEUTRAL_PASSIVE) ) ) then
return true
endif
if ( ( GetUnitTypeId(GetEnumUnit()) == 'H02D' ) ) then
return true
endif
if ( ( GetPlayerController(GetOwningPlayer(GetEnumUnit())) == MAP_CONTROL_USER ) ) then
return true
endif
return false
endfunction
function Trig_Maelstrom_Func001Func004C takes nothing returns boolean
if ( not Trig_Maelstrom_Func001Func004Func002C() ) then
return false
endif
return true
endfunction
function Trig_Maelstrom_Func001A takes nothing returns nothing
set udg_LoopInteger = ( udg_LoopInteger + 1 )
set udg_DealDamage = GetRandomInt(1000, 6000)
set udg_DealDamage = ( udg_DealDamage * udg_Xmagix[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))] )
if ( Trig_Maelstrom_Func001Func004C() ) then
call DoNothing( )
else
if ( Trig_Maelstrom_Func001Func004Func001C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Doodads\\Cinematic\\Lightningbolt\\Lightningbolt.mdl" )
call CreateNUnitsAtLocFacingLocBJ( 1, 'H02C', Player(bj_PLAYER_NEUTRAL_EXTRA), GetUnitLoc(GetEnumUnit()), GetUnitLoc(GetEnumUnit()) )
call ForGroupBJ( GetUnitsInRectAll(GetPlayableMapRect()), function Trig_Maelstrom_Func001Func004Func001Func005A )
call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) - I2R(udg_DealDamage) ) )
call CreateTextTagUnitBJ( ( I2S(udg_DealDamage) + "!" ), GetEnumUnit(), 0, 10, 100.00, 100.00, 80.00, 0 )
set udg_CleanFloatingText[udg_LoopInteger] = GetLastCreatedTextTag()
call TriggerSleepAction( 0.10 )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
else
call DoNothing( )
endif
endif
endfunction
function Trig_Maelstrom_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsInRangeOfLocAll(512.00, GetUnitLoc(GetSpellAbilityUnit())), function Trig_Maelstrom_Func001A )
call TriggerSleepAction( 2.00 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = udg_LoopInteger
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call DestroyTextTagBJ( udg_CleanFloatingText[GetForLoopIndexA()] )
call ShowTextTagForceBJ( false, udg_CleanFloatingText[GetForLoopIndexA()], GetPlayersAll() )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set udg_LoopInteger = 0
endfunction
//===========================================================================
function InitTrig_Maelstrom takes nothing returns nothing
set gg_trg_Maelstrom = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Maelstrom, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Maelstrom, Condition( function Trig_Maelstrom_Conditions ) )
call TriggerAddAction( gg_trg_Maelstrom, function Trig_Maelstrom_Actions )
endfunction
function Trig_Blizzard_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'H009' ) ) then
return false
endif
return true
endfunction
function Trig_Blizzard_Func002Func007A takes nothing returns nothing
set udg_LoopInteger = ( udg_LoopInteger + 1 )
call SetUnitMoveSpeed( GetEnumUnit(), ( GetUnitMoveSpeed(GetEnumUnit()) / 2.00 ) )
set udg_DealDamage = GetRandomInt(35, 55)
set udg_DealDamage = ( udg_DealDamage * udg_Xmagix[GetConvertedPlayerId(GetOwningPlayer(GetSummoningUnit()))] )
call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) - I2R(udg_DealDamage) ) )
call CreateTextTagUnitBJ( ( I2S(udg_DealDamage) + "!" ), GetEnumUnit(), 0, 10, 0.00, 0.00, 100, 0 )
set udg_CleanFloatingText[udg_LoopInteger] = GetLastCreatedTextTag()
call SetUnitVertexColorBJ( GetEnumUnit(), 50.00, 50.00, 100, 0 )
endfunction
function Trig_Blizzard_Func002Func009A takes nothing returns nothing
call ExplodeUnitBJ( GetEnumUnit() )
endfunction
function Trig_Blizzard_Func002C takes nothing returns boolean
if ( not ( true == true ) ) then
return false
endif
return true
endfunction
function Trig_Blizzard_Actions takes nothing returns nothing
call RemoveUnit( GetSummonedUnit() )
if ( Trig_Blizzard_Func002C() ) then
call MoveRectToLoc( gg_rct_Small_Casting_Area, GetUnitLoc(GetSummonedUnit()) )
set udg_PlayerWhoSummoned = GetOwningPlayer(GetSummonedUnit())
call CreateNUnitsAtLocFacingLocBJ( 1, 'e000', Player(PLAYER_NEUTRAL_PASSIVE), GetUnitLoc(GetSummoningUnit()), GetUnitLoc(GetSummonedUnit()) )
call KillUnit( GetLastCreatedUnit() )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 10
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call CreateNUnitsAtLoc( 1, 'hfoo', Player(PLAYER_NEUTRAL_PASSIVE), GetRandomLocInRect(gg_rct_Small_Casting_Area), bj_UNIT_FACING )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Small_Casting_Area, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Blizzard_Func002Func007A )
call TriggerSleepAction( 2 )
call ForGroupBJ( GetUnitsOfTypeIdAll('hfoo'), function Trig_Blizzard_Func002Func009A )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = udg_LoopInteger
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call DestroyTextTagBJ( udg_CleanFloatingText[GetForLoopIndexA()] )
call ShowTextTagForceBJ( false, udg_CleanFloatingText[GetForLoopIndexA()], GetPlayersAll() )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set udg_LoopInteger = 0
else
endif
endfunction
//===========================================================================
function InitTrig_Blizzard takes nothing returns nothing
set gg_trg_Blizzard = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Blizzard, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Blizzard, Condition( function Trig_Blizzard_Conditions ) )
call TriggerAddAction( gg_trg_Blizzard, function Trig_Blizzard_Actions )
endfunction
function Trig_Blizzara_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'H00B' ) ) then
return false
endif
return true
endfunction
function Trig_Blizzara_Func002Func004A takes nothing returns nothing
set udg_LoopInteger = ( udg_LoopInteger + 1 )
call SetUnitMoveSpeed( GetEnumUnit(), ( GetUnitMoveSpeed(GetEnumUnit()) / 2.00 ) )
set udg_DealDamage = GetRandomInt(500, 3000)
set udg_DealDamage = ( udg_DealDamage * udg_Xmagix[GetConvertedPlayerId(GetOwningPlayer(GetSummoningUnit()))] )
call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) - I2R(udg_DealDamage) ) )
call CreateTextTagUnitBJ( ( I2S(udg_DealDamage) + "!" ), GetEnumUnit(), 0, 10, 0.00, 0.00, 100, 0 )
set udg_CleanFloatingText[udg_LoopInteger] = GetLastCreatedTextTag()
call SetUnitVertexColorBJ( GetEnumUnit(), 50.00, 50.00, 100, 0 )
endfunction
function Trig_Blizzara_Func002Func006A takes nothing returns nothing
call ExplodeUnitBJ( GetEnumUnit() )
endfunction
function Trig_Blizzara_Func002C takes nothing returns boolean
if ( not ( true == true ) ) then
return false
endif
return true
endfunction
function Trig_Blizzara_Actions takes nothing returns nothing
call RemoveUnit( GetSummonedUnit() )
if ( Trig_Blizzara_Func002C() ) then
call MoveRectToLoc( gg_rct_Medium_Casting_Area, GetUnitLoc(GetSummonedUnit()) )
set udg_PlayerWhoSummoned = GetOwningPlayer(GetSummonedUnit())
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 20
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call CreateNUnitsAtLoc( 1, 'hfoo', Player(PLAYER_NEUTRAL_PASSIVE), GetRandomLocInRect(gg_rct_Medium_Casting_Area), bj_UNIT_FACING )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Medium_Casting_Area, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Blizzara_Func002Func004A )
call TriggerSleepAction( 2 )
call ForGroupBJ( GetUnitsOfTypeIdAll('hfoo'), function Trig_Blizzara_Func002Func006A )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = udg_LoopInteger
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call DestroyTextTagBJ( udg_CleanFloatingText[GetForLoopIndexA()] )
call ShowTextTagForceBJ( false, udg_CleanFloatingText[GetForLoopIndexA()], GetPlayersAll() )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set udg_LoopInteger = 0
else
endif
endfunction
//===========================================================================
function InitTrig_Blizzara takes nothing returns nothing
set gg_trg_Blizzara = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Blizzara, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Blizzara, Condition( function Trig_Blizzara_Conditions ) )
call TriggerAddAction( gg_trg_Blizzara, function Trig_Blizzara_Actions )
endfunction
function Trig_Blizzaga_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'H00A' ) ) then
return false
endif
return true
endfunction
function Trig_Blizzaga_Func001Func007A takes nothing returns nothing
set udg_LoopInteger = ( udg_LoopInteger + 1 )
call SetUnitMoveSpeed( GetEnumUnit(), ( GetUnitMoveSpeed(GetEnumUnit()) / 2.00 ) )
set udg_DealDamage = GetRandomInt(500, 9999)
set udg_DealDamage = ( udg_DealDamage * udg_Xmagix[GetConvertedPlayerId(GetOwningPlayer(GetSummoningUnit()))] )
call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) - I2R(udg_DealDamage) ) )
call CreateTextTagUnitBJ( ( I2S(udg_DealDamage) + "!" ), GetEnumUnit(), 0, 10, 0.00, 0.00, 100, 0 )
set udg_CleanFloatingText[udg_LoopInteger] = GetLastCreatedTextTag()
call SetUnitVertexColorBJ( GetEnumUnit(), 50.00, 50.00, 100, 0 )
endfunction
function Trig_Blizzaga_Func001Func009A takes nothing returns nothing
call ExplodeUnitBJ( GetEnumUnit() )
endfunction
function Trig_Blizzaga_Func001C takes nothing returns boolean
if ( not ( true == true ) ) then
return false
endif
return true
endfunction
function Trig_Blizzaga_Actions takes nothing returns nothing
if ( Trig_Blizzaga_Func001C() ) then
call MoveRectToLoc( gg_rct_Large_Medium_Area, GetUnitLoc(GetSummonedUnit()) )
set udg_PlayerWhoSummoned = GetOwningPlayer(GetSummonedUnit())
call CreateNUnitsAtLocFacingLocBJ( 1, 'e000', Player(PLAYER_NEUTRAL_PASSIVE), GetUnitLoc(GetSummonedUnit()), GetUnitLoc(GetTriggerUnit()) )
call KillUnit( GetLastCreatedUnit() )
call RemoveUnit( GetSummonedUnit() )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 20
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call CreateNUnitsAtLoc( 1, 'hfoo', Player(PLAYER_NEUTRAL_PASSIVE), GetRandomLocInRect(gg_rct_Large_Medium_Area), bj_UNIT_FACING )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Large_Medium_Area, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Blizzaga_Func001Func007A )
call TriggerSleepAction( 2 )
call ForGroupBJ( GetUnitsOfTypeIdAll('hfoo'), function Trig_Blizzaga_Func001Func009A )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = udg_LoopInteger
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call DestroyTextTagBJ( udg_CleanFloatingText[GetForLoopIndexA()] )
call ShowTextTagForceBJ( false, udg_CleanFloatingText[GetForLoopIndexA()], GetPlayersAll() )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set udg_LoopInteger = 0
else
endif
endfunction
//===========================================================================
function InitTrig_Blizzaga takes nothing returns nothing
set gg_trg_Blizzaga = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Blizzaga, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Blizzaga, Condition( function Trig_Blizzaga_Conditions ) )
call TriggerAddAction( gg_trg_Blizzaga, function Trig_Blizzaga_Actions )
endfunction
function Trig_Bio_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'e001' ) ) then
return false
endif
return true
endfunction
function Trig_Bio_Func005A takes nothing returns nothing
set udg_LoopInteger = ( udg_LoopInteger + 1 )
set udg_DealDamage = GetRandomInt(130, 150)
set udg_DealDamage = ( udg_DealDamage * udg_Xmagix[GetConvertedPlayerId(GetOwningPlayer(GetSummoningUnit()))] )
call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) - I2R(udg_DealDamage) ) )
call CreateTextTagUnitBJ( ( I2S(udg_DealDamage) + "!" ), GetEnumUnit(), 0, 10, 0.00, 100.00, 0.00, 0 )
set udg_CleanFloatingText[udg_LoopInteger] = GetLastCreatedTextTag()
call SetUnitVertexColorBJ( GetEnumUnit(), 0.00, 100.00, 0.00, 0 )
endfunction
function Trig_Bio_Func006C takes nothing returns boolean
return true
endfunction
function Trig_Bio_Func007Func005001 takes nothing returns boolean
return ( udg_DealDamage >= R2I(GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit())) )
endfunction
function Trig_Bio_Func007A takes nothing returns nothing
set udg_LoopInteger = ( udg_LoopInteger + 1 )
call SetUnitMoveSpeed( GetEnumUnit(), ( GetUnitMoveSpeed(GetEnumUnit()) / 2.00 ) )
set udg_DealDamage = 35
set udg_DealDamage = ( udg_DealDamage * udg_Xmagix[GetConvertedPlayerId(GetOwningPlayer(GetSummoningUnit()))] )
if ( Trig_Bio_Func007Func005001() ) then
call AddHeroXPSwapped( GetUnitPointValue(GetEnumUnit()), GroupPickRandomUnit(GetUnitsOfPlayerAll(udg_PlayerWhoSummoned)), true )
else
call DoNothing( )
endif
call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) - I2R(udg_DealDamage) ) )
call CreateTextTagUnitBJ( ( I2S(udg_DealDamage) + "!" ), GetEnumUnit(), 0, 10, 0.00, 100.00, 0.00, 0 )
set udg_CleanFloatingText[udg_LoopInteger] = GetLastCreatedTextTag()
call SetUnitVertexColorBJ( GetEnumUnit(), 0.00, 100.00, 0.00, 0 )
endfunction
function Trig_Bio_Func008C takes nothing returns boolean
return true
endfunction
function Trig_Bio_Func009Func005001 takes nothing returns boolean
return ( udg_DealDamage >= R2I(GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit())) )
endfunction
function Trig_Bio_Func009A takes nothing returns nothing
set udg_LoopInteger = ( udg_LoopInteger + 1 )
call SetUnitMoveSpeed( GetEnumUnit(), ( GetUnitMoveSpeed(GetEnumUnit()) / 2.00 ) )
set udg_DealDamage = 35
set udg_DealDamage = ( udg_DealDamage * udg_Xmagix[GetConvertedPlayerId(GetOwningPlayer(GetSummoningUnit()))] )
if ( Trig_Bio_Func009Func005001() ) then
call AddHeroXPSwapped( GetUnitPointValue(GetEnumUnit()), GroupPickRandomUnit(GetUnitsOfPlayerAll(udg_PlayerWhoSummoned)), true )
else
call DoNothing( )
endif
call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) - I2R(udg_DealDamage) ) )
call CreateTextTagUnitBJ( ( I2S(udg_DealDamage) + "!" ), GetEnumUnit(), 0, 10, 0.00, 100.00, 0.00, 0 )
set udg_CleanFloatingText[udg_LoopInteger] = GetLastCreatedTextTag()
call SetUnitVertexColorBJ( GetEnumUnit(), 100.00, 100.00, 100.00, 0 )
endfunction
function Trig_Bio_Func010C takes nothing returns boolean
return true
endfunction
function Trig_Bio_Actions takes nothing returns nothing
call RemoveUnit( GetSummonedUnit() )
call MoveRectToLoc( gg_rct_Large_Medium_Area, GetUnitLoc(GetSummonedUnit()) )
set udg_PlayerWhoSummoned = GetOwningPlayer(GetSummonedUnit())
call TriggerSleepAction( 2 )
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Large_Medium_Area, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Bio_Func005A )
if ( Trig_Bio_Func006C() ) then
call TriggerSleepAction( 2 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = udg_LoopInteger
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call DestroyTextTagBJ( udg_CleanFloatingText[GetForLoopIndexA()] )
call ShowTextTagForceBJ( false, udg_CleanFloatingText[GetForLoopIndexA()], GetPlayersAll() )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set udg_LoopInteger = 0
else
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_1305" )
endif
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Large_Medium_Area, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Bio_Func007A )
if ( Trig_Bio_Func008C() ) then
call TriggerSleepAction( 2 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = udg_LoopInteger
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call DestroyTextTagBJ( udg_CleanFloatingText[GetForLoopIndexA()] )
call ShowTextTagForceBJ( false, udg_CleanFloatingText[GetForLoopIndexA()], GetPlayersAll() )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set udg_LoopInteger = 0
else
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_1306" )
endif
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Large_Medium_Area, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Bio_Func009A )
if ( Trig_Bio_Func010C() ) then
call TriggerSleepAction( 2 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = udg_LoopInteger
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call DestroyTextTagBJ( udg_CleanFloatingText[GetForLoopIndexA()] )
call ShowTextTagForceBJ( false, udg_CleanFloatingText[GetForLoopIndexA()], GetPlayersAll() )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set udg_LoopInteger = 0
else
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_1307" )
endif
endfunction
//===========================================================================
function InitTrig_Bio takes nothing returns nothing
set gg_trg_Bio = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Bio, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Bio, Condition( function Trig_Bio_Conditions ) )
call TriggerAddAction( gg_trg_Bio, function Trig_Bio_Actions )
endfunction
function Trig_Slow_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'e00B' ) ) then
return false
endif
return true
endfunction
function Trig_Slow_Func004A takes nothing returns nothing
set udg_LoopInteger = ( udg_LoopInteger + 1 )
call SetUnitMoveSpeed( GetEnumUnit(), 15.00 )
call CreateTextTagUnitBJ( "TRIGSTR_1308", GetEnumUnit(), 0, 10, 100.00, 100.00, 100.00, 0 )
set udg_CleanFloatingText[udg_LoopInteger] = GetLastCreatedTextTag()
call SetUnitVertexColorBJ( GetEnumUnit(), 75.00, 75.00, 75.00, 0 )
endfunction
function Trig_Slow_Func005C takes nothing returns boolean
return true
endfunction
function Trig_Slow_Actions takes nothing returns nothing
call RemoveUnit( GetSummonedUnit() )
call MoveRectToLoc( gg_rct_Large_Medium_Area, GetUnitLoc(GetSummonedUnit()) )
set udg_PlayerWhoSummoned = GetOwningPlayer(GetSummonedUnit())
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Large_Medium_Area, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Slow_Func004A )
if ( Trig_Slow_Func005C() ) then
call TriggerSleepAction( 2 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = udg_LoopInteger
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call DestroyTextTagBJ( udg_CleanFloatingText[GetForLoopIndexA()] )
call ShowTextTagForceBJ( false, udg_CleanFloatingText[GetForLoopIndexA()], GetPlayersAll() )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set udg_LoopInteger = 0
else
endif
endfunction
//===========================================================================
function InitTrig_Slow takes nothing returns nothing
set gg_trg_Slow = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Slow, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Slow, Condition( function Trig_Slow_Conditions ) )
call TriggerAddAction( gg_trg_Slow, function Trig_Slow_Actions )
endfunction
function Trig_Slowga_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'e00C' ) ) then
return false
endif
return true
endfunction
function Trig_Slowga_Func004A takes nothing returns nothing
set udg_LoopInteger = ( udg_LoopInteger + 1 )
call SetUnitMoveSpeed( GetEnumUnit(), 1.00 )
call SetUnitTurnSpeedBJ( GetTriggerUnit(), 0.01 )
call CreateTextTagUnitBJ( "TRIGSTR_1309", GetEnumUnit(), 0, 10, 100.00, 100.00, 100.00, 0 )
set udg_CleanFloatingText[udg_LoopInteger] = GetLastCreatedTextTag()
call SetUnitVertexColorBJ( GetEnumUnit(), 75.00, 75.00, 75.00, 0 )
endfunction
function Trig_Slowga_Func005C takes nothing returns boolean
return true
endfunction
function Trig_Slowga_Actions takes nothing returns nothing
call RemoveUnit( GetSummonedUnit() )
call MoveRectToLoc( gg_rct_Large_Medium_Area, GetUnitLoc(GetSummonedUnit()) )
set udg_PlayerWhoSummoned = GetOwningPlayer(GetSummonedUnit())
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Large_Medium_Area, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Slowga_Func004A )
if ( Trig_Slowga_Func005C() ) then
call TriggerSleepAction( 2 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = udg_LoopInteger
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call DestroyTextTagBJ( udg_CleanFloatingText[GetForLoopIndexA()] )
call ShowTextTagForceBJ( false, udg_CleanFloatingText[GetForLoopIndexA()], GetPlayersAll() )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set udg_LoopInteger = 0
else
endif
endfunction
//===========================================================================
function InitTrig_Slowga takes nothing returns nothing
set gg_trg_Slowga = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Slowga, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Slowga, Condition( function Trig_Slowga_Conditions ) )
call TriggerAddAction( gg_trg_Slowga, function Trig_Slowga_Actions )
endfunction
function Trig_Comet_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'e003' ) ) then
return false
endif
return true
endfunction
function Trig_Comet_Func004A takes nothing returns nothing
set udg_LoopInteger = ( udg_LoopInteger + 1 )
set udg_DealDamage = GetRandomInt(500, 900)
set udg_DealDamage = ( udg_DealDamage * udg_Xmagix[GetConvertedPlayerId(GetOwningPlayer(GetSummoningUnit()))] )
call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) - I2R(udg_DealDamage) ) )
call CreateTextTagUnitBJ( ( I2S(udg_DealDamage) + "!" ), GetEnumUnit(), 0, 10, 50.00, 50.00, 50.00, 0 )
set udg_CleanFloatingText[udg_LoopInteger] = GetLastCreatedTextTag()
endfunction
function Trig_Comet_Func005C takes nothing returns boolean
return true
endfunction
function Trig_Comet_Actions takes nothing returns nothing
call RemoveUnit( GetSummonedUnit() )
call MoveRectToLoc( gg_rct_Small_Casting_Area, GetUnitLoc(GetSummonedUnit()) )
set udg_PlayerWhoSummoned = GetOwningPlayer(GetSummonedUnit())
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Small_Casting_Area, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Comet_Func004A )
if ( Trig_Comet_Func005C() ) then
call TriggerSleepAction( 2 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = udg_LoopInteger
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call DestroyTextTagBJ( udg_CleanFloatingText[GetForLoopIndexA()] )
call ShowTextTagForceBJ( false, udg_CleanFloatingText[GetForLoopIndexA()], GetPlayersAll() )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set udg_LoopInteger = 0
else
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_1310" )
endif
endfunction
//===========================================================================
function InitTrig_Comet takes nothing returns nothing
set gg_trg_Comet = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Comet, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Comet, Condition( function Trig_Comet_Conditions ) )
call TriggerAddAction( gg_trg_Comet, function Trig_Comet_Actions )
endfunction
function Trig_Meteo_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'e008' ) ) then
return false
endif
return true
endfunction
function Trig_Meteo_Func015A takes nothing returns nothing
set udg_LoopInteger = ( udg_LoopInteger + 1 )
set udg_DealDamage = GetRandomInt(1200, 1600)
set udg_DealDamage = ( udg_DealDamage * udg_Xmagix[GetConvertedPlayerId(GetOwningPlayer(GetSummoningUnit()))] )
call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) - I2R(udg_DealDamage) ) )
call CreateTextTagUnitBJ( ( I2S(udg_DealDamage) + "!" ), GetEnumUnit(), 0, 10, 50.00, 50.00, 50.00, 0 )
set udg_CleanFloatingText[udg_LoopInteger] = GetLastCreatedTextTag()
endfunction
function Trig_Meteo_Func016C takes nothing returns boolean
return true
endfunction
function Trig_Meteo_Actions takes nothing returns nothing
call RemoveUnit( GetSummonedUnit() )
call MoveRectToLoc( gg_rct_Large_Medium_Area, GetUnitLoc(GetSummonedUnit()) )
call AddSpecialEffectLocBJ( GetRandomLocInRect(gg_rct_Large_Medium_Area), "Objects\\Spawnmodels\\Demon\\InfernalMeteor\\InfernalMeteor.mdl" )
call AddSpecialEffectLocBJ( GetRandomLocInRect(gg_rct_Large_Medium_Area), "Objects\\Spawnmodels\\Demon\\InfernalMeteor\\InfernalMeteor2.mdl" )
call AddSpecialEffectLocBJ( GetRandomLocInRect(gg_rct_Large_Medium_Area), "Objects\\Spawnmodels\\Demon\\InfernalMeteor\\InfernalMeteor2.mdl" )
call AddSpecialEffectLocBJ( GetRandomLocInRect(gg_rct_Large_Medium_Area), "Objects\\Spawnmodels\\Demon\\InfernalMeteor\\InfernalMeteor2.mdl" )
call AddSpecialEffectLocBJ( GetRandomLocInRect(gg_rct_Large_Medium_Area), "Objects\\Spawnmodels\\Demon\\InfernalMeteor\\InfernalMeteor3.mdl" )
call AddSpecialEffectLocBJ( GetRandomLocInRect(gg_rct_Large_Medium_Area), "Objects\\Spawnmodels\\Demon\\InfernalMeteor\\InfernalMeteor3.mdl" )
call AddSpecialEffectLocBJ( GetRandomLocInRect(gg_rct_Large_Medium_Area), "Objects\\Spawnmodels\\Demon\\InfernalMeteor\\InfernalMeteor3.mdl" )
call AddSpecialEffectLocBJ( GetRandomLocInRect(gg_rct_Large_Medium_Area), "Objects\\Spawnmodels\\Demon\\InfernalMeteor\\InfernalMeteor.mdl" )
call AddSpecialEffectLocBJ( GetRandomLocInRect(gg_rct_Large_Medium_Area), "Objects\\Spawnmodels\\Demon\\InfernalMeteor\\InfernalMeteor.mdl" )
call AddSpecialEffectLocBJ( GetRandomLocInRect(gg_rct_Large_Medium_Area), "Objects\\Spawnmodels\\Demon\\InfernalMeteor\\InfernalMeteor.mdl" )
call TriggerSleepAction( 3.00 )
set udg_PlayerWhoSummoned = GetOwningPlayer(GetSummonedUnit())
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Large_Medium_Area, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Meteo_Func015A )
if ( Trig_Meteo_Func016C() ) then
call TriggerSleepAction( 2 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = udg_LoopInteger
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call DestroyTextTagBJ( udg_CleanFloatingText[GetForLoopIndexA()] )
call ShowTextTagForceBJ( false, udg_CleanFloatingText[GetForLoopIndexA()], GetPlayersAll() )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set udg_LoopInteger = 0
else
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_1311" )
endif
endfunction
//===========================================================================
function InitTrig_Meteo takes nothing returns nothing
set gg_trg_Meteo = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Meteo, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Meteo, Condition( function Trig_Meteo_Conditions ) )
call TriggerAddAction( gg_trg_Meteo, function Trig_Meteo_Actions )
endfunction
function Trig_Meteor_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'e009' ) ) then
return false
endif
return true
endfunction
function Trig_Meteor_Func019A takes nothing returns nothing
call CameraSetEQNoiseForPlayer( GetEnumPlayer(), 20.00 )
endfunction
function Trig_Meteor_Func038A takes nothing returns nothing
call ExplodeUnitBJ( GetEnumUnit() )
endfunction
function Trig_Meteor_Func039A takes nothing returns nothing
call ResetToGameCameraForPlayer( GetEnumPlayer(), 0 )
endfunction
function Trig_Meteor_Func041A takes nothing returns nothing
set udg_LoopInteger = ( udg_LoopInteger + 1 )
set udg_DealDamage = GetRandomInt(50000, 100000)
set udg_DealDamage = ( udg_DealDamage * udg_Xmagix[GetConvertedPlayerId(GetOwningPlayer(GetSummoningUnit()))] )
call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) - I2R(udg_DealDamage) ) )
call CreateTextTagUnitBJ( ( I2S(udg_DealDamage) + "!" ), GetEnumUnit(), 0, 10, 50.00, 50.00, 50.00, 0 )
set udg_CleanFloatingText[udg_LoopInteger] = GetLastCreatedTextTag()
endfunction
function Trig_Meteor_Func042C takes nothing returns boolean
return true
endfunction
function Trig_Meteor_Actions takes nothing returns nothing
call RemoveUnit( GetSummonedUnit() )
call MoveRectToLoc( gg_rct_Large_Medium_Area, GetUnitLoc(GetSummonedUnit()) )
call CreateNUnitsAtLocFacingLocBJ( 1, 'n00I', Player(PLAYER_NEUTRAL_PASSIVE), GetRectCenter(gg_rct_Large_Medium_Area), GetUnitLoc(GetTriggerUnit()) )
set udg_Meteor = GetLastCreatedUnit()
call SetUnitFlyHeightBJ( GetLastCreatedUnit(), 0.00, 900.00 )
call AddSpecialEffectLocBJ( GetRandomLocInRect(gg_rct_Large_Medium_Area), "Objects\\Spawnmodels\\Demon\\InfernalMeteor\\InfernalMeteor3.mdl" )
call AddSpecialEffectLocBJ( GetRandomLocInRect(gg_rct_Large_Medium_Area), "Objects\\Spawnmodels\\Demon\\InfernalMeteor\\InfernalMeteor3.mdl" )
call AddSpecialEffectLocBJ( GetRandomLocInRect(gg_rct_Large_Medium_Area), "Objects\\Spawnmodels\\Demon\\InfernalMeteor\\InfernalMeteor3.mdl" )
call AddSpecialEffectLocBJ( GetRandomLocInRect(gg_rct_Large_Medium_Area), "Objects\\Spawnmodels\\Demon\\InfernalMeteor\\InfernalMeteor3.mdl" )
call AddSpecialEffectLocBJ( GetRandomLocInRect(gg_rct_Large_Medium_Area), "Objects\\Spawnmodels\\Demon\\InfernalMeteor\\InfernalMeteor.mdl" )
call AddSpecialEffectLocBJ( GetRandomLocInRect(gg_rct_Large_Medium_Area), "Objects\\Spawnmodels\\Demon\\InfernalMeteor\\InfernalMeteor.mdl" )
call AddSpecialEffectLocBJ( GetRandomLocInRect(gg_rct_Large_Medium_Area), "Objects\\Spawnmodels\\Demon\\InfernalMeteor\\InfernalMeteor.mdl" )
call AddSpecialEffectLocBJ( GetRandomLocInRect(gg_rct_Large_Medium_Area), "Objects\\Spawnmodels\\Demon\\InfernalMeteor\\InfernalMeteor.mdl" )
call AddSpecialEffectLocBJ( GetRandomLocInRect(gg_rct_Large_Medium_Area), "Objects\\Spawnmodels\\Demon\\InfernalMeteor\\InfernalMeteor.mdl" )
call AddSpecialEffectLocBJ( GetRandomLocInRect(gg_rct_Large_Medium_Area), "Objects\\Spawnmodels\\Demon\\InfernalMeteor\\InfernalMeteor.mdl" )
call AddSpecialEffectLocBJ( GetRandomLocInRect(gg_rct_Large_Medium_Area), "Objects\\Spawnmodels\\Demon\\InfernalMeteor\\InfernalMeteor.mdl" )
call AddSpecialEffectLocBJ( GetRandomLocInRect(gg_rct_Large_Medium_Area), "Objects\\Spawnmodels\\Demon\\InfernalMeteor\\InfernalMeteor.mdl" )
call AddSpecialEffectLocBJ( GetRandomLocInRect(gg_rct_Large_Medium_Area), "Objects\\Spawnmodels\\Demon\\InfernalMeteor\\InfernalMeteor.mdl" )
call ForForce( GetForceOfPlayer(GetOwningPlayer(GetSummoningUnit())), function Trig_Meteor_Func019A )
call TriggerSleepAction( 3.00 )
call AddSpecialEffectLocBJ( GetRandomLocInRect(gg_rct_Large_Medium_Area), "Abilities\\Spells\\Human\\FlameStrike\\FlameStrike1.mdl" )
call AddSpecialEffectLocBJ( GetRandomLocInRect(gg_rct_Large_Medium_Area), "Abilities\\Spells\\Human\\FlameStrike\\FlameStrike1.mdl" )
call AddSpecialEffectLocBJ( GetRandomLocInRect(gg_rct_Large_Medium_Area), "Abilities\\Spells\\Human\\FlameStrike\\FlameStrike1.mdl" )
call AddSpecialEffectLocBJ( GetRandomLocInRect(gg_rct_Large_Medium_Area), "Abilities\\Spells\\Human\\FlameStrike\\FlameStrike1.mdl" )
call AddSpecialEffectLocBJ( GetRandomLocInRect(gg_rct_Large_Medium_Area), "Abilities\\Spells\\Human\\FlameStrike\\FlameStrike1.mdl" )
call AddSpecialEffectLocBJ( GetRandomLocInRect(gg_rct_Large_Medium_Area), "Abilities\\Spells\\Human\\FlameStrike\\FlameStrike1.mdl" )
call AddSpecialEffectLocBJ( GetRandomLocInRect(gg_rct_Large_Medium_Area), "Abilities\\Spells\\Human\\FlameStrike\\FlameStrike1.mdl" )
call AddSpecialEffectLocBJ( GetRandomLocInRect(gg_rct_Large_Medium_Area), "Abilities\\Spells\\Human\\FlameStrike\\FlameStrike1.mdl" )
call AddSpecialEffectLocBJ( GetRandomLocInRect(gg_rct_Large_Medium_Area), "Abilities\\Spells\\Human\\FlameStrike\\FlameStrike1.mdl" )
call AddSpecialEffectLocBJ( GetRandomLocInRect(gg_rct_Large_Medium_Area), "Abilities\\Spells\\Human\\FlameStrike\\FlameStrike1.mdl" )
call AddSpecialEffectLocBJ( GetRandomLocInRect(gg_rct_Large_Medium_Area), "Abilities\\Spells\\Human\\FlameStrike\\FlameStrike1.mdl" )
call AddSpecialEffectLocBJ( GetRandomLocInRect(gg_rct_Large_Medium_Area), "Abilities\\Spells\\Human\\FlameStrike\\FlameStrike1.mdl" )
call AddSpecialEffectLocBJ( GetRandomLocInRect(gg_rct_Large_Medium_Area), "Abilities\\Spells\\Human\\FlameStrike\\FlameStrike1.mdl" )
call AddSpecialEffectLocBJ( GetRandomLocInRect(gg_rct_Large_Medium_Area), "Abilities\\Spells\\Human\\FlameStrike\\FlameStrike1.mdl" )
call AddSpecialEffectLocBJ( GetRandomLocInRect(gg_rct_Large_Medium_Area), "Abilities\\Spells\\Human\\FlameStrike\\FlameStrike1.mdl" )
call AddSpecialEffectLocBJ( GetRandomLocInRect(gg_rct_Large_Medium_Area), "Abilities\\Spells\\Human\\FlameStrike\\FlameStrike1.mdl" )
call ExplodeUnitBJ( GetLastCreatedUnit() )
call ForGroupBJ( GetUnitsOfTypeIdAll('n00I'), function Trig_Meteor_Func038A )
call ForForce( GetPlayersAll(), function Trig_Meteor_Func039A )
set udg_PlayerWhoSummoned = GetOwningPlayer(GetSummonedUnit())
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Large_Medium_Area, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Meteor_Func041A )
if ( Trig_Meteor_Func042C() ) then
call TriggerSleepAction( 2 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = udg_LoopInteger
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call DestroyTextTagBJ( udg_CleanFloatingText[GetForLoopIndexA()] )
call ShowTextTagForceBJ( false, udg_CleanFloatingText[GetForLoopIndexA()], GetPlayersAll() )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set udg_LoopInteger = 0
else
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_1312" )
endif
call ExplodeUnitBJ( udg_Meteor )
endfunction
//===========================================================================
function InitTrig_Meteor takes nothing returns nothing
set gg_trg_Meteor = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Meteor, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Meteor, Condition( function Trig_Meteor_Conditions ) )
call TriggerAddAction( gg_trg_Meteor, function Trig_Meteor_Actions )
endfunction
function Trig_Ultima_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'e00D' ) ) then
return false
endif
return true
endfunction
function Trig_Ultima_Func003A takes nothing returns nothing
call CameraSetEQNoiseForPlayer( GetEnumPlayer(), 20.00 )
endfunction
function Trig_Ultima_Func007A takes nothing returns nothing
set udg_LoopInteger = ( udg_LoopInteger + 1 )
set udg_DealDamage = GetRandomInt(6000, 10000)
set udg_DealDamage = ( udg_DealDamage * udg_Xmagix[GetConvertedPlayerId(GetOwningPlayer(GetSummoningUnit()))] )
call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) - I2R(udg_DealDamage) ) )
call CreateTextTagUnitBJ( ( I2S(udg_DealDamage) + "!" ), GetEnumUnit(), 0, 10, 0.00, 100.00, 0.00, 0 )
set udg_CleanFloatingText[udg_LoopInteger] = GetLastCreatedTextTag()
endfunction
function Trig_Ultima_Func008C takes nothing returns boolean
return true
endfunction
function Trig_Ultima_Func011A takes nothing returns nothing
call ResetToGameCameraForPlayer( GetEnumPlayer(), 0 )
endfunction
function Trig_Ultima_Actions takes nothing returns nothing
call RemoveUnit( GetSummonedUnit() )
call MoveRectToLoc( gg_rct_Large_Medium_Area, GetUnitLoc(GetSummonedUnit()) )
call ForForce( GetForceOfPlayer(GetOwningPlayer(GetSummoningUnit())), function Trig_Ultima_Func003A )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 40
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call AddSpecialEffectLocBJ( GetRandomLocInRect(gg_rct_Large_Medium_Area), "Objects\\Spawnmodels\\Undead\\UDeathMedium\\UDeath.mdl" )
set udg_SpecialEffectsClear[GetForLoopIndexA()] = GetLastCreatedEffectBJ()
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 41
set bj_forLoopAIndexEnd = 80
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call AddSpecialEffectLocBJ( GetRandomLocInRect(gg_rct_Large_Medium_Area), "Units\\NightElf\\Wisp\\WispExplode.mdl" )
set udg_SpecialEffectsClear[GetForLoopIndexA()] = GetLastCreatedEffectBJ()
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set udg_PlayerWhoSummoned = GetOwningPlayer(GetSummonedUnit())
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Large_Medium_Area, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Ultima_Func007A )
if ( Trig_Ultima_Func008C() ) then
call TriggerSleepAction( 2 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = udg_LoopInteger
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call DestroyTextTagBJ( udg_CleanFloatingText[GetForLoopIndexA()] )
call ShowTextTagForceBJ( false, udg_CleanFloatingText[GetForLoopIndexA()], GetPlayersAll() )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set udg_LoopInteger = 0
else
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_1313" )
endif
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 80
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call DestroyEffectBJ( udg_SpecialEffectsClear[GetForLoopIndexA()] )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call TriggerSleepAction( 2 )
call ForForce( GetPlayersAll(), function Trig_Ultima_Func011A )
endfunction
//===========================================================================
function InitTrig_Ultima takes nothing returns nothing
set gg_trg_Ultima = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Ultima, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Ultima, Condition( function Trig_Ultima_Conditions ) )
call TriggerAddAction( gg_trg_Ultima, function Trig_Ultima_Actions )
endfunction
function Trig_Demi_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'e004' ) ) then
return false
endif
return true
endfunction
function Trig_Demi_Func001C takes nothing returns boolean
if ( not ( GetRandomInt(1, 2) == 2 ) ) then
return false
endif
return true
endfunction
function Trig_Demi_Func005A takes nothing returns nothing
set udg_LoopInteger = ( udg_LoopInteger + 1 )
call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) / 2.00 ) )
call CreateTextTagUnitBJ( "TRIGSTR_1315", GetEnumUnit(), 0, 10, 50.00, 50.00, 50.00, 0 )
set udg_CleanFloatingText[udg_LoopInteger] = GetLastCreatedTextTag()
endfunction
function Trig_Demi_Func006C takes nothing returns boolean
return true
endfunction
function Trig_Demi_Actions takes nothing returns nothing
if ( Trig_Demi_Func001C() ) then
call CreateTextTagUnitBJ( "TRIGSTR_1314", GetSummonedUnit(), 0, 13.00, 100, 100, 100, 0 )
call RemoveUnit( GetSummonedUnit() )
call TriggerSleepAction( 2 )
call DestroyTextTagBJ( GetLastCreatedTextTag() )
return
else
call DoNothing( )
endif
call RemoveUnit( GetSummonedUnit() )
call MoveRectToLoc( gg_rct_Small_Casting_Area, GetUnitLoc(GetSummonedUnit()) )
set udg_PlayerWhoSummoned = GetOwningPlayer(GetSummonedUnit())
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Small_Casting_Area, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Demi_Func005A )
if ( Trig_Demi_Func006C() ) then
call TriggerSleepAction( 2 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = udg_LoopInteger
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call DestroyTextTagBJ( udg_CleanFloatingText[GetForLoopIndexA()] )
call ShowTextTagForceBJ( false, udg_CleanFloatingText[GetForLoopIndexA()], GetPlayersAll() )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set udg_LoopInteger = 0
else
endif
endfunction
//===========================================================================
function InitTrig_Demi takes nothing returns nothing
set gg_trg_Demi = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Demi, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Demi, Condition( function Trig_Demi_Conditions ) )
call TriggerAddAction( gg_trg_Demi, function Trig_Demi_Actions )
endfunction
function Trig_Quarter_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'e00A' ) ) then
return false
endif
return true
endfunction
function Trig_Quarter_Func003Func001C takes nothing returns boolean
if ( ( GetRandomInt(1, 3) == 2 ) ) then
return true
endif
if ( ( GetRandomInt(1, 3) == 2 ) ) then
return true
endif
if ( ( GetRandomInt(1, 3) == 2 ) ) then
return true
endif
return false
endfunction
function Trig_Quarter_Func003C takes nothing returns boolean
if ( not Trig_Quarter_Func003Func001C() ) then
return false
endif
return true
endfunction
function Trig_Quarter_Func005A takes nothing returns nothing
set udg_LoopInteger = ( udg_LoopInteger + 1 )
call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) / 4.00 ) )
call CreateTextTagUnitBJ( "TRIGSTR_1317", GetEnumUnit(), 0, 10, 50.00, 50.00, 50.00, 0 )
set udg_CleanFloatingText[udg_LoopInteger] = GetLastCreatedTextTag()
endfunction
function Trig_Quarter_Func006C takes nothing returns boolean
return true
endfunction
function Trig_Quarter_Actions takes nothing returns nothing
call RemoveUnit( GetSummonedUnit() )
call MoveRectToLoc( gg_rct_Small_Casting_Area, GetUnitLoc(GetSummonedUnit()) )
if ( Trig_Quarter_Func003C() ) then
call CreateTextTagUnitBJ( "TRIGSTR_1316", GetSummonedUnit(), 0, 13.00, 100, 100, 100, 0 )
call RemoveUnit( GetSummonedUnit() )
call TriggerSleepAction( 2 )
call DestroyTextTagBJ( GetLastCreatedTextTag() )
return
else
call DoNothing( )
endif
set udg_PlayerWhoSummoned = GetOwningPlayer(GetSummonedUnit())
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Small_Casting_Area, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Quarter_Func005A )
if ( Trig_Quarter_Func006C() ) then
call TriggerSleepAction( 2 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = udg_LoopInteger
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call DestroyTextTagBJ( udg_CleanFloatingText[GetForLoopIndexA()] )
call ShowTextTagForceBJ( false, udg_CleanFloatingText[GetForLoopIndexA()], GetPlayersAll() )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set udg_LoopInteger = 0
else
endif
endfunction
//===========================================================================
function InitTrig_Quarter takes nothing returns nothing
set gg_trg_Quarter = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Quarter, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Quarter, Condition( function Trig_Quarter_Conditions ) )
call TriggerAddAction( gg_trg_Quarter, function Trig_Quarter_Actions )
endfunction
function Trig_FullLife_Effect_Func001C takes nothing returns boolean
if ( ( CountUnitsInGroup(GetUnitsOfTypeIdAll('e005')) > 0 ) ) then
return true
endif
if ( ( CountUnitsInGroup(GetUnitsOfTypeIdAll('e007')) > 0 ) ) then
return true
endif
return false
endfunction
function Trig_FullLife_Effect_Conditions takes nothing returns boolean
if ( not Trig_FullLife_Effect_Func001C() ) then
return false
endif
return true
endfunction
function Trig_FullLife_Effect_Actions takes nothing returns nothing
call SetUnitLifePercentBJ( GetRevivingUnit(), 100 )
call SetUnitManaPercentBJ( GetRevivingUnit(), 100 )
endfunction
//===========================================================================
function InitTrig_FullLife_Effect takes nothing returns nothing
set gg_trg_FullLife_Effect = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_FullLife_Effect, EVENT_PLAYER_HERO_REVIVE_FINISH )
call TriggerAddCondition( gg_trg_FullLife_Effect, Condition( function Trig_FullLife_Effect_Conditions ) )
call TriggerAddAction( gg_trg_FullLife_Effect, function Trig_FullLife_Effect_Actions )
endfunction
function Trig_FullLife_p1_Func002C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'e005' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'e007' ) ) then
return true
endif
return false
endfunction
function Trig_FullLife_p1_Conditions takes nothing returns boolean
if ( not Trig_FullLife_p1_Func002C() ) then
return false
endif
return true
endfunction
function Trig_FullLife_p1_Actions takes nothing returns nothing
call PolledWait( 5.00 )
call SetUnitOwner( GetTriggerUnit(), Player(0), true )
call TriggerSleepAction( 4.00 )
call SetUnitOwner( GetTriggerUnit(), Player(PLAYER_NEUTRAL_PASSIVE), true )
endfunction
//===========================================================================
function InitTrig_FullLife_p1 takes nothing returns nothing
set gg_trg_FullLife_p1 = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_FullLife_p1, Player(0), true )
call TriggerAddCondition( gg_trg_FullLife_p1, Condition( function Trig_FullLife_p1_Conditions ) )
call TriggerAddAction( gg_trg_FullLife_p1, function Trig_FullLife_p1_Actions )
endfunction
function Trig_FullLife_p2_Func005C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'e005' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'e007' ) ) then
return true
endif
return false
endfunction
function Trig_FullLife_p2_Conditions takes nothing returns boolean
if ( not Trig_FullLife_p2_Func005C() ) then
return false
endif
return true
endfunction
function Trig_FullLife_p2_Actions takes nothing returns nothing
call PolledWait( 5.00 )
call SetUnitOwner( GetTriggerUnit(), Player(1), true )
call TriggerSleepAction( 4.00 )
call SetUnitOwner( GetTriggerUnit(), Player(PLAYER_NEUTRAL_PASSIVE), true )
endfunction
//===========================================================================
function InitTrig_FullLife_p2 takes nothing returns nothing
set gg_trg_FullLife_p2 = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_FullLife_p2, Player(1), true )
call TriggerAddCondition( gg_trg_FullLife_p2, Condition( function Trig_FullLife_p2_Conditions ) )
call TriggerAddAction( gg_trg_FullLife_p2, function Trig_FullLife_p2_Actions )
endfunction
function Trig_FullLife_p3_Func005C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'e005' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'e007' ) ) then
return true
endif
return false
endfunction
function Trig_FullLife_p3_Conditions takes nothing returns boolean
if ( not Trig_FullLife_p3_Func005C() ) then
return false
endif
return true
endfunction
function Trig_FullLife_p3_Actions takes nothing returns nothing
call PolledWait( 5.00 )
call SetUnitOwner( GetTriggerUnit(), Player(2), true )
call TriggerSleepAction( 4.00 )
call SetUnitOwner( GetTriggerUnit(), Player(PLAYER_NEUTRAL_PASSIVE), true )
endfunction
//===========================================================================
function InitTrig_FullLife_p3 takes nothing returns nothing
set gg_trg_FullLife_p3 = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_FullLife_p3, Player(2), true )
call TriggerAddCondition( gg_trg_FullLife_p3, Condition( function Trig_FullLife_p3_Conditions ) )
call TriggerAddAction( gg_trg_FullLife_p3, function Trig_FullLife_p3_Actions )
endfunction
function Trig_FullLife_p4_Func005C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'e005' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'e007' ) ) then
return true
endif
return false
endfunction
function Trig_FullLife_p4_Conditions takes nothing returns boolean
if ( not Trig_FullLife_p4_Func005C() ) then
return false
endif
return true
endfunction
function Trig_FullLife_p4_Actions takes nothing returns nothing
call PolledWait( 5.00 )
call SetUnitOwner( GetTriggerUnit(), Player(3), true )
call TriggerSleepAction( 4.00 )
call SetUnitOwner( GetTriggerUnit(), Player(PLAYER_NEUTRAL_PASSIVE), true )
endfunction
//===========================================================================
function InitTrig_FullLife_p4 takes nothing returns nothing
set gg_trg_FullLife_p4 = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_FullLife_p4, Player(3), true )
call TriggerAddCondition( gg_trg_FullLife_p4, Condition( function Trig_FullLife_p4_Conditions ) )
call TriggerAddAction( gg_trg_FullLife_p4, function Trig_FullLife_p4_Actions )
endfunction
function Trig_FullLife_p5_Func005C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'e005' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'e007' ) ) then
return true
endif
return false
endfunction
function Trig_FullLife_p5_Conditions takes nothing returns boolean
if ( not Trig_FullLife_p5_Func005C() ) then
return false
endif
return true
endfunction
function Trig_FullLife_p5_Actions takes nothing returns nothing
call PolledWait( 5.00 )
call SetUnitOwner( GetTriggerUnit(), Player(4), true )
call TriggerSleepAction( 4.00 )
call SetUnitOwner( GetTriggerUnit(), Player(PLAYER_NEUTRAL_PASSIVE), true )
endfunction
//===========================================================================
function InitTrig_FullLife_p5 takes nothing returns nothing
set gg_trg_FullLife_p5 = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_FullLife_p5, Player(4), true )
call TriggerAddCondition( gg_trg_FullLife_p5, Condition( function Trig_FullLife_p5_Conditions ) )
call TriggerAddAction( gg_trg_FullLife_p5, function Trig_FullLife_p5_Actions )
endfunction
function Trig_FullLife_p6_Func005C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'e005' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'e007' ) ) then
return true
endif
return false
endfunction
function Trig_FullLife_p6_Conditions takes nothing returns boolean
if ( not Trig_FullLife_p6_Func005C() ) then
return false
endif
return true
endfunction
function Trig_FullLife_p6_Actions takes nothing returns nothing
call PolledWait( 5.00 )
call SetUnitOwner( GetTriggerUnit(), Player(5), true )
call TriggerSleepAction( 4.00 )
call SetUnitOwner( GetTriggerUnit(), Player(PLAYER_NEUTRAL_PASSIVE), true )
endfunction
//===========================================================================
function InitTrig_FullLife_p6 takes nothing returns nothing
set gg_trg_FullLife_p6 = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_FullLife_p6, Player(5), true )
call TriggerAddCondition( gg_trg_FullLife_p6, Condition( function Trig_FullLife_p6_Conditions ) )
call TriggerAddAction( gg_trg_FullLife_p6, function Trig_FullLife_p6_Actions )
endfunction
function Trig_FullLife_p7_Func005C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'e005' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'e007' ) ) then
return true
endif
return false
endfunction
function Trig_FullLife_p7_Conditions takes nothing returns boolean
if ( not Trig_FullLife_p7_Func005C() ) then
return false
endif
return true
endfunction
function Trig_FullLife_p7_Actions takes nothing returns nothing
call PolledWait( 5.00 )
call SetUnitOwner( GetTriggerUnit(), Player(6), true )
call TriggerSleepAction( 4.00 )
call SetUnitOwner( GetTriggerUnit(), Player(PLAYER_NEUTRAL_PASSIVE), true )
endfunction
//===========================================================================
function InitTrig_FullLife_p7 takes nothing returns nothing
set gg_trg_FullLife_p7 = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_FullLife_p7, Player(6), true )
call TriggerAddCondition( gg_trg_FullLife_p7, Condition( function Trig_FullLife_p7_Conditions ) )
call TriggerAddAction( gg_trg_FullLife_p7, function Trig_FullLife_p7_Actions )
endfunction
function Trig_FullLife_p8_Func005C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'e005' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'e007' ) ) then
return true
endif
return false
endfunction
function Trig_FullLife_p8_Conditions takes nothing returns boolean
if ( not Trig_FullLife_p8_Func005C() ) then
return false
endif
return true
endfunction
function Trig_FullLife_p8_Actions takes nothing returns nothing
call PolledWait( 5.00 )
call SetUnitOwner( GetTriggerUnit(), Player(7), true )
call TriggerSleepAction( 4.00 )
call SetUnitOwner( GetTriggerUnit(), Player(PLAYER_NEUTRAL_PASSIVE), true )
endfunction
//===========================================================================
function InitTrig_FullLife_p8 takes nothing returns nothing
set gg_trg_FullLife_p8 = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_FullLife_p8, Player(7), true )
call TriggerAddCondition( gg_trg_FullLife_p8, Condition( function Trig_FullLife_p8_Conditions ) )
call TriggerAddAction( gg_trg_FullLife_p8, function Trig_FullLife_p8_Actions )
endfunction
function Trig_FullLife_p9_Func005C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'e005' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'e007' ) ) then
return true
endif
return false
endfunction
function Trig_FullLife_p9_Conditions takes nothing returns boolean
if ( not Trig_FullLife_p9_Func005C() ) then
return false
endif
return true
endfunction
function Trig_FullLife_p9_Actions takes nothing returns nothing
call PolledWait( 5.00 )
call SetUnitOwner( GetTriggerUnit(), Player(8), true )
call TriggerSleepAction( 4.00 )
call SetUnitOwner( GetTriggerUnit(), Player(PLAYER_NEUTRAL_PASSIVE), true )
endfunction
//===========================================================================
function InitTrig_FullLife_p9 takes nothing returns nothing
set gg_trg_FullLife_p9 = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_FullLife_p9, Player(8), true )
call TriggerAddCondition( gg_trg_FullLife_p9, Condition( function Trig_FullLife_p9_Conditions ) )
call TriggerAddAction( gg_trg_FullLife_p9, function Trig_FullLife_p9_Actions )
endfunction
function Trig_FullLife_p10_Func005C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'e005' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'e007' ) ) then
return true
endif
return false
endfunction
function Trig_FullLife_p10_Conditions takes nothing returns boolean
if ( not Trig_FullLife_p10_Func005C() ) then
return false
endif
return true
endfunction
function Trig_FullLife_p10_Actions takes nothing returns nothing
call PolledWait( 5.00 )
call SetUnitOwner( GetTriggerUnit(), Player(9), true )
call TriggerSleepAction( 4.00 )
call SetUnitOwner( GetTriggerUnit(), Player(PLAYER_NEUTRAL_PASSIVE), true )
endfunction
//===========================================================================
function InitTrig_FullLife_p10 takes nothing returns nothing
set gg_trg_FullLife_p10 = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_FullLife_p10, Player(9), true )
call TriggerAddCondition( gg_trg_FullLife_p10, Condition( function Trig_FullLife_p10_Conditions ) )
call TriggerAddAction( gg_trg_FullLife_p10, function Trig_FullLife_p10_Actions )
endfunction
function Trig_FullLife_p11_Func005C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'e005' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'e007' ) ) then
return true
endif
return false
endfunction
function Trig_FullLife_p11_Conditions takes nothing returns boolean
if ( not Trig_FullLife_p11_Func005C() ) then
return false
endif
return true
endfunction
function Trig_FullLife_p11_Actions takes nothing returns nothing
call PolledWait( 5.00 )
call SetUnitOwner( GetTriggerUnit(), Player(10), true )
call TriggerSleepAction( 4.00 )
call SetUnitOwner( GetTriggerUnit(), Player(PLAYER_NEUTRAL_PASSIVE), true )
endfunction
//===========================================================================
function InitTrig_FullLife_p11 takes nothing returns nothing
set gg_trg_FullLife_p11 = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_FullLife_p11, Player(10), true )
call TriggerAddCondition( gg_trg_FullLife_p11, Condition( function Trig_FullLife_p11_Conditions ) )
call TriggerAddAction( gg_trg_FullLife_p11, function Trig_FullLife_p11_Actions )
endfunction
function Trig_Haste_Gained_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I01U' ) ) then
return false
endif
return true
endfunction
function Trig_Haste_Gained_Actions takes nothing returns nothing
call UnitAddAbilityBJ( 'A00X', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Haste_Gained takes nothing returns nothing
set gg_trg_Haste_Gained = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Haste_Gained, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Haste_Gained, Condition( function Trig_Haste_Gained_Conditions ) )
call TriggerAddAction( gg_trg_Haste_Gained, function Trig_Haste_Gained_Actions )
endfunction
function Trig_Haste_Lose_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I01U' ) ) then
return false
endif
return true
endfunction
function Trig_Haste_Lose_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'A00X', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Haste_Lose takes nothing returns nothing
set gg_trg_Haste_Lose = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Haste_Lose, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_Haste_Lose, Condition( function Trig_Haste_Lose_Conditions ) )
call TriggerAddAction( gg_trg_Haste_Lose, function Trig_Haste_Lose_Actions )
endfunction
function Trig_Flare_Gained_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I01I' ) ) then
return false
endif
return true
endfunction
function Trig_Flare_Gained_Actions takes nothing returns nothing
call UnitAddAbilityBJ( 'A00O', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Flare_Gained takes nothing returns nothing
set gg_trg_Flare_Gained = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Flare_Gained, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Flare_Gained, Condition( function Trig_Flare_Gained_Conditions ) )
call TriggerAddAction( gg_trg_Flare_Gained, function Trig_Flare_Gained_Actions )
endfunction
function Trig_Flare_Lose_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I01I' ) ) then
return false
endif
return true
endfunction
function Trig_Flare_Lose_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'A00O', GetManipulatingUnit() )
call TriggerSleepAction( 1.00 )
call UnitRemoveAbilityBJ( 'A00O', GetManipulatingUnit() )
call TriggerSleepAction( 1.00 )
call UnitRemoveAbilityBJ( 'A00O', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Flare_Lose takes nothing returns nothing
set gg_trg_Flare_Lose = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Flare_Lose, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_Flare_Lose, Condition( function Trig_Flare_Lose_Conditions ) )
call TriggerAddAction( gg_trg_Flare_Lose, function Trig_Flare_Lose_Actions )
endfunction
function Trig_Holy_Gained_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I01N' ) ) then
return false
endif
return true
endfunction
function Trig_Holy_Gained_Actions takes nothing returns nothing
call UnitAddAbilityBJ( 'A00W', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Holy_Gained takes nothing returns nothing
set gg_trg_Holy_Gained = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Holy_Gained, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Holy_Gained, Condition( function Trig_Holy_Gained_Conditions ) )
call TriggerAddAction( gg_trg_Holy_Gained, function Trig_Holy_Gained_Actions )
endfunction
function Trig_Holy_Lose_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I01N' ) ) then
return false
endif
return true
endfunction
function Trig_Holy_Lose_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'A00W', GetManipulatingUnit() )
call TriggerSleepAction( 1.00 )
call UnitRemoveAbilityBJ( 'A00W', GetManipulatingUnit() )
call TriggerSleepAction( 1.00 )
call UnitRemoveAbilityBJ( 'A00W', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Holy_Lose takes nothing returns nothing
set gg_trg_Holy_Lose = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Holy_Lose, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_Holy_Lose, Condition( function Trig_Holy_Lose_Conditions ) )
call TriggerAddAction( gg_trg_Holy_Lose, function Trig_Holy_Lose_Actions )
endfunction
function Trig_Initialize_Help_Quests_Actions takes nothing returns nothing
call CreateQuestBJ( bj_QUESTTYPE_OPT_DISCOVERED, "TRIGSTR_1318", "TRIGSTR_1319", "ReplaceableTextures\\WorldEditUI\\Editor-Random-Building.blp" )
call CreateQuestBJ( bj_QUESTTYPE_OPT_DISCOVERED, "TRIGSTR_1322", "TRIGSTR_1323", "ReplaceableTextures\\WorldEditUI\\Editor-Random-Building.blp" )
call CreateQuestBJ( bj_QUESTTYPE_OPT_DISCOVERED, "TRIGSTR_1230", "TRIGSTR_1231", "ReplaceableTextures\\CommandButtons\\BTNOrcBattleStandard.blp" )
call CreateQuestBJ( bj_QUESTTYPE_OPT_DISCOVERED, "TRIGSTR_091", "TRIGSTR_1139", "ReplaceableTextures\\CommandButtons\\BTNOrcBattleStandard.blp" )
call CreateQuestBJ( bj_QUESTTYPE_OPT_DISCOVERED, "TRIGSTR_1066", "TRIGSTR_1099", "ReplaceableTextures\\CommandButtons\\BTNOrcBattleStandard.blp" )
call CreateQuestBJ( bj_QUESTTYPE_OPT_DISCOVERED, "TRIGSTR_571", "TRIGSTR_572", "ReplaceableTextures\\WorldEditUI\\Editor-Random-Building.blp" )
call CreateQuestBJ( bj_QUESTTYPE_OPT_DISCOVERED, "TRIGSTR_1320", "TRIGSTR_1321", "ReplaceableTextures\\WorldEditUI\\Editor-Random-Building.blp" )
call CreateQuestBJ( bj_QUESTTYPE_OPT_DISCOVERED, "TRIGSTR_1330", "TRIGSTR_1331", "ReplaceableTextures\\WorldEditUI\\Editor-Random-Building.blp" )
call CreateQuestBJ( bj_QUESTTYPE_OPT_DISCOVERED, "TRIGSTR_1336", "TRIGSTR_1337", "ReplaceableTextures\\WorldEditUI\\Editor-Random-Building.blp" )
call CreateQuestBJ( bj_QUESTTYPE_OPT_DISCOVERED, "TRIGSTR_1346", "TRIGSTR_1347", "ReplaceableTextures\\WorldEditUI\\Editor-Random-Building.blp" )
call CreateQuestBJ( bj_QUESTTYPE_OPT_DISCOVERED, "TRIGSTR_378", "TRIGSTR_382", "ReplaceableTextures\\WorldEditUI\\Editor-Random-Building.blp" )
endfunction
//===========================================================================
function InitTrig_Initialize_Help_Quests takes nothing returns nothing
set gg_trg_Initialize_Help_Quests = CreateTrigger( )
call TriggerAddAction( gg_trg_Initialize_Help_Quests, function Trig_Initialize_Help_Quests_Actions )
endfunction
function Trig_Initialize_Quests_Actions takes nothing returns nothing
// Quest Creation
call CreateQuestBJ( bj_QUESTTYPE_REQ_DISCOVERED, "TRIGSTR_1348", "TRIGSTR_1349", "ReplaceableTextures\\CommandButtons\\BTNAmbush.blp" )
call QuestSetEnabledBJ( false, GetLastCreatedQuestBJ() )
set udg_Quests[2] = GetLastCreatedQuestBJ()
call CreateQuestBJ( bj_QUESTTYPE_REQ_DISCOVERED, "TRIGSTR_1350", "TRIGSTR_1351", "ReplaceableTextures\\CommandButtons\\BTNAmbush.blp" )
call QuestSetEnabledBJ( false, GetLastCreatedQuestBJ() )
set udg_Quests[1] = GetLastCreatedQuestBJ()
call CreateQuestBJ( bj_QUESTTYPE_REQ_DISCOVERED, "TRIGSTR_1352", "TRIGSTR_1353", "ReplaceableTextures\\CommandButtons\\BTNAmbush.blp" )
call QuestSetEnabledBJ( false, GetLastCreatedQuestBJ() )
set udg_Quests[3] = GetLastCreatedQuestBJ()
call CreateQuestBJ( bj_QUESTTYPE_REQ_DISCOVERED, "TRIGSTR_1354", "TRIGSTR_1355", "ReplaceableTextures\\CommandButtons\\BTNAmbush.blp" )
call QuestSetEnabledBJ( false, GetLastCreatedQuestBJ() )
set udg_Quests[4] = GetLastCreatedQuestBJ()
call CreateQuestBJ( bj_QUESTTYPE_REQ_DISCOVERED, "TRIGSTR_1356", "TRIGSTR_1357", "ReplaceableTextures\\CommandButtons\\BTNAmbush.blp" )
call QuestSetEnabledBJ( false, GetLastCreatedQuestBJ() )
set udg_Quests[5] = GetLastCreatedQuestBJ()
call CreateQuestBJ( bj_QUESTTYPE_REQ_DISCOVERED, "TRIGSTR_1358", "TRIGSTR_1359", "ReplaceableTextures\\CommandButtons\\BTNAmbush.blp" )
call QuestSetEnabledBJ( false, GetLastCreatedQuestBJ() )
set udg_Quests[6] = GetLastCreatedQuestBJ()
call CreateQuestBJ( bj_QUESTTYPE_REQ_DISCOVERED, "TRIGSTR_1360", "TRIGSTR_1361", "ReplaceableTextures\\CommandButtons\\BTNAmbush.blp" )
call QuestSetEnabledBJ( false, GetLastCreatedQuestBJ() )
set udg_Quests[7] = GetLastCreatedQuestBJ()
// Create Quest Marks
call AddSpecialEffectTargetUnitBJ( "overhead", gg_unit_n005_0113, "Abilities\\Spells\\Other\\TalkToMe\\TalkToMe.mdl" )
set udg_QuestMarkSpecialEffect[0] = GetLastCreatedEffectBJ()
call AddSpecialEffectTargetUnitBJ( "overhead", gg_unit_n00V_0150, "Abilities\\Spells\\Other\\TalkToMe\\TalkToMe.mdl" )
set udg_QuestMarkSpecialEffect[1] = GetLastCreatedEffectBJ()
call AddSpecialEffectTargetUnitBJ( "overhead", gg_unit_nhem_0293, "Abilities\\Spells\\Other\\TalkToMe\\TalkToMe.mdl" )
set udg_QuestMarkSpecialEffect[2] = GetLastCreatedEffectBJ()
call AddSpecialEffectTargetUnitBJ( "overhead", gg_unit_nhef_0289, "Abilities\\Spells\\Other\\TalkToMe\\TalkToMe.mdl" )
set udg_QuestMarkSpecialEffect[3] = GetLastCreatedEffectBJ()
endfunction
//===========================================================================
function InitTrig_Initialize_Quests takes nothing returns nothing
set gg_trg_Initialize_Quests = CreateTrigger( )
call TriggerAddAction( gg_trg_Initialize_Quests, function Trig_Initialize_Quests_Actions )
endfunction
function Trig_First_Shop_Cutscene_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == gg_unit_nhef_0122 ) ) then
return false
endif
return true
endfunction
function Trig_First_Shop_Cutscene_Actions takes nothing returns nothing
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1383" )
call TriggerSleepAction( 3.00 )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1384" )
call TriggerSleepAction( 3.00 )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1385" )
call UnitAddIndicatorBJ( GetTriggerUnit(), 0.00, 100, 0.00, 0 )
endfunction
//===========================================================================
function InitTrig_First_Shop_Cutscene takes nothing returns nothing
set gg_trg_First_Shop_Cutscene = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_First_Shop_Cutscene, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_First_Shop_Cutscene, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_First_Shop_Cutscene, Player(2), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_First_Shop_Cutscene, Player(3), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_First_Shop_Cutscene, Player(4), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_First_Shop_Cutscene, Player(5), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_First_Shop_Cutscene, Player(6), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_First_Shop_Cutscene, Player(7), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_First_Shop_Cutscene, Player(8), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_First_Shop_Cutscene, Player(9), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_First_Shop_Cutscene, Player(10), true )
call TriggerAddCondition( gg_trg_First_Shop_Cutscene, Condition( function Trig_First_Shop_Cutscene_Conditions ) )
call TriggerAddAction( gg_trg_First_Shop_Cutscene, function Trig_First_Shop_Cutscene_Actions )
endfunction
function Trig_Gurgan_1_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == gg_unit_n005_0106 ) ) then
return false
endif
return true
endfunction
function Trig_Gurgan_1_Actions takes nothing returns nothing
call ClearTextMessagesBJ( GetForceOfPlayer(GetTriggerPlayer()) )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1386" )
call UnitAddIndicatorBJ( GetTriggerUnit(), 0.00, 100, 0.00, 0 )
endfunction
//===========================================================================
function InitTrig_Gurgan_1 takes nothing returns nothing
set gg_trg_Gurgan_1 = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_1, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_1, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_1, Player(2), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_1, Player(3), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_1, Player(4), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_1, Player(5), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_1, Player(6), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_1, Player(7), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_1, Player(8), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_1, Player(9), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_1, Player(10), true )
call TriggerAddCondition( gg_trg_Gurgan_1, Condition( function Trig_Gurgan_1_Conditions ) )
call TriggerAddAction( gg_trg_Gurgan_1, function Trig_Gurgan_1_Actions )
endfunction
function Trig_Gurgan_2_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == gg_unit_n005_0105 ) ) then
return false
endif
return true
endfunction
function Trig_Gurgan_2_Actions takes nothing returns nothing
call ClearTextMessagesBJ( GetForceOfPlayer(GetTriggerPlayer()) )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1387" )
call UnitAddIndicatorBJ( GetTriggerUnit(), 0.00, 100, 0.00, 0 )
endfunction
//===========================================================================
function InitTrig_Gurgan_2 takes nothing returns nothing
set gg_trg_Gurgan_2 = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_2, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_2, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_2, Player(2), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_2, Player(3), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_2, Player(4), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_2, Player(5), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_2, Player(6), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_2, Player(7), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_2, Player(8), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_2, Player(9), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_2, Player(10), true )
call TriggerAddCondition( gg_trg_Gurgan_2, Condition( function Trig_Gurgan_2_Conditions ) )
call TriggerAddAction( gg_trg_Gurgan_2, function Trig_Gurgan_2_Actions )
endfunction
function Trig_Gurgan_3_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == gg_unit_n005_0107 ) ) then
return false
endif
return true
endfunction
function Trig_Gurgan_3_Actions takes nothing returns nothing
call ClearTextMessagesBJ( GetForceOfPlayer(GetTriggerPlayer()) )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1388" )
call UnitAddIndicatorBJ( GetTriggerUnit(), 0.00, 100, 0.00, 0 )
endfunction
//===========================================================================
function InitTrig_Gurgan_3 takes nothing returns nothing
set gg_trg_Gurgan_3 = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_3, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_3, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_3, Player(2), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_3, Player(3), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_3, Player(4), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_3, Player(5), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_3, Player(6), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_3, Player(7), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_3, Player(8), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_3, Player(9), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_3, Player(10), true )
call TriggerAddCondition( gg_trg_Gurgan_3, Condition( function Trig_Gurgan_3_Conditions ) )
call TriggerAddAction( gg_trg_Gurgan_3, function Trig_Gurgan_3_Actions )
endfunction
function Trig_Gurgan_4_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == gg_unit_n005_0108 ) ) then
return false
endif
return true
endfunction
function Trig_Gurgan_4_Actions takes nothing returns nothing
call ClearTextMessagesBJ( GetForceOfPlayer(GetTriggerPlayer()) )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1389" )
call UnitAddIndicatorBJ( GetTriggerUnit(), 0.00, 100, 0.00, 0 )
endfunction
//===========================================================================
function InitTrig_Gurgan_4 takes nothing returns nothing
set gg_trg_Gurgan_4 = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_4, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_4, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_4, Player(2), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_4, Player(3), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_4, Player(4), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_4, Player(5), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_4, Player(6), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_4, Player(7), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_4, Player(8), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_4, Player(9), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_4, Player(10), true )
call TriggerAddCondition( gg_trg_Gurgan_4, Condition( function Trig_Gurgan_4_Conditions ) )
call TriggerAddAction( gg_trg_Gurgan_4, function Trig_Gurgan_4_Actions )
endfunction
function Trig_Gurgan_5_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == gg_unit_n005_0109 ) ) then
return false
endif
return true
endfunction
function Trig_Gurgan_5_Actions takes nothing returns nothing
call ClearTextMessagesBJ( GetForceOfPlayer(GetTriggerPlayer()) )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1390" )
call UnitAddIndicatorBJ( GetTriggerUnit(), 0.00, 100, 0.00, 0 )
endfunction
//===========================================================================
function InitTrig_Gurgan_5 takes nothing returns nothing
set gg_trg_Gurgan_5 = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_5, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_5, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_5, Player(2), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_5, Player(3), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_5, Player(4), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_5, Player(5), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_5, Player(6), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_5, Player(7), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_5, Player(8), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_5, Player(9), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_5, Player(10), true )
call TriggerAddCondition( gg_trg_Gurgan_5, Condition( function Trig_Gurgan_5_Conditions ) )
call TriggerAddAction( gg_trg_Gurgan_5, function Trig_Gurgan_5_Actions )
endfunction
function Trig_Gurgan_6_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == gg_unit_n005_0111 ) ) then
return false
endif
return true
endfunction
function Trig_Gurgan_6_Actions takes nothing returns nothing
call ClearTextMessagesBJ( GetForceOfPlayer(GetTriggerPlayer()) )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1391" )
call UnitAddIndicatorBJ( GetTriggerUnit(), 0.00, 100, 0.00, 0 )
endfunction
//===========================================================================
function InitTrig_Gurgan_6 takes nothing returns nothing
set gg_trg_Gurgan_6 = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_6, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_6, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_6, Player(2), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_6, Player(3), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_6, Player(4), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_6, Player(5), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_6, Player(6), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_6, Player(7), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_6, Player(8), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_6, Player(9), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_6, Player(10), true )
call TriggerAddCondition( gg_trg_Gurgan_6, Condition( function Trig_Gurgan_6_Conditions ) )
call TriggerAddAction( gg_trg_Gurgan_6, function Trig_Gurgan_6_Actions )
endfunction
function Trig_Gurgan_7_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == gg_unit_n005_0115 ) ) then
return false
endif
return true
endfunction
function Trig_Gurgan_7_Actions takes nothing returns nothing
call ClearTextMessagesBJ( GetForceOfPlayer(GetTriggerPlayer()) )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1392" )
call UnitAddIndicatorBJ( GetTriggerUnit(), 0.00, 100, 0.00, 0 )
endfunction
//===========================================================================
function InitTrig_Gurgan_7 takes nothing returns nothing
set gg_trg_Gurgan_7 = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_7, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_7, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_7, Player(2), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_7, Player(3), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_7, Player(4), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_7, Player(5), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_7, Player(6), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_7, Player(7), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_7, Player(8), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_7, Player(9), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_7, Player(10), true )
call TriggerAddCondition( gg_trg_Gurgan_7, Condition( function Trig_Gurgan_7_Conditions ) )
call TriggerAddAction( gg_trg_Gurgan_7, function Trig_Gurgan_7_Actions )
endfunction
function Trig_Gurgan_8_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == gg_unit_n005_0114 ) ) then
return false
endif
return true
endfunction
function Trig_Gurgan_8_Actions takes nothing returns nothing
call ClearTextMessagesBJ( GetForceOfPlayer(GetTriggerPlayer()) )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1393" )
call UnitAddIndicatorBJ( GetTriggerUnit(), 0.00, 100, 0.00, 0 )
endfunction
//===========================================================================
function InitTrig_Gurgan_8 takes nothing returns nothing
set gg_trg_Gurgan_8 = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_8, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_8, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_8, Player(2), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_8, Player(3), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_8, Player(4), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_8, Player(5), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_8, Player(6), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_8, Player(7), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_8, Player(8), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_8, Player(9), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_8, Player(10), true )
call TriggerAddCondition( gg_trg_Gurgan_8, Condition( function Trig_Gurgan_8_Conditions ) )
call TriggerAddAction( gg_trg_Gurgan_8, function Trig_Gurgan_8_Actions )
endfunction
function Trig_Gurgan_9_Letter_Quest_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == gg_unit_n005_0113 ) ) then
return false
endif
return true
endfunction
function Trig_Gurgan_9_Letter_Quest_Func018002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), GetUnitLoc(gg_unit_n005_0113), 1.00 )
endfunction
function Trig_Gurgan_9_Letter_Quest_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call DestroyEffectBJ( udg_QuestMarkSpecialEffect[0] )
call ClearTextMessagesBJ( GetForceOfPlayer(GetTriggerPlayer()) )
call UnitAddIndicatorBJ( GetTriggerUnit(), 0.00, 100, 0.00, 0 )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1394" )
call ForForce( GetForceOfPlayer(GetTriggerPlayer()), function Trig_Gurgan_9_Letter_Quest_Func018002 )
call TriggerSleepAction( 5.00 )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1395" )
call TriggerSleepAction( 5.00 )
call ClearTextMessagesBJ( GetForceOfPlayer(GetTriggerPlayer()) )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1396" )
call UnitAddItemByIdSwapped( 'I04D', GroupPickRandomUnit(GetUnitsOfPlayerAll(GetTriggerPlayer())) )
call QuestSetEnabledBJ( true, udg_Quests[2] )
call FlashQuestDialogButtonBJ( )
call AddSpecialEffectTargetUnitBJ( "overhead", gg_unit_nhem_0292, "Abilities\\Spells\\Other\\TalkToMe\\TalkToMe.mdl" )
set udg_QuestMarkSpecialEffect[0] = GetLastCreatedEffectBJ()
set udg_QuestLetter = true
endfunction
//===========================================================================
function InitTrig_Gurgan_9_Letter_Quest takes nothing returns nothing
set gg_trg_Gurgan_9_Letter_Quest = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_9_Letter_Quest, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_9_Letter_Quest, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_9_Letter_Quest, Player(2), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_9_Letter_Quest, Player(3), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_9_Letter_Quest, Player(4), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_9_Letter_Quest, Player(5), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_9_Letter_Quest, Player(6), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_9_Letter_Quest, Player(7), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_9_Letter_Quest, Player(8), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_9_Letter_Quest, Player(9), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_9_Letter_Quest, Player(10), true )
call TriggerAddCondition( gg_trg_Gurgan_9_Letter_Quest, Condition( function Trig_Gurgan_9_Letter_Quest_Conditions ) )
call TriggerAddAction( gg_trg_Gurgan_9_Letter_Quest, function Trig_Gurgan_9_Letter_Quest_Actions )
endfunction
function Trig_Gurgan_10_Turtle_Quest_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == gg_unit_n00V_0150 ) ) then
return false
endif
return true
endfunction
function Trig_Gurgan_10_Turtle_Quest_Func018002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), GetUnitLoc(gg_unit_n00V_0150), 1.00 )
endfunction
function Trig_Gurgan_10_Turtle_Quest_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call DestroyEffectBJ( udg_QuestMarkSpecialEffect[1] )
call ClearTextMessagesBJ( GetForceOfPlayer(GetTriggerPlayer()) )
call UnitAddIndicatorBJ( GetTriggerUnit(), 0.00, 100, 0.00, 0 )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1397" )
call ForForce( GetForceOfPlayer(GetTriggerPlayer()), function Trig_Gurgan_10_Turtle_Quest_Func018002 )
call TriggerSleepAction( 5.00 )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1398" )
call TriggerSleepAction( 5.00 )
call ClearTextMessagesBJ( GetForceOfPlayer(GetTriggerPlayer()) )
call QuestSetEnabledBJ( true, udg_Quests[1] )
call FlashQuestDialogButtonBJ( )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1399" )
endfunction
//===========================================================================
function InitTrig_Gurgan_10_Turtle_Quest takes nothing returns nothing
set gg_trg_Gurgan_10_Turtle_Quest = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_10_Turtle_Quest, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_10_Turtle_Quest, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_10_Turtle_Quest, Player(2), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_10_Turtle_Quest, Player(3), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_10_Turtle_Quest, Player(4), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_10_Turtle_Quest, Player(5), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_10_Turtle_Quest, Player(6), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_10_Turtle_Quest, Player(7), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_10_Turtle_Quest, Player(8), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_10_Turtle_Quest, Player(9), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_10_Turtle_Quest, Player(10), true )
call TriggerAddCondition( gg_trg_Gurgan_10_Turtle_Quest, Condition( function Trig_Gurgan_10_Turtle_Quest_Conditions ) )
call TriggerAddAction( gg_trg_Gurgan_10_Turtle_Quest, function Trig_Gurgan_10_Turtle_Quest_Actions )
endfunction
function Trig_Gurgan_10_Turtle_Quest_Complete_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == gg_unit_n00V_0150 ) ) then
return false
endif
if ( not ( udg_QuestAdamontoise == true ) ) then
return false
endif
return true
endfunction
function Trig_Gurgan_10_Turtle_Quest_Complete_Func017002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), GetUnitLoc(gg_unit_n00V_0150), 1.00 )
endfunction
function Trig_Gurgan_10_Turtle_Quest_Complete_Actions takes nothing returns nothing
call ClearTextMessagesBJ( GetForceOfPlayer(GetTriggerPlayer()) )
call UnitAddIndicatorBJ( GetTriggerUnit(), 0.00, 100, 0.00, 0 )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1400" )
call ForForce( GetForceOfPlayer(GetTriggerPlayer()), function Trig_Gurgan_10_Turtle_Quest_Complete_Func017002 )
call TriggerSleepAction( 5.00 )
call ClearTextMessagesBJ( GetForceOfPlayer(GetTriggerPlayer()) )
call CreateItemLoc( 'I00W', GetUnitLoc(gg_unit_n00V_0150) )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1401" )
call QuestSetCompletedBJ( udg_Quests[1], true )
call DisableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Gurgan_10_Turtle_Quest_Complete takes nothing returns nothing
set gg_trg_Gurgan_10_Turtle_Quest_Complete = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_10_Turtle_Quest_Complete, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_10_Turtle_Quest_Complete, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_10_Turtle_Quest_Complete, Player(2), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_10_Turtle_Quest_Complete, Player(3), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_10_Turtle_Quest_Complete, Player(4), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_10_Turtle_Quest_Complete, Player(5), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_10_Turtle_Quest_Complete, Player(6), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_10_Turtle_Quest_Complete, Player(7), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_10_Turtle_Quest_Complete, Player(8), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_10_Turtle_Quest_Complete, Player(9), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Gurgan_10_Turtle_Quest_Complete, Player(10), true )
call TriggerAddCondition( gg_trg_Gurgan_10_Turtle_Quest_Complete, Condition( function Trig_Gurgan_10_Turtle_Quest_Complete_Conditions ) )
call TriggerAddAction( gg_trg_Gurgan_10_Turtle_Quest_Complete, function Trig_Gurgan_10_Turtle_Quest_Complete_Actions )
endfunction
function Trig_Gurgan_10_Turtle_Quest_Dead_Turtle_Actions takes nothing returns nothing
set udg_QuestAdamontoise = true
endfunction
//===========================================================================
function InitTrig_Gurgan_10_Turtle_Quest_Dead_Turtle takes nothing returns nothing
set gg_trg_Gurgan_10_Turtle_Quest_Dead_Turtle = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_Gurgan_10_Turtle_Quest_Dead_Turtle, gg_unit_n00R_0013, EVENT_UNIT_DEATH )
call TriggerAddAction( gg_trg_Gurgan_10_Turtle_Quest_Dead_Turtle, function Trig_Gurgan_10_Turtle_Quest_Dead_Turtle_Actions )
endfunction
function Trig_Elf_1_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == gg_unit_nhef_0008 ) ) then
return false
endif
return true
endfunction
function Trig_Elf_1_Actions takes nothing returns nothing
call ClearTextMessagesBJ( GetForceOfPlayer(GetTriggerPlayer()) )
call UnitAddIndicatorBJ( GetTriggerUnit(), 0.00, 100, 0.00, 0 )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1402" )
endfunction
//===========================================================================
function InitTrig_Elf_1 takes nothing returns nothing
set gg_trg_Elf_1 = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_1, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_1, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_1, Player(2), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_1, Player(3), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_1, Player(4), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_1, Player(5), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_1, Player(6), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_1, Player(7), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_1, Player(8), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_1, Player(9), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_1, Player(10), true )
call TriggerAddCondition( gg_trg_Elf_1, Condition( function Trig_Elf_1_Conditions ) )
call TriggerAddAction( gg_trg_Elf_1, function Trig_Elf_1_Actions )
endfunction
function Trig_Elf_2_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == gg_unit_nhem_0263 ) ) then
return false
endif
return true
endfunction
function Trig_Elf_2_Actions takes nothing returns nothing
call ClearTextMessagesBJ( GetForceOfPlayer(GetTriggerPlayer()) )
call UnitAddIndicatorBJ( GetTriggerUnit(), 0.00, 100, 0.00, 0 )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1403" )
endfunction
//===========================================================================
function InitTrig_Elf_2 takes nothing returns nothing
set gg_trg_Elf_2 = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_2, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_2, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_2, Player(2), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_2, Player(3), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_2, Player(4), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_2, Player(5), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_2, Player(6), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_2, Player(7), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_2, Player(8), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_2, Player(9), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_2, Player(10), true )
call TriggerAddCondition( gg_trg_Elf_2, Condition( function Trig_Elf_2_Conditions ) )
call TriggerAddAction( gg_trg_Elf_2, function Trig_Elf_2_Actions )
endfunction
function Trig_Elf_3_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == gg_unit_nhem_0264 ) ) then
return false
endif
return true
endfunction
function Trig_Elf_3_Actions takes nothing returns nothing
call ClearTextMessagesBJ( GetForceOfPlayer(GetTriggerPlayer()) )
call UnitAddIndicatorBJ( GetTriggerUnit(), 0.00, 100, 0.00, 0 )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1404" )
endfunction
//===========================================================================
function InitTrig_Elf_3 takes nothing returns nothing
set gg_trg_Elf_3 = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_3, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_3, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_3, Player(2), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_3, Player(3), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_3, Player(4), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_3, Player(5), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_3, Player(6), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_3, Player(7), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_3, Player(8), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_3, Player(9), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_3, Player(10), true )
call TriggerAddCondition( gg_trg_Elf_3, Condition( function Trig_Elf_3_Conditions ) )
call TriggerAddAction( gg_trg_Elf_3, function Trig_Elf_3_Actions )
endfunction
function Trig_Elf_4_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == gg_unit_nhef_0256 ) ) then
return false
endif
return true
endfunction
function Trig_Elf_4_Actions takes nothing returns nothing
call ClearTextMessagesBJ( GetForceOfPlayer(GetTriggerPlayer()) )
call UnitAddIndicatorBJ( GetTriggerUnit(), 0.00, 100, 0.00, 0 )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1405" )
endfunction
//===========================================================================
function InitTrig_Elf_4 takes nothing returns nothing
set gg_trg_Elf_4 = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_4, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_4, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_4, Player(2), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_4, Player(3), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_4, Player(4), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_4, Player(5), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_4, Player(6), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_4, Player(7), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_4, Player(8), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_4, Player(9), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_4, Player(10), true )
call TriggerAddCondition( gg_trg_Elf_4, Condition( function Trig_Elf_4_Conditions ) )
call TriggerAddAction( gg_trg_Elf_4, function Trig_Elf_4_Actions )
endfunction
function Trig_Elf_5_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == gg_unit_nhem_0294 ) ) then
return false
endif
return true
endfunction
function Trig_Elf_5_Actions takes nothing returns nothing
call ClearTextMessagesBJ( GetForceOfPlayer(GetTriggerPlayer()) )
call UnitAddIndicatorBJ( GetTriggerUnit(), 0.00, 100, 0.00, 0 )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1406" )
endfunction
//===========================================================================
function InitTrig_Elf_5 takes nothing returns nothing
set gg_trg_Elf_5 = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_5, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_5, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_5, Player(2), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_5, Player(3), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_5, Player(4), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_5, Player(5), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_5, Player(6), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_5, Player(7), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_5, Player(8), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_5, Player(9), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_5, Player(10), true )
call TriggerAddCondition( gg_trg_Elf_5, Condition( function Trig_Elf_5_Conditions ) )
call TriggerAddAction( gg_trg_Elf_5, function Trig_Elf_5_Actions )
endfunction
function Trig_Elf_6_Ale_Quest_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == gg_unit_nhem_0293 ) ) then
return false
endif
return true
endfunction
function Trig_Elf_6_Ale_Quest_Func005002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), GetUnitLoc(gg_unit_nhem_0293), 1.00 )
endfunction
function Trig_Elf_6_Ale_Quest_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call DestroyEffectBJ( udg_QuestMarkSpecialEffect[2] )
call ClearTextMessagesBJ( GetForceOfPlayer(GetTriggerPlayer()) )
call UnitAddIndicatorBJ( GetTriggerUnit(), 0.00, 100, 0.00, 0 )
call ForForce( GetForceOfPlayer(GetTriggerPlayer()), function Trig_Elf_6_Ale_Quest_Func005002 )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1407" )
call TriggerSleepAction( 2.00 )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1408" )
call TriggerSleepAction( 5.00 )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1409" )
set udg_QuestAle = true
call PolledWait( 5.00 )
call ClearTextMessagesBJ( GetForceOfPlayer(GetTriggerPlayer()) )
call QuestSetEnabledBJ( true, udg_Quests[3] )
call FlashQuestDialogButtonBJ( )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1410" )
endfunction
//===========================================================================
function InitTrig_Elf_6_Ale_Quest takes nothing returns nothing
set gg_trg_Elf_6_Ale_Quest = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_6_Ale_Quest, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_6_Ale_Quest, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_6_Ale_Quest, Player(2), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_6_Ale_Quest, Player(3), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_6_Ale_Quest, Player(4), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_6_Ale_Quest, Player(5), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_6_Ale_Quest, Player(6), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_6_Ale_Quest, Player(7), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_6_Ale_Quest, Player(8), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_6_Ale_Quest, Player(9), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_6_Ale_Quest, Player(10), true )
call TriggerAddCondition( gg_trg_Elf_6_Ale_Quest, Condition( function Trig_Elf_6_Ale_Quest_Conditions ) )
call TriggerAddAction( gg_trg_Elf_6_Ale_Quest, function Trig_Elf_6_Ale_Quest_Actions )
endfunction
function Trig_Elf_6_Ale_Quest_Complete_Conditions takes nothing returns boolean
if ( not ( udg_QuestAle == true ) ) then
return false
endif
if ( not ( GetTriggerUnit() == gg_unit_nhem_0293 ) ) then
return false
endif
return true
endfunction
function Trig_Elf_6_Ale_Quest_Complete_Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetEnumUnit(), GetForLoopIndexA())) == 'I04E' ) ) then
return false
endif
return true
endfunction
function Trig_Elf_6_Ale_Quest_Complete_Func001A takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Elf_6_Ale_Quest_Complete_Func001Func001Func001C() ) then
set udg_HasQuestItem = true
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), GetForLoopIndexA()), GetEnumUnit() )
call RemoveItem( GetLastRemovedItem() )
else
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
function Trig_Elf_6_Ale_Quest_Complete_Func002001 takes nothing returns boolean
return ( udg_HasQuestItem == false )
endfunction
function Trig_Elf_6_Ale_Quest_Complete_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsInRangeOfLocAll(1000.00, GetUnitLoc(GetTriggerUnit())), function Trig_Elf_6_Ale_Quest_Complete_Func001A )
if ( Trig_Elf_6_Ale_Quest_Complete_Func002001() ) then
return
else
call DoNothing( )
endif
call ClearTextMessagesBJ( GetForceOfPlayer(GetTriggerPlayer()) )
call UnitAddIndicatorBJ( GetTriggerUnit(), 0.00, 100, 0.00, 0 )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1411" )
set udg_QuestCactuar = false
set udg_HasQuestItem = false
call PolledWait( 5.00 )
call ClearTextMessagesBJ( GetForceOfPlayer(GetTriggerPlayer()) )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1412" )
call QuestSetCompletedBJ( udg_Quests[3], true )
call DialogSetMessageBJ( udg_SelectItem, "TRIGSTR_1413" )
call DialogAddButtonBJ( udg_SelectItem, "TRIGSTR_1414" )
set udg_MateriaPick[1] = GetLastCreatedButtonBJ()
call DialogAddButtonBJ( udg_SelectItem, "TRIGSTR_1415" )
set udg_MateriaPick[2] = GetLastCreatedButtonBJ()
call DialogAddButtonBJ( udg_SelectItem, "TRIGSTR_1416" )
set udg_MateriaPick[3] = GetLastCreatedButtonBJ()
call DialogAddButtonBJ( udg_SelectItem, "TRIGSTR_1417" )
set udg_MateriaPick[4] = GetLastCreatedButtonBJ()
call DialogAddButtonBJ( udg_SelectItem, "TRIGSTR_1418" )
set udg_MateriaPick[5] = GetLastCreatedButtonBJ()
call DialogAddButtonBJ( udg_SelectItem, "TRIGSTR_1419" )
set udg_MateriaPick[6] = GetLastCreatedButtonBJ()
call DialogDisplayBJ( true, udg_SelectItem, GetTriggerPlayer() )
call DisableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Elf_6_Ale_Quest_Complete takes nothing returns nothing
set gg_trg_Elf_6_Ale_Quest_Complete = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_6_Ale_Quest_Complete, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_6_Ale_Quest_Complete, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_6_Ale_Quest_Complete, Player(2), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_6_Ale_Quest_Complete, Player(3), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_6_Ale_Quest_Complete, Player(4), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_6_Ale_Quest_Complete, Player(5), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_6_Ale_Quest_Complete, Player(6), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_6_Ale_Quest_Complete, Player(7), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_6_Ale_Quest_Complete, Player(8), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_6_Ale_Quest_Complete, Player(9), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_6_Ale_Quest_Complete, Player(10), true )
call TriggerAddCondition( gg_trg_Elf_6_Ale_Quest_Complete, Condition( function Trig_Elf_6_Ale_Quest_Complete_Conditions ) )
call TriggerAddAction( gg_trg_Elf_6_Ale_Quest_Complete, function Trig_Elf_6_Ale_Quest_Complete_Actions )
endfunction
function Trig_Elf_6_Ale_Quest_Reward_Dialog_Func002001 takes nothing returns boolean
return ( udg_MateriaPick[1] == GetClickedButtonBJ() )
endfunction
function Trig_Elf_6_Ale_Quest_Reward_Dialog_Func003001 takes nothing returns boolean
return ( udg_MateriaPick[2] == GetClickedButtonBJ() )
endfunction
function Trig_Elf_6_Ale_Quest_Reward_Dialog_Func004001 takes nothing returns boolean
return ( udg_MateriaPick[3] == GetClickedButtonBJ() )
endfunction
function Trig_Elf_6_Ale_Quest_Reward_Dialog_Func005001 takes nothing returns boolean
return ( udg_MateriaPick[4] == GetClickedButtonBJ() )
endfunction
function Trig_Elf_6_Ale_Quest_Reward_Dialog_Func006001 takes nothing returns boolean
return ( udg_MateriaPick[5] == GetClickedButtonBJ() )
endfunction
function Trig_Elf_6_Ale_Quest_Reward_Dialog_Func007001 takes nothing returns boolean
return ( udg_MateriaPick[6] == GetClickedButtonBJ() )
endfunction
function Trig_Elf_6_Ale_Quest_Reward_Dialog_Actions takes nothing returns nothing
if ( Trig_Elf_6_Ale_Quest_Reward_Dialog_Func002001() ) then
call CreateItemLoc( 'I02N', GetRectCenter(gg_rct_Region_049) )
else
call DoNothing( )
endif
if ( Trig_Elf_6_Ale_Quest_Reward_Dialog_Func003001() ) then
call CreateItemLoc( 'I04C', GetRectCenter(gg_rct_Region_049) )
else
call DoNothing( )
endif
if ( Trig_Elf_6_Ale_Quest_Reward_Dialog_Func004001() ) then
call CreateItemLoc( 'I00H', GetRectCenter(gg_rct_Region_049) )
else
call DoNothing( )
endif
if ( Trig_Elf_6_Ale_Quest_Reward_Dialog_Func005001() ) then
call CreateItemLoc( 'I00G', GetRectCenter(gg_rct_Region_049) )
else
call DoNothing( )
endif
if ( Trig_Elf_6_Ale_Quest_Reward_Dialog_Func006001() ) then
call CreateItemLoc( 'I02M', GetRectCenter(gg_rct_Region_049) )
else
call DoNothing( )
endif
if ( Trig_Elf_6_Ale_Quest_Reward_Dialog_Func007001() ) then
call CreateItemLoc( 'I02L', GetRectCenter(gg_rct_Region_049) )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Elf_6_Ale_Quest_Reward_Dialog takes nothing returns nothing
set gg_trg_Elf_6_Ale_Quest_Reward_Dialog = CreateTrigger( )
call TriggerRegisterDialogEventBJ( gg_trg_Elf_6_Ale_Quest_Reward_Dialog, udg_SelectItem )
call TriggerAddAction( gg_trg_Elf_6_Ale_Quest_Reward_Dialog, function Trig_Elf_6_Ale_Quest_Reward_Dialog_Actions )
endfunction
function Trig_Elf_7_Letter_Quest_Complete_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == gg_unit_nhem_0292 ) ) then
return false
endif
if ( not ( udg_QuestLetter == true ) ) then
return false
endif
return true
endfunction
function Trig_Elf_7_Letter_Quest_Complete_Func002Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetEnumUnit(), GetForLoopIndexA())) == 'I04D' ) ) then
return false
endif
return true
endfunction
function Trig_Elf_7_Letter_Quest_Complete_Func002A takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Elf_7_Letter_Quest_Complete_Func002Func001Func001C() ) then
set udg_HasQuestItem = true
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), GetForLoopIndexA()), GetEnumUnit() )
call RemoveItem( GetLastRemovedItem() )
else
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
function Trig_Elf_7_Letter_Quest_Complete_Func005002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), GetUnitLoc(gg_unit_nhem_0292), 1.00 )
endfunction
function Trig_Elf_7_Letter_Quest_Complete_Actions takes nothing returns nothing
call DestroyEffectBJ( udg_QuestMarkSpecialEffect[0] )
call ForGroupBJ( GetUnitsInRangeOfLocAll(1000.00, GetUnitLoc(GetTriggerUnit())), function Trig_Elf_7_Letter_Quest_Complete_Func002A )
call ClearTextMessagesBJ( GetForceOfPlayer(GetTriggerPlayer()) )
call UnitAddIndicatorBJ( GetTriggerUnit(), 0.00, 100, 0.00, 0 )
call ForForce( GetForceOfPlayer(GetTriggerPlayer()), function Trig_Elf_7_Letter_Quest_Complete_Func005002 )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1420" )
call CreateItemLoc( 'I00U', GetRectCenter(gg_rct_Region_049) )
set udg_QuestLetter = false
set udg_HasQuestItem = false
call PolledWait( 5.00 )
call ClearTextMessagesBJ( GetForceOfPlayer(GetTriggerPlayer()) )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1421" )
call QuestSetCompletedBJ( udg_Quests[2], true )
call DisableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Elf_7_Letter_Quest_Complete takes nothing returns nothing
set gg_trg_Elf_7_Letter_Quest_Complete = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_7_Letter_Quest_Complete, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_7_Letter_Quest_Complete, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_7_Letter_Quest_Complete, Player(2), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_7_Letter_Quest_Complete, Player(3), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_7_Letter_Quest_Complete, Player(4), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_7_Letter_Quest_Complete, Player(5), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_7_Letter_Quest_Complete, Player(6), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_7_Letter_Quest_Complete, Player(7), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_7_Letter_Quest_Complete, Player(8), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_7_Letter_Quest_Complete, Player(9), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_7_Letter_Quest_Complete, Player(10), true )
call TriggerAddCondition( gg_trg_Elf_7_Letter_Quest_Complete, Condition( function Trig_Elf_7_Letter_Quest_Complete_Conditions ) )
call TriggerAddAction( gg_trg_Elf_7_Letter_Quest_Complete, function Trig_Elf_7_Letter_Quest_Complete_Actions )
endfunction
function Trig_Elf_8_Cactuar_Quest_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == gg_unit_nhef_0289 ) ) then
return false
endif
return true
endfunction
function Trig_Elf_8_Cactuar_Quest_Func005002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), GetUnitLoc(gg_unit_nhef_0289), 1.00 )
endfunction
function Trig_Elf_8_Cactuar_Quest_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call DestroyEffectBJ( udg_QuestMarkSpecialEffect[3] )
call ClearTextMessagesBJ( GetForceOfPlayer(GetTriggerPlayer()) )
call UnitAddIndicatorBJ( GetTriggerUnit(), 0.00, 100, 0.00, 0 )
call ForForce( GetForceOfPlayer(GetTriggerPlayer()), function Trig_Elf_8_Cactuar_Quest_Func005002 )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1422" )
set udg_QuestCactuar = true
call PolledWait( 5.00 )
call ClearTextMessagesBJ( GetForceOfPlayer(GetTriggerPlayer()) )
call QuestSetEnabledBJ( true, udg_Quests[4] )
call FlashQuestDialogButtonBJ( )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1423" )
endfunction
//===========================================================================
function InitTrig_Elf_8_Cactuar_Quest takes nothing returns nothing
set gg_trg_Elf_8_Cactuar_Quest = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_8_Cactuar_Quest, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_8_Cactuar_Quest, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_8_Cactuar_Quest, Player(2), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_8_Cactuar_Quest, Player(3), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_8_Cactuar_Quest, Player(4), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_8_Cactuar_Quest, Player(5), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_8_Cactuar_Quest, Player(6), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_8_Cactuar_Quest, Player(7), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_8_Cactuar_Quest, Player(8), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_8_Cactuar_Quest, Player(9), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_8_Cactuar_Quest, Player(10), true )
call TriggerAddCondition( gg_trg_Elf_8_Cactuar_Quest, Condition( function Trig_Elf_8_Cactuar_Quest_Conditions ) )
call TriggerAddAction( gg_trg_Elf_8_Cactuar_Quest, function Trig_Elf_8_Cactuar_Quest_Actions )
endfunction
function Trig_Elf_8_Cactuar_Quest_Complete_Conditions takes nothing returns boolean
if ( not ( udg_QuestCactuar == true ) ) then
return false
endif
if ( not ( GetTriggerUnit() == gg_unit_nhef_0289 ) ) then
return false
endif
return true
endfunction
function Trig_Elf_8_Cactuar_Quest_Complete_Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetEnumUnit(), GetForLoopIndexA())) == 'I04F' ) ) then
return false
endif
return true
endfunction
function Trig_Elf_8_Cactuar_Quest_Complete_Func001A takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Elf_8_Cactuar_Quest_Complete_Func001Func001Func001C() ) then
set udg_HasQuestItem = true
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), GetForLoopIndexA()), GetEnumUnit() )
call RemoveItem( GetLastRemovedItem() )
else
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
function Trig_Elf_8_Cactuar_Quest_Complete_Func002001 takes nothing returns boolean
return ( udg_HasQuestItem == false )
endfunction
function Trig_Elf_8_Cactuar_Quest_Complete_Func020001 takes nothing returns boolean
return ( udg_DiceDrop == 1 )
endfunction
function Trig_Elf_8_Cactuar_Quest_Complete_Func021001 takes nothing returns boolean
return ( udg_DiceDrop == 2 )
endfunction
function Trig_Elf_8_Cactuar_Quest_Complete_Func022001 takes nothing returns boolean
return ( udg_DiceDrop == 3 )
endfunction
function Trig_Elf_8_Cactuar_Quest_Complete_Func023001 takes nothing returns boolean
return ( udg_DiceDrop == 4 )
endfunction
function Trig_Elf_8_Cactuar_Quest_Complete_Func024001 takes nothing returns boolean
return ( udg_DiceDrop == 5 )
endfunction
function Trig_Elf_8_Cactuar_Quest_Complete_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsInRangeOfLocAll(1000.00, GetUnitLoc(GetTriggerUnit())), function Trig_Elf_8_Cactuar_Quest_Complete_Func001A )
if ( Trig_Elf_8_Cactuar_Quest_Complete_Func002001() ) then
return
else
call DoNothing( )
endif
call ClearTextMessagesBJ( GetForceOfPlayer(GetTriggerPlayer()) )
call UnitAddIndicatorBJ( GetTriggerUnit(), 0.00, 100, 0.00, 0 )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1424" )
set udg_DiceDrop = GetRandomInt(1, 5)
if ( Trig_Elf_8_Cactuar_Quest_Complete_Func020001() ) then
call CreateItemLoc( 'I00O', GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Elf_8_Cactuar_Quest_Complete_Func021001() ) then
call CreateItemLoc( 'I02F', GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Elf_8_Cactuar_Quest_Complete_Func022001() ) then
call CreateItemLoc( 'I03X', GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Elf_8_Cactuar_Quest_Complete_Func023001() ) then
call CreateItemLoc( 'I03M', GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Elf_8_Cactuar_Quest_Complete_Func024001() ) then
call CreateItemLoc( 'I00J', GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
set udg_QuestCactuar = false
set udg_HasQuestItem = false
call PolledWait( 5.00 )
call ClearTextMessagesBJ( GetForceOfPlayer(GetTriggerPlayer()) )
call QuestSetCompletedBJ( udg_Quests[4], true )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1425" )
call DisableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Elf_8_Cactuar_Quest_Complete takes nothing returns nothing
set gg_trg_Elf_8_Cactuar_Quest_Complete = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_8_Cactuar_Quest_Complete, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_8_Cactuar_Quest_Complete, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_8_Cactuar_Quest_Complete, Player(2), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_8_Cactuar_Quest_Complete, Player(3), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_8_Cactuar_Quest_Complete, Player(4), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_8_Cactuar_Quest_Complete, Player(5), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_8_Cactuar_Quest_Complete, Player(6), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_8_Cactuar_Quest_Complete, Player(7), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_8_Cactuar_Quest_Complete, Player(8), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_8_Cactuar_Quest_Complete, Player(9), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Elf_8_Cactuar_Quest_Complete, Player(10), true )
call TriggerAddCondition( gg_trg_Elf_8_Cactuar_Quest_Complete, Condition( function Trig_Elf_8_Cactuar_Quest_Complete_Conditions ) )
call TriggerAddAction( gg_trg_Elf_8_Cactuar_Quest_Complete, function Trig_Elf_8_Cactuar_Quest_Complete_Actions )
endfunction
function Trig_Swamp_Critter_1_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == gg_unit_nska_0035 ) ) then
return false
endif
return true
endfunction
function Trig_Swamp_Critter_1_Actions takes nothing returns nothing
call ClearTextMessagesBJ( GetForceOfPlayer(GetTriggerPlayer()) )
call UnitAddIndicatorBJ( GetTriggerUnit(), 0.00, 100, 0.00, 0 )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1426" )
endfunction
//===========================================================================
function InitTrig_Swamp_Critter_1 takes nothing returns nothing
set gg_trg_Swamp_Critter_1 = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_1, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_1, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_1, Player(2), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_1, Player(3), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_1, Player(4), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_1, Player(5), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_1, Player(6), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_1, Player(7), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_1, Player(8), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_1, Player(9), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_1, Player(10), true )
call TriggerAddCondition( gg_trg_Swamp_Critter_1, Condition( function Trig_Swamp_Critter_1_Conditions ) )
call TriggerAddAction( gg_trg_Swamp_Critter_1, function Trig_Swamp_Critter_1_Actions )
endfunction
function Trig_Swamp_Critter_2_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == gg_unit_nska_0087 ) ) then
return false
endif
return true
endfunction
function Trig_Swamp_Critter_2_Actions takes nothing returns nothing
call ClearTextMessagesBJ( GetForceOfPlayer(GetTriggerPlayer()) )
call UnitAddIndicatorBJ( GetTriggerUnit(), 0.00, 100, 0.00, 0 )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1427" )
endfunction
//===========================================================================
function InitTrig_Swamp_Critter_2 takes nothing returns nothing
set gg_trg_Swamp_Critter_2 = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_2, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_2, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_2, Player(2), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_2, Player(3), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_2, Player(4), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_2, Player(5), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_2, Player(6), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_2, Player(7), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_2, Player(8), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_2, Player(9), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_2, Player(10), true )
call TriggerAddCondition( gg_trg_Swamp_Critter_2, Condition( function Trig_Swamp_Critter_2_Conditions ) )
call TriggerAddAction( gg_trg_Swamp_Critter_2, function Trig_Swamp_Critter_2_Actions )
endfunction
function Trig_Swamp_Critter_3_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == gg_unit_nvdw_0118 ) ) then
return false
endif
return true
endfunction
function Trig_Swamp_Critter_3_Actions takes nothing returns nothing
call ClearTextMessagesBJ( GetForceOfPlayer(GetTriggerPlayer()) )
call UnitAddIndicatorBJ( GetTriggerUnit(), 0.00, 100, 0.00, 0 )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1428" )
call PolledWait( 3.00 )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1429" )
endfunction
//===========================================================================
function InitTrig_Swamp_Critter_3 takes nothing returns nothing
set gg_trg_Swamp_Critter_3 = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_3, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_3, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_3, Player(2), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_3, Player(3), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_3, Player(4), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_3, Player(5), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_3, Player(6), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_3, Player(7), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_3, Player(8), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_3, Player(9), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_3, Player(10), true )
call TriggerAddCondition( gg_trg_Swamp_Critter_3, Condition( function Trig_Swamp_Critter_3_Conditions ) )
call TriggerAddAction( gg_trg_Swamp_Critter_3, function Trig_Swamp_Critter_3_Actions )
endfunction
function Trig_Swamp_Critter_4_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == gg_unit_nvdw_0117 ) ) then
return false
endif
return true
endfunction
function Trig_Swamp_Critter_4_Actions takes nothing returns nothing
call ClearTextMessagesBJ( GetForceOfPlayer(GetTriggerPlayer()) )
call UnitAddIndicatorBJ( GetTriggerUnit(), 0.00, 100, 0.00, 0 )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1430" )
endfunction
//===========================================================================
function InitTrig_Swamp_Critter_4 takes nothing returns nothing
set gg_trg_Swamp_Critter_4 = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_4, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_4, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_4, Player(2), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_4, Player(3), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_4, Player(4), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_4, Player(5), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_4, Player(6), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_4, Player(7), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_4, Player(8), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_4, Player(9), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_4, Player(10), true )
call TriggerAddCondition( gg_trg_Swamp_Critter_4, Condition( function Trig_Swamp_Critter_4_Conditions ) )
call TriggerAddAction( gg_trg_Swamp_Critter_4, function Trig_Swamp_Critter_4_Actions )
endfunction
function Trig_Swamp_Critter_5_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == gg_unit_nvdw_0091 ) ) then
return false
endif
return true
endfunction
function Trig_Swamp_Critter_5_Actions takes nothing returns nothing
call ClearTextMessagesBJ( GetForceOfPlayer(GetTriggerPlayer()) )
call UnitAddIndicatorBJ( GetTriggerUnit(), 0.00, 100, 0.00, 0 )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1431" )
endfunction
//===========================================================================
function InitTrig_Swamp_Critter_5 takes nothing returns nothing
set gg_trg_Swamp_Critter_5 = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_5, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_5, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_5, Player(2), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_5, Player(3), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_5, Player(4), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_5, Player(5), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_5, Player(6), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_5, Player(7), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_5, Player(8), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_5, Player(9), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_5, Player(10), true )
call TriggerAddCondition( gg_trg_Swamp_Critter_5, Condition( function Trig_Swamp_Critter_5_Conditions ) )
call TriggerAddAction( gg_trg_Swamp_Critter_5, function Trig_Swamp_Critter_5_Actions )
endfunction
function Trig_Swamp_Critter_6_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == gg_unit_nvdw_0120 ) ) then
return false
endif
return true
endfunction
function Trig_Swamp_Critter_6_Actions takes nothing returns nothing
call ClearTextMessagesBJ( GetForceOfPlayer(GetTriggerPlayer()) )
call UnitAddIndicatorBJ( GetTriggerUnit(), 0.00, 100, 0.00, 0 )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1432" )
endfunction
//===========================================================================
function InitTrig_Swamp_Critter_6 takes nothing returns nothing
set gg_trg_Swamp_Critter_6 = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_6, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_6, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_6, Player(2), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_6, Player(3), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_6, Player(4), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_6, Player(5), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_6, Player(6), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_6, Player(7), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_6, Player(8), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_6, Player(9), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_6, Player(10), true )
call TriggerAddCondition( gg_trg_Swamp_Critter_6, Condition( function Trig_Swamp_Critter_6_Conditions ) )
call TriggerAddAction( gg_trg_Swamp_Critter_6, function Trig_Swamp_Critter_6_Actions )
endfunction
function Trig_Swamp_Critter_7_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == gg_unit_nssn_0141 ) ) then
return false
endif
return true
endfunction
function Trig_Swamp_Critter_7_Actions takes nothing returns nothing
call ClearTextMessagesBJ( GetForceOfPlayer(GetTriggerPlayer()) )
call UnitAddIndicatorBJ( GetTriggerUnit(), 0.00, 100, 0.00, 0 )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1433" )
endfunction
//===========================================================================
function InitTrig_Swamp_Critter_7 takes nothing returns nothing
set gg_trg_Swamp_Critter_7 = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_7, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_7, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_7, Player(2), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_7, Player(3), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_7, Player(4), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_7, Player(5), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_7, Player(6), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_7, Player(7), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_7, Player(8), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_7, Player(9), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_7, Player(10), true )
call TriggerAddCondition( gg_trg_Swamp_Critter_7, Condition( function Trig_Swamp_Critter_7_Conditions ) )
call TriggerAddAction( gg_trg_Swamp_Critter_7, function Trig_Swamp_Critter_7_Actions )
endfunction
function Trig_Swamp_Critter_8_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == gg_unit_nvil_0143 ) ) then
return false
endif
return true
endfunction
function Trig_Swamp_Critter_8_Actions takes nothing returns nothing
call ClearTextMessagesBJ( GetForceOfPlayer(GetTriggerPlayer()) )
call UnitAddIndicatorBJ( GetTriggerUnit(), 0.00, 100, 0.00, 0 )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1434" )
endfunction
//===========================================================================
function InitTrig_Swamp_Critter_8 takes nothing returns nothing
set gg_trg_Swamp_Critter_8 = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_8, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_8, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_8, Player(2), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_8, Player(3), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_8, Player(4), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_8, Player(5), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_8, Player(6), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_8, Player(7), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_8, Player(8), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_8, Player(9), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_8, Player(10), true )
call TriggerAddCondition( gg_trg_Swamp_Critter_8, Condition( function Trig_Swamp_Critter_8_Conditions ) )
call TriggerAddAction( gg_trg_Swamp_Critter_8, function Trig_Swamp_Critter_8_Actions )
endfunction
function Trig_Swamp_Critter_9_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == gg_unit_n01A_0166 ) ) then
return false
endif
return true
endfunction
function Trig_Swamp_Critter_9_Actions takes nothing returns nothing
call ClearTextMessagesBJ( GetForceOfPlayer(GetTriggerPlayer()) )
call UnitAddIndicatorBJ( GetTriggerUnit(), 0.00, 100, 0.00, 0 )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1435" )
endfunction
//===========================================================================
function InitTrig_Swamp_Critter_9 takes nothing returns nothing
set gg_trg_Swamp_Critter_9 = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_9, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_9, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_9, Player(2), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_9, Player(3), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_9, Player(4), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_9, Player(5), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_9, Player(6), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_9, Player(7), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_9, Player(8), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_9, Player(9), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Swamp_Critter_9, Player(10), true )
call TriggerAddCondition( gg_trg_Swamp_Critter_9, Condition( function Trig_Swamp_Critter_9_Conditions ) )
call TriggerAddAction( gg_trg_Swamp_Critter_9, function Trig_Swamp_Critter_9_Actions )
endfunction
function Trig_Town_Defense_1_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == gg_unit_nska_0088 ) ) then
return false
endif
if ( not ( IsQuestCompleted(udg_Quests[5]) == false ) ) then
return false
endif
if ( not ( IsQuestFailed(udg_Quests[5]) == false ) ) then
return false
endif
if ( not ( IsTriggerQueuedBJ(gg_trg_Town_Defense_1_Copy) == false ) ) then
return false
endif
return true
endfunction
function Trig_Town_Defense_1_Func003002 takes nothing returns nothing
call SmartCameraPanBJ( GetEnumPlayer(), GetUnitLoc(GetTriggerUnit()), 1.00 )
endfunction
function Trig_Town_Defense_1_Actions takes nothing returns nothing
call ClearTextMessagesBJ( GetForceOfPlayer(GetTriggerPlayer()) )
call UnitAddIndicatorBJ( GetTriggerUnit(), 0.00, 100, 0.00, 0 )
call ForForce( GetPlayersAll(), function Trig_Town_Defense_1_Func003002 )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_1436" )
call PolledWait( 4.00 )
call DialogClearBJ( udg_SwampDefense )
call DialogSetMessageBJ( udg_SwampDefense, "TRIGSTR_1437" )
call DialogAddButtonBJ( udg_SwampDefense, "TRIGSTR_1438" )
set udg_YesButton = GetLastCreatedButtonBJ()
call DialogAddButtonBJ( udg_SwampDefense, "TRIGSTR_1439" )
set udg_NoButton = GetLastCreatedButtonBJ()
call DialogDisplayBJ( true, udg_SwampDefense, GetTriggerPlayer() )
call QuestSetEnabledBJ( true, udg_Quests[5] )
call FlashQuestDialogButtonBJ( )
call DisableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Town_Defense_1 takes nothing returns nothing
set gg_trg_Town_Defense_1 = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Town_Defense_1, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Town_Defense_1, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Town_Defense_1, Player(2), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Town_Defense_1, Player(3), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Town_Defense_1, Player(4), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Town_Defense_1, Player(5), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Town_Defense_1, Player(6), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Town_Defense_1, Player(7), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Town_Defense_1, Player(8), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Town_Defense_1, Player(9), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Town_Defense_1, Player(10), true )
call TriggerAddCondition( gg_trg_Town_Defense_1, Condition( function Trig_Town_Defense_1_Conditions ) )
call TriggerAddAction( gg_trg_Town_Defense_1, function Trig_Town_Defense_1_Actions )
endfunction
function Trig_Town_Defense_1_Copy_Conditions takes nothing returns boolean
if ( not ( GetClickedButtonBJ() == udg_YesButton ) ) then
return false
endif
return true
endfunction
function Trig_Town_Defense_1_Copy_Func005001001 takes nothing returns boolean
return ( GetPlayerSlotState(GetFilterPlayer()) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Town_Defense_1_Copy_Func005Func001001002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Town_Defense_1_Copy_Func005Func001Func001C takes nothing returns boolean
if ( not ( IsUnitEnemy(GetEnumUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Town_Defense_1_Copy_Func005Func001A takes nothing returns nothing
if ( Trig_Town_Defense_1_Copy_Func005Func001Func001C() ) then
call SetUnitPositionLoc( GetEnumUnit(), GetRectCenter(gg_rct_Swamp_Town_Cutscene) )
else
endif
endfunction
function Trig_Town_Defense_1_Copy_Func005A takes nothing returns nothing
call ForGroupBJ( GetUnitsOfPlayerMatching(GetEnumPlayer(), Condition(function Trig_Town_Defense_1_Copy_Func005Func001001002)), function Trig_Town_Defense_1_Copy_Func005Func001A )
endfunction
function Trig_Town_Defense_1_Copy_Func025C takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectOfPlayer(gg_rct_Swamp_Town, Player(11))) <= 0 ) ) then
return false
endif
return true
endfunction
function Trig_Town_Defense_1_Copy_Actions takes nothing returns nothing
call ClearTextMessagesBJ( GetForceOfPlayer(GetTriggerPlayer()) )
call UnitAddIndicatorBJ( GetTriggerUnit(), 0.00, 100, 0.00, 0 )
call ForForce( GetPlayersMatching(Condition(function Trig_Town_Defense_1_Copy_Func005001001)), function Trig_Town_Defense_1_Copy_Func005A )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_1440" )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_1441" )
call PolledWait( 4.00 )
call CreateNUnitsAtLoc( 6, 'n01E', Player(11), GetRectCenter(gg_rct_Region_055), bj_UNIT_FACING )
call GroupPointOrderLocBJ( GetLastCreatedGroup(), "attack", GetRectCenter(gg_rct_Ship_Route_1) )
call PolledWait( 5.00 )
call CreateNUnitsAtLoc( 6, 'n01E', Player(11), GetRectCenter(gg_rct_Region_055), bj_UNIT_FACING )
call GroupPointOrderLocBJ( GetLastCreatedGroup(), "attack", GetRectCenter(gg_rct_Ship_Route_1) )
call PolledWait( 5.00 )
call CreateNUnitsAtLoc( 6, 'n01E', Player(11), GetRectCenter(gg_rct_Region_055), bj_UNIT_FACING )
call GroupPointOrderLocBJ( GetLastCreatedGroup(), "attack", GetRectCenter(gg_rct_Ship_Route_1) )
call PolledWait( 5.00 )
call CreateNUnitsAtLoc( 6, 'n01E', Player(11), GetRectCenter(gg_rct_Region_055), bj_UNIT_FACING )
call GroupPointOrderLocBJ( GetLastCreatedGroup(), "attack", GetRectCenter(gg_rct_Ship_Route_1) )
call PolledWait( 5.00 )
call CreateNUnitsAtLoc( 5, 'n01E', Player(11), GetRectCenter(gg_rct_Region_055), bj_UNIT_FACING )
call GroupPointOrderLocBJ( GetLastCreatedGroup(), "attack", GetRectCenter(gg_rct_Ship_Route_1) )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1442" )
call PolledWait( 10.00 )
if ( Trig_Town_Defense_1_Copy_Func025C() ) then
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_1444" )
call CreateItemLoc( 'I043', GetUnitLoc(gg_unit_nska_0088) )
call QuestSetCompletedBJ( udg_Quests[5], true )
else
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_1443" )
call SetPlayerAllianceStateBJ( Player(11), Player(PLAYER_NEUTRAL_PASSIVE), bj_ALLIANCE_UNALLIED )
call QuestSetFailedBJ( udg_Quests[5], true )
endif
endfunction
//===========================================================================
function InitTrig_Town_Defense_1_Copy takes nothing returns nothing
set gg_trg_Town_Defense_1_Copy = CreateTrigger( )
call TriggerRegisterDialogEventBJ( gg_trg_Town_Defense_1_Copy, udg_SwampDefense )
call TriggerAddCondition( gg_trg_Town_Defense_1_Copy, Condition( function Trig_Town_Defense_1_Copy_Conditions ) )
call TriggerAddAction( gg_trg_Town_Defense_1_Copy, function Trig_Town_Defense_1_Copy_Actions )
endfunction
function Trig_Town_Defense_1_Copy_Copy_Conditions takes nothing returns boolean
if ( not ( GetClickedButtonBJ() == udg_NoButton ) ) then
return false
endif
return true
endfunction
function Trig_Town_Defense_1_Copy_Copy_Actions takes nothing returns nothing
call DoNothing( )
endfunction
//===========================================================================
function InitTrig_Town_Defense_1_Copy_Copy takes nothing returns nothing
set gg_trg_Town_Defense_1_Copy_Copy = CreateTrigger( )
call TriggerRegisterDialogEventBJ( gg_trg_Town_Defense_1_Copy_Copy, udg_SwampDefense )
call TriggerAddCondition( gg_trg_Town_Defense_1_Copy_Copy, Condition( function Trig_Town_Defense_1_Copy_Copy_Conditions ) )
call TriggerAddAction( gg_trg_Town_Defense_1_Copy_Copy, function Trig_Town_Defense_1_Copy_Copy_Actions )
endfunction
function Trig_Town_Defense_3_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == gg_unit_nban_0074 ) ) then
return false
endif
if ( not ( IsQuestCompleted(udg_Quests[7]) == false ) ) then
return false
endif
if ( not ( IsQuestFailed(udg_Quests[7]) == false ) ) then
return false
endif
if ( not ( IsTriggerQueuedBJ(gg_trg_Town_Defense_3_part_3) == false ) ) then
return false
endif
return true
endfunction
function Trig_Town_Defense_3_Func022002 takes nothing returns nothing
call SmartCameraPanBJ( GetEnumPlayer(), GetUnitLoc(GetTriggerUnit()), 1.00 )
endfunction
function Trig_Town_Defense_3_Actions takes nothing returns nothing
call EnableTrigger( gg_trg_Town_Defense_3_part_2 )
call EnableTrigger( gg_trg_Town_Defense_3_part_2_Copy )
call EnableTrigger( gg_trg_Town_Defense_3_part_3 )
call ClearTextMessagesBJ( GetForceOfPlayer(GetTriggerPlayer()) )
call UnitAddIndicatorBJ( GetTriggerUnit(), 0.00, 100, 0.00, 0 )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_1454" )
call ForForce( GetPlayersAll(), function Trig_Town_Defense_3_Func022002 )
call PolledWait( 4.00 )
call DialogClearBJ( udg_VakorDefense )
call DialogSetMessageBJ( udg_VakorDefense, "TRIGSTR_1455" )
call DialogAddButtonBJ( udg_VakorDefense, "TRIGSTR_1456" )
set udg_YesButton = GetLastCreatedButtonBJ()
call DialogAddButtonBJ( udg_VakorDefense, "TRIGSTR_1457" )
set udg_NoButton = GetLastCreatedButtonBJ()
call DialogDisplayBJ( true, udg_VakorDefense, GetTriggerPlayer() )
call QuestSetEnabledBJ( true, udg_Quests[7] )
call FlashQuestDialogButtonBJ( )
set udg_Quests[7] = GetLastCreatedQuestBJ()
call DisableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Town_Defense_3 takes nothing returns nothing
set gg_trg_Town_Defense_3 = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Town_Defense_3, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Town_Defense_3, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Town_Defense_3, Player(2), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Town_Defense_3, Player(3), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Town_Defense_3, Player(4), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Town_Defense_3, Player(5), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Town_Defense_3, Player(6), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Town_Defense_3, Player(7), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Town_Defense_3, Player(8), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Town_Defense_3, Player(9), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Town_Defense_3, Player(10), true )
call TriggerAddCondition( gg_trg_Town_Defense_3, Condition( function Trig_Town_Defense_3_Conditions ) )
call TriggerAddAction( gg_trg_Town_Defense_3, function Trig_Town_Defense_3_Actions )
endfunction
function Trig_Town_Defense_3_part_2_Conditions takes nothing returns boolean
if ( not ( GetClickedButtonBJ() == udg_YesButton ) ) then
return false
endif
return true
endfunction
function Trig_Town_Defense_3_part_2_Func004001001 takes nothing returns boolean
return ( GetPlayerSlotState(GetFilterPlayer()) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Town_Defense_3_part_2_Func004Func001001002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Town_Defense_3_part_2_Func004Func001Func001C takes nothing returns boolean
if ( not ( IsUnitEnemy(GetEnumUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Town_Defense_3_part_2_Func004Func001A takes nothing returns nothing
if ( Trig_Town_Defense_3_part_2_Func004Func001Func001C() ) then
call SetUnitPositionLoc( GetEnumUnit(), GetRectCenter(gg_rct_Ship_Route_4) )
else
endif
endfunction
function Trig_Town_Defense_3_part_2_Func004A takes nothing returns nothing
call ForGroupBJ( GetUnitsOfPlayerMatching(GetEnumPlayer(), Condition(function Trig_Town_Defense_3_part_2_Func004Func001001002)), function Trig_Town_Defense_3_part_2_Func004Func001A )
endfunction
function Trig_Town_Defense_3_part_2_Func022Func007A takes nothing returns nothing
call CameraSetupApplyForPlayer( true, gg_cam_Camera_040, GetEnumPlayer(), 0 )
call SetCameraTargetControllerNoZForPlayer( GetEnumPlayer(), GetLastCreatedUnit(), 0, 0, false )
endfunction
function Trig_Town_Defense_3_part_2_Func022Func010002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Town_Defense_3_part_2_Func022Func013002 takes nothing returns nothing
call ResetToGameCameraForPlayer( GetEnumPlayer(), 0 )
endfunction
function Trig_Town_Defense_3_part_2_Func022Func014002 takes nothing returns nothing
call SmartCameraPanBJ( GetEnumPlayer(), GetUnitLoc(gg_unit_nban_0074), 1.00 )
endfunction
function Trig_Town_Defense_3_part_2_Func022Func019002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Town_Defense_3_part_2_Func022C takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectOfPlayer(gg_rct_Vakor, Player(PLAYER_NEUTRAL_PASSIVE))) > 5 ) ) then
return false
endif
return true
endfunction
function Trig_Town_Defense_3_part_2_Func025Func001Func002C takes nothing returns boolean
if ( ( GetUnitTypeId(GetEnumUnit()) == 'u004' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetEnumUnit()) == 'u005' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetEnumUnit()) == 'u000' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetEnumUnit()) == 'u002' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetEnumUnit()) == 'u001' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetEnumUnit()) == 'u006' ) ) then
return true
endif
return false
endfunction
function Trig_Town_Defense_3_part_2_Func025Func001C takes nothing returns boolean
if ( not Trig_Town_Defense_3_part_2_Func025Func001Func002C() ) then
return false
endif
return true
endfunction
function Trig_Town_Defense_3_part_2_Func025A takes nothing returns nothing
if ( Trig_Town_Defense_3_part_2_Func025Func001C() ) then
call RemoveUnit( GetEnumUnit() )
else
endif
endfunction
function Trig_Town_Defense_3_part_2_Actions takes nothing returns nothing
call ClearTextMessagesBJ( GetForceOfPlayer(GetTriggerPlayer()) )
call ForForce( GetPlayersMatching(Condition(function Trig_Town_Defense_3_part_2_Func004001001)), function Trig_Town_Defense_3_part_2_Func004A )
call UnitAddIndicatorBJ( GetTriggerUnit(), 0.00, 100, 0.00, 0 )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_1458" )
call StartTimerBJ( udg_VakorTimer, false, 300.00 )
call CreateTimerDialogBJ( GetLastCreatedTimerBJ(), "TRIGSTR_1459" )
call CreateLeaderboardBJ( GetPlayersAll(), "TRIGSTR_1460" )
call LeaderboardAddItemBJ( Player(4), udg_VakorLeaderBoard, "TRIGSTR_1461", CountUnitsInGroup(GetUnitsInRectOfPlayer(gg_rct_Vakor, Player(PLAYER_NEUTRAL_PASSIVE))) )
call TriggerExecute( gg_trg_Town_Defense_3_part_3 )
set udg_VakorLeaderBoard = GetLastCreatedLeaderboard()
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_1462" )
call AddUnitToStockBJ( 'u004', gg_unit_n02G_0157, 1, 1 )
call AddUnitToStockBJ( 'u005', gg_unit_n02G_0157, 1, 1 )
call PolledWait( 30.00 )
set bj_forLoopBIndex = 1
set bj_forLoopBIndexEnd = 4
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
call CreateNUnitsAtLoc( 4, 'u002', Player(11), GetRectCenter(gg_rct_Evil_Ship_Spawn), bj_UNIT_FACING )
call GroupPointOrderLocBJ( GetLastCreatedGroup(), "attack", GetRectCenter(gg_rct_Vakor) )
call PolledWait( 15.00 )
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
set bj_forLoopBIndex = 1
set bj_forLoopBIndexEnd = 6
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
call CreateNUnitsAtLoc( 2, 'u002', Player(11), GetRectCenter(gg_rct_Evil_Ship_Spawn), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 2, 'u000', Player(11), GetRectCenter(gg_rct_Evil_Ship_Spawn), bj_UNIT_FACING )
call GroupPointOrderLocBJ( GetLastCreatedGroup(), "attack", GetRectCenter(gg_rct_Vakor) )
call PolledWait( 15.00 )
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
set bj_forLoopBIndex = 1
set bj_forLoopBIndexEnd = 4
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
call CreateNUnitsAtLoc( 4, 'u002', Player(11), GetRectCenter(gg_rct_Evil_Ship_Spawn), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 2, 'u000', Player(11), GetRectCenter(gg_rct_Evil_Ship_Spawn), bj_UNIT_FACING )
call GroupPointOrderLocBJ( GetLastCreatedGroup(), "attack", GetRectCenter(gg_rct_Vakor) )
call PolledWait( 15.00 )
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
set bj_forLoopBIndex = 1
set bj_forLoopBIndexEnd = 4
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
call PolledWait( 15.00 )
call GroupPointOrderLocBJ( GetLastCreatedGroup(), "attack", GetRectCenter(gg_rct_Vakor) )
call CreateNUnitsAtLoc( 5, 'u000', Player(11), GetRectCenter(gg_rct_Evil_Ship_Spawn), bj_UNIT_FACING )
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
call DestroyTimerDialogBJ( GetLastCreatedTimerDialogBJ() )
if ( Trig_Town_Defense_3_part_2_Func022C() ) then
call CinematicModeBJ( true, GetPlayersAll() )
call CreateNUnitsAtLoc( 1, 'u006', Player(3), GetRectCenter(gg_rct_Spawn_Battleship), bj_UNIT_FACING )
call ForForce( GetPlayersAll(), function Trig_Town_Defense_3_part_2_Func022Func007A )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "attack", GetUnitLoc(GroupPickRandomUnit(GetUnitsInRectOfPlayer(GetPlayableMapRect(), Player(11)))) )
call PolledWait( 15.00 )
call ForGroupBJ( GetUnitsOfPlayerAndTypeId(Player(3), 'u006'), function Trig_Town_Defense_3_part_2_Func022Func010002 )
call CinematicModeBJ( false, GetPlayersAll() )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_1464" )
call ForForce( GetPlayersAll(), function Trig_Town_Defense_3_part_2_Func022Func013002 )
call ForForce( GetPlayersAll(), function Trig_Town_Defense_3_part_2_Func022Func014002 )
call CreateItemLoc( 'I01N', GetUnitLoc(gg_unit_nban_0074) )
call CreateItemLoc( 'I01I', GetUnitLoc(gg_unit_nban_0074) )
call QuestSetCompletedBJ( udg_Quests[7], true )
call DestroyLeaderboardBJ( GetLastCreatedLeaderboard() )
call ForGroupBJ( GetUnitsOfPlayerAll(Player(11)), function Trig_Town_Defense_3_part_2_Func022Func019002 )
else
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_1463" )
call SetPlayerAllianceStateBJ( Player(11), Player(PLAYER_NEUTRAL_PASSIVE), bj_ALLIANCE_UNALLIED )
call QuestSetFailedBJ( udg_Quests[7], true )
call DestroyLeaderboardBJ( GetLastCreatedLeaderboard() )
endif
call RemoveUnitFromStockBJ( 'u004', gg_unit_n02G_0157 )
call RemoveUnitFromStockBJ( 'u005', gg_unit_n02G_0157 )
call ForGroupBJ( GetUnitsInRectAll(GetPlayableMapRect()), function Trig_Town_Defense_3_part_2_Func025A )
endfunction
//===========================================================================
function InitTrig_Town_Defense_3_part_2 takes nothing returns nothing
set gg_trg_Town_Defense_3_part_2 = CreateTrigger( )
call DisableTrigger( gg_trg_Town_Defense_3_part_2 )
call TriggerRegisterDialogEventBJ( gg_trg_Town_Defense_3_part_2, udg_VakorDefense )
call TriggerAddCondition( gg_trg_Town_Defense_3_part_2, Condition( function Trig_Town_Defense_3_part_2_Conditions ) )
call TriggerAddAction( gg_trg_Town_Defense_3_part_2, function Trig_Town_Defense_3_part_2_Actions )
endfunction
function Trig_Town_Defense_3_part_2_Copy_Conditions takes nothing returns boolean
if ( not ( GetClickedButtonBJ() == udg_NoButton ) ) then
return false
endif
return true
endfunction
function Trig_Town_Defense_3_part_2_Copy_Actions takes nothing returns nothing
call DoNothing( )
endfunction
//===========================================================================
function InitTrig_Town_Defense_3_part_2_Copy takes nothing returns nothing
set gg_trg_Town_Defense_3_part_2_Copy = CreateTrigger( )
call DisableTrigger( gg_trg_Town_Defense_3_part_2_Copy )
call TriggerRegisterDialogEventBJ( gg_trg_Town_Defense_3_part_2_Copy, udg_VakorDefense )
call TriggerAddCondition( gg_trg_Town_Defense_3_part_2_Copy, Condition( function Trig_Town_Defense_3_part_2_Copy_Conditions ) )
call TriggerAddAction( gg_trg_Town_Defense_3_part_2_Copy, function Trig_Town_Defense_3_part_2_Copy_Actions )
endfunction
function Trig_Town_Defense_3_part_3_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetDyingUnit()) == Player(PLAYER_NEUTRAL_PASSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Town_Defense_3_part_3_Actions takes nothing returns nothing
call LeaderboardRemovePlayerItemBJ( Player(4), udg_VakorLeaderBoard )
call LeaderboardAddItemBJ( Player(4), udg_VakorLeaderBoard, "TRIGSTR_1465", CountUnitsInGroup(GetUnitsInRectOfPlayer(gg_rct_Vakor, Player(PLAYER_NEUTRAL_PASSIVE))) )
endfunction
//===========================================================================
function InitTrig_Town_Defense_3_part_3 takes nothing returns nothing
set gg_trg_Town_Defense_3_part_3 = CreateTrigger( )
call DisableTrigger( gg_trg_Town_Defense_3_part_3 )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Town_Defense_3_part_3, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Town_Defense_3_part_3, Condition( function Trig_Town_Defense_3_part_3_Conditions ) )
call TriggerAddAction( gg_trg_Town_Defense_3_part_3, function Trig_Town_Defense_3_part_3_Actions )
endfunction
function Trig_Vakor_1_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == gg_unit_nvlw_0077 ) ) then
return false
endif
return true
endfunction
function Trig_Vakor_1_Actions takes nothing returns nothing
call ClearTextMessagesBJ( GetForceOfPlayer(GetTriggerPlayer()) )
call UnitAddIndicatorBJ( GetTriggerUnit(), 0.00, 100, 0.00, 0 )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1466" )
endfunction
//===========================================================================
function InitTrig_Vakor_1 takes nothing returns nothing
set gg_trg_Vakor_1 = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_1, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_1, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_1, Player(2), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_1, Player(3), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_1, Player(4), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_1, Player(5), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_1, Player(6), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_1, Player(7), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_1, Player(8), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_1, Player(9), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_1, Player(10), true )
call TriggerAddCondition( gg_trg_Vakor_1, Condition( function Trig_Vakor_1_Conditions ) )
call TriggerAddAction( gg_trg_Vakor_1, function Trig_Vakor_1_Actions )
endfunction
function Trig_Vakor_2_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == gg_unit_nvl2_0079 ) ) then
return false
endif
return true
endfunction
function Trig_Vakor_2_Actions takes nothing returns nothing
call ClearTextMessagesBJ( GetForceOfPlayer(GetTriggerPlayer()) )
call UnitAddIndicatorBJ( GetTriggerUnit(), 0.00, 100, 0.00, 0 )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1467" )
endfunction
//===========================================================================
function InitTrig_Vakor_2 takes nothing returns nothing
set gg_trg_Vakor_2 = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_2, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_2, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_2, Player(2), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_2, Player(3), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_2, Player(4), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_2, Player(5), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_2, Player(6), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_2, Player(7), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_2, Player(8), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_2, Player(9), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_2, Player(10), true )
call TriggerAddCondition( gg_trg_Vakor_2, Condition( function Trig_Vakor_2_Conditions ) )
call TriggerAddAction( gg_trg_Vakor_2, function Trig_Vakor_2_Actions )
endfunction
function Trig_Vakor_3_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == gg_unit_nass_0071 ) ) then
return false
endif
return true
endfunction
function Trig_Vakor_3_Actions takes nothing returns nothing
call ClearTextMessagesBJ( GetForceOfPlayer(GetTriggerPlayer()) )
call UnitAddIndicatorBJ( GetTriggerUnit(), 0.00, 100, 0.00, 0 )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1468" )
endfunction
//===========================================================================
function InitTrig_Vakor_3 takes nothing returns nothing
set gg_trg_Vakor_3 = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_3, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_3, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_3, Player(2), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_3, Player(3), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_3, Player(4), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_3, Player(5), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_3, Player(6), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_3, Player(7), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_3, Player(8), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_3, Player(9), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_3, Player(10), true )
call TriggerAddCondition( gg_trg_Vakor_3, Condition( function Trig_Vakor_3_Conditions ) )
call TriggerAddAction( gg_trg_Vakor_3, function Trig_Vakor_3_Actions )
endfunction
function Trig_Vakor_4_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == gg_unit_nvil_0081 ) ) then
return false
endif
return true
endfunction
function Trig_Vakor_4_Actions takes nothing returns nothing
call ClearTextMessagesBJ( GetForceOfPlayer(GetTriggerPlayer()) )
call UnitAddIndicatorBJ( GetTriggerUnit(), 0.00, 100, 0.00, 0 )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1469" )
endfunction
//===========================================================================
function InitTrig_Vakor_4 takes nothing returns nothing
set gg_trg_Vakor_4 = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_4, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_4, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_4, Player(2), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_4, Player(3), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_4, Player(4), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_4, Player(5), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_4, Player(6), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_4, Player(7), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_4, Player(8), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_4, Player(9), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_4, Player(10), true )
call TriggerAddCondition( gg_trg_Vakor_4, Condition( function Trig_Vakor_4_Conditions ) )
call TriggerAddAction( gg_trg_Vakor_4, function Trig_Vakor_4_Actions )
endfunction
function Trig_Vakor_4_Copy_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == gg_unit_nban_0073 ) ) then
return false
endif
return true
endfunction
function Trig_Vakor_4_Copy_Actions takes nothing returns nothing
call ClearTextMessagesBJ( GetForceOfPlayer(GetTriggerPlayer()) )
call UnitAddIndicatorBJ( GetTriggerUnit(), 0.00, 100, 0.00, 0 )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_088" )
endfunction
//===========================================================================
function InitTrig_Vakor_4_Copy takes nothing returns nothing
set gg_trg_Vakor_4_Copy = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_4_Copy, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_4_Copy, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_4_Copy, Player(2), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_4_Copy, Player(3), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_4_Copy, Player(4), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_4_Copy, Player(5), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_4_Copy, Player(6), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_4_Copy, Player(7), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_4_Copy, Player(8), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_4_Copy, Player(9), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Vakor_4_Copy, Player(10), true )
call TriggerAddCondition( gg_trg_Vakor_4_Copy, Condition( function Trig_Vakor_4_Copy_Conditions ) )
call TriggerAddAction( gg_trg_Vakor_4_Copy, function Trig_Vakor_4_Copy_Actions )
endfunction
function Trig_Ultima_Weapon_Copy_Conditions takes nothing returns boolean
if ( not ( IsUnitEnemy(GetEnteringUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Ultima_Weapon_Copy_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call CreateNUnitsAtLoc( 1, 'n01R', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_Create_Weapon), 270.00 )
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit())), "TRIGSTR_1589" )
call PlayMusicBJ( gg_snd_One_Winged_Angel )
endfunction
//===========================================================================
function InitTrig_Ultima_Weapon_Copy takes nothing returns nothing
set gg_trg_Ultima_Weapon_Copy = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Ultima_Weapon_Copy, gg_rct_Ultima_Weapon )
call TriggerAddCondition( gg_trg_Ultima_Weapon_Copy, Condition( function Trig_Ultima_Weapon_Copy_Conditions ) )
call TriggerAddAction( gg_trg_Ultima_Weapon_Copy, function Trig_Ultima_Weapon_Copy_Actions )
endfunction
function Trig_Giant_Lizard_Copy_Conditions takes nothing returns boolean
if ( not ( IsUnitEnemy(GetEnteringUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Giant_Lizard_Copy_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit())), "TRIGSTR_1590" )
call PlayMusicBJ( gg_snd_One_Winged_Angel )
endfunction
//===========================================================================
function InitTrig_Giant_Lizard_Copy takes nothing returns nothing
set gg_trg_Giant_Lizard_Copy = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Giant_Lizard_Copy, gg_rct_Giant_Lizard )
call TriggerAddCondition( gg_trg_Giant_Lizard_Copy, Condition( function Trig_Giant_Lizard_Copy_Conditions ) )
call TriggerAddAction( gg_trg_Giant_Lizard_Copy, function Trig_Giant_Lizard_Copy_Actions )
endfunction
function Trig_Ocean_Serpent_Copy_Conditions takes nothing returns boolean
if ( not ( IsUnitEnemy(GetEnteringUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Ocean_Serpent_Copy_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit())), "TRIGSTR_540" )
call PlayMusicBJ( gg_snd_One_Winged_Angel )
endfunction
//===========================================================================
function InitTrig_Ocean_Serpent_Copy takes nothing returns nothing
set gg_trg_Ocean_Serpent_Copy = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Ocean_Serpent_Copy, gg_rct_Ocean_Serpent )
call TriggerAddCondition( gg_trg_Ocean_Serpent_Copy, Condition( function Trig_Ocean_Serpent_Copy_Conditions ) )
call TriggerAddAction( gg_trg_Ocean_Serpent_Copy, function Trig_Ocean_Serpent_Copy_Actions )
endfunction
function Trig_Adamontoise_Copy_Conditions takes nothing returns boolean
if ( not ( IsUnitEnemy(GetEnteringUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Adamontoise_Copy_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit())), "TRIGSTR_539" )
call PlayMusicBJ( gg_snd_One_Winged_Angel )
endfunction
//===========================================================================
function InitTrig_Adamontoise_Copy takes nothing returns nothing
set gg_trg_Adamontoise_Copy = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Adamontoise_Copy, gg_rct_Adamontoise )
call TriggerAddCondition( gg_trg_Adamontoise_Copy, Condition( function Trig_Adamontoise_Copy_Conditions ) )
call TriggerAddAction( gg_trg_Adamontoise_Copy, function Trig_Adamontoise_Copy_Actions )
endfunction
function Trig_Forest_Dragon_Copy_Conditions takes nothing returns boolean
if ( not ( IsUnitEnemy(GetEnteringUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Forest_Dragon_Copy_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit())), "TRIGSTR_1593" )
call PlayMusicBJ( gg_snd_One_Winged_Angel )
endfunction
//===========================================================================
function InitTrig_Forest_Dragon_Copy takes nothing returns nothing
set gg_trg_Forest_Dragon_Copy = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Forest_Dragon_Copy, gg_rct_Dark_Forest )
call TriggerAddCondition( gg_trg_Forest_Dragon_Copy, Condition( function Trig_Forest_Dragon_Copy_Conditions ) )
call TriggerAddAction( gg_trg_Forest_Dragon_Copy, function Trig_Forest_Dragon_Copy_Actions )
endfunction
function Trig_Enter_the_City_Copy_Conditions takes nothing returns boolean
if ( not ( IsUnitEnemy(GetEnteringUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Enter_the_City_Copy_Func001A takes nothing returns nothing
call CreateFogModifierRectBJ( true, GetEnumPlayer(), FOG_OF_WAR_VISIBLE, gg_rct_Elf_town_life )
endfunction
function Trig_Enter_the_City_Copy_Actions takes nothing returns nothing
call ForForce( GetPlayersAll(), function Trig_Enter_the_City_Copy_Func001A )
call DisableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Enter_the_City_Copy takes nothing returns nothing
set gg_trg_Enter_the_City_Copy = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Enter_the_City_Copy, gg_rct_Enter_Elf_City )
call TriggerAddCondition( gg_trg_Enter_the_City_Copy, Condition( function Trig_Enter_the_City_Copy_Conditions ) )
call TriggerAddAction( gg_trg_Enter_the_City_Copy, function Trig_Enter_the_City_Copy_Actions )
endfunction
function Trig_First_Shop_Cutscene_Copy_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == gg_unit_nhef_0122 ) ) then
return false
endif
return true
endfunction
function Trig_First_Shop_Cutscene_Copy_Actions takes nothing returns nothing
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1594" )
call TriggerSleepAction( 3.00 )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1595" )
call TriggerSleepAction( 3.00 )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1596" )
call UnitAddIndicatorBJ( GetTriggerUnit(), 0.00, 100, 0.00, 0 )
endfunction
//===========================================================================
function InitTrig_First_Shop_Cutscene_Copy takes nothing returns nothing
set gg_trg_First_Shop_Cutscene_Copy = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_First_Shop_Cutscene_Copy, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_First_Shop_Cutscene_Copy, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_First_Shop_Cutscene_Copy, Player(2), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_First_Shop_Cutscene_Copy, Player(3), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_First_Shop_Cutscene_Copy, Player(4), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_First_Shop_Cutscene_Copy, Player(5), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_First_Shop_Cutscene_Copy, Player(6), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_First_Shop_Cutscene_Copy, Player(7), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_First_Shop_Cutscene_Copy, Player(8), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_First_Shop_Cutscene_Copy, Player(9), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_First_Shop_Cutscene_Copy, Player(10), true )
call TriggerAddCondition( gg_trg_First_Shop_Cutscene_Copy, Condition( function Trig_First_Shop_Cutscene_Copy_Conditions ) )
call TriggerAddAction( gg_trg_First_Shop_Cutscene_Copy, function Trig_First_Shop_Cutscene_Copy_Actions )
endfunction
function Trig_Omega_Weapon_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'hkni' ) ) then
return false
endif
return true
endfunction
function Trig_Omega_Weapon_Func001Func001C takes nothing returns boolean
if ( not ( GetHeroLevel(GetEnumUnit()) > 150 ) ) then
return false
endif
return true
endfunction
function Trig_Omega_Weapon_Func001A takes nothing returns nothing
if ( Trig_Omega_Weapon_Func001Func001C() ) then
call SetHeroLevelBJ( GetEnumUnit(), 275, false )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_1097" )
else
endif
endfunction
function Trig_Omega_Weapon_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsInRectAll(gg_rct_Region_088), function Trig_Omega_Weapon_Func001A )
endfunction
//===========================================================================
function InitTrig_Omega_Weapon takes nothing returns nothing
set gg_trg_Omega_Weapon = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Omega_Weapon, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Omega_Weapon, Condition( function Trig_Omega_Weapon_Conditions ) )
call TriggerAddAction( gg_trg_Omega_Weapon, function Trig_Omega_Weapon_Actions )
endfunction
function Trig_Ultima_Drop_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'n01R' ) ) then
return false
endif
return true
endfunction
function Trig_Ultima_Drop_Func002001 takes nothing returns boolean
return ( udg_DiceDrop == 1 )
endfunction
function Trig_Ultima_Drop_Func003001 takes nothing returns boolean
return ( udg_DiceDrop == 2 )
endfunction
function Trig_Ultima_Drop_Func004001 takes nothing returns boolean
return ( udg_DiceDrop == 3 )
endfunction
function Trig_Ultima_Drop_Func005001 takes nothing returns boolean
return ( udg_DiceDrop == 4 )
endfunction
function Trig_Ultima_Drop_Func006001 takes nothing returns boolean
return ( udg_DiceDrop == 5 )
endfunction
function Trig_Ultima_Drop_Func007001 takes nothing returns boolean
return ( udg_DiceDrop == 6 )
endfunction
function Trig_Ultima_Drop_Func008001 takes nothing returns boolean
return ( udg_DiceDrop == 7 )
endfunction
function Trig_Ultima_Drop_Func009001 takes nothing returns boolean
return ( udg_DiceDrop == 8 )
endfunction
function Trig_Ultima_Drop_Func010001 takes nothing returns boolean
return ( udg_DiceDrop == 9 )
endfunction
function Trig_Ultima_Drop_Func011001 takes nothing returns boolean
return ( udg_DiceDrop == 10 )
endfunction
function Trig_Ultima_Drop_Actions takes nothing returns nothing
set udg_DiceDrop = GetRandomInt(1, 10)
if ( Trig_Ultima_Drop_Func002001() ) then
call CreateItemLoc( 'I025', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Ultima_Drop_Func003001() ) then
call CreateItemLoc( 'I023', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Ultima_Drop_Func004001() ) then
call CreateItemLoc( 'I00G', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Ultima_Drop_Func005001() ) then
call CreateItemLoc( 'I02M', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Ultima_Drop_Func006001() ) then
call CreateItemLoc( 'I02H', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Ultima_Drop_Func007001() ) then
call CreateItemLoc( 'I04B', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Ultima_Drop_Func008001() ) then
call CreateItemLoc( 'I03S', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Ultima_Drop_Func009001() ) then
call CreateItemLoc( 'I02L', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Ultima_Drop_Func010001() ) then
call CreateItemLoc( 'I02N', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Ultima_Drop_Func011001() ) then
call CreateItemLoc( 'I01I', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Ultima_Drop takes nothing returns nothing
set gg_trg_Ultima_Drop = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Ultima_Drop, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Ultima_Drop, Condition( function Trig_Ultima_Drop_Conditions ) )
call TriggerAddAction( gg_trg_Ultima_Drop, function Trig_Ultima_Drop_Actions )
endfunction
function Trig_Goblin_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'n00Z' ) ) then
return false
endif
return true
endfunction
function Trig_Goblin_Func002001 takes nothing returns boolean
return ( udg_DiceDrop == 1 )
endfunction
function Trig_Goblin_Func003001 takes nothing returns boolean
return ( udg_DiceDrop == 2 )
endfunction
function Trig_Goblin_Func004001 takes nothing returns boolean
return ( udg_DiceDrop == 3 )
endfunction
function Trig_Goblin_Func005001 takes nothing returns boolean
return ( udg_DiceDrop > 40 )
endfunction
function Trig_Goblin_Actions takes nothing returns nothing
set udg_DiceDrop = GetRandomInt(1, 50)
if ( Trig_Goblin_Func002001() ) then
call CreateItemLoc( 'I01K', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Goblin_Func003001() ) then
call CreateItemLoc( 'I01M', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Goblin_Func004001() ) then
call CreateItemLoc( 'I00K', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Goblin_Func005001() ) then
call CreateItemLoc( 'I05K', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Goblin takes nothing returns nothing
set gg_trg_Goblin = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Goblin, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Goblin, Condition( function Trig_Goblin_Conditions ) )
call TriggerAddAction( gg_trg_Goblin, function Trig_Goblin_Actions )
endfunction
function Trig_All_sets_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetDyingUnit()) == Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_All_sets_Func002001 takes nothing returns boolean
return ( udg_DiceDrop == 1 )
endfunction
function Trig_All_sets_Func003001 takes nothing returns boolean
return ( udg_DiceDrop == 2 )
endfunction
function Trig_All_sets_Func004001 takes nothing returns boolean
return ( udg_DiceDrop == 3 )
endfunction
function Trig_All_sets_Func005001 takes nothing returns boolean
return ( udg_DiceDrop == 4 )
endfunction
function Trig_All_sets_Func006001 takes nothing returns boolean
return ( udg_DiceDrop == 5 )
endfunction
function Trig_All_sets_Func007001 takes nothing returns boolean
return ( udg_DiceDrop == 6 )
endfunction
function Trig_All_sets_Func008001 takes nothing returns boolean
return ( udg_DiceDrop == 7 )
endfunction
function Trig_All_sets_Func009001 takes nothing returns boolean
return ( udg_DiceDrop == 8 )
endfunction
function Trig_All_sets_Actions takes nothing returns nothing
set udg_DiceDrop = GetRandomInt(1, 1000)
if ( Trig_All_sets_Func002001() ) then
call CreateItemLoc( 'I062', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_All_sets_Func003001() ) then
call CreateItemLoc( 'I05F', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_All_sets_Func004001() ) then
call CreateItemLoc( 'I05I', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_All_sets_Func005001() ) then
call CreateItemLoc( 'I05J', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_All_sets_Func006001() ) then
call CreateItemLoc( 'I05L', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_All_sets_Func007001() ) then
call CreateItemLoc( 'I05C', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_All_sets_Func008001() ) then
call CreateItemLoc( 'I05A', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_All_sets_Func009001() ) then
call CreateItemLoc( 'I05D', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_All_sets takes nothing returns nothing
set gg_trg_All_sets = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_All_sets, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_All_sets, Condition( function Trig_All_sets_Conditions ) )
call TriggerAddAction( gg_trg_All_sets, function Trig_All_sets_Actions )
endfunction
function Trig_Antlion_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'n012' ) ) then
return false
endif
return true
endfunction
function Trig_Antlion_Func002001 takes nothing returns boolean
return ( udg_DiceDrop == 1 )
endfunction
function Trig_Antlion_Func003001 takes nothing returns boolean
return ( udg_DiceDrop == 2 )
endfunction
function Trig_Antlion_Func004001 takes nothing returns boolean
return ( udg_DiceDrop == 3 )
endfunction
function Trig_Antlion_Func005001 takes nothing returns boolean
return ( udg_DiceDrop > 40 )
endfunction
function Trig_Antlion_Actions takes nothing returns nothing
set udg_DiceDrop = GetRandomInt(1, 50)
if ( Trig_Antlion_Func002001() ) then
call CreateItemLoc( 'I02O', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Antlion_Func003001() ) then
call CreateItemLoc( 'I00Z', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Antlion_Func004001() ) then
call CreateItemLoc( 'I02N', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Antlion_Func005001() ) then
call CreateItemLoc( 'I05K', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Antlion takes nothing returns nothing
set gg_trg_Antlion = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Antlion, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Antlion, Condition( function Trig_Antlion_Conditions ) )
call TriggerAddAction( gg_trg_Antlion, function Trig_Antlion_Actions )
endfunction
function Trig_Cactuar_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'n01D' ) ) then
return false
endif
return true
endfunction
function Trig_Cactuar_Func002001 takes nothing returns boolean
return ( udg_DiceDrop == 1 )
endfunction
function Trig_Cactuar_Func003001 takes nothing returns boolean
return ( udg_DiceDrop == 2 )
endfunction
function Trig_Cactuar_Func004001 takes nothing returns boolean
return ( udg_DiceDrop == 3 )
endfunction
function Trig_Cactuar_Func005001 takes nothing returns boolean
return ( udg_DiceDrop == 4 )
endfunction
function Trig_Cactuar_Actions takes nothing returns nothing
set udg_DiceDrop = GetRandomInt(1, 30)
if ( Trig_Cactuar_Func002001() ) then
call CreateItemLoc( 'I02S', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Cactuar_Func003001() ) then
call CreateItemLoc( 'I02M', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Cactuar_Func004001() ) then
call CreateItemLoc( 'I00H', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Cactuar_Func005001() ) then
call CreateItemLoc( 'I04F', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Cactuar takes nothing returns nothing
set gg_trg_Cactuar = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Cactuar, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Cactuar, Condition( function Trig_Cactuar_Conditions ) )
call TriggerAddAction( gg_trg_Cactuar, function Trig_Cactuar_Actions )
endfunction
function Trig_Ghoul_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'n01E' ) ) then
return false
endif
return true
endfunction
function Trig_Ghoul_Func002001 takes nothing returns boolean
return ( udg_DiceDrop == 1 )
endfunction
function Trig_Ghoul_Func003001 takes nothing returns boolean
return ( udg_DiceDrop == 2 )
endfunction
function Trig_Ghoul_Func004001 takes nothing returns boolean
return ( udg_DiceDrop == 3 )
endfunction
function Trig_Ghoul_Func005001 takes nothing returns boolean
return ( udg_DiceDrop > 40 )
endfunction
function Trig_Ghoul_Actions takes nothing returns nothing
set udg_DiceDrop = GetRandomInt(1, 50)
if ( Trig_Ghoul_Func002001() ) then
call CreateItemLoc( 'I03S', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Ghoul_Func003001() ) then
call CreateItemLoc( 'I00G', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Ghoul_Func004001() ) then
call CreateItemLoc( 'I02L', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Ghoul_Func005001() ) then
call CreateItemLoc( 'I05K', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Ghoul takes nothing returns nothing
set gg_trg_Ghoul = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Ghoul, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Ghoul, Condition( function Trig_Ghoul_Conditions ) )
call TriggerAddAction( gg_trg_Ghoul, function Trig_Ghoul_Actions )
endfunction
function Trig_Ghost_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'n018' ) ) then
return false
endif
return true
endfunction
function Trig_Ghost_Func002001 takes nothing returns boolean
return ( udg_DiceDrop == 1 )
endfunction
function Trig_Ghost_Func003001 takes nothing returns boolean
return ( udg_DiceDrop == 2 )
endfunction
function Trig_Ghost_Func004001 takes nothing returns boolean
return ( udg_DiceDrop == 3 )
endfunction
function Trig_Ghost_Actions takes nothing returns nothing
set udg_DiceDrop = GetRandomInt(1, 20)
if ( Trig_Ghost_Func002001() ) then
call CreateItemLoc( 'I02N', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Ghost_Func003001() ) then
call CreateItemLoc( 'I00G', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Ghost_Func004001() ) then
call CreateItemLoc( 'I02L', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Ghost takes nothing returns nothing
set gg_trg_Ghost = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Ghost, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Ghost, Condition( function Trig_Ghost_Conditions ) )
call TriggerAddAction( gg_trg_Ghost, function Trig_Ghost_Actions )
endfunction
function Trig_Adamontoise_drop_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'n00R' ) ) then
return false
endif
return true
endfunction
function Trig_Adamontoise_drop_Func002001 takes nothing returns boolean
return ( udg_DiceDrop == 1 )
endfunction
function Trig_Adamontoise_drop_Func003001 takes nothing returns boolean
return ( udg_DiceDrop == 2 )
endfunction
function Trig_Adamontoise_drop_Func004001 takes nothing returns boolean
return ( udg_DiceDrop == 3 )
endfunction
function Trig_Adamontoise_drop_Func005001 takes nothing returns boolean
return ( udg_DiceDrop == 4 )
endfunction
function Trig_Adamontoise_drop_Func006001 takes nothing returns boolean
return ( udg_DiceDrop == 5 )
endfunction
function Trig_Adamontoise_drop_Func007001 takes nothing returns boolean
return ( udg_DiceDrop == 6 )
endfunction
function Trig_Adamontoise_drop_Actions takes nothing returns nothing
set udg_DiceDrop = GetRandomInt(1, 50)
if ( Trig_Adamontoise_drop_Func002001() ) then
call CreateItemLoc( 'I02N', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Adamontoise_drop_Func003001() ) then
call CreateItemLoc( 'I00G', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Adamontoise_drop_Func004001() ) then
call CreateItemLoc( 'I02L', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Adamontoise_drop_Func005001() ) then
call CreateItemLoc( 'I00H', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Adamontoise_drop_Func006001() ) then
call CreateItemLoc( 'I00J', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Adamontoise_drop_Func007001() ) then
call CreateItemLoc( 'I02H', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Adamontoise_drop takes nothing returns nothing
set gg_trg_Adamontoise_drop = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Adamontoise_drop, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Adamontoise_drop, Condition( function Trig_Adamontoise_drop_Conditions ) )
call TriggerAddAction( gg_trg_Adamontoise_drop, function Trig_Adamontoise_drop_Actions )
endfunction
function Trig_Tremor_Ram_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'n023' ) ) then
return false
endif
return true
endfunction
function Trig_Tremor_Ram_Func002001 takes nothing returns boolean
return ( udg_DiceDrop == 1 )
endfunction
function Trig_Tremor_Ram_Func003001 takes nothing returns boolean
return ( udg_DiceDrop == 2 )
endfunction
function Trig_Tremor_Ram_Func004001 takes nothing returns boolean
return ( udg_DiceDrop == 3 )
endfunction
function Trig_Tremor_Ram_Func005001 takes nothing returns boolean
return ( udg_DiceDrop == 4 )
endfunction
function Trig_Tremor_Ram_Func006001 takes nothing returns boolean
return ( udg_DiceDrop == 5 )
endfunction
function Trig_Tremor_Ram_Func007001 takes nothing returns boolean
return ( udg_DiceDrop == 6 )
endfunction
function Trig_Tremor_Ram_Actions takes nothing returns nothing
set udg_DiceDrop = GetRandomInt(1, 50)
if ( Trig_Tremor_Ram_Func002001() ) then
call CreateItemLoc( 'I02N', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Tremor_Ram_Func003001() ) then
call CreateItemLoc( 'I00G', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Tremor_Ram_Func004001() ) then
call CreateItemLoc( 'I02L', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Tremor_Ram_Func005001() ) then
call CreateItemLoc( 'I00H', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Tremor_Ram_Func006001() ) then
call CreateItemLoc( 'I02F', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Tremor_Ram_Func007001() ) then
call CreateItemLoc( 'I00O', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Tremor_Ram takes nothing returns nothing
set gg_trg_Tremor_Ram = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Tremor_Ram, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Tremor_Ram, Condition( function Trig_Tremor_Ram_Conditions ) )
call TriggerAddAction( gg_trg_Tremor_Ram, function Trig_Tremor_Ram_Actions )
endfunction
function Trig_Demon_Commander_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'n02E' ) ) then
return false
endif
return true
endfunction
function Trig_Demon_Commander_Func002001 takes nothing returns boolean
return ( udg_DiceDrop == 1 )
endfunction
function Trig_Demon_Commander_Func003001 takes nothing returns boolean
return ( udg_DiceDrop == 2 )
endfunction
function Trig_Demon_Commander_Func004001 takes nothing returns boolean
return ( udg_DiceDrop == 3 )
endfunction
function Trig_Demon_Commander_Func005001 takes nothing returns boolean
return ( udg_DiceDrop == 4 )
endfunction
function Trig_Demon_Commander_Func006001 takes nothing returns boolean
return ( udg_DiceDrop == 5 )
endfunction
function Trig_Demon_Commander_Func007001 takes nothing returns boolean
return ( udg_DiceDrop == 6 )
endfunction
function Trig_Demon_Commander_Func008001 takes nothing returns boolean
return ( udg_DiceDrop == 7 )
endfunction
function Trig_Demon_Commander_Func009001 takes nothing returns boolean
return ( udg_DiceDrop == 8 )
endfunction
function Trig_Demon_Commander_Func010001 takes nothing returns boolean
return ( udg_DiceDrop == 9 )
endfunction
function Trig_Demon_Commander_Func011001 takes nothing returns boolean
return ( udg_DiceDrop == 10 )
endfunction
function Trig_Demon_Commander_Func012001 takes nothing returns boolean
return ( udg_DiceDrop == 11 )
endfunction
function Trig_Demon_Commander_Actions takes nothing returns nothing
set udg_DiceDrop = GetRandomInt(1, 100)
if ( Trig_Demon_Commander_Func002001() ) then
call CreateItemLoc( 'I04R', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Demon_Commander_Func003001() ) then
call CreateItemLoc( 'I04O', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Demon_Commander_Func004001() ) then
call CreateItemLoc( 'I04Q', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Demon_Commander_Func005001() ) then
call CreateItemLoc( 'I04T', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Demon_Commander_Func006001() ) then
call CreateItemLoc( 'I04P', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Demon_Commander_Func007001() ) then
call CreateItemLoc( 'I04S', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Demon_Commander_Func008001() ) then
call CreateItemLoc( 'I00J', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Demon_Commander_Func009001() ) then
call CreateItemLoc( 'I02H', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Demon_Commander_Func010001() ) then
call CreateItemLoc( 'I03M', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Demon_Commander_Func011001() ) then
call CreateItemLoc( 'I025', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Demon_Commander_Func012001() ) then
call CreateItemLoc( 'I008', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Demon_Commander takes nothing returns nothing
set gg_trg_Demon_Commander = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Demon_Commander, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Demon_Commander, Condition( function Trig_Demon_Commander_Conditions ) )
call TriggerAddAction( gg_trg_Demon_Commander, function Trig_Demon_Commander_Actions )
endfunction
function Trig_Yagudo_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'n01Z' ) ) then
return false
endif
if ( not ( udg_QuestAle == true ) ) then
return false
endif
return true
endfunction
function Trig_Yagudo_Func002001 takes nothing returns boolean
return ( udg_DiceDrop == 1 )
endfunction
function Trig_Yagudo_Func003001 takes nothing returns boolean
return ( udg_DiceDrop == 2 )
endfunction
function Trig_Yagudo_Func004001 takes nothing returns boolean
return ( udg_DiceDrop == 3 )
endfunction
function Trig_Yagudo_Func005001 takes nothing returns boolean
return ( udg_DiceDrop == 4 )
endfunction
function Trig_Yagudo_Func006001 takes nothing returns boolean
return ( udg_DiceDrop == 5 )
endfunction
function Trig_Yagudo_Func007001 takes nothing returns boolean
return ( udg_DiceDrop == 6 )
endfunction
function Trig_Yagudo_Func008001 takes nothing returns boolean
return ( udg_DiceDrop == 7 )
endfunction
function Trig_Yagudo_Func009001 takes nothing returns boolean
return ( udg_DiceDrop > 75 )
endfunction
function Trig_Yagudo_Func010001 takes nothing returns boolean
return ( udg_DiceDrop == 9 )
endfunction
function Trig_Yagudo_Func011001 takes nothing returns boolean
return ( udg_DiceDrop == 10 )
endfunction
function Trig_Yagudo_Func012001 takes nothing returns boolean
return ( udg_DiceDrop == 11 )
endfunction
function Trig_Yagudo_Actions takes nothing returns nothing
set udg_DiceDrop = GetRandomInt(1, 100)
if ( Trig_Yagudo_Func002001() ) then
call CreateItemLoc( 'I02N', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Yagudo_Func003001() ) then
call CreateItemLoc( 'I00G', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Yagudo_Func004001() ) then
call CreateItemLoc( 'I02L', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Yagudo_Func005001() ) then
call CreateItemLoc( 'I00H', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Yagudo_Func006001() ) then
call CreateItemLoc( 'I02F', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Yagudo_Func007001() ) then
call CreateItemLoc( 'I00O', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Yagudo_Func008001() ) then
call CreateItemLoc( 'I00J', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Yagudo_Func009001() ) then
call CreateItemLoc( 'I04E', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Yagudo_Func010001() ) then
call CreateItemLoc( 'I03M', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Yagudo_Func011001() ) then
call CreateItemLoc( 'I025', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Yagudo_Func012001() ) then
call CreateItemLoc( 'I008', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Yagudo takes nothing returns nothing
set gg_trg_Yagudo = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Yagudo, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Yagudo, Condition( function Trig_Yagudo_Conditions ) )
call TriggerAddAction( gg_trg_Yagudo, function Trig_Yagudo_Actions )
endfunction
function Trig_Kefka_Stop_Conditions takes nothing returns boolean
if ( not ( udg_KefkaQuest == false ) ) then
return false
endif
if ( not ( IsUnitEnemy(GetEnteringUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Kefka_Stop_Func002C takes nothing returns boolean
if ( not ( IsUnitType(GetEnteringUnit(), UNIT_TYPE_GROUND) == true ) ) then
return false
endif
return true
endfunction
function Trig_Kefka_Stop_Actions takes nothing returns nothing
if ( Trig_Kefka_Stop_Func002C() ) then
call SetUnitPositionLoc( GetEnteringUnit(), GetRectCenter(gg_rct_Kefka_Fight_no_moved) )
else
endif
call CinematicFadeBJ( bj_CINEFADETYPE_FADEOUT, 5.00, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 0, 0, 0, 0 )
call TriggerSleepAction( 5.00 )
call CinematicFadeBJ( bj_CINEFADETYPE_FADEIN, 5.00, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 0, 0, 0, 0 )
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit())), "TRIGSTR_1124" )
endfunction
//===========================================================================
function InitTrig_Kefka_Stop takes nothing returns nothing
set gg_trg_Kefka_Stop = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Kefka_Stop, gg_rct_Kefka_fight_no )
call TriggerAddCondition( gg_trg_Kefka_Stop, Condition( function Trig_Kefka_Stop_Conditions ) )
call TriggerAddAction( gg_trg_Kefka_Stop, function Trig_Kefka_Stop_Actions )
endfunction
function Trig_Ship_Decoration_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnteringUnit()) == 'n007' ) ) then
return false
endif
return true
endfunction
function Trig_Ship_Decoration_Actions takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnteringUnit(), "move", GetRectCenter(gg_rct_Ship_Route_2) )
endfunction
//===========================================================================
function InitTrig_Ship_Decoration takes nothing returns nothing
set gg_trg_Ship_Decoration = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Ship_Decoration, gg_rct_Ship_Route_1 )
call TriggerAddCondition( gg_trg_Ship_Decoration, Condition( function Trig_Ship_Decoration_Conditions ) )
call TriggerAddAction( gg_trg_Ship_Decoration, function Trig_Ship_Decoration_Actions )
endfunction
function Trig_Ship_Decoration_1_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnteringUnit()) == 'n007' ) ) then
return false
endif
return true
endfunction
function Trig_Ship_Decoration_1_Actions takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnteringUnit(), "move", GetRectCenter(gg_rct_Ship_Route_3) )
endfunction
//===========================================================================
function InitTrig_Ship_Decoration_1 takes nothing returns nothing
set gg_trg_Ship_Decoration_1 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Ship_Decoration_1, gg_rct_Ship_Route_2 )
call TriggerAddCondition( gg_trg_Ship_Decoration_1, Condition( function Trig_Ship_Decoration_1_Conditions ) )
call TriggerAddAction( gg_trg_Ship_Decoration_1, function Trig_Ship_Decoration_1_Actions )
endfunction
function Trig_Ship_Decoration_2_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnteringUnit()) == 'n007' ) ) then
return false
endif
return true
endfunction
function Trig_Ship_Decoration_2_Actions takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnteringUnit(), "move", GetRectCenter(gg_rct_Ship_Route_4) )
endfunction
//===========================================================================
function InitTrig_Ship_Decoration_2 takes nothing returns nothing
set gg_trg_Ship_Decoration_2 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Ship_Decoration_2, gg_rct_Ship_Route_3 )
call TriggerAddCondition( gg_trg_Ship_Decoration_2, Condition( function Trig_Ship_Decoration_2_Conditions ) )
call TriggerAddAction( gg_trg_Ship_Decoration_2, function Trig_Ship_Decoration_2_Actions )
endfunction
function Trig_Ship_Decoration_3_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnteringUnit()) == 'n007' ) ) then
return false
endif
return true
endfunction
function Trig_Ship_Decoration_3_Actions takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnteringUnit(), "move", GetRectCenter(gg_rct_Ship_Route_1) )
endfunction
//===========================================================================
function InitTrig_Ship_Decoration_3 takes nothing returns nothing
set gg_trg_Ship_Decoration_3 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Ship_Decoration_3, gg_rct_Ship_Route_4 )
call TriggerAddCondition( gg_trg_Ship_Decoration_3, Condition( function Trig_Ship_Decoration_3_Conditions ) )
call TriggerAddAction( gg_trg_Ship_Decoration_3, function Trig_Ship_Decoration_3_Actions )
endfunction
function Trig_Ship_Decoration_4_Actions takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'n007', Player(PLAYER_NEUTRAL_PASSIVE), GetRectCenter(GetPlayableMapRect()), bj_UNIT_FACING )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "move", GetRectCenter(gg_rct_Ship_Route_1) )
endfunction
//===========================================================================
function InitTrig_Ship_Decoration_4 takes nothing returns nothing
set gg_trg_Ship_Decoration_4 = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Ship_Decoration_4, 10.00 )
call TriggerAddAction( gg_trg_Ship_Decoration_4, function Trig_Ship_Decoration_4_Actions )
endfunction
function Trig_Ship_Decoration_5_Actions takes nothing returns nothing
call DisableTrigger( gg_trg_Ship_Decoration_4 )
endfunction
//===========================================================================
function InitTrig_Ship_Decoration_5 takes nothing returns nothing
set gg_trg_Ship_Decoration_5 = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Ship_Decoration_5, 280.00 )
call TriggerAddAction( gg_trg_Ship_Decoration_5, function Trig_Ship_Decoration_5_Actions )
endfunction
function Trig_Elf_Village_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I04G' ) ) then
return false
endif
return true
endfunction
function Trig_Elf_Village_Func005002 takes nothing returns nothing
call CameraSetupApplyForPlayer( true, gg_cam_Airship_Swamp, GetEnumPlayer(), 0 )
endfunction
function Trig_Elf_Village_Func006002 takes nothing returns nothing
call CameraSetupApplyForPlayer( true, gg_cam_Airship_Elf, GetEnumPlayer(), 6.00 )
endfunction
function Trig_Elf_Village_Func010002 takes nothing returns nothing
call ResetToGameCameraForPlayer( GetEnumPlayer(), 0 )
endfunction
function Trig_Elf_Village_Func011002002001001002 takes nothing returns boolean
return ( GetPlayerController(GetFilterPlayer()) == MAP_CONTROL_USER )
endfunction
function Trig_Elf_Village_Func011002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), GetUnitLoc(GroupPickRandomUnit(GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Elf_Village_Func011002002001001002)))), 0 )
endfunction
function Trig_Elf_Village_Actions takes nothing returns nothing
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
call RemoveItem( GetLastRemovedItem() )
call PolledWait( 2.00 )
call CinematicModeBJ( true, GetForceOfPlayer(GetOwningPlayer(GetManipulatingUnit())) )
call ForForce( GetForceOfPlayer(GetOwningPlayer(GetManipulatingUnit())), function Trig_Elf_Village_Func005002 )
call ForForce( GetForceOfPlayer(GetOwningPlayer(GetManipulatingUnit())), function Trig_Elf_Village_Func006002 )
call PolledWait( 6.00 )
call CinematicModeBJ( false, GetForceOfPlayer(GetOwningPlayer(GetManipulatingUnit())) )
call SetUnitPositionLoc( GetManipulatingUnit(), GetRectCenter(gg_rct_Elf_Town) )
call ForForce( GetForceOfPlayer(GetOwningPlayer(GetManipulatingUnit())), function Trig_Elf_Village_Func010002 )
call ForForce( GetForceOfPlayer(GetOwningPlayer(GetManipulatingUnit())), function Trig_Elf_Village_Func011002 )
endfunction
//===========================================================================
function InitTrig_Elf_Village takes nothing returns nothing
set gg_trg_Elf_Village = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Elf_Village, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Elf_Village, Condition( function Trig_Elf_Village_Conditions ) )
call TriggerAddAction( gg_trg_Elf_Village, function Trig_Elf_Village_Actions )
endfunction
function Trig_Gurgan_Village_Airship_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I04H' ) ) then
return false
endif
return true
endfunction
function Trig_Gurgan_Village_Airship_Func005002 takes nothing returns nothing
call CameraSetupApplyForPlayer( true, gg_cam_Airship_Elf, GetEnumPlayer(), 0 )
endfunction
function Trig_Gurgan_Village_Airship_Func006002 takes nothing returns nothing
call CameraSetupApplyForPlayer( true, gg_cam_Airship_Gurgan, GetEnumPlayer(), 6.00 )
endfunction
function Trig_Gurgan_Village_Airship_Func010002 takes nothing returns nothing
call ResetToGameCameraForPlayer( GetEnumPlayer(), 0 )
endfunction
function Trig_Gurgan_Village_Airship_Func011002002001001002 takes nothing returns boolean
return ( GetPlayerController(GetFilterPlayer()) == MAP_CONTROL_USER )
endfunction
function Trig_Gurgan_Village_Airship_Func011002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), GetUnitLoc(GroupPickRandomUnit(GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Gurgan_Village_Airship_Func011002002001001002)))), 0 )
endfunction
function Trig_Gurgan_Village_Airship_Actions takes nothing returns nothing
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
call RemoveItem( GetLastRemovedItem() )
call PolledWait( 2.00 )
call CinematicModeBJ( true, GetForceOfPlayer(GetOwningPlayer(GetManipulatingUnit())) )
call ForForce( GetForceOfPlayer(GetOwningPlayer(GetManipulatingUnit())), function Trig_Gurgan_Village_Airship_Func005002 )
call ForForce( GetForceOfPlayer(GetOwningPlayer(GetManipulatingUnit())), function Trig_Gurgan_Village_Airship_Func006002 )
call PolledWait( 6.00 )
call CinematicModeBJ( false, GetForceOfPlayer(GetOwningPlayer(GetManipulatingUnit())) )
call SetUnitPositionLoc( GetManipulatingUnit(), GetRectCenter(gg_rct_Gurgan_Village) )
call ForForce( GetForceOfPlayer(GetOwningPlayer(GetManipulatingUnit())), function Trig_Gurgan_Village_Airship_Func010002 )
call ForForce( GetForceOfPlayer(GetOwningPlayer(GetManipulatingUnit())), function Trig_Gurgan_Village_Airship_Func011002 )
endfunction
//===========================================================================
function InitTrig_Gurgan_Village_Airship takes nothing returns nothing
set gg_trg_Gurgan_Village_Airship = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Gurgan_Village_Airship, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Gurgan_Village_Airship, Condition( function Trig_Gurgan_Village_Airship_Conditions ) )
call TriggerAddAction( gg_trg_Gurgan_Village_Airship, function Trig_Gurgan_Village_Airship_Actions )
endfunction
function Trig_Vakor_Airship_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I04J' ) ) then
return false
endif
return true
endfunction
function Trig_Vakor_Airship_Func005002 takes nothing returns nothing
call CameraSetupApplyForPlayer( true, gg_cam_Airship_Gurgan, GetEnumPlayer(), 0 )
endfunction
function Trig_Vakor_Airship_Func006002 takes nothing returns nothing
call CameraSetupApplyForPlayer( true, gg_cam_Airship_Vakor, GetEnumPlayer(), 6.00 )
endfunction
function Trig_Vakor_Airship_Func010002 takes nothing returns nothing
call ResetToGameCameraForPlayer( GetEnumPlayer(), 0 )
endfunction
function Trig_Vakor_Airship_Func011002002001001002 takes nothing returns boolean
return ( GetPlayerController(GetFilterPlayer()) == MAP_CONTROL_USER )
endfunction
function Trig_Vakor_Airship_Func011002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), GetUnitLoc(GroupPickRandomUnit(GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Vakor_Airship_Func011002002001001002)))), 0 )
endfunction
function Trig_Vakor_Airship_Actions takes nothing returns nothing
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
call RemoveItem( GetLastRemovedItem() )
call PolledWait( 2.00 )
call CinematicModeBJ( true, GetForceOfPlayer(GetOwningPlayer(GetManipulatingUnit())) )
call ForForce( GetForceOfPlayer(GetOwningPlayer(GetManipulatingUnit())), function Trig_Vakor_Airship_Func005002 )
call ForForce( GetForceOfPlayer(GetOwningPlayer(GetManipulatingUnit())), function Trig_Vakor_Airship_Func006002 )
call PolledWait( 6.00 )
call CinematicModeBJ( false, GetForceOfPlayer(GetOwningPlayer(GetManipulatingUnit())) )
call SetUnitPositionLoc( GetManipulatingUnit(), GetRectCenter(gg_rct_Ship_Route_4) )
call ForForce( GetForceOfPlayer(GetOwningPlayer(GetManipulatingUnit())), function Trig_Vakor_Airship_Func010002 )
call ForForce( GetForceOfPlayer(GetOwningPlayer(GetManipulatingUnit())), function Trig_Vakor_Airship_Func011002 )
endfunction
//===========================================================================
function InitTrig_Vakor_Airship takes nothing returns nothing
set gg_trg_Vakor_Airship = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Vakor_Airship, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Vakor_Airship, Condition( function Trig_Vakor_Airship_Conditions ) )
call TriggerAddAction( gg_trg_Vakor_Airship, function Trig_Vakor_Airship_Actions )
endfunction
function Trig_Swamp_Village_Airship_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I04I' ) ) then
return false
endif
return true
endfunction
function Trig_Swamp_Village_Airship_Func005002 takes nothing returns nothing
call CameraSetupApplyForPlayer( true, gg_cam_Airship_Vakor, GetEnumPlayer(), 0 )
endfunction
function Trig_Swamp_Village_Airship_Func006002 takes nothing returns nothing
call CameraSetupApplyForPlayer( true, gg_cam_Airship_Swamp, GetEnumPlayer(), 6.00 )
endfunction
function Trig_Swamp_Village_Airship_Func010002 takes nothing returns nothing
call ResetToGameCameraForPlayer( GetEnumPlayer(), 0 )
endfunction
function Trig_Swamp_Village_Airship_Func011002002001001002 takes nothing returns boolean
return ( GetPlayerController(GetFilterPlayer()) == MAP_CONTROL_USER )
endfunction
function Trig_Swamp_Village_Airship_Func011002 takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), GetUnitLoc(GroupPickRandomUnit(GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Swamp_Village_Airship_Func011002002001001002)))), 0 )
endfunction
function Trig_Swamp_Village_Airship_Actions takes nothing returns nothing
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
call RemoveItem( GetLastRemovedItem() )
call PolledWait( 2.00 )
call CinematicModeBJ( true, GetForceOfPlayer(GetOwningPlayer(GetManipulatingUnit())) )
call ForForce( GetForceOfPlayer(GetOwningPlayer(GetManipulatingUnit())), function Trig_Swamp_Village_Airship_Func005002 )
call ForForce( GetForceOfPlayer(GetOwningPlayer(GetManipulatingUnit())), function Trig_Swamp_Village_Airship_Func006002 )
call PolledWait( 6.00 )
call CinematicModeBJ( false, GetForceOfPlayer(GetOwningPlayer(GetManipulatingUnit())) )
call SetUnitPositionLoc( GetManipulatingUnit(), GetUnitLoc(gg_unit_n00Y_0003) )
call ForForce( GetForceOfPlayer(GetOwningPlayer(GetManipulatingUnit())), function Trig_Swamp_Village_Airship_Func010002 )
call ForForce( GetForceOfPlayer(GetOwningPlayer(GetManipulatingUnit())), function Trig_Swamp_Village_Airship_Func011002 )
endfunction
//===========================================================================
function InitTrig_Swamp_Village_Airship takes nothing returns nothing
set gg_trg_Swamp_Village_Airship = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Swamp_Village_Airship, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Swamp_Village_Airship, Condition( function Trig_Swamp_Village_Airship_Conditions ) )
call TriggerAddAction( gg_trg_Swamp_Village_Airship, function Trig_Swamp_Village_Airship_Actions )
endfunction
function Trig_Dead_Unit_Clean_Up_Func001001002 takes nothing returns boolean
return ( IsUnitDeadBJ(GetFilterUnit()) == true )
endfunction
function Trig_Dead_Unit_Clean_Up_Func001002 takes nothing returns nothing
call DoNothing( )
endfunction
function Trig_Dead_Unit_Clean_Up_Func002C takes nothing returns boolean
if ( not ( IsUnitAlly(GetEnumUnit(), Player(PLAYER_NEUTRAL_PASSIVE)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Dead_Unit_Clean_Up_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Dead_Unit_Clean_Up_Func001001002)), function Trig_Dead_Unit_Clean_Up_Func001002 )
if ( Trig_Dead_Unit_Clean_Up_Func002C() ) then
call DoNothing( )
else
call RemoveUnit( GetEnumUnit() )
endif
endfunction
//===========================================================================
function InitTrig_Dead_Unit_Clean_Up takes nothing returns nothing
set gg_trg_Dead_Unit_Clean_Up = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Dead_Unit_Clean_Up, 120.00 )
call TriggerAddAction( gg_trg_Dead_Unit_Clean_Up, function Trig_Dead_Unit_Clean_Up_Actions )
endfunction
function Trig_Planes_Func001001001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true )
endfunction
function Trig_Planes_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(gg_rct_Plains, Condition(function Trig_Planes_Func001001001002))) > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Planes_Func003001 takes nothing returns boolean
return ( udg_DiceRoll == 1 )
endfunction
function Trig_Planes_Func004001 takes nothing returns boolean
return ( udg_DiceRoll == 2 )
endfunction
function Trig_Planes_Func005001 takes nothing returns boolean
return ( udg_DiceRoll == 3 )
endfunction
function Trig_Planes_Func006001 takes nothing returns boolean
return ( udg_DiceRoll == 4 )
endfunction
function Trig_Planes_Func007001 takes nothing returns boolean
return ( udg_DiceRoll == 5 )
endfunction
function Trig_Planes_Func008001 takes nothing returns boolean
return ( udg_DiceRoll == 6 )
endfunction
function Trig_Planes_Func009001 takes nothing returns boolean
return ( udg_DiceRoll == 7 )
endfunction
function Trig_Planes_Func010001 takes nothing returns boolean
return ( udg_DiceRoll == 8 )
endfunction
function Trig_Planes_Func011001 takes nothing returns boolean
return ( udg_DiceRoll == 9 )
endfunction
function Trig_Planes_Func012001 takes nothing returns boolean
return ( udg_DiceRoll == 10 )
endfunction
function Trig_Planes_Func013001 takes nothing returns boolean
return ( udg_DiceRoll == 11 )
endfunction
function Trig_Planes_Func014002003001001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true )
endfunction
function Trig_Planes_Func014002 takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "patrol", GetUnitLoc(GroupPickRandomUnit(GetUnitsInRectMatching(gg_rct_Plains, Condition(function Trig_Planes_Func014002003001001002)))) )
endfunction
function Trig_Planes_Func015002 takes nothing returns nothing
call SetUnitExplodedBJ( GetEnumUnit(), true )
endfunction
function Trig_Planes_Actions takes nothing returns nothing
set udg_DiceRoll = GetRandomInt(1, 11)
if ( Trig_Planes_Func003001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'n00Z', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Plains), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Planes_Func004001() ) then
call CreateNUnitsAtLocFacingLocBJ( 2, 'n00Z', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Plains), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Planes_Func005001() ) then
call CreateNUnitsAtLocFacingLocBJ( 3, 'n00Z', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Plains), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Planes_Func006001() ) then
call CreateNUnitsAtLocFacingLocBJ( 3, 'n008', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Plains), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Planes_Func007001() ) then
call CreateNUnitsAtLocFacingLocBJ( 5, 'n013', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Plains), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Planes_Func008001() ) then
call CreateNUnitsAtLocFacingLocBJ( 2, 'n013', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Plains), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Planes_Func009001() ) then
call CreateNUnitsAtLocFacingLocBJ( 5, 'n008', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Plains), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Planes_Func010001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'n008', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Plains), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Planes_Func011001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'n013', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Plains), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Planes_Func012001() ) then
call CreateNUnitsAtLocFacingLocBJ( 2, 'n008', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Plains), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Planes_Func013001() ) then
call CreateNUnitsAtLocFacingLocBJ( 2, 'n02S', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Plains), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Plains, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Planes_Func014002 )
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Plains, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Planes_Func015002 )
endfunction
//===========================================================================
function InitTrig_Planes takes nothing returns nothing
set gg_trg_Planes = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Planes, 10.00 )
call TriggerAddCondition( gg_trg_Planes, Condition( function Trig_Planes_Conditions ) )
call TriggerAddAction( gg_trg_Planes, function Trig_Planes_Actions )
endfunction
function Trig_Planes_Clear_Func001001001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true )
endfunction
function Trig_Planes_Clear_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(gg_rct_Plains, Condition(function Trig_Planes_Clear_Func001001001002))) == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Planes_Clear_Func002002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Planes_Clear_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Plains, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Planes_Clear_Func002002 )
endfunction
//===========================================================================
function InitTrig_Planes_Clear takes nothing returns nothing
set gg_trg_Planes_Clear = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Planes_Clear, 10.00 )
call TriggerAddCondition( gg_trg_Planes_Clear, Condition( function Trig_Planes_Clear_Conditions ) )
call TriggerAddAction( gg_trg_Planes_Clear, function Trig_Planes_Clear_Actions )
endfunction
function Trig_Enter_Planes_Conditions takes nothing returns boolean
if ( not ( GetPlayerController(GetOwningPlayer(GetEnteringUnit())) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_Enter_Planes_Func006Func001001 takes nothing returns boolean
return ( GetPlayerName(GetEnumPlayer()) == "MystWolf" )
endfunction
function Trig_Enter_Planes_Func006Func002001 takes nothing returns boolean
return ( GetPlayerName(GetEnumPlayer()) == "MistWolf" )
endfunction
function Trig_Enter_Planes_Func006Func003001 takes nothing returns boolean
return ( GetPlayerName(GetEnumPlayer()) == "mystwolf" )
endfunction
function Trig_Enter_Planes_Func006Func004001 takes nothing returns boolean
return ( GetPlayerName(GetEnumPlayer()) == "Mystwolf" )
endfunction
function Trig_Enter_Planes_Func006Func005001 takes nothing returns boolean
return ( GetPlayerName(GetEnumPlayer()) == "vinn" )
endfunction
function Trig_Enter_Planes_Func006Func006001 takes nothing returns boolean
return ( GetPlayerName(GetEnumPlayer()) == "Vinn" )
endfunction
function Trig_Enter_Planes_Func006Func007001 takes nothing returns boolean
return ( GetPlayerName(GetEnumPlayer()) == "Grymtork_Gorhan" )
endfunction
function Trig_Enter_Planes_Func006Func008001 takes nothing returns boolean
return ( GetPlayerName(GetEnumPlayer()) == "dragoon-5" )
endfunction
function Trig_Enter_Planes_Func006Func009001 takes nothing returns boolean
return ( GetPlayerName(GetEnumPlayer()) == "wenger" )
endfunction
function Trig_Enter_Planes_Func006Func010001 takes nothing returns boolean
return ( GetPlayerName(GetEnumPlayer()) == "roseworn" )
endfunction
function Trig_Enter_Planes_Func006Func011001 takes nothing returns boolean
return ( GetPlayerName(GetEnumPlayer()) == "Nullpersona" )
endfunction
function Trig_Enter_Planes_Func006Func012001 takes nothing returns boolean
return ( GetPlayerName(GetEnumPlayer()) == "MoronicHunter" )
endfunction
function Trig_Enter_Planes_Func006Func013001 takes nothing returns boolean
return ( GetPlayerName(GetEnumPlayer()) == "ShootingPandas" )
endfunction
function Trig_Enter_Planes_Func006Func014001 takes nothing returns boolean
return ( GetPlayerName(GetEnumPlayer()) == "jackal121" )
endfunction
function Trig_Enter_Planes_Func006A takes nothing returns nothing
if ( Trig_Enter_Planes_Func006Func001001() ) then
call CustomDefeatBJ( GetEnumPlayer(), "TRIGSTR_552" )
else
call DoNothing( )
endif
if ( Trig_Enter_Planes_Func006Func002001() ) then
call CustomDefeatBJ( GetEnumPlayer(), "TRIGSTR_553" )
else
call DoNothing( )
endif
if ( Trig_Enter_Planes_Func006Func003001() ) then
call CustomDefeatBJ( GetEnumPlayer(), "TRIGSTR_556" )
else
call DoNothing( )
endif
if ( Trig_Enter_Planes_Func006Func004001() ) then
call CustomDefeatBJ( GetEnumPlayer(), "TRIGSTR_557" )
else
call DoNothing( )
endif
if ( Trig_Enter_Planes_Func006Func005001() ) then
call CustomDefeatBJ( GetEnumPlayer(), "TRIGSTR_558" )
else
call DoNothing( )
endif
if ( Trig_Enter_Planes_Func006Func006001() ) then
call CustomDefeatBJ( GetEnumPlayer(), "TRIGSTR_559" )
else
call DoNothing( )
endif
if ( Trig_Enter_Planes_Func006Func007001() ) then
call CustomDefeatBJ( GetEnumPlayer(), "TRIGSTR_560" )
else
call DoNothing( )
endif
if ( Trig_Enter_Planes_Func006Func008001() ) then
call CustomDefeatBJ( GetEnumPlayer(), "TRIGSTR_561" )
else
call DoNothing( )
endif
if ( Trig_Enter_Planes_Func006Func009001() ) then
call CustomDefeatBJ( GetEnumPlayer(), "TRIGSTR_562" )
else
call DoNothing( )
endif
if ( Trig_Enter_Planes_Func006Func010001() ) then
call CustomDefeatBJ( GetEnumPlayer(), "TRIGSTR_563" )
else
call DoNothing( )
endif
if ( Trig_Enter_Planes_Func006Func011001() ) then
call CustomDefeatBJ( GetEnumPlayer(), "TRIGSTR_565" )
else
call DoNothing( )
endif
if ( Trig_Enter_Planes_Func006Func012001() ) then
call CustomDefeatBJ( GetEnumPlayer(), "TRIGSTR_566" )
else
call DoNothing( )
endif
if ( Trig_Enter_Planes_Func006Func013001() ) then
call CustomDefeatBJ( GetEnumPlayer(), "TRIGSTR_567" )
else
call DoNothing( )
endif
if ( Trig_Enter_Planes_Func006Func014001() ) then
call CustomDefeatBJ( GetEnumPlayer(), "TRIGSTR_568" )
else
call DoNothing( )
endif
endfunction
function Trig_Enter_Planes_Actions takes nothing returns nothing
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit())), "TRIGSTR_159" )
call DisableTrigger( GetTriggeringTrigger() )
call TriggerSleepAction( 10.00 )
call EnableTrigger( GetTriggeringTrigger() )
call ForForce( GetPlayersAll(), function Trig_Enter_Planes_Func006A )
endfunction
//===========================================================================
function InitTrig_Enter_Planes takes nothing returns nothing
set gg_trg_Enter_Planes = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Enter_Planes, gg_rct_Plains )
call TriggerAddCondition( gg_trg_Enter_Planes, Condition( function Trig_Enter_Planes_Conditions ) )
call TriggerAddAction( gg_trg_Enter_Planes, function Trig_Enter_Planes_Actions )
endfunction
function Trig_Leave_Planes_Conditions takes nothing returns boolean
if ( not ( GetPlayerController(GetOwningPlayer(GetLeavingUnit())) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_Leave_Planes_Actions takes nothing returns nothing
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit())), "TRIGSTR_202" )
call DisableTrigger( GetTriggeringTrigger() )
call TriggerSleepAction( 10.00 )
call EnableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Leave_Planes takes nothing returns nothing
set gg_trg_Leave_Planes = CreateTrigger( )
call TriggerRegisterLeaveRectSimple( gg_trg_Leave_Planes, gg_rct_Plains )
call TriggerAddCondition( gg_trg_Leave_Planes, Condition( function Trig_Leave_Planes_Conditions ) )
call TriggerAddAction( gg_trg_Leave_Planes, function Trig_Leave_Planes_Actions )
endfunction
function Trig_Enter_Tropical_Island_Conditions takes nothing returns boolean
if ( not ( GetPlayerController(GetOwningPlayer(GetEnteringUnit())) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_Enter_Tropical_Island_Actions takes nothing returns nothing
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit())), "TRIGSTR_1473" )
call DisableTrigger( GetTriggeringTrigger() )
call TriggerSleepAction( 10.00 )
call EnableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Enter_Tropical_Island takes nothing returns nothing
set gg_trg_Enter_Tropical_Island = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Enter_Tropical_Island, gg_rct_Tropical_Island )
call TriggerAddCondition( gg_trg_Enter_Tropical_Island, Condition( function Trig_Enter_Tropical_Island_Conditions ) )
call TriggerAddAction( gg_trg_Enter_Tropical_Island, function Trig_Enter_Tropical_Island_Actions )
endfunction
function Trig_Leave_Tropical_Island_Conditions takes nothing returns boolean
if ( not ( GetPlayerController(GetOwningPlayer(GetLeavingUnit())) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_Leave_Tropical_Island_Actions takes nothing returns nothing
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit())), "TRIGSTR_1474" )
call DisableTrigger( GetTriggeringTrigger() )
call TriggerSleepAction( 10.00 )
call EnableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Leave_Tropical_Island takes nothing returns nothing
set gg_trg_Leave_Tropical_Island = CreateTrigger( )
call TriggerRegisterLeaveRectSimple( gg_trg_Leave_Tropical_Island, gg_rct_Tropical_Island )
call TriggerAddCondition( gg_trg_Leave_Tropical_Island, Condition( function Trig_Leave_Tropical_Island_Conditions ) )
call TriggerAddAction( gg_trg_Leave_Tropical_Island, function Trig_Leave_Tropical_Island_Actions )
endfunction
function Trig_Tropical_Island_Func001001001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true )
endfunction
function Trig_Tropical_Island_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(gg_rct_Tropical_Island, Condition(function Trig_Tropical_Island_Func001001001002))) > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Tropical_Island_Func003001 takes nothing returns boolean
return ( udg_DiceRoll == 1 )
endfunction
function Trig_Tropical_Island_Func004001 takes nothing returns boolean
return ( udg_DiceRoll == 2 )
endfunction
function Trig_Tropical_Island_Func005001 takes nothing returns boolean
return ( udg_DiceRoll == 3 )
endfunction
function Trig_Tropical_Island_Func006001 takes nothing returns boolean
return ( udg_DiceRoll == 4 )
endfunction
function Trig_Tropical_Island_Func007001 takes nothing returns boolean
return ( udg_DiceRoll == 5 )
endfunction
function Trig_Tropical_Island_Func008001 takes nothing returns boolean
return ( udg_DiceRoll == 6 )
endfunction
function Trig_Tropical_Island_Func009002003001001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true )
endfunction
function Trig_Tropical_Island_Func009002 takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "patrol", GetUnitLoc(GroupPickRandomUnit(GetUnitsInRectMatching(gg_rct_Tropical_Island, Condition(function Trig_Tropical_Island_Func009002003001001002)))) )
endfunction
function Trig_Tropical_Island_Func010002 takes nothing returns nothing
call SetUnitExplodedBJ( GetEnumUnit(), true )
endfunction
function Trig_Tropical_Island_Actions takes nothing returns nothing
set udg_DiceRoll = GetRandomInt(1, 6)
if ( Trig_Tropical_Island_Func003001() ) then
call CreateNUnitsAtLocFacingLocBJ( 3, 'n010', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Tropical_Island), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Tropical_Island_Func004001() ) then
call CreateNUnitsAtLocFacingLocBJ( 4, 'n010', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Tropical_Island), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Tropical_Island_Func005001() ) then
call CreateNUnitsAtLocFacingLocBJ( 3, 'n00W', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Tropical_Island), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Tropical_Island_Func006001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'n00X', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Tropical_Island), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Tropical_Island_Func007001() ) then
call CreateNUnitsAtLocFacingLocBJ( 5, 'n013', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Tropical_Island), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Tropical_Island_Func008001() ) then
call CreateNUnitsAtLocFacingLocBJ( 2, 'n02T', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Tropical_Island), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Tropical_Island, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Tropical_Island_Func009002 )
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Tropical_Island, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Tropical_Island_Func010002 )
endfunction
//===========================================================================
function InitTrig_Tropical_Island takes nothing returns nothing
set gg_trg_Tropical_Island = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Tropical_Island, 10.00 )
call TriggerAddCondition( gg_trg_Tropical_Island, Condition( function Trig_Tropical_Island_Conditions ) )
call TriggerAddAction( gg_trg_Tropical_Island, function Trig_Tropical_Island_Actions )
endfunction
function Trig_Tropical_Island_Clear_Func001001001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true )
endfunction
function Trig_Tropical_Island_Clear_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(gg_rct_Tropical_Island, Condition(function Trig_Tropical_Island_Clear_Func001001001002))) == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Tropical_Island_Clear_Func002002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Tropical_Island_Clear_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Tropical_Island, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Tropical_Island_Clear_Func002002 )
endfunction
//===========================================================================
function InitTrig_Tropical_Island_Clear takes nothing returns nothing
set gg_trg_Tropical_Island_Clear = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Tropical_Island_Clear, 10.00 )
call TriggerAddCondition( gg_trg_Tropical_Island_Clear, Condition( function Trig_Tropical_Island_Clear_Conditions ) )
call TriggerAddAction( gg_trg_Tropical_Island_Clear, function Trig_Tropical_Island_Clear_Actions )
endfunction
function Trig_Enter_Marsh_Conditions takes nothing returns boolean
if ( not ( GetPlayerController(GetOwningPlayer(GetEnteringUnit())) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_Enter_Marsh_Actions takes nothing returns nothing
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit())), "TRIGSTR_1475" )
call DisableTrigger( GetTriggeringTrigger() )
call TriggerSleepAction( 10.00 )
call EnableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Enter_Marsh takes nothing returns nothing
set gg_trg_Enter_Marsh = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Enter_Marsh, gg_rct_Dead_Marshes )
call TriggerAddCondition( gg_trg_Enter_Marsh, Condition( function Trig_Enter_Marsh_Conditions ) )
call TriggerAddAction( gg_trg_Enter_Marsh, function Trig_Enter_Marsh_Actions )
endfunction
function Trig_Leave_Marsh_Conditions takes nothing returns boolean
if ( not ( GetPlayerController(GetOwningPlayer(GetLeavingUnit())) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_Leave_Marsh_Actions takes nothing returns nothing
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit())), "TRIGSTR_1476" )
call DisableTrigger( GetTriggeringTrigger() )
call TriggerSleepAction( 10.00 )
call EnableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Leave_Marsh takes nothing returns nothing
set gg_trg_Leave_Marsh = CreateTrigger( )
call TriggerRegisterLeaveRectSimple( gg_trg_Leave_Marsh, gg_rct_Dead_Marshes )
call TriggerAddCondition( gg_trg_Leave_Marsh, Condition( function Trig_Leave_Marsh_Conditions ) )
call TriggerAddAction( gg_trg_Leave_Marsh, function Trig_Leave_Marsh_Actions )
endfunction
function Trig_Marsh_Func001001001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true )
endfunction
function Trig_Marsh_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(gg_rct_Dead_Marshes, Condition(function Trig_Marsh_Func001001001002))) > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Marsh_Func003001 takes nothing returns boolean
return ( udg_DiceRoll == 1 )
endfunction
function Trig_Marsh_Func004001 takes nothing returns boolean
return ( udg_DiceRoll == 2 )
endfunction
function Trig_Marsh_Func005001 takes nothing returns boolean
return ( udg_DiceRoll == 3 )
endfunction
function Trig_Marsh_Func006001 takes nothing returns boolean
return ( udg_DiceRoll == 4 )
endfunction
function Trig_Marsh_Func007001 takes nothing returns boolean
return ( udg_DiceRoll == 5 )
endfunction
function Trig_Marsh_Func008001 takes nothing returns boolean
return ( udg_DiceRoll == 6 )
endfunction
function Trig_Marsh_Func009002003001001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true )
endfunction
function Trig_Marsh_Func009002 takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "patrol", GetUnitLoc(GroupPickRandomUnit(GetUnitsInRectMatching(gg_rct_Dead_Marshes, Condition(function Trig_Marsh_Func009002003001001002)))) )
endfunction
function Trig_Marsh_Func010002 takes nothing returns nothing
call SetUnitExplodedBJ( GetEnumUnit(), true )
endfunction
function Trig_Marsh_Actions takes nothing returns nothing
set udg_DiceRoll = GetRandomInt(1, 6)
if ( Trig_Marsh_Func003001() ) then
call CreateNUnitsAtLocFacingLocBJ( 5, 'n010', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Dead_Marshes), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Marsh_Func004001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'n00X', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Dead_Marshes), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Marsh_Func005001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'n012', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Dead_Marshes), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Marsh_Func006001() ) then
call CreateNUnitsAtLocFacingLocBJ( 3, 'n01A', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Dead_Marshes), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Marsh_Func007001() ) then
call CreateNUnitsAtLocFacingLocBJ( 5, 'n01A', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Dead_Marshes), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Marsh_Func008001() ) then
call CreateNUnitsAtLocFacingLocBJ( 2, 'n02U', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Dead_Marshes), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Dead_Marshes, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Marsh_Func009002 )
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Dead_Marshes, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Marsh_Func010002 )
endfunction
//===========================================================================
function InitTrig_Marsh takes nothing returns nothing
set gg_trg_Marsh = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Marsh, 10.00 )
call TriggerAddCondition( gg_trg_Marsh, Condition( function Trig_Marsh_Conditions ) )
call TriggerAddAction( gg_trg_Marsh, function Trig_Marsh_Actions )
endfunction
function Trig_Marsh_Clear_Func001001001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true )
endfunction
function Trig_Marsh_Clear_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(gg_rct_Dead_Marshes, Condition(function Trig_Marsh_Clear_Func001001001002))) == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Marsh_Clear_Func002002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Marsh_Clear_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Dead_Marshes, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Marsh_Clear_Func002002 )
call SetSkyModel( "Environment\\Sky\\Sky\\SkyLight.mdl" )
endfunction
//===========================================================================
function InitTrig_Marsh_Clear takes nothing returns nothing
set gg_trg_Marsh_Clear = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Marsh_Clear, 10.00 )
call TriggerAddCondition( gg_trg_Marsh_Clear, Condition( function Trig_Marsh_Clear_Conditions ) )
call TriggerAddAction( gg_trg_Marsh_Clear, function Trig_Marsh_Clear_Actions )
endfunction
function Trig_Enter_Calm_Lands_Conditions takes nothing returns boolean
if ( not ( GetPlayerController(GetOwningPlayer(GetEnteringUnit())) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_Enter_Calm_Lands_Actions takes nothing returns nothing
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit())), "TRIGSTR_1477" )
call DisableTrigger( GetTriggeringTrigger() )
call TriggerSleepAction( 10.00 )
call EnableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Enter_Calm_Lands takes nothing returns nothing
set gg_trg_Enter_Calm_Lands = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Enter_Calm_Lands, gg_rct_Calm_Lands )
call TriggerAddCondition( gg_trg_Enter_Calm_Lands, Condition( function Trig_Enter_Calm_Lands_Conditions ) )
call TriggerAddAction( gg_trg_Enter_Calm_Lands, function Trig_Enter_Calm_Lands_Actions )
endfunction
function Trig_Leave_Calm_Lands_Conditions takes nothing returns boolean
if ( not ( GetPlayerController(GetOwningPlayer(GetLeavingUnit())) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_Leave_Calm_Lands_Actions takes nothing returns nothing
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit())), "TRIGSTR_1478" )
call DisableTrigger( GetTriggeringTrigger() )
call TriggerSleepAction( 10.00 )
call EnableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Leave_Calm_Lands takes nothing returns nothing
set gg_trg_Leave_Calm_Lands = CreateTrigger( )
call TriggerRegisterLeaveRectSimple( gg_trg_Leave_Calm_Lands, gg_rct_Calm_Lands )
call TriggerAddCondition( gg_trg_Leave_Calm_Lands, Condition( function Trig_Leave_Calm_Lands_Conditions ) )
call TriggerAddAction( gg_trg_Leave_Calm_Lands, function Trig_Leave_Calm_Lands_Actions )
endfunction
function Trig_Calm_Lands_Func001001001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true )
endfunction
function Trig_Calm_Lands_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(gg_rct_Calm_Lands, Condition(function Trig_Calm_Lands_Func001001001002))) > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Calm_Lands_Func003001 takes nothing returns boolean
return ( udg_DiceRoll == 1 )
endfunction
function Trig_Calm_Lands_Func004001 takes nothing returns boolean
return ( udg_DiceRoll == 2 )
endfunction
function Trig_Calm_Lands_Func005001 takes nothing returns boolean
return ( udg_DiceRoll == 3 )
endfunction
function Trig_Calm_Lands_Func006001 takes nothing returns boolean
return ( udg_DiceRoll == 4 )
endfunction
function Trig_Calm_Lands_Func007001 takes nothing returns boolean
return ( udg_DiceRoll == 5 )
endfunction
function Trig_Calm_Lands_Func008001 takes nothing returns boolean
return ( udg_DiceRoll == 6 )
endfunction
function Trig_Calm_Lands_Func009002003001001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true )
endfunction
function Trig_Calm_Lands_Func009002 takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "patrol", GetUnitLoc(GroupPickRandomUnit(GetUnitsInRectMatching(gg_rct_Calm_Lands, Condition(function Trig_Calm_Lands_Func009002003001001002)))) )
endfunction
function Trig_Calm_Lands_Func010002 takes nothing returns nothing
call SetUnitExplodedBJ( GetEnumUnit(), true )
endfunction
function Trig_Calm_Lands_Actions takes nothing returns nothing
set udg_DiceRoll = GetRandomInt(1, 6)
if ( Trig_Calm_Lands_Func003001() ) then
call CreateNUnitsAtLocFacingLocBJ( 4, 'n011', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Calm_Lands), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Calm_Lands_Func004001() ) then
call CreateNUnitsAtLocFacingLocBJ( 3, 'n014', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Calm_Lands), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Calm_Lands_Func005001() ) then
call CreateNUnitsAtLocFacingLocBJ( 2, 'n015', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Calm_Lands), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Calm_Lands_Func006001() ) then
call CreateNUnitsAtLocFacingLocBJ( 3, 'n00N', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Calm_Lands), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Calm_Lands_Func007001() ) then
call CreateNUnitsAtLocFacingLocBJ( 2, 'n014', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Calm_Lands), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Calm_Lands_Func008001() ) then
call CreateNUnitsAtLocFacingLocBJ( 2, 'n02V', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Calm_Lands), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Calm_Lands, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Calm_Lands_Func009002 )
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Calm_Lands, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Calm_Lands_Func010002 )
endfunction
//===========================================================================
function InitTrig_Calm_Lands takes nothing returns nothing
set gg_trg_Calm_Lands = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Calm_Lands, 10.00 )
call TriggerAddCondition( gg_trg_Calm_Lands, Condition( function Trig_Calm_Lands_Conditions ) )
call TriggerAddAction( gg_trg_Calm_Lands, function Trig_Calm_Lands_Actions )
endfunction
function Trig_Calm_Lands_Clear_Func001001001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true )
endfunction
function Trig_Calm_Lands_Clear_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(gg_rct_Calm_Lands, Condition(function Trig_Calm_Lands_Clear_Func001001001002))) == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Calm_Lands_Clear_Func002002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Calm_Lands_Clear_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Calm_Lands, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Calm_Lands_Clear_Func002002 )
endfunction
//===========================================================================
function InitTrig_Calm_Lands_Clear takes nothing returns nothing
set gg_trg_Calm_Lands_Clear = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Calm_Lands_Clear, 10.00 )
call TriggerAddCondition( gg_trg_Calm_Lands_Clear, Condition( function Trig_Calm_Lands_Clear_Conditions ) )
call TriggerAddAction( gg_trg_Calm_Lands_Clear, function Trig_Calm_Lands_Clear_Actions )
endfunction
function Trig_Enter_Cactaur_Deserts_Conditions takes nothing returns boolean
if ( not ( GetPlayerController(GetOwningPlayer(GetEnteringUnit())) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_Enter_Cactaur_Deserts_Actions takes nothing returns nothing
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit())), "TRIGSTR_1479" )
call DisableTrigger( GetTriggeringTrigger() )
call TriggerSleepAction( 10.00 )
call EnableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Enter_Cactaur_Deserts takes nothing returns nothing
set gg_trg_Enter_Cactaur_Deserts = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Enter_Cactaur_Deserts, gg_rct_Cactaur_Deserts )
call TriggerAddCondition( gg_trg_Enter_Cactaur_Deserts, Condition( function Trig_Enter_Cactaur_Deserts_Conditions ) )
call TriggerAddAction( gg_trg_Enter_Cactaur_Deserts, function Trig_Enter_Cactaur_Deserts_Actions )
endfunction
function Trig_Leave_Cactaur_Deserts_Conditions takes nothing returns boolean
if ( not ( GetPlayerController(GetOwningPlayer(GetLeavingUnit())) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_Leave_Cactaur_Deserts_Actions takes nothing returns nothing
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit())), "TRIGSTR_1480" )
call DisableTrigger( GetTriggeringTrigger() )
call TriggerSleepAction( 10.00 )
call EnableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Leave_Cactaur_Deserts takes nothing returns nothing
set gg_trg_Leave_Cactaur_Deserts = CreateTrigger( )
call TriggerRegisterLeaveRectSimple( gg_trg_Leave_Cactaur_Deserts, gg_rct_Cactaur_Deserts )
call TriggerAddCondition( gg_trg_Leave_Cactaur_Deserts, Condition( function Trig_Leave_Cactaur_Deserts_Conditions ) )
call TriggerAddAction( gg_trg_Leave_Cactaur_Deserts, function Trig_Leave_Cactaur_Deserts_Actions )
endfunction
function Trig_Cactaur_Deserts_Func001001001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true )
endfunction
function Trig_Cactaur_Deserts_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(gg_rct_Cactaur_Deserts, Condition(function Trig_Cactaur_Deserts_Func001001001002))) > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Cactaur_Deserts_Func003001 takes nothing returns boolean
return ( udg_DiceRoll == 2 )
endfunction
function Trig_Cactaur_Deserts_Func004001 takes nothing returns boolean
return ( udg_DiceRoll == 1 )
endfunction
function Trig_Cactaur_Deserts_Func005001 takes nothing returns boolean
return ( udg_DiceRoll == 3 )
endfunction
function Trig_Cactaur_Deserts_Func006001 takes nothing returns boolean
return ( udg_DiceRoll == 4 )
endfunction
function Trig_Cactaur_Deserts_Func007001 takes nothing returns boolean
return ( udg_DiceRoll == 5 )
endfunction
function Trig_Cactaur_Deserts_Func008001 takes nothing returns boolean
return ( udg_DiceRoll == 6 )
endfunction
function Trig_Cactaur_Deserts_Func009002003001001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true )
endfunction
function Trig_Cactaur_Deserts_Func009002 takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "patrol", GetUnitLoc(GroupPickRandomUnit(GetUnitsInRectMatching(gg_rct_Cactaur_Deserts, Condition(function Trig_Cactaur_Deserts_Func009002003001001002)))) )
endfunction
function Trig_Cactaur_Deserts_Func010002 takes nothing returns nothing
call SetUnitExplodedBJ( GetEnumUnit(), true )
endfunction
function Trig_Cactaur_Deserts_Actions takes nothing returns nothing
set udg_DiceRoll = GetRandomInt(1, 6)
if ( Trig_Cactaur_Deserts_Func003001() ) then
call CreateNUnitsAtLocFacingLocBJ( 3, 'n00M', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Cactaur_Deserts), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Cactaur_Deserts_Func004001() ) then
call CreateNUnitsAtLocFacingLocBJ( 4, 'n01D', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Cactaur_Deserts), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Cactaur_Deserts_Func005001() ) then
call CreateNUnitsAtLocFacingLocBJ( 4, 'n00M', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Cactaur_Deserts), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Cactaur_Deserts_Func006001() ) then
call CreateNUnitsAtLocFacingLocBJ( 5, 'n00M', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Cactaur_Deserts), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Cactaur_Deserts_Func007001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'n01D', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Cactaur_Deserts), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Cactaur_Deserts_Func008001() ) then
call CreateNUnitsAtLocFacingLocBJ( 2, 'n02W', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Cactaur_Deserts), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Cactaur_Deserts, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Cactaur_Deserts_Func009002 )
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Cactaur_Deserts, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Cactaur_Deserts_Func010002 )
endfunction
//===========================================================================
function InitTrig_Cactaur_Deserts takes nothing returns nothing
set gg_trg_Cactaur_Deserts = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Cactaur_Deserts, 10.00 )
call TriggerAddCondition( gg_trg_Cactaur_Deserts, Condition( function Trig_Cactaur_Deserts_Conditions ) )
call TriggerAddAction( gg_trg_Cactaur_Deserts, function Trig_Cactaur_Deserts_Actions )
endfunction
function Trig_Cactaur_Deserts_Clear_Func001001001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true )
endfunction
function Trig_Cactaur_Deserts_Clear_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(gg_rct_Cactaur_Deserts, Condition(function Trig_Cactaur_Deserts_Clear_Func001001001002))) == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Cactaur_Deserts_Clear_Func002002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Cactaur_Deserts_Clear_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Cactaur_Deserts, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Cactaur_Deserts_Clear_Func002002 )
endfunction
//===========================================================================
function InitTrig_Cactaur_Deserts_Clear takes nothing returns nothing
set gg_trg_Cactaur_Deserts_Clear = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Cactaur_Deserts_Clear, 10.00 )
call TriggerAddCondition( gg_trg_Cactaur_Deserts_Clear, Condition( function Trig_Cactaur_Deserts_Clear_Conditions ) )
call TriggerAddAction( gg_trg_Cactaur_Deserts_Clear, function Trig_Cactaur_Deserts_Clear_Actions )
endfunction
function Trig_Enter_Great_Forest_Conditions takes nothing returns boolean
if ( not ( GetPlayerController(GetOwningPlayer(GetEnteringUnit())) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_Enter_Great_Forest_Actions takes nothing returns nothing
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit())), "TRIGSTR_1481" )
call DisableTrigger( GetTriggeringTrigger() )
call TriggerSleepAction( 10.00 )
call EnableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Enter_Great_Forest takes nothing returns nothing
set gg_trg_Enter_Great_Forest = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Enter_Great_Forest, gg_rct_Great_Forest )
call TriggerAddCondition( gg_trg_Enter_Great_Forest, Condition( function Trig_Enter_Great_Forest_Conditions ) )
call TriggerAddAction( gg_trg_Enter_Great_Forest, function Trig_Enter_Great_Forest_Actions )
endfunction
function Trig_Leave_Great_Forest_Conditions takes nothing returns boolean
if ( not ( GetPlayerController(GetOwningPlayer(GetLeavingUnit())) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_Leave_Great_Forest_Actions takes nothing returns nothing
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit())), "TRIGSTR_1482" )
call DisableTrigger( GetTriggeringTrigger() )
call TriggerSleepAction( 10.00 )
call EnableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Leave_Great_Forest takes nothing returns nothing
set gg_trg_Leave_Great_Forest = CreateTrigger( )
call TriggerRegisterLeaveRectSimple( gg_trg_Leave_Great_Forest, gg_rct_Great_Forest )
call TriggerAddCondition( gg_trg_Leave_Great_Forest, Condition( function Trig_Leave_Great_Forest_Conditions ) )
call TriggerAddAction( gg_trg_Leave_Great_Forest, function Trig_Leave_Great_Forest_Actions )
endfunction
function Trig_Great_Forest_Func001001001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true )
endfunction
function Trig_Great_Forest_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(gg_rct_Great_Forest, Condition(function Trig_Great_Forest_Func001001001002))) > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Great_Forest_Func003001 takes nothing returns boolean
return ( udg_DiceRoll == 1 )
endfunction
function Trig_Great_Forest_Func004001 takes nothing returns boolean
return ( udg_DiceRoll == 2 )
endfunction
function Trig_Great_Forest_Func005001 takes nothing returns boolean
return ( udg_DiceRoll == 3 )
endfunction
function Trig_Great_Forest_Func006001 takes nothing returns boolean
return ( udg_DiceRoll == 4 )
endfunction
function Trig_Great_Forest_Func007001 takes nothing returns boolean
return ( udg_DiceRoll == 5 )
endfunction
function Trig_Great_Forest_Func008001 takes nothing returns boolean
return ( udg_DiceRoll == 6 )
endfunction
function Trig_Great_Forest_Func009002003001001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true )
endfunction
function Trig_Great_Forest_Func009002 takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "patrol", GetUnitLoc(GroupPickRandomUnit(GetUnitsInRectMatching(gg_rct_Great_Forest, Condition(function Trig_Great_Forest_Func009002003001001002)))) )
endfunction
function Trig_Great_Forest_Func010002 takes nothing returns nothing
call SetUnitExplodedBJ( GetEnumUnit(), true )
endfunction
function Trig_Great_Forest_Actions takes nothing returns nothing
set udg_DiceRoll = GetRandomInt(1, 6)
if ( Trig_Great_Forest_Func003001() ) then
call CreateNUnitsAtLocFacingLocBJ( 4, 'n016', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Great_Forest), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Great_Forest_Func004001() ) then
call CreateNUnitsAtLocFacingLocBJ( 3, 'n00O', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Great_Forest), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Great_Forest_Func005001() ) then
call CreateNUnitsAtLocFacingLocBJ( 6, 'n00N', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Great_Forest), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Great_Forest_Func006001() ) then
call CreateNUnitsAtLocFacingLocBJ( 5, 'n00O', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Great_Forest), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Great_Forest_Func007001() ) then
call CreateNUnitsAtLocFacingLocBJ( 4, 'n01E', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Great_Forest), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Great_Forest_Func008001() ) then
call CreateNUnitsAtLocFacingLocBJ( 2, 'n02R', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Great_Forest), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Great_Forest, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Great_Forest_Func009002 )
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Great_Forest, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Great_Forest_Func010002 )
endfunction
//===========================================================================
function InitTrig_Great_Forest takes nothing returns nothing
set gg_trg_Great_Forest = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Great_Forest, 10.00 )
call TriggerAddCondition( gg_trg_Great_Forest, Condition( function Trig_Great_Forest_Conditions ) )
call TriggerAddAction( gg_trg_Great_Forest, function Trig_Great_Forest_Actions )
endfunction
function Trig_Great_Forest_Clear_Func001001001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true )
endfunction
function Trig_Great_Forest_Clear_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(gg_rct_Great_Forest, Condition(function Trig_Great_Forest_Clear_Func001001001002))) == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Great_Forest_Clear_Func002002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Great_Forest_Clear_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Great_Forest, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Great_Forest_Clear_Func002002 )
endfunction
//===========================================================================
function InitTrig_Great_Forest_Clear takes nothing returns nothing
set gg_trg_Great_Forest_Clear = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Great_Forest_Clear, 10.00 )
call TriggerAddCondition( gg_trg_Great_Forest_Clear, Condition( function Trig_Great_Forest_Clear_Conditions ) )
call TriggerAddAction( gg_trg_Great_Forest_Clear, function Trig_Great_Forest_Clear_Actions )
endfunction
function Trig_Enter_Mountains_Conditions takes nothing returns boolean
if ( not ( GetPlayerController(GetOwningPlayer(GetEnteringUnit())) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_Enter_Mountains_Actions takes nothing returns nothing
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit())), "TRIGSTR_1483" )
call DisableTrigger( GetTriggeringTrigger() )
call TriggerSleepAction( 10.00 )
call EnableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Enter_Mountains takes nothing returns nothing
set gg_trg_Enter_Mountains = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Enter_Mountains, gg_rct_Mountains )
call TriggerAddCondition( gg_trg_Enter_Mountains, Condition( function Trig_Enter_Mountains_Conditions ) )
call TriggerAddAction( gg_trg_Enter_Mountains, function Trig_Enter_Mountains_Actions )
endfunction
function Trig_Leave_Mountains_Conditions takes nothing returns boolean
if ( not ( GetPlayerController(GetOwningPlayer(GetLeavingUnit())) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_Leave_Mountains_Actions takes nothing returns nothing
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit())), "TRIGSTR_1484" )
call DisableTrigger( GetTriggeringTrigger() )
call TriggerSleepAction( 10.00 )
call EnableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Leave_Mountains takes nothing returns nothing
set gg_trg_Leave_Mountains = CreateTrigger( )
call TriggerRegisterLeaveRectSimple( gg_trg_Leave_Mountains, gg_rct_Mountains )
call TriggerAddCondition( gg_trg_Leave_Mountains, Condition( function Trig_Leave_Mountains_Conditions ) )
call TriggerAddAction( gg_trg_Leave_Mountains, function Trig_Leave_Mountains_Actions )
endfunction
function Trig_Mountains_Func001001001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true )
endfunction
function Trig_Mountains_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(gg_rct_Mountains, Condition(function Trig_Mountains_Func001001001002))) > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Mountains_Func003001 takes nothing returns boolean
return ( udg_DiceRoll == 1 )
endfunction
function Trig_Mountains_Func004001 takes nothing returns boolean
return ( udg_DiceRoll == 2 )
endfunction
function Trig_Mountains_Func005001 takes nothing returns boolean
return ( udg_DiceRoll == 3 )
endfunction
function Trig_Mountains_Func006001 takes nothing returns boolean
return ( udg_DiceRoll == 4 )
endfunction
function Trig_Mountains_Func007001 takes nothing returns boolean
return ( udg_DiceRoll == 5 )
endfunction
function Trig_Mountains_Func008002003001001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true )
endfunction
function Trig_Mountains_Func008002 takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "patrol", GetUnitLoc(GroupPickRandomUnit(GetUnitsInRectMatching(gg_rct_Mountains, Condition(function Trig_Mountains_Func008002003001001002)))) )
endfunction
function Trig_Mountains_Func009002 takes nothing returns nothing
call SetUnitExplodedBJ( GetEnumUnit(), true )
endfunction
function Trig_Mountains_Actions takes nothing returns nothing
set udg_DiceRoll = GetRandomInt(1, 5)
if ( Trig_Mountains_Func003001() ) then
call CreateNUnitsAtLocFacingLocBJ( 4, 'n016', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Mountains), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Mountains_Func004001() ) then
call CreateNUnitsAtLocFacingLocBJ( 3, 'n017', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Mountains), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Mountains_Func005001() ) then
call CreateNUnitsAtLocFacingLocBJ( 6, 'n01E', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Mountains), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Mountains_Func006001() ) then
call CreateNUnitsAtLocFacingLocBJ( 5, 'n018', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Mountains), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Mountains_Func007001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'n018', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Mountains), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Mountains, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Mountains_Func008002 )
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Mountains, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Mountains_Func009002 )
endfunction
//===========================================================================
function InitTrig_Mountains takes nothing returns nothing
set gg_trg_Mountains = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Mountains, 10.00 )
call TriggerAddCondition( gg_trg_Mountains, Condition( function Trig_Mountains_Conditions ) )
call TriggerAddAction( gg_trg_Mountains, function Trig_Mountains_Actions )
endfunction
function Trig_Mountains_Clear_Func001001001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true )
endfunction
function Trig_Mountains_Clear_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(gg_rct_Mountains, Condition(function Trig_Mountains_Clear_Func001001001002))) == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Mountains_Clear_Func002002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Mountains_Clear_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Mountains, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Mountains_Clear_Func002002 )
endfunction
//===========================================================================
function InitTrig_Mountains_Clear takes nothing returns nothing
set gg_trg_Mountains_Clear = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Mountains_Clear, 10.00 )
call TriggerAddCondition( gg_trg_Mountains_Clear, Condition( function Trig_Mountains_Clear_Conditions ) )
call TriggerAddAction( gg_trg_Mountains_Clear, function Trig_Mountains_Clear_Actions )
endfunction
function Trig_Enter_Icecap_Conditions takes nothing returns boolean
if ( not ( GetPlayerController(GetOwningPlayer(GetEnteringUnit())) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_Enter_Icecap_Actions takes nothing returns nothing
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit())), "TRIGSTR_1485" )
call DisableTrigger( GetTriggeringTrigger() )
call TriggerSleepAction( 10.00 )
call EnableTrigger( GetTriggeringTrigger() )
call PlayMusicBJ( gg_snd_SadMystery )
endfunction
//===========================================================================
function InitTrig_Enter_Icecap takes nothing returns nothing
set gg_trg_Enter_Icecap = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Enter_Icecap, gg_rct_Icecap )
call TriggerAddCondition( gg_trg_Enter_Icecap, Condition( function Trig_Enter_Icecap_Conditions ) )
call TriggerAddAction( gg_trg_Enter_Icecap, function Trig_Enter_Icecap_Actions )
endfunction
function Trig_Enter_The_Beach_Conditions takes nothing returns boolean
if ( not ( GetPlayerController(GetOwningPlayer(GetEnteringUnit())) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_Enter_The_Beach_Actions takes nothing returns nothing
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit())), "TRIGSTR_1486" )
call DisableTrigger( GetTriggeringTrigger() )
call TriggerSleepAction( 10.00 )
call EnableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Enter_The_Beach takes nothing returns nothing
set gg_trg_Enter_The_Beach = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Enter_The_Beach, gg_rct_The_Beach )
call TriggerAddCondition( gg_trg_Enter_The_Beach, Condition( function Trig_Enter_The_Beach_Conditions ) )
call TriggerAddAction( gg_trg_Enter_The_Beach, function Trig_Enter_The_Beach_Actions )
endfunction
function Trig_Leave_The_Beach_Conditions takes nothing returns boolean
if ( not ( GetPlayerController(GetOwningPlayer(GetLeavingUnit())) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_Leave_The_Beach_Actions takes nothing returns nothing
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit())), "TRIGSTR_1487" )
call DisableTrigger( GetTriggeringTrigger() )
call TriggerSleepAction( 10.00 )
call EnableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Leave_The_Beach takes nothing returns nothing
set gg_trg_Leave_The_Beach = CreateTrigger( )
call TriggerRegisterLeaveRectSimple( gg_trg_Leave_The_Beach, gg_rct_The_Beach )
call TriggerAddCondition( gg_trg_Leave_The_Beach, Condition( function Trig_Leave_The_Beach_Conditions ) )
call TriggerAddAction( gg_trg_Leave_The_Beach, function Trig_Leave_The_Beach_Actions )
endfunction
function Trig_Beach_Func001001001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true )
endfunction
function Trig_Beach_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(gg_rct_The_Beach, Condition(function Trig_Beach_Func001001001002))) > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Beach_Func003001 takes nothing returns boolean
return ( udg_DiceRoll == 1 )
endfunction
function Trig_Beach_Func004001 takes nothing returns boolean
return ( udg_DiceRoll == 2 )
endfunction
function Trig_Beach_Func005001 takes nothing returns boolean
return ( udg_DiceRoll == 3 )
endfunction
function Trig_Beach_Func006001 takes nothing returns boolean
return ( udg_DiceRoll == 3 )
endfunction
function Trig_Beach_Func007001 takes nothing returns boolean
return ( udg_DiceRoll == 5 )
endfunction
function Trig_Beach_Func008001 takes nothing returns boolean
return ( udg_DiceRoll == 6 )
endfunction
function Trig_Beach_Func009002003001001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true )
endfunction
function Trig_Beach_Func009002 takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "patrol", GetUnitLoc(GroupPickRandomUnit(GetUnitsInRectMatching(gg_rct_The_Beach, Condition(function Trig_Beach_Func009002003001001002)))) )
endfunction
function Trig_Beach_Func010002 takes nothing returns nothing
call SetUnitExplodedBJ( GetEnumUnit(), true )
endfunction
function Trig_Beach_Actions takes nothing returns nothing
set udg_DiceRoll = GetRandomInt(1, 6)
if ( Trig_Beach_Func003001() ) then
call CreateNUnitsAtLocFacingLocBJ( 4, 'n00O', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_The_Beach), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Beach_Func004001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'n02D', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_The_Beach), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Beach_Func005001() ) then
call CreateNUnitsAtLocFacingLocBJ( 4, 'n024', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_The_Beach), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Beach_Func006001() ) then
call CreateNUnitsAtLocFacingLocBJ( 3, 'n01F', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_The_Beach), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Beach_Func007001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'n00R', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_The_Beach), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Beach_Func008001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'n02X', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_The_Beach), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_The_Beach, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Beach_Func009002 )
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_The_Beach, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Beach_Func010002 )
endfunction
//===========================================================================
function InitTrig_Beach takes nothing returns nothing
set gg_trg_Beach = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Beach, 10.00 )
call TriggerAddCondition( gg_trg_Beach, Condition( function Trig_Beach_Conditions ) )
call TriggerAddAction( gg_trg_Beach, function Trig_Beach_Actions )
endfunction
function Trig_Beach_Clear_Func001001001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true )
endfunction
function Trig_Beach_Clear_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(gg_rct_The_Beach, Condition(function Trig_Beach_Clear_Func001001001002))) == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Beach_Clear_Func002002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Beach_Clear_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_The_Beach, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Beach_Clear_Func002002 )
endfunction
//===========================================================================
function InitTrig_Beach_Clear takes nothing returns nothing
set gg_trg_Beach_Clear = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Beach_Clear, 10.00 )
call TriggerAddCondition( gg_trg_Beach_Clear, Condition( function Trig_Beach_Clear_Conditions ) )
call TriggerAddAction( gg_trg_Beach_Clear, function Trig_Beach_Clear_Actions )
endfunction
function Trig_Enter_Southern_Tundra_Conditions takes nothing returns boolean
if ( not ( GetPlayerController(GetOwningPlayer(GetEnteringUnit())) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_Enter_Southern_Tundra_Actions takes nothing returns nothing
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit())), "TRIGSTR_1488" )
call DisableTrigger( GetTriggeringTrigger() )
call TriggerSleepAction( 10.00 )
call EnableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Enter_Southern_Tundra takes nothing returns nothing
set gg_trg_Enter_Southern_Tundra = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Enter_Southern_Tundra, gg_rct_Southern_Tundra )
call TriggerAddCondition( gg_trg_Enter_Southern_Tundra, Condition( function Trig_Enter_Southern_Tundra_Conditions ) )
call TriggerAddAction( gg_trg_Enter_Southern_Tundra, function Trig_Enter_Southern_Tundra_Actions )
endfunction
function Trig_Leave_Southern_Tundra_Conditions takes nothing returns boolean
if ( not ( GetPlayerController(GetOwningPlayer(GetLeavingUnit())) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_Leave_Southern_Tundra_Actions takes nothing returns nothing
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit())), "TRIGSTR_1489" )
call DisableTrigger( GetTriggeringTrigger() )
call TriggerSleepAction( 10.00 )
call EnableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Leave_Southern_Tundra takes nothing returns nothing
set gg_trg_Leave_Southern_Tundra = CreateTrigger( )
call TriggerRegisterLeaveRectSimple( gg_trg_Leave_Southern_Tundra, gg_rct_Southern_Tundra )
call TriggerAddCondition( gg_trg_Leave_Southern_Tundra, Condition( function Trig_Leave_Southern_Tundra_Conditions ) )
call TriggerAddAction( gg_trg_Leave_Southern_Tundra, function Trig_Leave_Southern_Tundra_Actions )
endfunction
function Trig_Southern_Tundra_Func001001001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true )
endfunction
function Trig_Southern_Tundra_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(gg_rct_Southern_Tundra, Condition(function Trig_Southern_Tundra_Func001001001002))) > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Southern_Tundra_Func003001 takes nothing returns boolean
return ( udg_DiceRoll == 1 )
endfunction
function Trig_Southern_Tundra_Func004001 takes nothing returns boolean
return ( udg_DiceRoll == 2 )
endfunction
function Trig_Southern_Tundra_Func005001 takes nothing returns boolean
return ( udg_DiceRoll == 3 )
endfunction
function Trig_Southern_Tundra_Func006001 takes nothing returns boolean
return ( udg_DiceRoll == 4 )
endfunction
function Trig_Southern_Tundra_Func007001 takes nothing returns boolean
return ( udg_DiceRoll == 5 )
endfunction
function Trig_Southern_Tundra_Func008002003001001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true )
endfunction
function Trig_Southern_Tundra_Func008002 takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "patrol", GetUnitLoc(GroupPickRandomUnit(GetUnitsInRectMatching(gg_rct_Southern_Tundra, Condition(function Trig_Southern_Tundra_Func008002003001001002)))) )
endfunction
function Trig_Southern_Tundra_Func009002 takes nothing returns nothing
call SetUnitExplodedBJ( GetEnumUnit(), true )
endfunction
function Trig_Southern_Tundra_Actions takes nothing returns nothing
set udg_DiceRoll = GetRandomInt(1, 5)
if ( Trig_Southern_Tundra_Func003001() ) then
call CreateNUnitsAtLocFacingLocBJ( 4, 'n028', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Southern_Tundra), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Southern_Tundra_Func004001() ) then
call CreateNUnitsAtLocFacingLocBJ( 4, 'n01Z', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Southern_Tundra), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Southern_Tundra_Func005001() ) then
call CreateNUnitsAtLocFacingLocBJ( 6, 'n00P', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Southern_Tundra), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Southern_Tundra_Func006001() ) then
call CreateNUnitsAtLocFacingLocBJ( 5, 'n028', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Southern_Tundra), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Southern_Tundra_Func007001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'n023', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Southern_Tundra), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Southern_Tundra, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Southern_Tundra_Func008002 )
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Southern_Tundra, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Southern_Tundra_Func009002 )
endfunction
//===========================================================================
function InitTrig_Southern_Tundra takes nothing returns nothing
set gg_trg_Southern_Tundra = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Southern_Tundra, 10.00 )
call TriggerAddCondition( gg_trg_Southern_Tundra, Condition( function Trig_Southern_Tundra_Conditions ) )
call TriggerAddAction( gg_trg_Southern_Tundra, function Trig_Southern_Tundra_Actions )
endfunction
function Trig_Southern_Tundra_Clear_Func001001001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true )
endfunction
function Trig_Southern_Tundra_Clear_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(gg_rct_Southern_Tundra, Condition(function Trig_Southern_Tundra_Clear_Func001001001002))) == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Southern_Tundra_Clear_Func002002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Southern_Tundra_Clear_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Southern_Tundra, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Southern_Tundra_Clear_Func002002 )
endfunction
//===========================================================================
function InitTrig_Southern_Tundra_Clear takes nothing returns nothing
set gg_trg_Southern_Tundra_Clear = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Southern_Tundra_Clear, 10.00 )
call TriggerAddCondition( gg_trg_Southern_Tundra_Clear, Condition( function Trig_Southern_Tundra_Clear_Conditions ) )
call TriggerAddAction( gg_trg_Southern_Tundra_Clear, function Trig_Southern_Tundra_Clear_Actions )
endfunction
function Trig_Enter_Mushroom_Forest_Conditions takes nothing returns boolean
if ( not ( GetPlayerController(GetOwningPlayer(GetEnteringUnit())) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_Enter_Mushroom_Forest_Actions takes nothing returns nothing
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit())), "TRIGSTR_1490" )
call DisableTrigger( GetTriggeringTrigger() )
call TriggerSleepAction( 10.00 )
call EnableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Enter_Mushroom_Forest takes nothing returns nothing
set gg_trg_Enter_Mushroom_Forest = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Enter_Mushroom_Forest, gg_rct_Mushroom_Forest )
call TriggerAddCondition( gg_trg_Enter_Mushroom_Forest, Condition( function Trig_Enter_Mushroom_Forest_Conditions ) )
call TriggerAddAction( gg_trg_Enter_Mushroom_Forest, function Trig_Enter_Mushroom_Forest_Actions )
endfunction
function Trig_Leave_Mushroom_Forest_Conditions takes nothing returns boolean
if ( not ( GetPlayerController(GetOwningPlayer(GetLeavingUnit())) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_Leave_Mushroom_Forest_Actions takes nothing returns nothing
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit())), "TRIGSTR_1491" )
call DisableTrigger( GetTriggeringTrigger() )
call TriggerSleepAction( 10.00 )
call EnableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Leave_Mushroom_Forest takes nothing returns nothing
set gg_trg_Leave_Mushroom_Forest = CreateTrigger( )
call TriggerRegisterLeaveRectSimple( gg_trg_Leave_Mushroom_Forest, gg_rct_Mushroom_Forest )
call TriggerAddCondition( gg_trg_Leave_Mushroom_Forest, Condition( function Trig_Leave_Mushroom_Forest_Conditions ) )
call TriggerAddAction( gg_trg_Leave_Mushroom_Forest, function Trig_Leave_Mushroom_Forest_Actions )
endfunction
function Trig_Mushroom_Forest_Func001001001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true )
endfunction
function Trig_Mushroom_Forest_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(gg_rct_Mushroom_Forest, Condition(function Trig_Mushroom_Forest_Func001001001002))) > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Mushroom_Forest_Func003001 takes nothing returns boolean
return ( udg_DiceRoll == 1 )
endfunction
function Trig_Mushroom_Forest_Func004001 takes nothing returns boolean
return ( udg_DiceRoll == 2 )
endfunction
function Trig_Mushroom_Forest_Func005001 takes nothing returns boolean
return ( udg_DiceRoll == 4 )
endfunction
function Trig_Mushroom_Forest_Func006002003001001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true )
endfunction
function Trig_Mushroom_Forest_Func006002 takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "patrol", GetUnitLoc(GroupPickRandomUnit(GetUnitsInRectMatching(gg_rct_Mushroom_Forest, Condition(function Trig_Mushroom_Forest_Func006002003001001002)))) )
endfunction
function Trig_Mushroom_Forest_Func007002 takes nothing returns nothing
call SetUnitExplodedBJ( GetEnumUnit(), true )
endfunction
function Trig_Mushroom_Forest_Actions takes nothing returns nothing
set udg_DiceRoll = GetRandomInt(1, 3)
if ( Trig_Mushroom_Forest_Func003001() ) then
call CreateNUnitsAtLocFacingLocBJ( 10, 'n02C', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Mushroom_Forest), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Mushroom_Forest_Func004001() ) then
call CreateNUnitsAtLocFacingLocBJ( 10, 'n026', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Mushroom_Forest), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Mushroom_Forest_Func005001() ) then
call CreateNUnitsAtLocFacingLocBJ( 10, 'n01T', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Mushroom_Forest), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Mushroom_Forest, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Mushroom_Forest_Func006002 )
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Mushroom_Forest, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Mushroom_Forest_Func007002 )
endfunction
//===========================================================================
function InitTrig_Mushroom_Forest takes nothing returns nothing
set gg_trg_Mushroom_Forest = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Mushroom_Forest, 10.00 )
call TriggerAddCondition( gg_trg_Mushroom_Forest, Condition( function Trig_Mushroom_Forest_Conditions ) )
call TriggerAddAction( gg_trg_Mushroom_Forest, function Trig_Mushroom_Forest_Actions )
endfunction
function Trig_Mushroom_Forest_Clear_Func002001001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true )
endfunction
function Trig_Mushroom_Forest_Clear_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(gg_rct_Mushroom_Forest, Condition(function Trig_Mushroom_Forest_Clear_Func002001001002))) == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Mushroom_Forest_Clear_Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'n02I' ) ) then
return false
endif
return true
endfunction
function Trig_Mushroom_Forest_Clear_Func001A takes nothing returns nothing
if ( Trig_Mushroom_Forest_Clear_Func001Func001C() ) then
call RemoveUnit( GetEnumUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_Mushroom_Forest_Clear_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Mushroom_Forest, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Mushroom_Forest_Clear_Func001A )
endfunction
//===========================================================================
function InitTrig_Mushroom_Forest_Clear takes nothing returns nothing
set gg_trg_Mushroom_Forest_Clear = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Mushroom_Forest_Clear, 10.00 )
call TriggerAddCondition( gg_trg_Mushroom_Forest_Clear, Condition( function Trig_Mushroom_Forest_Clear_Conditions ) )
call TriggerAddAction( gg_trg_Mushroom_Forest_Clear, function Trig_Mushroom_Forest_Clear_Actions )
endfunction
function Trig_Enter_Southern_Forest_Conditions takes nothing returns boolean
if ( not ( GetPlayerController(GetOwningPlayer(GetEnteringUnit())) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_Enter_Southern_Forest_Actions takes nothing returns nothing
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit())), "TRIGSTR_1492" )
call DisableTrigger( GetTriggeringTrigger() )
call TriggerSleepAction( 10.00 )
call EnableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Enter_Southern_Forest takes nothing returns nothing
set gg_trg_Enter_Southern_Forest = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Enter_Southern_Forest, gg_rct_Southern_Forest )
call TriggerAddCondition( gg_trg_Enter_Southern_Forest, Condition( function Trig_Enter_Southern_Forest_Conditions ) )
call TriggerAddAction( gg_trg_Enter_Southern_Forest, function Trig_Enter_Southern_Forest_Actions )
endfunction
function Trig_Leave_Southern_Forest_Conditions takes nothing returns boolean
if ( not ( GetPlayerController(GetOwningPlayer(GetLeavingUnit())) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_Leave_Southern_Forest_Actions takes nothing returns nothing
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit())), "TRIGSTR_1493" )
call DisableTrigger( GetTriggeringTrigger() )
call TriggerSleepAction( 10.00 )
call EnableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Leave_Southern_Forest takes nothing returns nothing
set gg_trg_Leave_Southern_Forest = CreateTrigger( )
call TriggerRegisterLeaveRectSimple( gg_trg_Leave_Southern_Forest, gg_rct_Southern_Forest )
call TriggerAddCondition( gg_trg_Leave_Southern_Forest, Condition( function Trig_Leave_Southern_Forest_Conditions ) )
call TriggerAddAction( gg_trg_Leave_Southern_Forest, function Trig_Leave_Southern_Forest_Actions )
endfunction
function Trig_Southern_Forest_Func001001001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true )
endfunction
function Trig_Southern_Forest_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(gg_rct_Southern_Forest, Condition(function Trig_Southern_Forest_Func001001001002))) > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Southern_Forest_Func003001 takes nothing returns boolean
return ( udg_DiceRoll == 1 )
endfunction
function Trig_Southern_Forest_Func004001 takes nothing returns boolean
return ( udg_DiceRoll == 2 )
endfunction
function Trig_Southern_Forest_Func005001 takes nothing returns boolean
return ( udg_DiceRoll == 3 )
endfunction
function Trig_Southern_Forest_Func006001 takes nothing returns boolean
return ( udg_DiceRoll == 4 )
endfunction
function Trig_Southern_Forest_Func007001 takes nothing returns boolean
return ( udg_DiceRoll == 5 )
endfunction
function Trig_Southern_Forest_Func008002003001001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true )
endfunction
function Trig_Southern_Forest_Func008002 takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "patrol", GetUnitLoc(GroupPickRandomUnit(GetUnitsInRectMatching(gg_rct_Southern_Forest, Condition(function Trig_Southern_Forest_Func008002003001001002)))) )
endfunction
function Trig_Southern_Forest_Func009002 takes nothing returns nothing
call SetUnitExplodedBJ( GetEnumUnit(), true )
endfunction
function Trig_Southern_Forest_Actions takes nothing returns nothing
set udg_DiceRoll = GetRandomInt(1, 5)
if ( Trig_Southern_Forest_Func003001() ) then
call CreateNUnitsAtLocFacingLocBJ( 4, 'n02A', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Southern_Forest), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Southern_Forest_Func004001() ) then
call CreateNUnitsAtLocFacingLocBJ( 3, 'n027', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Southern_Forest), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Southern_Forest_Func005001() ) then
call CreateNUnitsAtLocFacingLocBJ( 6, 'n025', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Southern_Forest), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Southern_Forest_Func006001() ) then
call CreateNUnitsAtLocFacingLocBJ( 5, 'n023', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Southern_Forest), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Southern_Forest_Func007001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'n02B', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Southern_Forest), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Southern_Forest, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Southern_Forest_Func008002 )
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Southern_Forest, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Southern_Forest_Func009002 )
endfunction
//===========================================================================
function InitTrig_Southern_Forest takes nothing returns nothing
set gg_trg_Southern_Forest = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Southern_Forest, 10.00 )
call TriggerAddCondition( gg_trg_Southern_Forest, Condition( function Trig_Southern_Forest_Conditions ) )
call TriggerAddAction( gg_trg_Southern_Forest, function Trig_Southern_Forest_Actions )
endfunction
function Trig_Southern_Forest_Clear_Func001001001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true )
endfunction
function Trig_Southern_Forest_Clear_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(gg_rct_Southern_Forest, Condition(function Trig_Southern_Forest_Clear_Func001001001002))) == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Southern_Forest_Clear_Func002002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Southern_Forest_Clear_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Southern_Forest, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Southern_Forest_Clear_Func002002 )
endfunction
//===========================================================================
function InitTrig_Southern_Forest_Clear takes nothing returns nothing
set gg_trg_Southern_Forest_Clear = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Southern_Forest_Clear, 10.00 )
call TriggerAddCondition( gg_trg_Southern_Forest_Clear, Condition( function Trig_Southern_Forest_Clear_Conditions ) )
call TriggerAddAction( gg_trg_Southern_Forest_Clear, function Trig_Southern_Forest_Clear_Actions )
endfunction
function Trig_Enter_Tropical_Peninsula_Conditions takes nothing returns boolean
if ( not ( GetPlayerController(GetOwningPlayer(GetEnteringUnit())) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_Enter_Tropical_Peninsula_Actions takes nothing returns nothing
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit())), "TRIGSTR_1494" )
call DisableTrigger( GetTriggeringTrigger() )
call TriggerSleepAction( 10.00 )
call EnableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Enter_Tropical_Peninsula takes nothing returns nothing
set gg_trg_Enter_Tropical_Peninsula = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Enter_Tropical_Peninsula, gg_rct_Tropical_Peninsula )
call TriggerAddCondition( gg_trg_Enter_Tropical_Peninsula, Condition( function Trig_Enter_Tropical_Peninsula_Conditions ) )
call TriggerAddAction( gg_trg_Enter_Tropical_Peninsula, function Trig_Enter_Tropical_Peninsula_Actions )
endfunction
function Trig_Leave_Tropical_Peninsula_Conditions takes nothing returns boolean
if ( not ( GetPlayerController(GetOwningPlayer(GetLeavingUnit())) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_Leave_Tropical_Peninsula_Actions takes nothing returns nothing
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit())), "TRIGSTR_1495" )
call DisableTrigger( GetTriggeringTrigger() )
call TriggerSleepAction( 10.00 )
call EnableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Leave_Tropical_Peninsula takes nothing returns nothing
set gg_trg_Leave_Tropical_Peninsula = CreateTrigger( )
call TriggerRegisterLeaveRectSimple( gg_trg_Leave_Tropical_Peninsula, gg_rct_Tropical_Peninsula )
call TriggerAddCondition( gg_trg_Leave_Tropical_Peninsula, Condition( function Trig_Leave_Tropical_Peninsula_Conditions ) )
call TriggerAddAction( gg_trg_Leave_Tropical_Peninsula, function Trig_Leave_Tropical_Peninsula_Actions )
endfunction
function Trig_Tropical_Peninsula_Func001001001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true )
endfunction
function Trig_Tropical_Peninsula_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(gg_rct_Tropical_Peninsula, Condition(function Trig_Tropical_Peninsula_Func001001001002))) > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Tropical_Peninsula_Func003001 takes nothing returns boolean
return ( udg_DiceRoll == 1 )
endfunction
function Trig_Tropical_Peninsula_Func004001 takes nothing returns boolean
return ( udg_DiceRoll == 2 )
endfunction
function Trig_Tropical_Peninsula_Func005001 takes nothing returns boolean
return ( udg_DiceRoll == 3 )
endfunction
function Trig_Tropical_Peninsula_Func006001 takes nothing returns boolean
return ( udg_DiceRoll == 4 )
endfunction
function Trig_Tropical_Peninsula_Func007001 takes nothing returns boolean
return ( udg_DiceRoll == 5 )
endfunction
function Trig_Tropical_Peninsula_Func008002003001001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true )
endfunction
function Trig_Tropical_Peninsula_Func008002 takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "patrol", GetUnitLoc(GroupPickRandomUnit(GetUnitsInRectMatching(gg_rct_Tropical_Peninsula, Condition(function Trig_Tropical_Peninsula_Func008002003001001002)))) )
endfunction
function Trig_Tropical_Peninsula_Func009002 takes nothing returns nothing
call SetUnitExplodedBJ( GetEnumUnit(), true )
endfunction
function Trig_Tropical_Peninsula_Actions takes nothing returns nothing
set udg_DiceRoll = GetRandomInt(1, 5)
if ( Trig_Tropical_Peninsula_Func003001() ) then
call CreateNUnitsAtLocFacingLocBJ( 4, 'n00P', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Tropical_Peninsula), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Tropical_Peninsula_Func004001() ) then
call CreateNUnitsAtLocFacingLocBJ( 3, 'n01F', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Tropical_Peninsula), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Tropical_Peninsula_Func005001() ) then
call CreateNUnitsAtLocFacingLocBJ( 6, 'n018', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Tropical_Peninsula), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Tropical_Peninsula_Func006001() ) then
call CreateNUnitsAtLocFacingLocBJ( 5, 'n02D', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Tropical_Peninsula), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Tropical_Peninsula_Func007001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'n02A', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Tropical_Peninsula), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Tropical_Peninsula, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Tropical_Peninsula_Func008002 )
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Tropical_Peninsula, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Tropical_Peninsula_Func009002 )
endfunction
//===========================================================================
function InitTrig_Tropical_Peninsula takes nothing returns nothing
set gg_trg_Tropical_Peninsula = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Tropical_Peninsula, 10.00 )
call TriggerAddCondition( gg_trg_Tropical_Peninsula, Condition( function Trig_Tropical_Peninsula_Conditions ) )
call TriggerAddAction( gg_trg_Tropical_Peninsula, function Trig_Tropical_Peninsula_Actions )
endfunction
function Trig_Tropical_Peninsula_Clear_Func001001001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true )
endfunction
function Trig_Tropical_Peninsula_Clear_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(gg_rct_Tropical_Peninsula, Condition(function Trig_Tropical_Peninsula_Clear_Func001001001002))) == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Tropical_Peninsula_Clear_Func002002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Tropical_Peninsula_Clear_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Tropical_Peninsula, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Tropical_Peninsula_Clear_Func002002 )
endfunction
//===========================================================================
function InitTrig_Tropical_Peninsula_Clear takes nothing returns nothing
set gg_trg_Tropical_Peninsula_Clear = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Tropical_Peninsula_Clear, 10.00 )
call TriggerAddCondition( gg_trg_Tropical_Peninsula_Clear, Condition( function Trig_Tropical_Peninsula_Clear_Conditions ) )
call TriggerAddAction( gg_trg_Tropical_Peninsula_Clear, function Trig_Tropical_Peninsula_Clear_Actions )
endfunction
function Trig_Enter_Ancient_Forest_Conditions takes nothing returns boolean
if ( not ( GetPlayerController(GetOwningPlayer(GetEnteringUnit())) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_Enter_Ancient_Forest_Actions takes nothing returns nothing
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit())), "TRIGSTR_1496" )
call DisableTrigger( GetTriggeringTrigger() )
call TriggerSleepAction( 10.00 )
call EnableTrigger( GetTriggeringTrigger() )
call PlayMusicBJ( gg_snd_SadMystery )
endfunction
//===========================================================================
function InitTrig_Enter_Ancient_Forest takes nothing returns nothing
set gg_trg_Enter_Ancient_Forest = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Enter_Ancient_Forest, gg_rct_Ancient_Forest )
call TriggerAddCondition( gg_trg_Enter_Ancient_Forest, Condition( function Trig_Enter_Ancient_Forest_Conditions ) )
call TriggerAddAction( gg_trg_Enter_Ancient_Forest, function Trig_Enter_Ancient_Forest_Actions )
endfunction
function Trig_Leave_Ancient_Forest_Conditions takes nothing returns boolean
if ( not ( GetPlayerController(GetOwningPlayer(GetLeavingUnit())) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_Leave_Ancient_Forest_Actions takes nothing returns nothing
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit())), "TRIGSTR_1497" )
call DisableTrigger( GetTriggeringTrigger() )
call TriggerSleepAction( 10.00 )
call EnableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Leave_Ancient_Forest takes nothing returns nothing
set gg_trg_Leave_Ancient_Forest = CreateTrigger( )
call TriggerRegisterLeaveRectSimple( gg_trg_Leave_Ancient_Forest, gg_rct_Ancient_Forest )
call TriggerAddCondition( gg_trg_Leave_Ancient_Forest, Condition( function Trig_Leave_Ancient_Forest_Conditions ) )
call TriggerAddAction( gg_trg_Leave_Ancient_Forest, function Trig_Leave_Ancient_Forest_Actions )
endfunction
function Trig_Ancient_Forest_Func001001001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true )
endfunction
function Trig_Ancient_Forest_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(gg_rct_Ancient_Forest, Condition(function Trig_Ancient_Forest_Func001001001002))) > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Ancient_Forest_Func003001 takes nothing returns boolean
return ( udg_DiceRoll == 1 )
endfunction
function Trig_Ancient_Forest_Func004001 takes nothing returns boolean
return ( udg_DiceRoll == 2 )
endfunction
function Trig_Ancient_Forest_Func005001 takes nothing returns boolean
return ( udg_DiceRoll == 4 )
endfunction
function Trig_Ancient_Forest_Func006001 takes nothing returns boolean
return ( udg_DiceRoll == 5 )
endfunction
function Trig_Ancient_Forest_Func007002003001001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true )
endfunction
function Trig_Ancient_Forest_Func007002 takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "patrol", GetUnitLoc(GroupPickRandomUnit(GetUnitsInRectMatching(gg_rct_Ancient_Forest, Condition(function Trig_Ancient_Forest_Func007002003001001002)))) )
endfunction
function Trig_Ancient_Forest_Func008002 takes nothing returns nothing
call SetUnitExplodedBJ( GetEnumUnit(), true )
endfunction
function Trig_Ancient_Forest_Actions takes nothing returns nothing
set udg_DiceRoll = GetRandomInt(1, 5)
if ( Trig_Ancient_Forest_Func003001() ) then
call CreateNUnitsAtLocFacingLocBJ( 4, 'n021', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Ancient_Forest), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Ancient_Forest_Func004001() ) then
call CreateNUnitsAtLocFacingLocBJ( 3, 'n020', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Ancient_Forest), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Ancient_Forest_Func005001() ) then
call CreateNUnitsAtLocFacingLocBJ( 5, 'n022', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Ancient_Forest), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Ancient_Forest_Func006001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'n01Q', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Ancient_Forest), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Ancient_Forest, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Ancient_Forest_Func007002 )
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Ancient_Forest, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Ancient_Forest_Func008002 )
endfunction
//===========================================================================
function InitTrig_Ancient_Forest takes nothing returns nothing
set gg_trg_Ancient_Forest = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Ancient_Forest, 10.00 )
call TriggerAddCondition( gg_trg_Ancient_Forest, Condition( function Trig_Ancient_Forest_Conditions ) )
call TriggerAddAction( gg_trg_Ancient_Forest, function Trig_Ancient_Forest_Actions )
endfunction
function Trig_Ancient_Forest_Clear_Func002001001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true )
endfunction
function Trig_Ancient_Forest_Clear_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(gg_rct_Ancient_Forest, Condition(function Trig_Ancient_Forest_Clear_Func002001001002))) == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Ancient_Forest_Clear_Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'n02I' ) ) then
return false
endif
return true
endfunction
function Trig_Ancient_Forest_Clear_Func001A takes nothing returns nothing
if ( Trig_Ancient_Forest_Clear_Func001Func001C() ) then
call RemoveUnit( GetEnumUnit() )
else
endif
endfunction
function Trig_Ancient_Forest_Clear_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Ancient_Forest, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Ancient_Forest_Clear_Func001A )
endfunction
//===========================================================================
function InitTrig_Ancient_Forest_Clear takes nothing returns nothing
set gg_trg_Ancient_Forest_Clear = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Ancient_Forest_Clear, 10.00 )
call TriggerAddCondition( gg_trg_Ancient_Forest_Clear, Condition( function Trig_Ancient_Forest_Clear_Conditions ) )
call TriggerAddAction( gg_trg_Ancient_Forest_Clear, function Trig_Ancient_Forest_Clear_Actions )
endfunction
function Trig_Enter_Demon_Highlands_Conditions takes nothing returns boolean
if ( not ( GetPlayerController(GetOwningPlayer(GetEnteringUnit())) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_Enter_Demon_Highlands_Actions takes nothing returns nothing
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit())), "TRIGSTR_1498" )
call DisableTrigger( GetTriggeringTrigger() )
call TriggerSleepAction( 10.00 )
call EnableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Enter_Demon_Highlands takes nothing returns nothing
set gg_trg_Enter_Demon_Highlands = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Enter_Demon_Highlands, gg_rct_The_Demon_Meadows )
call TriggerAddCondition( gg_trg_Enter_Demon_Highlands, Condition( function Trig_Enter_Demon_Highlands_Conditions ) )
call TriggerAddAction( gg_trg_Enter_Demon_Highlands, function Trig_Enter_Demon_Highlands_Actions )
endfunction
function Trig_Leave_Demon_Highlands_Conditions takes nothing returns boolean
if ( not ( GetPlayerController(GetOwningPlayer(GetLeavingUnit())) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_Leave_Demon_Highlands_Actions takes nothing returns nothing
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit())), "TRIGSTR_1499" )
call DisableTrigger( GetTriggeringTrigger() )
call TriggerSleepAction( 10.00 )
call EnableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Leave_Demon_Highlands takes nothing returns nothing
set gg_trg_Leave_Demon_Highlands = CreateTrigger( )
call TriggerRegisterLeaveRectSimple( gg_trg_Leave_Demon_Highlands, gg_rct_The_Demon_Meadows )
call TriggerAddCondition( gg_trg_Leave_Demon_Highlands, Condition( function Trig_Leave_Demon_Highlands_Conditions ) )
call TriggerAddAction( gg_trg_Leave_Demon_Highlands, function Trig_Leave_Demon_Highlands_Actions )
endfunction
function Trig_Demon_Highlands_Func001001001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true )
endfunction
function Trig_Demon_Highlands_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(gg_rct_The_Demon_Meadows, Condition(function Trig_Demon_Highlands_Func001001001002))) > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Demon_Highlands_Func003001 takes nothing returns boolean
return ( udg_DiceRoll == 1 )
endfunction
function Trig_Demon_Highlands_Func004001 takes nothing returns boolean
return ( udg_DiceRoll == 2 )
endfunction
function Trig_Demon_Highlands_Func005001 takes nothing returns boolean
return ( udg_DiceRoll == 3 )
endfunction
function Trig_Demon_Highlands_Func006001 takes nothing returns boolean
return ( udg_DiceRoll == 4 )
endfunction
function Trig_Demon_Highlands_Func007001 takes nothing returns boolean
return ( udg_DiceRoll == 5 )
endfunction
function Trig_Demon_Highlands_Func008002003001001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true )
endfunction
function Trig_Demon_Highlands_Func008002 takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "patrol", GetUnitLoc(GroupPickRandomUnit(GetUnitsInRectMatching(gg_rct_The_Demon_Meadows, Condition(function Trig_Demon_Highlands_Func008002003001001002)))) )
endfunction
function Trig_Demon_Highlands_Func009002 takes nothing returns nothing
call SetUnitExplodedBJ( GetEnumUnit(), true )
endfunction
function Trig_Demon_Highlands_Actions takes nothing returns nothing
set udg_DiceRoll = GetRandomInt(1, 5)
if ( Trig_Demon_Highlands_Func003001() ) then
call CreateNUnitsAtLocFacingLocBJ( 4, 'n01U', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_The_Demon_Meadows), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Demon_Highlands_Func004001() ) then
call CreateNUnitsAtLocFacingLocBJ( 3, 'n01V', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_The_Demon_Meadows), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Demon_Highlands_Func005001() ) then
call CreateNUnitsAtLocFacingLocBJ( 6, 'n01W', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_The_Demon_Meadows), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Demon_Highlands_Func006001() ) then
call CreateNUnitsAtLocFacingLocBJ( 5, 'n01U', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_The_Demon_Meadows), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Demon_Highlands_Func007001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'n02E', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_The_Demon_Meadows), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_The_Demon_Meadows, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Demon_Highlands_Func008002 )
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_The_Demon_Meadows, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Demon_Highlands_Func009002 )
endfunction
//===========================================================================
function InitTrig_Demon_Highlands takes nothing returns nothing
set gg_trg_Demon_Highlands = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Demon_Highlands, 10.00 )
call TriggerAddCondition( gg_trg_Demon_Highlands, Condition( function Trig_Demon_Highlands_Conditions ) )
call TriggerAddAction( gg_trg_Demon_Highlands, function Trig_Demon_Highlands_Actions )
endfunction
function Trig_Demon_Highlands_Clear_Func002001001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true )
endfunction
function Trig_Demon_Highlands_Clear_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(gg_rct_The_Demon_Meadows, Condition(function Trig_Demon_Highlands_Clear_Func002001001002))) == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Demon_Highlands_Clear_Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'n02P' ) ) then
return false
endif
return true
endfunction
function Trig_Demon_Highlands_Clear_Func001A takes nothing returns nothing
if ( Trig_Demon_Highlands_Clear_Func001Func001C() ) then
call RemoveUnit( GetEnumUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_Demon_Highlands_Clear_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_The_Demon_Meadows, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Demon_Highlands_Clear_Func001A )
endfunction
//===========================================================================
function InitTrig_Demon_Highlands_Clear takes nothing returns nothing
set gg_trg_Demon_Highlands_Clear = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Demon_Highlands_Clear, 10.00 )
call TriggerAddCondition( gg_trg_Demon_Highlands_Clear, Condition( function Trig_Demon_Highlands_Clear_Conditions ) )
call TriggerAddAction( gg_trg_Demon_Highlands_Clear, function Trig_Demon_Highlands_Clear_Actions )
endfunction
function Trig_Enter_Kefka_Outer_Ruins_Conditions takes nothing returns boolean
if ( not ( GetPlayerController(GetOwningPlayer(GetEnteringUnit())) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_Enter_Kefka_Outer_Ruins_Actions takes nothing returns nothing
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit())), "TRIGSTR_1041" )
call DisableTrigger( GetTriggeringTrigger() )
call TriggerSleepAction( 10.00 )
call EnableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Enter_Kefka_Outer_Ruins takes nothing returns nothing
set gg_trg_Enter_Kefka_Outer_Ruins = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Enter_Kefka_Outer_Ruins, gg_rct_Kefka_Outer_Ruins )
call TriggerAddCondition( gg_trg_Enter_Kefka_Outer_Ruins, Condition( function Trig_Enter_Kefka_Outer_Ruins_Conditions ) )
call TriggerAddAction( gg_trg_Enter_Kefka_Outer_Ruins, function Trig_Enter_Kefka_Outer_Ruins_Actions )
endfunction
function Trig_Leave_Kefka_Outer_Ruins_Conditions takes nothing returns boolean
if ( not ( GetPlayerController(GetOwningPlayer(GetLeavingUnit())) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_Leave_Kefka_Outer_Ruins_Actions takes nothing returns nothing
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit())), "TRIGSTR_1042" )
call DisableTrigger( GetTriggeringTrigger() )
call TriggerSleepAction( 10.00 )
call EnableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Leave_Kefka_Outer_Ruins takes nothing returns nothing
set gg_trg_Leave_Kefka_Outer_Ruins = CreateTrigger( )
call TriggerRegisterLeaveRectSimple( gg_trg_Leave_Kefka_Outer_Ruins, gg_rct_Kefka_Outer_Ruins )
call TriggerAddCondition( gg_trg_Leave_Kefka_Outer_Ruins, Condition( function Trig_Leave_Kefka_Outer_Ruins_Conditions ) )
call TriggerAddAction( gg_trg_Leave_Kefka_Outer_Ruins, function Trig_Leave_Kefka_Outer_Ruins_Actions )
endfunction
function Trig_Kefka_Outer_Ruins_Func001001001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true )
endfunction
function Trig_Kefka_Outer_Ruins_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(gg_rct_Kefka_Outer_Ruins, Condition(function Trig_Kefka_Outer_Ruins_Func001001001002))) > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Kefka_Outer_Ruins_Func003001 takes nothing returns boolean
return ( udg_DiceRoll == 1 )
endfunction
function Trig_Kefka_Outer_Ruins_Func004001 takes nothing returns boolean
return ( udg_DiceRoll == 2 )
endfunction
function Trig_Kefka_Outer_Ruins_Func005001 takes nothing returns boolean
return ( udg_DiceRoll == 3 )
endfunction
function Trig_Kefka_Outer_Ruins_Func006001 takes nothing returns boolean
return ( udg_DiceRoll == 4 )
endfunction
function Trig_Kefka_Outer_Ruins_Func007001 takes nothing returns boolean
return ( udg_DiceRoll == 5 )
endfunction
function Trig_Kefka_Outer_Ruins_Func008002003001001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true )
endfunction
function Trig_Kefka_Outer_Ruins_Func008002 takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "patrol", GetUnitLoc(GroupPickRandomUnit(GetUnitsInRectMatching(gg_rct_Kefka_Outer_Ruins, Condition(function Trig_Kefka_Outer_Ruins_Func008002003001001002)))) )
endfunction
function Trig_Kefka_Outer_Ruins_Func009002 takes nothing returns nothing
call SetUnitExplodedBJ( GetEnumUnit(), true )
endfunction
function Trig_Kefka_Outer_Ruins_Actions takes nothing returns nothing
set udg_DiceRoll = GetRandomInt(1, 5)
if ( Trig_Kefka_Outer_Ruins_Func003001() ) then
call CreateNUnitsAtLocFacingLocBJ( 4, 'u00A', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Kefka_Outer_Ruins), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefka_Outer_Ruins_Func004001() ) then
call CreateNUnitsAtLocFacingLocBJ( 3, 'u00B', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Kefka_Outer_Ruins), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefka_Outer_Ruins_Func005001() ) then
call CreateNUnitsAtLocFacingLocBJ( 4, 'n02O', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Kefka_Outer_Ruins), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefka_Outer_Ruins_Func006001() ) then
call CreateNUnitsAtLocFacingLocBJ( 10, 'u00C', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Kefka_Outer_Ruins), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefka_Outer_Ruins_Func007001() ) then
call CreateNUnitsAtLocFacingLocBJ( 4, 'u00D', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Kefka_Outer_Ruins), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Kefka_Outer_Ruins, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Kefka_Outer_Ruins_Func008002 )
call ForGroupBJ( GetLastCreatedGroup(), function Trig_Kefka_Outer_Ruins_Func009002 )
endfunction
//===========================================================================
function InitTrig_Kefka_Outer_Ruins takes nothing returns nothing
set gg_trg_Kefka_Outer_Ruins = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Kefka_Outer_Ruins, 15.00 )
call TriggerAddCondition( gg_trg_Kefka_Outer_Ruins, Condition( function Trig_Kefka_Outer_Ruins_Conditions ) )
call TriggerAddAction( gg_trg_Kefka_Outer_Ruins, function Trig_Kefka_Outer_Ruins_Actions )
endfunction
function Trig_Kefka_Outer_Ruins_Clear_Func002001001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true )
endfunction
function Trig_Kefka_Outer_Ruins_Clear_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(gg_rct_Kefka_Outer_Ruins, Condition(function Trig_Kefka_Outer_Ruins_Clear_Func002001001002))) == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Kefka_Outer_Ruins_Clear_Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'n02Q' ) ) then
return false
endif
return true
endfunction
function Trig_Kefka_Outer_Ruins_Clear_Func001A takes nothing returns nothing
if ( Trig_Kefka_Outer_Ruins_Clear_Func001Func001C() ) then
call RemoveUnit( GetEnumUnit() )
else
endif
endfunction
function Trig_Kefka_Outer_Ruins_Clear_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_Kefka_Outer_Ruins, Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Kefka_Outer_Ruins_Clear_Func001A )
endfunction
//===========================================================================
function InitTrig_Kefka_Outer_Ruins_Clear takes nothing returns nothing
set gg_trg_Kefka_Outer_Ruins_Clear = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Kefka_Outer_Ruins_Clear, 10.00 )
call TriggerAddCondition( gg_trg_Kefka_Outer_Ruins_Clear, Condition( function Trig_Kefka_Outer_Ruins_Clear_Conditions ) )
call TriggerAddAction( gg_trg_Kefka_Outer_Ruins_Clear, function Trig_Kefka_Outer_Ruins_Clear_Actions )
endfunction
function Trig_Human_Players_Actions takes nothing returns nothing
call ForceAddPlayerSimple( Player(0), udg_HumanPlayers )
call ForceAddPlayerSimple( Player(1), udg_HumanPlayers )
call ForceAddPlayerSimple( Player(2), udg_HumanPlayers )
call ForceAddPlayerSimple( Player(3), udg_HumanPlayers )
call ForceAddPlayerSimple( Player(4), udg_HumanPlayers )
call ForceAddPlayerSimple( Player(5), udg_HumanPlayers )
call ForceAddPlayerSimple( Player(6), udg_HumanPlayers )
call ForceAddPlayerSimple( Player(7), udg_HumanPlayers )
call ForceAddPlayerSimple( Player(8), udg_HumanPlayers )
call ForceAddPlayerSimple( Player(9), udg_HumanPlayers )
call ForceAddPlayerSimple( Player(10), udg_HumanPlayers )
endfunction
//===========================================================================
function InitTrig_Human_Players takes nothing returns nothing
set gg_trg_Human_Players = CreateTrigger( )
call TriggerAddAction( gg_trg_Human_Players, function Trig_Human_Players_Actions )
endfunction
function Trig_Change_music_Func001001 takes nothing returns boolean
return ( SubStringBJ(GetEventPlayerChatString(), 12, 13) == "1" )
endfunction
function Trig_Change_music_Func002001 takes nothing returns boolean
return ( SubStringBJ(GetEventPlayerChatString(), 12, 13) == "2" )
endfunction
function Trig_Change_music_Func003001 takes nothing returns boolean
return ( SubStringBJ(GetEventPlayerChatString(), 12, 13) == "3" )
endfunction
function Trig_Change_music_Func004001 takes nothing returns boolean
return ( SubStringBJ(GetEventPlayerChatString(), 12, 13) == "4" )
endfunction
function Trig_Change_music_Func005001 takes nothing returns boolean
return ( SubStringBJ(GetEventPlayerChatString(), 12, 13) == "5" )
endfunction
function Trig_Change_music_Actions takes nothing returns nothing
if ( Trig_Change_music_Func001001() ) then
call PlayMusicBJ( gg_snd_Celtic_Moon )
else
call DoNothing( )
endif
if ( Trig_Change_music_Func002001() ) then
call PlayMusicBJ( gg_snd_Clouds_Theme )
else
call DoNothing( )
endif
if ( Trig_Change_music_Func003001() ) then
call PlayMusicBJ( gg_snd_Liberi_Fatali )
else
call DoNothing( )
endif
if ( Trig_Change_music_Func004001() ) then
call PlayMusicBJ( gg_snd_One_Winged_Angel )
else
call DoNothing( )
endif
if ( Trig_Change_music_Func005001() ) then
call PlayMusicBJ( gg_snd_Terras_theme )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Change_music takes nothing returns nothing
set gg_trg_Change_music = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Change_music, Player(0), "-set music", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Change_music, Player(1), "-set music", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Change_music, Player(2), "-set music", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Change_music, Player(3), "-set music", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Change_music, Player(4), "-set music", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Change_music, Player(5), "-set music", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Change_music, Player(6), "-set music", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Change_music, Player(7), "-set music", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Change_music, Player(8), "-set music", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Change_music, Player(9), "-set music", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Change_music, Player(10), "-set music", false )
call TriggerAddAction( gg_trg_Change_music, function Trig_Change_music_Actions )
endfunction
function Trig_Town_Guard_Dies_to_Player_Conditions takes nothing returns boolean
if ( not ( GetPlayerController(GetOwningPlayer(GetKillingUnitBJ())) == MAP_CONTROL_USER ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetDyingUnit()) == Player(PLAYER_NEUTRAL_PASSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Town_Guard_Dies_to_Player_Actions takes nothing returns nothing
call SetPlayerAllianceStateBJ( Player(PLAYER_NEUTRAL_PASSIVE), GetOwningPlayer(GetKillingUnitBJ()), bj_ALLIANCE_UNALLIED )
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetKillingUnitBJ())), "TRIGSTR_1524" )
endfunction
//===========================================================================
function InitTrig_Town_Guard_Dies_to_Player takes nothing returns nothing
set gg_trg_Town_Guard_Dies_to_Player = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Town_Guard_Dies_to_Player, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Town_Guard_Dies_to_Player, Condition( function Trig_Town_Guard_Dies_to_Player_Conditions ) )
call TriggerAddAction( gg_trg_Town_Guard_Dies_to_Player, function Trig_Town_Guard_Dies_to_Player_Actions )
endfunction
function Trig_Town_Guard_Attacked_by_Player_Conditions takes nothing returns boolean
if ( not ( GetPlayerController(GetOwningPlayer(GetAttacker())) == MAP_CONTROL_USER ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetAttackedUnitBJ()) == Player(PLAYER_NEUTRAL_PASSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Town_Guard_Attacked_by_Player_Actions takes nothing returns nothing
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetAttacker())), "TRIGSTR_1525" )
endfunction
//===========================================================================
function InitTrig_Town_Guard_Attacked_by_Player takes nothing returns nothing
set gg_trg_Town_Guard_Attacked_by_Player = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Town_Guard_Attacked_by_Player, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Town_Guard_Attacked_by_Player, Condition( function Trig_Town_Guard_Attacked_by_Player_Conditions ) )
call TriggerAddAction( gg_trg_Town_Guard_Attacked_by_Player, function Trig_Town_Guard_Attacked_by_Player_Actions )
endfunction
function Trig_Create_Starting_Life_Func003A takes nothing returns nothing
call UnitShareVisionBJ( true, GetLastCreatedUnit(), GetEnumPlayer() )
endfunction
function Trig_Create_Starting_Life_Actions takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'e007', Player(PLAYER_NEUTRAL_PASSIVE), GetRectCenter(gg_rct_Life_Spawn), bj_UNIT_FACING )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call ForForce( GetPlayersAll(), function Trig_Create_Starting_Life_Func003A )
endfunction
//===========================================================================
function InitTrig_Create_Starting_Life takes nothing returns nothing
set gg_trg_Create_Starting_Life = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Create_Starting_Life, 30.00 )
call TriggerAddAction( gg_trg_Create_Starting_Life, function Trig_Create_Starting_Life_Actions )
endfunction
function Trig_Create_Starting_Life_Copy_Func003A takes nothing returns nothing
call UnitShareVisionBJ( true, GetLastCreatedUnit(), GetEnumPlayer() )
endfunction
function Trig_Create_Starting_Life_Copy_Func006A takes nothing returns nothing
call UnitShareVisionBJ( true, GetLastCreatedUnit(), GetEnumPlayer() )
endfunction
function Trig_Create_Starting_Life_Copy_Func009A takes nothing returns nothing
call UnitShareVisionBJ( true, GetLastCreatedUnit(), GetEnumPlayer() )
endfunction
function Trig_Create_Starting_Life_Copy_Func012A takes nothing returns nothing
call UnitShareVisionBJ( true, GetLastCreatedUnit(), GetEnumPlayer() )
endfunction
function Trig_Create_Starting_Life_Copy_Actions takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'e007', Player(PLAYER_NEUTRAL_PASSIVE), GetRectCenter(gg_rct_Life_Spawn_Copy), bj_UNIT_FACING )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call ForForce( GetPlayersAll(), function Trig_Create_Starting_Life_Copy_Func003A )
call CreateNUnitsAtLoc( 1, 'e007', Player(PLAYER_NEUTRAL_PASSIVE), GetRectCenter(gg_rct_Life_Spawn_Copy_2), bj_UNIT_FACING )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call ForForce( GetPlayersAll(), function Trig_Create_Starting_Life_Copy_Func006A )
call CreateNUnitsAtLoc( 1, 'e007', Player(PLAYER_NEUTRAL_PASSIVE), GetRectCenter(gg_rct_Life_Spawn_Copy_3), bj_UNIT_FACING )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call ForForce( GetPlayersAll(), function Trig_Create_Starting_Life_Copy_Func009A )
call CreateNUnitsAtLoc( 1, 'e007', Player(PLAYER_NEUTRAL_PASSIVE), GetRectCenter(gg_rct_Life_Spawn_Copy_4), bj_UNIT_FACING )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call ForForce( GetPlayersAll(), function Trig_Create_Starting_Life_Copy_Func012A )
endfunction
//===========================================================================
function InitTrig_Create_Starting_Life_Copy takes nothing returns nothing
set gg_trg_Create_Starting_Life_Copy = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Create_Starting_Life_Copy, 30.00 )
call TriggerAddAction( gg_trg_Create_Starting_Life_Copy, function Trig_Create_Starting_Life_Copy_Actions )
endfunction
function Trig_Mountain_Exception_Entering_Conditions takes nothing returns boolean
if ( not ( IsUnitEnemy(GetEnteringUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Mountain_Exception_Entering_Actions takes nothing returns nothing
set udg_CutsceneisOn = true
endfunction
//===========================================================================
function InitTrig_Mountain_Exception_Entering takes nothing returns nothing
set gg_trg_Mountain_Exception_Entering = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Mountain_Exception_Entering, gg_rct_Mountains )
call TriggerAddCondition( gg_trg_Mountain_Exception_Entering, Condition( function Trig_Mountain_Exception_Entering_Conditions ) )
call TriggerAddAction( gg_trg_Mountain_Exception_Entering, function Trig_Mountain_Exception_Entering_Actions )
endfunction
function Trig_Mountain_Exception_Leaving_Conditions takes nothing returns boolean
if ( not ( IsUnitEnemy(GetEnteringUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Mountain_Exception_Leaving_Actions takes nothing returns nothing
set udg_CutsceneisOn = false
endfunction
//===========================================================================
function InitTrig_Mountain_Exception_Leaving takes nothing returns nothing
set gg_trg_Mountain_Exception_Leaving = CreateTrigger( )
call TriggerRegisterLeaveRectSimple( gg_trg_Mountain_Exception_Leaving, gg_rct_Mountains )
call TriggerAddCondition( gg_trg_Mountain_Exception_Leaving, Condition( function Trig_Mountain_Exception_Leaving_Conditions ) )
call TriggerAddAction( gg_trg_Mountain_Exception_Leaving, function Trig_Mountain_Exception_Leaving_Actions )
endfunction
function Trig_Initialization_Func002Func001001 takes nothing returns boolean
return ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Initialization_Func002Func002001 takes nothing returns boolean
return ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Initialization_Func004A takes nothing returns nothing
call CameraSetupApplyForPlayer( true, gg_cam_Beginning, GetEnumPlayer(), 0 )
endfunction
function Trig_Initialization_Func006002 takes nothing returns nothing
call SetUnitExplodedBJ( GetEnumUnit(), true )
endfunction
function Trig_Initialization_Func010002002 takes nothing returns nothing
call SetPlayerStateBJ( GetEnumPlayer(), PLAYER_STATE_RESOURCE_GOLD, 1500 )
endfunction
function Trig_Initialization_Func010002 takes nothing returns nothing
call ForForce( GetPlayersAll(), function Trig_Initialization_Func010002002 )
endfunction
function Trig_Initialization_Func014002 takes nothing returns nothing
call SetUnitExplodedBJ( GetEnumUnit(), true )
endfunction
function Trig_Initialization_Actions takes nothing returns nothing
set udg_NumberOfPlayers = 0
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 11
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Initialization_Func002Func001001() ) then
set udg_NumberOfPlayers = ( udg_NumberOfPlayers + 1 )
else
call DoNothing( )
endif
if ( Trig_Initialization_Func002Func002001() ) then
call CreateNUnitsAtLoc( 1, 'ewsp', ConvertedPlayer(GetForLoopIndexA()), GetRandomLocInRect(gg_rct_Wisp_Starting_Area), bj_UNIT_FACING )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call PlayMusicBJ( gg_snd_Clouds_Theme )
call ForForce( GetPlayersByMapControl(MAP_CONTROL_USER), function Trig_Initialization_Func004A )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 12
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set udg_HigherCamera[GetForLoopIndexA()] = true
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ForGroupBJ( GetUnitsInRectAll(GetPlayableMapRect()), function Trig_Initialization_Func006002 )
call VolumeGroupSetVolumeBJ( SOUND_VOLUMEGROUP_MUSIC, 100 )
call SetTimeOfDay( 6.00 )
call SetSkyModel( "Environment\\Sky\\Sky\\SkyLight.mdl" )
call ForForce( GetPlayersAll(), function Trig_Initialization_Func010002 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 11
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call SetPlayerAllianceStateBJ( Player(11), ConvertedPlayer(GetForLoopIndexA()), bj_ALLIANCE_UNALLIED )
call SetPlayerAllianceStateBJ( ConvertedPlayer(GetForLoopIndexA()), Player(11), bj_ALLIANCE_UNALLIED )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call SetPlayerAllianceStateBJ( Player(11), Player(PLAYER_NEUTRAL_PASSIVE), bj_ALLIANCE_UNALLIED )
call SetPlayerAllianceStateBJ( Player(PLAYER_NEUTRAL_PASSIVE), Player(11), bj_ALLIANCE_UNALLIED )
call ForGroupBJ( GetUnitsOfPlayerAll(Player(PLAYER_NEUTRAL_AGGRESSIVE)), function Trig_Initialization_Func014002 )
endfunction
//===========================================================================
function InitTrig_Initialization takes nothing returns nothing
set gg_trg_Initialization = CreateTrigger( )
call TriggerAddAction( gg_trg_Initialization, function Trig_Initialization_Actions )
endfunction
function Trig_Hostile_bombs_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetTriggerUnit()) == Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Hostile_bombs_Actions takes nothing returns nothing
call SetUnitExplodedBJ( GetTriggerUnit(), true )
endfunction
//===========================================================================
function InitTrig_Hostile_bombs takes nothing returns nothing
set gg_trg_Hostile_bombs = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Hostile_bombs, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Hostile_bombs, Condition( function Trig_Hostile_bombs_Conditions ) )
call TriggerAddAction( gg_trg_Hostile_bombs, function Trig_Hostile_bombs_Actions )
endfunction
function Trig_Cid_killer_protect_Actions takes nothing returns nothing
call SetUnitInvulnerable( gg_unit_N002_0092, true )
endfunction
//===========================================================================
function InitTrig_Cid_killer_protect takes nothing returns nothing
set gg_trg_Cid_killer_protect = CreateTrigger( )
call TriggerAddAction( gg_trg_Cid_killer_protect, function Trig_Cid_killer_protect_Actions )
endfunction
function Trig_Magic_Orb_Use_Materia_Func004C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I03Y' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I02L' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I00F' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I04C' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I00D' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I02O' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I02N' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I02K' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I000' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I02P' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I02S' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I00H' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I00C' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I02M' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I00G' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I02I' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I02J' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I00B' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I00E' ) ) then
return true
endif
return false
endfunction
function Trig_Magic_Orb_Use_Materia_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'H02D' ) ) then
return false
endif
if ( not Trig_Magic_Orb_Use_Materia_Func004C() ) then
return false
endif
return true
endfunction
function Trig_Magic_Orb_Use_Materia_Actions takes nothing returns nothing
call RemoveItem( GetManipulatedItem() )
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit())), "TRIGSTR_499" )
endfunction
//===========================================================================
function InitTrig_Magic_Orb_Use_Materia takes nothing returns nothing
set gg_trg_Magic_Orb_Use_Materia = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Magic_Orb_Use_Materia, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Magic_Orb_Use_Materia, Condition( function Trig_Magic_Orb_Use_Materia_Conditions ) )
call TriggerAddAction( gg_trg_Magic_Orb_Use_Materia, function Trig_Magic_Orb_Use_Materia_Actions )
endfunction
function Trig_Full_Onion_Set_Remove_Func001C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I04R' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I04O' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I04Q' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I04P' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I04S' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I04T' ) ) then
return true
endif
return false
endfunction
function Trig_Full_Onion_Set_Remove_Conditions takes nothing returns boolean
if ( not Trig_Full_Onion_Set_Remove_Func001C() ) then
return false
endif
return true
endfunction
function Trig_Full_Onion_Set_Remove_Func003C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(udg_OnionKid, 'I04R') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(udg_OnionKid, 'I04O') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(udg_OnionKid, 'I04Q') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(udg_OnionKid, 'I04T') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(udg_OnionKid, 'I04P') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(udg_OnionKid, 'I04S') == true ) ) then
return false
endif
return true
endfunction
function Trig_Full_Onion_Set_Remove_Actions takes nothing returns nothing
set udg_OnionKid = GetManipulatingUnit()
if ( Trig_Full_Onion_Set_Remove_Func003C() ) then
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(udg_OnionKid)), "TRIGSTR_160" )
call ModifyHeroStat( bj_HEROSTAT_STR, udg_OnionKid, bj_MODIFYMETHOD_SUB, 39615 )
call ModifyHeroStat( bj_HEROSTAT_AGI, udg_OnionKid, bj_MODIFYMETHOD_SUB, 39615 )
call ModifyHeroStat( bj_HEROSTAT_INT, udg_OnionKid, bj_MODIFYMETHOD_SUB, 39615 )
else
endif
endfunction
//===========================================================================
function InitTrig_Full_Onion_Set_Remove takes nothing returns nothing
set gg_trg_Full_Onion_Set_Remove = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Full_Onion_Set_Remove, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_Full_Onion_Set_Remove, Condition( function Trig_Full_Onion_Set_Remove_Conditions ) )
call TriggerAddAction( gg_trg_Full_Onion_Set_Remove, function Trig_Full_Onion_Set_Remove_Actions )
endfunction
function Trig_Init_Variables_Actions takes nothing returns nothing
set udg_colors[1] = "|c00ff0303"
set udg_colors[2] = "|c000042ff"
set udg_colors[3] = "|c001ce6b9"
set udg_colors[4] = "|c00540081"
set udg_colors[5] = "|c00fffc01"
set udg_colors[6] = "|c00feba0e"
set udg_colors[7] = "|c0020c000"
set udg_colors[8] = "|c00e55bb0"
set udg_colors[9] = "|c00959697"
set udg_colors[10] = "|c007ebff1"
set udg_colors[11] = "|c00106246"
set udg_colors[12] = "|c004e2a04"
endfunction
//===========================================================================
function InitTrig_Init_Variables takes nothing returns nothing
set gg_trg_Init_Variables = CreateTrigger( )
call TriggerAddAction( gg_trg_Init_Variables, function Trig_Init_Variables_Actions )
endfunction
function Trig_treasure_drop_Func002001 takes nothing returns boolean
return ( udg_DiceDrop == 1 )
endfunction
function Trig_treasure_drop_Func003001 takes nothing returns boolean
return ( udg_DiceDrop == 2 )
endfunction
function Trig_treasure_drop_Func004001 takes nothing returns boolean
return ( udg_DiceDrop == 3 )
endfunction
function Trig_treasure_drop_Func005001 takes nothing returns boolean
return ( udg_DiceDrop == 4 )
endfunction
function Trig_treasure_drop_Func006001 takes nothing returns boolean
return ( udg_DiceDrop == 5 )
endfunction
function Trig_treasure_drop_Func007001 takes nothing returns boolean
return ( udg_DiceDrop == 6 )
endfunction
function Trig_treasure_drop_Func008001 takes nothing returns boolean
return ( udg_DiceDrop == 7 )
endfunction
function Trig_treasure_drop_Func009001 takes nothing returns boolean
return ( udg_DiceDrop == 8 )
endfunction
function Trig_treasure_drop_Func010001 takes nothing returns boolean
return ( udg_DiceDrop == 9 )
endfunction
function Trig_treasure_drop_Func011001 takes nothing returns boolean
return ( udg_DiceDrop == 10 )
endfunction
function Trig_treasure_drop_Func012001 takes nothing returns boolean
return ( udg_DiceDrop == 11 )
endfunction
function Trig_treasure_drop_Func013001 takes nothing returns boolean
return ( udg_DiceDrop == 12 )
endfunction
function Trig_treasure_drop_Actions takes nothing returns nothing
set udg_DiceDrop = GetRandomInt(1, 140)
if ( Trig_treasure_drop_Func002001() ) then
call CreateItemLoc( 'I05S', GetDestructableLoc(GetDyingDestructable()) )
else
call DoNothing( )
endif
if ( Trig_treasure_drop_Func003001() ) then
call CreateItemLoc( 'I05O', GetDestructableLoc(GetDyingDestructable()) )
else
call DoNothing( )
endif
if ( Trig_treasure_drop_Func004001() ) then
call CreateItemLoc( 'I05P', GetDestructableLoc(GetDyingDestructable()) )
else
call DoNothing( )
endif
if ( Trig_treasure_drop_Func005001() ) then
call CreateItemLoc( 'I05M', GetDestructableLoc(GetDyingDestructable()) )
else
call DoNothing( )
endif
if ( Trig_treasure_drop_Func006001() ) then
call CreateItemLoc( 'I05E', GetDestructableLoc(GetDyingDestructable()) )
else
call DoNothing( )
endif
if ( Trig_treasure_drop_Func007001() ) then
call CreateItemLoc( 'I04Z', GetDestructableLoc(GetDyingDestructable()) )
else
call DoNothing( )
endif
if ( Trig_treasure_drop_Func008001() ) then
call CreateItemLoc( 'I061', GetDestructableLoc(GetDyingDestructable()) )
else
call DoNothing( )
endif
if ( Trig_treasure_drop_Func009001() ) then
call CreateItemLoc( 'I062', GetDestructableLoc(GetDyingDestructable()) )
else
call DoNothing( )
endif
if ( Trig_treasure_drop_Func010001() ) then
call CreateItemLoc( 'I060', GetDestructableLoc(GetDyingDestructable()) )
else
call DoNothing( )
endif
if ( Trig_treasure_drop_Func011001() ) then
call CreateItemLoc( 'I063', GetDestructableLoc(GetDyingDestructable()) )
else
call DoNothing( )
endif
if ( Trig_treasure_drop_Func012001() ) then
call CreateItemLoc( 'I05L', GetDestructableLoc(GetDyingDestructable()) )
else
call DoNothing( )
endif
if ( Trig_treasure_drop_Func013001() ) then
call CreateItemLoc( 'I05F', GetDestructableLoc(GetDyingDestructable()) )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_treasure_drop takes nothing returns nothing
set gg_trg_treasure_drop = CreateTrigger( )
call TriggerRegisterDeathEvent( gg_trg_treasure_drop, gg_dest_LTbr_3774 )
call TriggerRegisterDeathEvent( gg_trg_treasure_drop, gg_dest_LTbs_3773 )
call TriggerRegisterDeathEvent( gg_trg_treasure_drop, gg_dest_LTbs_3772 )
call TriggerRegisterDeathEvent( gg_trg_treasure_drop, gg_dest_LTbs_4074 )
call TriggerRegisterDeathEvent( gg_trg_treasure_drop, gg_dest_LTbs_3871 )
call TriggerRegisterDeathEvent( gg_trg_treasure_drop, gg_dest_LTbs_4072 )
call TriggerRegisterDeathEvent( gg_trg_treasure_drop, gg_dest_LTbs_4069 )
call TriggerRegisterDeathEvent( gg_trg_treasure_drop, gg_dest_LTbs_3949 )
call TriggerRegisterDeathEvent( gg_trg_treasure_drop, gg_dest_LTbs_4071 )
call TriggerAddAction( gg_trg_treasure_drop, function Trig_treasure_drop_Actions )
endfunction
function Trig_Poison_Spider_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'n010' ) ) then
return false
endif
return true
endfunction
function Trig_Poison_Spider_Func002001 takes nothing returns boolean
return ( udg_DiceDrop > 30 )
endfunction
function Trig_Poison_Spider_Actions takes nothing returns nothing
set udg_DiceDrop = GetRandomInt(1, 50)
if ( Trig_Poison_Spider_Func002001() ) then
call CreateItemLoc( 'I05K', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Poison_Spider takes nothing returns nothing
set gg_trg_Poison_Spider = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Poison_Spider, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Poison_Spider, Condition( function Trig_Poison_Spider_Conditions ) )
call TriggerAddAction( gg_trg_Poison_Spider, function Trig_Poison_Spider_Actions )
endfunction
function Trig_Gray_Goblin_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'n00X' ) ) then
return false
endif
return true
endfunction
function Trig_Gray_Goblin_Func002001 takes nothing returns boolean
return ( udg_DiceDrop > 30 )
endfunction
function Trig_Gray_Goblin_Actions takes nothing returns nothing
set udg_DiceDrop = GetRandomInt(1, 50)
if ( Trig_Gray_Goblin_Func002001() ) then
call CreateItemLoc( 'I05K', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Gray_Goblin takes nothing returns nothing
set gg_trg_Gray_Goblin = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Gray_Goblin, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Gray_Goblin, Condition( function Trig_Gray_Goblin_Conditions ) )
call TriggerAddAction( gg_trg_Gray_Goblin, function Trig_Gray_Goblin_Actions )
endfunction
function Trig_Sand_Worm_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'n00M' ) ) then
return false
endif
return true
endfunction
function Trig_Sand_Worm_Func002001 takes nothing returns boolean
return ( udg_DiceDrop > 30 )
endfunction
function Trig_Sand_Worm_Actions takes nothing returns nothing
set udg_DiceDrop = GetRandomInt(1, 50)
if ( Trig_Sand_Worm_Func002001() ) then
call CreateItemLoc( 'I05K', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Sand_Worm takes nothing returns nothing
set gg_trg_Sand_Worm = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Sand_Worm, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Sand_Worm, Condition( function Trig_Sand_Worm_Conditions ) )
call TriggerAddAction( gg_trg_Sand_Worm, function Trig_Sand_Worm_Actions )
endfunction
function Trig_Assassin_Drop_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'n017' ) ) then
return false
endif
return true
endfunction
function Trig_Assassin_Drop_Func002001 takes nothing returns boolean
return ( udg_DiceDrop == 1 )
endfunction
function Trig_Assassin_Drop_Func003001 takes nothing returns boolean
return ( udg_DiceDrop > 30 )
endfunction
function Trig_Assassin_Drop_Actions takes nothing returns nothing
set udg_DiceDrop = GetRandomInt(1, 50)
if ( Trig_Assassin_Drop_Func002001() ) then
call CreateItemLoc( 'I05B', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Assassin_Drop_Func003001() ) then
call CreateItemLoc( 'I05K', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Assassin_Drop takes nothing returns nothing
set gg_trg_Assassin_Drop = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Assassin_Drop, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Assassin_Drop, Condition( function Trig_Assassin_Drop_Conditions ) )
call TriggerAddAction( gg_trg_Assassin_Drop, function Trig_Assassin_Drop_Actions )
endfunction
function Trig_Flan_Drop_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'n015' ) ) then
return false
endif
return true
endfunction
function Trig_Flan_Drop_Func002001 takes nothing returns boolean
return ( udg_DiceDrop == 1 )
endfunction
function Trig_Flan_Drop_Func003001 takes nothing returns boolean
return ( udg_DiceDrop > 30 )
endfunction
function Trig_Flan_Drop_Actions takes nothing returns nothing
set udg_DiceDrop = GetRandomInt(1, 50)
if ( Trig_Flan_Drop_Func002001() ) then
call CreateItemLoc( 'I05D', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Flan_Drop_Func003001() ) then
call CreateItemLoc( 'I05K', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Flan_Drop takes nothing returns nothing
set gg_trg_Flan_Drop = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Flan_Drop, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Flan_Drop, Condition( function Trig_Flan_Drop_Conditions ) )
call TriggerAddAction( gg_trg_Flan_Drop, function Trig_Flan_Drop_Actions )
endfunction
function Trig_Giant_Crab_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'n024' ) ) then
return false
endif
return true
endfunction
function Trig_Giant_Crab_Func002001 takes nothing returns boolean
return ( udg_DiceDrop == 2 )
endfunction
function Trig_Giant_Crab_Func003001 takes nothing returns boolean
return ( udg_DiceDrop == 3 )
endfunction
function Trig_Giant_Crab_Func004001 takes nothing returns boolean
return ( udg_DiceDrop == 1 )
endfunction
function Trig_Giant_Crab_Actions takes nothing returns nothing
set udg_DiceDrop = GetRandomInt(1, 50)
if ( Trig_Giant_Crab_Func002001() ) then
call CreateItemLoc( 'I05J', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Giant_Crab_Func003001() ) then
call CreateItemLoc( 'I03M', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Giant_Crab_Func004001() ) then
call CreateItemLoc( 'I05C', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Giant_Crab takes nothing returns nothing
set gg_trg_Giant_Crab = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Giant_Crab, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Giant_Crab, Condition( function Trig_Giant_Crab_Conditions ) )
call TriggerAddAction( gg_trg_Giant_Crab, function Trig_Giant_Crab_Actions )
endfunction
function Trig_Drop_commons_Func001C takes nothing returns boolean
if ( ( GetUnitTypeId(GetDyingUnit()) == 'n00X' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetDyingUnit()) == 'n011' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetDyingUnit()) == 'n00N' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetDyingUnit()) == 'n00W' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetDyingUnit()) == 'n01A' ) ) then
return true
endif
return false
endfunction
function Trig_Drop_commons_Conditions takes nothing returns boolean
if ( not Trig_Drop_commons_Func001C() ) then
return false
endif
return true
endfunction
function Trig_Drop_commons_Func003001 takes nothing returns boolean
return ( udg_DiceDrop == 1 )
endfunction
function Trig_Drop_commons_Func004001 takes nothing returns boolean
return ( udg_DiceDrop == 2 )
endfunction
function Trig_Drop_commons_Func005001 takes nothing returns boolean
return ( udg_DiceDrop == 3 )
endfunction
function Trig_Drop_commons_Func006001 takes nothing returns boolean
return ( udg_DiceDrop == 4 )
endfunction
function Trig_Drop_commons_Func007001 takes nothing returns boolean
return ( udg_DiceDrop == 5 )
endfunction
function Trig_Drop_commons_Func008001 takes nothing returns boolean
return ( udg_DiceDrop == 6 )
endfunction
function Trig_Drop_commons_Func009001 takes nothing returns boolean
return ( udg_DiceDrop == 7 )
endfunction
function Trig_Drop_commons_Func010001 takes nothing returns boolean
return ( udg_DiceDrop == 8 )
endfunction
function Trig_Drop_commons_Func011001 takes nothing returns boolean
return ( udg_DiceDrop == 9 )
endfunction
function Trig_Drop_commons_Func012001 takes nothing returns boolean
return ( udg_DiceDrop == 10 )
endfunction
function Trig_Drop_commons_Func013001 takes nothing returns boolean
return ( udg_DiceDrop == 11 )
endfunction
function Trig_Drop_commons_Func014001 takes nothing returns boolean
return ( udg_DiceDrop >= 55 )
endfunction
function Trig_Drop_commons_Actions takes nothing returns nothing
set udg_DiceDrop = GetRandomInt(1, 80)
if ( Trig_Drop_commons_Func003001() ) then
call CreateItemLoc( 'I03V', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Drop_commons_Func004001() ) then
call CreateItemLoc( 'I00L', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Drop_commons_Func005001() ) then
call CreateItemLoc( 'I00M', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Drop_commons_Func006001() ) then
call CreateItemLoc( 'I005', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Drop_commons_Func007001() ) then
call CreateItemLoc( 'I02D', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Drop_commons_Func008001() ) then
call CreateItemLoc( 'I003', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Drop_commons_Func009001() ) then
call CreateItemLoc( 'I028', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Drop_commons_Func010001() ) then
call CreateItemLoc( 'I03W', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Drop_commons_Func011001() ) then
call CreateItemLoc( 'I03G', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Drop_commons_Func012001() ) then
call CreateItemLoc( 'I05H', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Drop_commons_Func013001() ) then
call CreateItemLoc( 'I003', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Drop_commons_Func014001() ) then
call CreateItemLoc( 'I05K', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Drop_commons takes nothing returns nothing
set gg_trg_Drop_commons = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Drop_commons, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Drop_commons, Condition( function Trig_Drop_commons_Conditions ) )
call TriggerAddAction( gg_trg_Drop_commons, function Trig_Drop_commons_Actions )
endfunction
function Trig_Drop_uncommons_Func001C takes nothing returns boolean
if ( ( GetUnitTypeId(GetDyingUnit()) == 'n026' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetDyingUnit()) == 'n00S' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetDyingUnit()) == 'n02B' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetDyingUnit()) == 'n02W' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetDyingUnit()) == 'n01S' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetDyingUnit()) == 'n00Q' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetDyingUnit()) == 'n018' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetDyingUnit()) == 'n01U' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetDyingUnit()) == 'u00B' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetDyingUnit()) == 'u00A' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetDyingUnit()) == 'u00D' ) ) then
return true
endif
return false
endfunction
function Trig_Drop_uncommons_Conditions takes nothing returns boolean
if ( not Trig_Drop_uncommons_Func001C() ) then
return false
endif
return true
endfunction
function Trig_Drop_uncommons_Func003001 takes nothing returns boolean
return ( udg_DiceDrop == 1 )
endfunction
function Trig_Drop_uncommons_Func004001 takes nothing returns boolean
return ( udg_DiceDrop == 2 )
endfunction
function Trig_Drop_uncommons_Func005001 takes nothing returns boolean
return ( udg_DiceDrop == 3 )
endfunction
function Trig_Drop_uncommons_Func006001 takes nothing returns boolean
return ( udg_DiceDrop == 4 )
endfunction
function Trig_Drop_uncommons_Func007001 takes nothing returns boolean
return ( udg_DiceDrop == 5 )
endfunction
function Trig_Drop_uncommons_Func008001 takes nothing returns boolean
return ( udg_DiceDrop == 6 )
endfunction
function Trig_Drop_uncommons_Func009001 takes nothing returns boolean
return ( udg_DiceDrop == 7 )
endfunction
function Trig_Drop_uncommons_Func010001 takes nothing returns boolean
return ( udg_DiceDrop == 8 )
endfunction
function Trig_Drop_uncommons_Func011001 takes nothing returns boolean
return ( udg_DiceDrop == 9 )
endfunction
function Trig_Drop_uncommons_Func012001 takes nothing returns boolean
return ( udg_DiceDrop == 10 )
endfunction
function Trig_Drop_uncommons_Func013001 takes nothing returns boolean
return ( udg_DiceDrop == 11 )
endfunction
function Trig_Drop_uncommons_Func014001 takes nothing returns boolean
return ( udg_DiceDrop == 12 )
endfunction
function Trig_Drop_uncommons_Func015001 takes nothing returns boolean
return ( udg_DiceDrop >= 80 )
endfunction
function Trig_Drop_uncommons_Actions takes nothing returns nothing
set udg_DiceDrop = GetRandomInt(1, 110)
if ( Trig_Drop_uncommons_Func003001() ) then
call CreateItemLoc( 'I05C', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Drop_uncommons_Func004001() ) then
call CreateItemLoc( 'I05D', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Drop_uncommons_Func005001() ) then
call CreateItemLoc( 'I00O', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Drop_uncommons_Func006001() ) then
call CreateItemLoc( 'I059', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Drop_uncommons_Func007001() ) then
call CreateItemLoc( 'I05B', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Drop_uncommons_Func008001() ) then
call CreateItemLoc( 'I05A', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Drop_uncommons_Func009001() ) then
call CreateItemLoc( 'I05M', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Drop_uncommons_Func010001() ) then
call CreateItemLoc( 'I05N', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Drop_uncommons_Func011001() ) then
call CreateItemLoc( 'I05I', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Drop_uncommons_Func012001() ) then
call CreateItemLoc( 'I05H', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Drop_uncommons_Func013001() ) then
call CreateItemLoc( 'I05F', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Drop_uncommons_Func014001() ) then
call CreateItemLoc( 'I061', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Drop_uncommons_Func015001() ) then
call CreateItemLoc( 'I05K', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Drop_uncommons takes nothing returns nothing
set gg_trg_Drop_uncommons = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Drop_uncommons, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Drop_uncommons, Condition( function Trig_Drop_uncommons_Conditions ) )
call TriggerAddAction( gg_trg_Drop_uncommons, function Trig_Drop_uncommons_Actions )
endfunction
function Trig_Uncommon_Boss_Drops_Func001C takes nothing returns boolean
if ( ( GetUnitTypeId(GetDyingUnit()) == 'n02Z' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetDyingUnit()) == 'n02Y' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetDyingUnit()) == 'n030' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetDyingUnit()) == 'n031' ) ) then
return true
endif
return false
endfunction
function Trig_Uncommon_Boss_Drops_Conditions takes nothing returns boolean
if ( not Trig_Uncommon_Boss_Drops_Func001C() ) then
return false
endif
return true
endfunction
function Trig_Uncommon_Boss_Drops_Func003001 takes nothing returns boolean
return ( udg_DiceDrop == 1 )
endfunction
function Trig_Uncommon_Boss_Drops_Func004001 takes nothing returns boolean
return ( udg_DiceDrop == 2 )
endfunction
function Trig_Uncommon_Boss_Drops_Func005001 takes nothing returns boolean
return ( udg_DiceDrop == 3 )
endfunction
function Trig_Uncommon_Boss_Drops_Func006001 takes nothing returns boolean
return ( udg_DiceDrop == 4 )
endfunction
function Trig_Uncommon_Boss_Drops_Func007001 takes nothing returns boolean
return ( udg_DiceDrop == 5 )
endfunction
function Trig_Uncommon_Boss_Drops_Func008001 takes nothing returns boolean
return ( udg_DiceDrop == 6 )
endfunction
function Trig_Uncommon_Boss_Drops_Func009001 takes nothing returns boolean
return ( udg_DiceDrop == 7 )
endfunction
function Trig_Uncommon_Boss_Drops_Func010001 takes nothing returns boolean
return ( udg_DiceDrop == 8 )
endfunction
function Trig_Uncommon_Boss_Drops_Func011001 takes nothing returns boolean
return ( udg_DiceDrop == 9 )
endfunction
function Trig_Uncommon_Boss_Drops_Func012001 takes nothing returns boolean
return ( udg_DiceDrop == 10 )
endfunction
function Trig_Uncommon_Boss_Drops_Func013001 takes nothing returns boolean
return ( udg_DiceDrop == 11 )
endfunction
function Trig_Uncommon_Boss_Drops_Func014001 takes nothing returns boolean
return ( udg_DiceDrop == 12 )
endfunction
function Trig_Uncommon_Boss_Drops_Func015001 takes nothing returns boolean
return ( udg_DiceDrop >= 13 )
endfunction
function Trig_Uncommon_Boss_Drops_Actions takes nothing returns nothing
set udg_DiceDrop = GetRandomInt(1, 24)
if ( Trig_Uncommon_Boss_Drops_Func003001() ) then
call CreateItemLoc( 'I05C', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Uncommon_Boss_Drops_Func004001() ) then
call CreateItemLoc( 'I05D', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Uncommon_Boss_Drops_Func005001() ) then
call CreateItemLoc( 'I00O', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Uncommon_Boss_Drops_Func006001() ) then
call CreateItemLoc( 'I059', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Uncommon_Boss_Drops_Func007001() ) then
call CreateItemLoc( 'I05B', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Uncommon_Boss_Drops_Func008001() ) then
call CreateItemLoc( 'I05A', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Uncommon_Boss_Drops_Func009001() ) then
call CreateItemLoc( 'I05M', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Uncommon_Boss_Drops_Func010001() ) then
call CreateItemLoc( 'I05N', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Uncommon_Boss_Drops_Func011001() ) then
call CreateItemLoc( 'I05I', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Uncommon_Boss_Drops_Func012001() ) then
call CreateItemLoc( 'I05H', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Uncommon_Boss_Drops_Func013001() ) then
call CreateItemLoc( 'I05F', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Uncommon_Boss_Drops_Func014001() ) then
call CreateItemLoc( 'I061', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Uncommon_Boss_Drops_Func015001() ) then
call CreateItemLoc( 'I05K', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Uncommon_Boss_Drops takes nothing returns nothing
set gg_trg_Uncommon_Boss_Drops = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Uncommon_Boss_Drops, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Uncommon_Boss_Drops, Condition( function Trig_Uncommon_Boss_Drops_Conditions ) )
call TriggerAddAction( gg_trg_Uncommon_Boss_Drops, function Trig_Uncommon_Boss_Drops_Actions )
endfunction
function Trig_Green_Dragon_Drop_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'n020' ) ) then
return false
endif
return true
endfunction
function Trig_Green_Dragon_Drop_Func002001 takes nothing returns boolean
return ( udg_DiceDrop == 1 )
endfunction
function Trig_Green_Dragon_Drop_Func003001 takes nothing returns boolean
return ( udg_DiceDrop == 2 )
endfunction
function Trig_Green_Dragon_Drop_Func004001 takes nothing returns boolean
return ( udg_DiceDrop > 30 )
endfunction
function Trig_Green_Dragon_Drop_Actions takes nothing returns nothing
set udg_DiceDrop = GetRandomInt(1, 50)
if ( Trig_Green_Dragon_Drop_Func002001() ) then
call CreateItemLoc( 'I05A', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Green_Dragon_Drop_Func003001() ) then
call CreateItemLoc( 'I02N', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Green_Dragon_Drop_Func004001() ) then
call CreateItemLoc( 'I05K', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Green_Dragon_Drop takes nothing returns nothing
set gg_trg_Green_Dragon_Drop = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Green_Dragon_Drop, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Green_Dragon_Drop, Condition( function Trig_Green_Dragon_Drop_Conditions ) )
call TriggerAddAction( gg_trg_Green_Dragon_Drop, function Trig_Green_Dragon_Drop_Actions )
endfunction
function Trig_Giant_Forest_Dragon_Drop_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'n02I' ) ) then
return false
endif
return true
endfunction
function Trig_Giant_Forest_Dragon_Drop_Func002001 takes nothing returns boolean
return ( udg_DiceDrop == 1 )
endfunction
function Trig_Giant_Forest_Dragon_Drop_Func003001 takes nothing returns boolean
return ( udg_DiceDrop == 2 )
endfunction
function Trig_Giant_Forest_Dragon_Drop_Func004001 takes nothing returns boolean
return ( udg_DiceDrop == 3 )
endfunction
function Trig_Giant_Forest_Dragon_Drop_Func005001 takes nothing returns boolean
return ( udg_DiceDrop == 4 )
endfunction
function Trig_Giant_Forest_Dragon_Drop_Func006001 takes nothing returns boolean
return ( udg_DiceDrop == 5 )
endfunction
function Trig_Giant_Forest_Dragon_Drop_Func007001 takes nothing returns boolean
return ( udg_DiceDrop == 6 )
endfunction
function Trig_Giant_Forest_Dragon_Drop_Func008001 takes nothing returns boolean
return ( udg_DiceDrop == 7 )
endfunction
function Trig_Giant_Forest_Dragon_Drop_Func009001 takes nothing returns boolean
return ( udg_DiceDrop == 9 )
endfunction
function Trig_Giant_Forest_Dragon_Drop_Func010001 takes nothing returns boolean
return ( udg_DiceDrop == 10 )
endfunction
function Trig_Giant_Forest_Dragon_Drop_Func011001 takes nothing returns boolean
return ( udg_DiceDrop == 11 )
endfunction
function Trig_Giant_Forest_Dragon_Drop_Func012001 takes nothing returns boolean
return ( udg_DiceDrop == 15 )
endfunction
function Trig_Giant_Forest_Dragon_Drop_Func013001 takes nothing returns boolean
return ( udg_DiceDrop == 16 )
endfunction
function Trig_Giant_Forest_Dragon_Drop_Func014001 takes nothing returns boolean
return ( udg_DiceDrop == 17 )
endfunction
function Trig_Giant_Forest_Dragon_Drop_Func015001 takes nothing returns boolean
return ( udg_DiceDrop == 18 )
endfunction
function Trig_Giant_Forest_Dragon_Drop_Func016001 takes nothing returns boolean
return ( udg_DiceDrop == 19 )
endfunction
function Trig_Giant_Forest_Dragon_Drop_Func017001 takes nothing returns boolean
return ( udg_DiceDrop == 20 )
endfunction
function Trig_Giant_Forest_Dragon_Drop_Func018001 takes nothing returns boolean
return ( udg_DiceDrop == 21 )
endfunction
function Trig_Giant_Forest_Dragon_Drop_Func019001 takes nothing returns boolean
return ( udg_DiceDrop == 22 )
endfunction
function Trig_Giant_Forest_Dragon_Drop_Func020001 takes nothing returns boolean
return ( udg_DiceDrop == 23 )
endfunction
function Trig_Giant_Forest_Dragon_Drop_Func021001 takes nothing returns boolean
return ( udg_DiceDrop == 24 )
endfunction
function Trig_Giant_Forest_Dragon_Drop_Actions takes nothing returns nothing
set udg_DiceDrop = GetRandomInt(1, 28)
if ( Trig_Giant_Forest_Dragon_Drop_Func002001() ) then
call CreateItemLoc( 'I02N', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Giant_Forest_Dragon_Drop_Func003001() ) then
call CreateItemLoc( 'I00G', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Giant_Forest_Dragon_Drop_Func004001() ) then
call CreateItemLoc( 'I02L', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Giant_Forest_Dragon_Drop_Func005001() ) then
call CreateItemLoc( 'I00H', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Giant_Forest_Dragon_Drop_Func006001() ) then
call CreateItemLoc( 'I02F', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Giant_Forest_Dragon_Drop_Func007001() ) then
call CreateItemLoc( 'I00O', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Giant_Forest_Dragon_Drop_Func008001() ) then
call CreateItemLoc( 'I00J', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Giant_Forest_Dragon_Drop_Func009001() ) then
call CreateItemLoc( 'I03M', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Giant_Forest_Dragon_Drop_Func010001() ) then
call CreateItemLoc( 'I025', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Giant_Forest_Dragon_Drop_Func011001() ) then
call CreateItemLoc( 'I04Z', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Giant_Forest_Dragon_Drop_Func012001() ) then
call CreateItemLoc( 'I04T', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Giant_Forest_Dragon_Drop_Func013001() ) then
call CreateItemLoc( 'I04P', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Giant_Forest_Dragon_Drop_Func014001() ) then
call CreateItemLoc( 'I04S', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Giant_Forest_Dragon_Drop_Func015001() ) then
call CreateItemLoc( 'I063', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Giant_Forest_Dragon_Drop_Func016001() ) then
call CreateItemLoc( 'I05S', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Giant_Forest_Dragon_Drop_Func017001() ) then
call CreateItemLoc( 'I060', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Giant_Forest_Dragon_Drop_Func018001() ) then
call CreateItemLoc( 'I04N', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Giant_Forest_Dragon_Drop_Func019001() ) then
call CreateItemLoc( 'I059', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Giant_Forest_Dragon_Drop_Func020001() ) then
call CreateItemLoc( 'I05O', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Giant_Forest_Dragon_Drop_Func021001() ) then
call CreateItemLoc( 'I05P', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
call TriggerSleepAction( 420.00 )
call CreateNUnitsAtLoc( 1, 'n02I', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_Ancient_Forest), bj_UNIT_FACING )
endfunction
//===========================================================================
function InitTrig_Giant_Forest_Dragon_Drop takes nothing returns nothing
set gg_trg_Giant_Forest_Dragon_Drop = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Giant_Forest_Dragon_Drop, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Giant_Forest_Dragon_Drop, Condition( function Trig_Giant_Forest_Dragon_Drop_Conditions ) )
call TriggerAddAction( gg_trg_Giant_Forest_Dragon_Drop, function Trig_Giant_Forest_Dragon_Drop_Actions )
endfunction
function Trig_Archdemon_Drop_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'n01X' ) ) then
return false
endif
return true
endfunction
function Trig_Archdemon_Drop_Func002001 takes nothing returns boolean
return ( udg_DiceDrop == 1 )
endfunction
function Trig_Archdemon_Drop_Func003001 takes nothing returns boolean
return ( udg_DiceDrop == 2 )
endfunction
function Trig_Archdemon_Drop_Func004001 takes nothing returns boolean
return ( udg_DiceDrop == 3 )
endfunction
function Trig_Archdemon_Drop_Func005001 takes nothing returns boolean
return ( udg_DiceDrop == 4 )
endfunction
function Trig_Archdemon_Drop_Func006001 takes nothing returns boolean
return ( udg_DiceDrop == 5 )
endfunction
function Trig_Archdemon_Drop_Func007001 takes nothing returns boolean
return ( udg_DiceDrop == 6 )
endfunction
function Trig_Archdemon_Drop_Func008001 takes nothing returns boolean
return ( udg_DiceDrop == 7 )
endfunction
function Trig_Archdemon_Drop_Func009001 takes nothing returns boolean
return ( udg_DiceDrop == 9 )
endfunction
function Trig_Archdemon_Drop_Func010001 takes nothing returns boolean
return ( udg_DiceDrop == 10 )
endfunction
function Trig_Archdemon_Drop_Func011001 takes nothing returns boolean
return ( udg_DiceDrop == 21 )
endfunction
function Trig_Archdemon_Drop_Func012001 takes nothing returns boolean
return ( udg_DiceDrop == 11 )
endfunction
function Trig_Archdemon_Drop_Func013001 takes nothing returns boolean
return ( udg_DiceDrop == 12 )
endfunction
function Trig_Archdemon_Drop_Func014001 takes nothing returns boolean
return ( udg_DiceDrop == 13 )
endfunction
function Trig_Archdemon_Drop_Func015001 takes nothing returns boolean
return ( udg_DiceDrop == 15 )
endfunction
function Trig_Archdemon_Drop_Func016001 takes nothing returns boolean
return ( udg_DiceDrop == 16 )
endfunction
function Trig_Archdemon_Drop_Func017001 takes nothing returns boolean
return ( udg_DiceDrop == 17 )
endfunction
function Trig_Archdemon_Drop_Func018001 takes nothing returns boolean
return ( udg_DiceDrop == 18 )
endfunction
function Trig_Archdemon_Drop_Func019001 takes nothing returns boolean
return ( udg_DiceDrop == 19 )
endfunction
function Trig_Archdemon_Drop_Func020001 takes nothing returns boolean
return ( udg_DiceDrop == 20 )
endfunction
function Trig_Archdemon_Drop_Actions takes nothing returns nothing
set udg_DiceDrop = GetRandomInt(1, 28)
if ( Trig_Archdemon_Drop_Func002001() ) then
call CreateItemLoc( 'I02N', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Archdemon_Drop_Func003001() ) then
call CreateItemLoc( 'I00G', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Archdemon_Drop_Func004001() ) then
call CreateItemLoc( 'I02L', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Archdemon_Drop_Func005001() ) then
call CreateItemLoc( 'I00H', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Archdemon_Drop_Func006001() ) then
call CreateItemLoc( 'I02F', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Archdemon_Drop_Func007001() ) then
call CreateItemLoc( 'I00O', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Archdemon_Drop_Func008001() ) then
call CreateItemLoc( 'I00J', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Archdemon_Drop_Func009001() ) then
call CreateItemLoc( 'I03M', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Archdemon_Drop_Func010001() ) then
call CreateItemLoc( 'I025', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Archdemon_Drop_Func011001() ) then
call CreateItemLoc( 'I05R', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Archdemon_Drop_Func012001() ) then
call CreateItemLoc( 'I008', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Archdemon_Drop_Func013001() ) then
call CreateItemLoc( 'I04R', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Archdemon_Drop_Func014001() ) then
call CreateItemLoc( 'I04O', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Archdemon_Drop_Func015001() ) then
call CreateItemLoc( 'I04Q', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Archdemon_Drop_Func016001() ) then
call CreateItemLoc( 'I05E', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Archdemon_Drop_Func017001() ) then
call CreateItemLoc( 'I05Q', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Archdemon_Drop_Func018001() ) then
call CreateItemLoc( 'I05J', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Archdemon_Drop_Func019001() ) then
call CreateItemLoc( 'I05L', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Archdemon_Drop_Func020001() ) then
call CreateItemLoc( 'I05G', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Archdemon_Drop takes nothing returns nothing
set gg_trg_Archdemon_Drop = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Archdemon_Drop, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Archdemon_Drop, Condition( function Trig_Archdemon_Drop_Conditions ) )
call TriggerAddAction( gg_trg_Archdemon_Drop, function Trig_Archdemon_Drop_Actions )
endfunction
function Trig_Demon_Overlord_Drop_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'n02P' ) ) then
return false
endif
return true
endfunction
function Trig_Demon_Overlord_Drop_Func002001 takes nothing returns boolean
return ( udg_DiceDrop == 1 )
endfunction
function Trig_Demon_Overlord_Drop_Func003001 takes nothing returns boolean
return ( udg_DiceDrop == 2 )
endfunction
function Trig_Demon_Overlord_Drop_Func004001 takes nothing returns boolean
return ( udg_DiceDrop == 3 )
endfunction
function Trig_Demon_Overlord_Drop_Func005001 takes nothing returns boolean
return ( udg_DiceDrop == 4 )
endfunction
function Trig_Demon_Overlord_Drop_Func006001 takes nothing returns boolean
return ( udg_DiceDrop == 5 )
endfunction
function Trig_Demon_Overlord_Drop_Func007001 takes nothing returns boolean
return ( udg_DiceDrop == 6 )
endfunction
function Trig_Demon_Overlord_Drop_Func008001 takes nothing returns boolean
return ( udg_DiceDrop == 7 )
endfunction
function Trig_Demon_Overlord_Drop_Func009001 takes nothing returns boolean
return ( udg_DiceDrop == 9 )
endfunction
function Trig_Demon_Overlord_Drop_Func010001 takes nothing returns boolean
return ( udg_DiceDrop == 10 )
endfunction
function Trig_Demon_Overlord_Drop_Func011001 takes nothing returns boolean
return ( udg_DiceDrop == 11 )
endfunction
function Trig_Demon_Overlord_Drop_Func012001 takes nothing returns boolean
return ( udg_DiceDrop == 12 )
endfunction
function Trig_Demon_Overlord_Drop_Func013001 takes nothing returns boolean
return ( udg_DiceDrop == 13 )
endfunction
function Trig_Demon_Overlord_Drop_Func014001 takes nothing returns boolean
return ( udg_DiceDrop == 14 )
endfunction
function Trig_Demon_Overlord_Drop_Func015001 takes nothing returns boolean
return ( udg_DiceDrop == 15 )
endfunction
function Trig_Demon_Overlord_Drop_Func016001 takes nothing returns boolean
return ( udg_DiceDrop == 16 )
endfunction
function Trig_Demon_Overlord_Drop_Func017001 takes nothing returns boolean
return ( udg_DiceDrop == 17 )
endfunction
function Trig_Demon_Overlord_Drop_Func018001 takes nothing returns boolean
return ( udg_DiceDrop == 18 )
endfunction
function Trig_Demon_Overlord_Drop_Func019001 takes nothing returns boolean
return ( udg_DiceDrop == 19 )
endfunction
function Trig_Demon_Overlord_Drop_Func020001 takes nothing returns boolean
return ( udg_DiceDrop == 20 )
endfunction
function Trig_Demon_Overlord_Drop_Func021001 takes nothing returns boolean
return ( udg_DiceDrop == 21 )
endfunction
function Trig_Demon_Overlord_Drop_Func022001 takes nothing returns boolean
return ( udg_DiceDrop == 22 )
endfunction
function Trig_Demon_Overlord_Drop_Func023001 takes nothing returns boolean
return ( udg_DiceDrop == 23 )
endfunction
function Trig_Demon_Overlord_Drop_Func024001 takes nothing returns boolean
return ( udg_DiceDrop == 24 )
endfunction
function Trig_Demon_Overlord_Drop_Func025001 takes nothing returns boolean
return ( udg_DiceDrop == 25 )
endfunction
function Trig_Demon_Overlord_Drop_Actions takes nothing returns nothing
set udg_DiceDrop = GetRandomInt(1, 32)
if ( Trig_Demon_Overlord_Drop_Func002001() ) then
call CreateItemLoc( 'I062', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Demon_Overlord_Drop_Func003001() ) then
call CreateItemLoc( 'I05G', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Demon_Overlord_Drop_Func004001() ) then
call CreateItemLoc( 'I05B', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Demon_Overlord_Drop_Func005001() ) then
call CreateItemLoc( 'I05A', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Demon_Overlord_Drop_Func006001() ) then
call CreateItemLoc( 'I05E', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Demon_Overlord_Drop_Func007001() ) then
call CreateItemLoc( 'I00O', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Demon_Overlord_Drop_Func008001() ) then
call CreateItemLoc( 'I00J', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Demon_Overlord_Drop_Func009001() ) then
call CreateItemLoc( 'I03M', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Demon_Overlord_Drop_Func010001() ) then
call CreateItemLoc( 'I025', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Demon_Overlord_Drop_Func011001() ) then
call CreateItemLoc( 'I04Z', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Demon_Overlord_Drop_Func012001() ) then
call CreateItemLoc( 'I05J', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Demon_Overlord_Drop_Func013001() ) then
call CreateItemLoc( 'I05L', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Demon_Overlord_Drop_Func014001() ) then
call CreateItemLoc( 'I05Q', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Demon_Overlord_Drop_Func015001() ) then
call CreateItemLoc( 'I04T', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Demon_Overlord_Drop_Func016001() ) then
call CreateItemLoc( 'I04P', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Demon_Overlord_Drop_Func017001() ) then
call CreateItemLoc( 'I04S', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Demon_Overlord_Drop_Func018001() ) then
call CreateItemLoc( 'I05L', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Demon_Overlord_Drop_Func019001() ) then
call CreateItemLoc( 'I05F', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Demon_Overlord_Drop_Func020001() ) then
call CreateItemLoc( 'I05I', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Demon_Overlord_Drop_Func021001() ) then
call CreateItemLoc( 'I061', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Demon_Overlord_Drop_Func022001() ) then
call CreateItemLoc( 'I05R', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Demon_Overlord_Drop_Func023001() ) then
call CreateItemLoc( 'I060', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Demon_Overlord_Drop_Func024001() ) then
call CreateItemLoc( 'I05P', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Demon_Overlord_Drop_Func025001() ) then
call CreateItemLoc( 'I05E', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
call TriggerSleepAction( 420.00 )
call CreateNUnitsAtLoc( 1, 'n02P', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRandomLocInRect(gg_rct_The_Demon_Meadows), bj_UNIT_FACING )
endfunction
//===========================================================================
function InitTrig_Demon_Overlord_Drop takes nothing returns nothing
set gg_trg_Demon_Overlord_Drop = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Demon_Overlord_Drop, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Demon_Overlord_Drop, Condition( function Trig_Demon_Overlord_Drop_Conditions ) )
call TriggerAddAction( gg_trg_Demon_Overlord_Drop, function Trig_Demon_Overlord_Drop_Actions )
endfunction
function Trig_Kefkas_Dragon_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'n032' ) ) then
return false
endif
return true
endfunction
function Trig_Kefkas_Dragon_Func002001 takes nothing returns boolean
return ( udg_DiceDrop == 1 )
endfunction
function Trig_Kefkas_Dragon_Func003001 takes nothing returns boolean
return ( udg_DiceDrop == 2 )
endfunction
function Trig_Kefkas_Dragon_Func004001 takes nothing returns boolean
return ( udg_DiceDrop == 3 )
endfunction
function Trig_Kefkas_Dragon_Func005001 takes nothing returns boolean
return ( udg_DiceDrop == 4 )
endfunction
function Trig_Kefkas_Dragon_Func006001 takes nothing returns boolean
return ( udg_DiceDrop == 5 )
endfunction
function Trig_Kefkas_Dragon_Func007001 takes nothing returns boolean
return ( udg_DiceDrop == 6 )
endfunction
function Trig_Kefkas_Dragon_Func008001 takes nothing returns boolean
return ( udg_DiceDrop == 7 )
endfunction
function Trig_Kefkas_Dragon_Func009001 takes nothing returns boolean
return ( udg_DiceDrop == 9 )
endfunction
function Trig_Kefkas_Dragon_Func010001 takes nothing returns boolean
return ( udg_DiceDrop == 10 )
endfunction
function Trig_Kefkas_Dragon_Func011001 takes nothing returns boolean
return ( udg_DiceDrop == 11 )
endfunction
function Trig_Kefkas_Dragon_Func012001 takes nothing returns boolean
return ( udg_DiceDrop == 12 )
endfunction
function Trig_Kefkas_Dragon_Func013001 takes nothing returns boolean
return ( udg_DiceDrop == 13 )
endfunction
function Trig_Kefkas_Dragon_Func014001 takes nothing returns boolean
return ( udg_DiceDrop == 14 )
endfunction
function Trig_Kefkas_Dragon_Func015001 takes nothing returns boolean
return ( udg_DiceDrop == 15 )
endfunction
function Trig_Kefkas_Dragon_Func016001 takes nothing returns boolean
return ( udg_DiceDrop == 16 )
endfunction
function Trig_Kefkas_Dragon_Func017001 takes nothing returns boolean
return ( udg_DiceDrop == 17 )
endfunction
function Trig_Kefkas_Dragon_Func018001 takes nothing returns boolean
return ( udg_DiceDrop == 18 )
endfunction
function Trig_Kefkas_Dragon_Func019001 takes nothing returns boolean
return ( udg_DiceDrop == 19 )
endfunction
function Trig_Kefkas_Dragon_Func020001 takes nothing returns boolean
return ( udg_DiceDrop == 20 )
endfunction
function Trig_Kefkas_Dragon_Func021001 takes nothing returns boolean
return ( udg_DiceDrop == 21 )
endfunction
function Trig_Kefkas_Dragon_Func022001 takes nothing returns boolean
return ( udg_DiceDrop == 22 )
endfunction
function Trig_Kefkas_Dragon_Func023001 takes nothing returns boolean
return ( udg_DiceDrop == 23 )
endfunction
function Trig_Kefkas_Dragon_Func024001 takes nothing returns boolean
return ( udg_DiceDrop == 24 )
endfunction
function Trig_Kefkas_Dragon_Func025001 takes nothing returns boolean
return ( udg_DiceDrop == 25 )
endfunction
function Trig_Kefkas_Dragon_Actions takes nothing returns nothing
set udg_DiceDrop = GetRandomInt(1, 32)
if ( Trig_Kefkas_Dragon_Func002001() ) then
call CreateItemLoc( 'I062', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefkas_Dragon_Func003001() ) then
call CreateItemLoc( 'I05G', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefkas_Dragon_Func004001() ) then
call CreateItemLoc( 'I05B', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefkas_Dragon_Func005001() ) then
call CreateItemLoc( 'I05A', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefkas_Dragon_Func006001() ) then
call CreateItemLoc( 'I05E', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefkas_Dragon_Func007001() ) then
call CreateItemLoc( 'I00O', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefkas_Dragon_Func008001() ) then
call CreateItemLoc( 'I00J', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefkas_Dragon_Func009001() ) then
call CreateItemLoc( 'I03M', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefkas_Dragon_Func010001() ) then
call CreateItemLoc( 'I025', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefkas_Dragon_Func011001() ) then
call CreateItemLoc( 'I04Z', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefkas_Dragon_Func012001() ) then
call CreateItemLoc( 'I05J', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefkas_Dragon_Func013001() ) then
call CreateItemLoc( 'I05L', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefkas_Dragon_Func014001() ) then
call CreateItemLoc( 'I05Q', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefkas_Dragon_Func015001() ) then
call CreateItemLoc( 'I04T', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefkas_Dragon_Func016001() ) then
call CreateItemLoc( 'I04P', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefkas_Dragon_Func017001() ) then
call CreateItemLoc( 'I04S', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefkas_Dragon_Func018001() ) then
call CreateItemLoc( 'I05L', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefkas_Dragon_Func019001() ) then
call CreateItemLoc( 'I05F', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefkas_Dragon_Func020001() ) then
call CreateItemLoc( 'I05I', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefkas_Dragon_Func021001() ) then
call CreateItemLoc( 'I061', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefkas_Dragon_Func022001() ) then
call CreateItemLoc( 'I05R', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefkas_Dragon_Func023001() ) then
call CreateItemLoc( 'I060', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefkas_Dragon_Func024001() ) then
call CreateItemLoc( 'I05P', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefkas_Dragon_Func025001() ) then
call CreateItemLoc( 'I05E', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Kefkas_Dragon takes nothing returns nothing
set gg_trg_Kefkas_Dragon = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Kefkas_Dragon, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Kefkas_Dragon, Condition( function Trig_Kefkas_Dragon_Conditions ) )
call TriggerAddAction( gg_trg_Kefkas_Dragon, function Trig_Kefkas_Dragon_Actions )
endfunction
function Trig_Kefka_Guard_Drop_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'n02Q' ) ) then
return false
endif
return true
endfunction
function Trig_Kefka_Guard_Drop_Func002001 takes nothing returns boolean
return ( udg_DiceDrop == 1 )
endfunction
function Trig_Kefka_Guard_Drop_Func003001 takes nothing returns boolean
return ( udg_DiceDrop == 2 )
endfunction
function Trig_Kefka_Guard_Drop_Func004001 takes nothing returns boolean
return ( udg_DiceDrop == 3 )
endfunction
function Trig_Kefka_Guard_Drop_Func005001 takes nothing returns boolean
return ( udg_DiceDrop == 4 )
endfunction
function Trig_Kefka_Guard_Drop_Func006001 takes nothing returns boolean
return ( udg_DiceDrop == 5 )
endfunction
function Trig_Kefka_Guard_Drop_Func007001 takes nothing returns boolean
return ( udg_DiceDrop == 6 )
endfunction
function Trig_Kefka_Guard_Drop_Func008001 takes nothing returns boolean
return ( udg_DiceDrop == 7 )
endfunction
function Trig_Kefka_Guard_Drop_Func009001 takes nothing returns boolean
return ( udg_DiceDrop == 8 )
endfunction
function Trig_Kefka_Guard_Drop_Func010001 takes nothing returns boolean
return ( udg_DiceDrop == 9 )
endfunction
function Trig_Kefka_Guard_Drop_Func011001 takes nothing returns boolean
return ( udg_DiceDrop == 10 )
endfunction
function Trig_Kefka_Guard_Drop_Func012001 takes nothing returns boolean
return ( udg_DiceDrop == 11 )
endfunction
function Trig_Kefka_Guard_Drop_Func013001 takes nothing returns boolean
return ( udg_DiceDrop == 12 )
endfunction
function Trig_Kefka_Guard_Drop_Func014001 takes nothing returns boolean
return ( udg_DiceDrop == 13 )
endfunction
function Trig_Kefka_Guard_Drop_Func015001 takes nothing returns boolean
return ( udg_DiceDrop == 14 )
endfunction
function Trig_Kefka_Guard_Drop_Func016001 takes nothing returns boolean
return ( udg_DiceDrop == 15 )
endfunction
function Trig_Kefka_Guard_Drop_Actions takes nothing returns nothing
set udg_DiceDrop = GetRandomInt(1, 15)
if ( Trig_Kefka_Guard_Drop_Func002001() ) then
call CreateItemLoc( 'I063', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefka_Guard_Drop_Func003001() ) then
call CreateItemLoc( 'I05Q', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefka_Guard_Drop_Func004001() ) then
call CreateItemLoc( 'I062', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefka_Guard_Drop_Func005001() ) then
call CreateItemLoc( 'I05E', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefka_Guard_Drop_Func006001() ) then
call CreateItemLoc( 'I05G', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefka_Guard_Drop_Func007001() ) then
call CreateItemLoc( 'I05L', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefka_Guard_Drop_Func008001() ) then
call CreateItemLoc( 'I05J', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefka_Guard_Drop_Func009001() ) then
call CreateItemLoc( 'I05I', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefka_Guard_Drop_Func010001() ) then
call CreateItemLoc( 'I061', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefka_Guard_Drop_Func011001() ) then
call CreateItemLoc( 'I05R', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefka_Guard_Drop_Func012001() ) then
call CreateItemLoc( 'I060', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefka_Guard_Drop_Func013001() ) then
call CreateItemLoc( 'I05P', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefka_Guard_Drop_Func014001() ) then
call CreateItemLoc( 'I04Z', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefka_Guard_Drop_Func015001() ) then
call CreateItemLoc( 'I05O', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefka_Guard_Drop_Func016001() ) then
call CreateItemLoc( 'I05S', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Kefka_Guard_Drop takes nothing returns nothing
set gg_trg_Kefka_Guard_Drop = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Kefka_Guard_Drop, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Kefka_Guard_Drop, Condition( function Trig_Kefka_Guard_Drop_Conditions ) )
call TriggerAddAction( gg_trg_Kefka_Guard_Drop, function Trig_Kefka_Guard_Drop_Actions )
endfunction
function Trig_Kefka_Drop_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'h00K' ) ) then
return false
endif
return true
endfunction
function Trig_Kefka_Drop_Func003001 takes nothing returns boolean
return ( udg_DiceDrop == 1 )
endfunction
function Trig_Kefka_Drop_Func004001 takes nothing returns boolean
return ( udg_DiceDrop == 2 )
endfunction
function Trig_Kefka_Drop_Func005001 takes nothing returns boolean
return ( udg_DiceDrop == 3 )
endfunction
function Trig_Kefka_Drop_Func006001 takes nothing returns boolean
return ( udg_DiceDrop == 4 )
endfunction
function Trig_Kefka_Drop_Func007001 takes nothing returns boolean
return ( udg_DiceDrop == 5 )
endfunction
function Trig_Kefka_Drop_Func008001 takes nothing returns boolean
return ( udg_DiceDrop == 6 )
endfunction
function Trig_Kefka_Drop_Func009001 takes nothing returns boolean
return ( udg_DiceDrop == 7 )
endfunction
function Trig_Kefka_Drop_Func010001 takes nothing returns boolean
return ( udg_DiceDrop == 8 )
endfunction
function Trig_Kefka_Drop_Func011001 takes nothing returns boolean
return ( udg_DiceDrop == 9 )
endfunction
function Trig_Kefka_Drop_Func012001 takes nothing returns boolean
return ( udg_DiceDrop == 10 )
endfunction
function Trig_Kefka_Drop_Func013001 takes nothing returns boolean
return ( udg_DiceDrop == 11 )
endfunction
function Trig_Kefka_Drop_Func014001 takes nothing returns boolean
return ( udg_DiceDrop == 12 )
endfunction
function Trig_Kefka_Drop_Func015001 takes nothing returns boolean
return ( udg_DiceDrop == 13 )
endfunction
function Trig_Kefka_Drop_Func016001 takes nothing returns boolean
return ( udg_DiceDrop == 14 )
endfunction
function Trig_Kefka_Drop_Func017001 takes nothing returns boolean
return ( udg_DiceDrop == 15 )
endfunction
function Trig_Kefka_Drop_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = CountPlayersInForceBJ(GetPlayersByMapControl(MAP_CONTROL_USER))
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call CreateItemLoc( 'I068', GetUnitLoc(GetDyingUnit()) )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set udg_DiceDrop = GetRandomInt(1, 15)
if ( Trig_Kefka_Drop_Func003001() ) then
call CreateItemLoc( 'I063', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefka_Drop_Func004001() ) then
call CreateItemLoc( 'I05Q', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefka_Drop_Func005001() ) then
call CreateItemLoc( 'I00J', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefka_Drop_Func006001() ) then
call CreateItemLoc( 'I05E', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefka_Drop_Func007001() ) then
call CreateItemLoc( 'I05G', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefka_Drop_Func008001() ) then
call CreateItemLoc( 'I05L', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefka_Drop_Func009001() ) then
call CreateItemLoc( 'I05J', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefka_Drop_Func010001() ) then
call CreateItemLoc( 'I05I', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefka_Drop_Func011001() ) then
call CreateItemLoc( 'I061', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefka_Drop_Func012001() ) then
call CreateItemLoc( 'I05R', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefka_Drop_Func013001() ) then
call CreateItemLoc( 'I060', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefka_Drop_Func014001() ) then
call CreateItemLoc( 'I05P', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefka_Drop_Func015001() ) then
call CreateItemLoc( 'I04Z', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefka_Drop_Func016001() ) then
call CreateItemLoc( 'I05O', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
if ( Trig_Kefka_Drop_Func017001() ) then
call CreateItemLoc( 'I05S', GetUnitLoc(GetDyingUnit()) )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Kefka_Drop takes nothing returns nothing
set gg_trg_Kefka_Drop = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Kefka_Drop, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Kefka_Drop, Condition( function Trig_Kefka_Drop_Conditions ) )
call TriggerAddAction( gg_trg_Kefka_Drop, function Trig_Kefka_Drop_Actions )
endfunction
function Trig_Use_Radagals_Func002C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05S' ) ) then
return true
endif
return false
endfunction
function Trig_Use_Radagals_Conditions takes nothing returns boolean
if ( not Trig_Use_Radagals_Func002C() ) then
return false
endif
return true
endfunction
function Trig_Use_Radagals_Func001Func003C takes nothing returns boolean
if ( ( GetUnitTypeId(GetManipulatingUnit()) == 'H02D' ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Berserker" ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I019') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I01A') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I01B') == true ) ) then
return true
endif
return false
endfunction
function Trig_Use_Radagals_Func001C takes nothing returns boolean
if ( not Trig_Use_Radagals_Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Use_Radagals_Actions takes nothing returns nothing
if ( Trig_Use_Radagals_Func001C() ) then
call DoNothing( )
else
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
endif
endfunction
//===========================================================================
function InitTrig_Use_Radagals takes nothing returns nothing
set gg_trg_Use_Radagals = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Use_Radagals, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Use_Radagals, Condition( function Trig_Use_Radagals_Conditions ) )
call TriggerAddAction( gg_trg_Use_Radagals, function Trig_Use_Radagals_Actions )
endfunction
function Trig_Drop_Radagals_Drop_Condition_Func005C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05S' ) ) then
return true
endif
return false
endfunction
function Trig_Drop_Radagals_Drop_Condition_Conditions takes nothing returns boolean
if ( not Trig_Drop_Radagals_Drop_Condition_Func005C() ) then
return false
endif
return true
endfunction
function Trig_Drop_Radagals_Drop_Condition_Func002Func001Func001C takes nothing returns boolean
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I05S' ) ) then
return true
endif
return false
endfunction
function Trig_Drop_Radagals_Drop_Condition_Func002Func001C takes nothing returns boolean
if ( not Trig_Drop_Radagals_Drop_Condition_Func002Func001Func001C() ) then
return false
endif
return true
endfunction
function Trig_Drop_Radagals_Drop_Condition_Func003C takes nothing returns boolean
if ( not ( udg_AlreadyCarryingEquip > 1 ) ) then
return false
endif
return true
endfunction
function Trig_Drop_Radagals_Drop_Condition_Actions takes nothing returns nothing
set udg_AlreadyCarryingEquip = 0
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Drop_Radagals_Drop_Condition_Func002Func001C() ) then
set udg_AlreadyCarryingEquip = ( udg_AlreadyCarryingEquip + 1 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
if ( Trig_Drop_Radagals_Drop_Condition_Func003C() ) then
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1123" )
else
endif
set udg_AlreadyCarryingEquip = 0
endfunction
//===========================================================================
function InitTrig_Drop_Radagals_Drop_Condition takes nothing returns nothing
set gg_trg_Drop_Radagals_Drop_Condition = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Drop_Radagals_Drop_Condition, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Drop_Radagals_Drop_Condition, Condition( function Trig_Drop_Radagals_Drop_Condition_Conditions ) )
call TriggerAddAction( gg_trg_Drop_Radagals_Drop_Condition, function Trig_Drop_Radagals_Drop_Condition_Actions )
endfunction
function Trig_Use_Galaliel_Func002C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I060' ) ) then
return true
endif
return false
endfunction
function Trig_Use_Galaliel_Conditions takes nothing returns boolean
if ( not Trig_Use_Galaliel_Func002C() ) then
return false
endif
return true
endfunction
function Trig_Use_Galaliel_Func001Func003C takes nothing returns boolean
if ( ( GetUnitTypeId(GetManipulatingUnit()) == 'H02D' ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Paladin" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "White Mage" ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I01G') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I01H') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I05Z') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I01C') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I012') == true ) ) then
return true
endif
return false
endfunction
function Trig_Use_Galaliel_Func001C takes nothing returns boolean
if ( not Trig_Use_Galaliel_Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Use_Galaliel_Actions takes nothing returns nothing
if ( Trig_Use_Galaliel_Func001C() ) then
call DoNothing( )
else
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
endif
endfunction
//===========================================================================
function InitTrig_Use_Galaliel takes nothing returns nothing
set gg_trg_Use_Galaliel = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Use_Galaliel, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Use_Galaliel, Condition( function Trig_Use_Galaliel_Conditions ) )
call TriggerAddAction( gg_trg_Use_Galaliel, function Trig_Use_Galaliel_Actions )
endfunction
function Trig_Drop_Galaliel_Drop_Condition_Func005C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I060' ) ) then
return true
endif
return false
endfunction
function Trig_Drop_Galaliel_Drop_Condition_Conditions takes nothing returns boolean
if ( not Trig_Drop_Galaliel_Drop_Condition_Func005C() ) then
return false
endif
return true
endfunction
function Trig_Drop_Galaliel_Drop_Condition_Func002Func001Func001C takes nothing returns boolean
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I060' ) ) then
return true
endif
return false
endfunction
function Trig_Drop_Galaliel_Drop_Condition_Func002Func001C takes nothing returns boolean
if ( not Trig_Drop_Galaliel_Drop_Condition_Func002Func001Func001C() ) then
return false
endif
return true
endfunction
function Trig_Drop_Galaliel_Drop_Condition_Func003C takes nothing returns boolean
if ( not ( udg_AlreadyCarryingEquip > 1 ) ) then
return false
endif
return true
endfunction
function Trig_Drop_Galaliel_Drop_Condition_Actions takes nothing returns nothing
set udg_AlreadyCarryingEquip = 0
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Drop_Galaliel_Drop_Condition_Func002Func001C() ) then
set udg_AlreadyCarryingEquip = ( udg_AlreadyCarryingEquip + 1 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
if ( Trig_Drop_Galaliel_Drop_Condition_Func003C() ) then
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1162" )
else
endif
set udg_AlreadyCarryingEquip = 0
endfunction
//===========================================================================
function InitTrig_Drop_Galaliel_Drop_Condition takes nothing returns nothing
set gg_trg_Drop_Galaliel_Drop_Condition = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Drop_Galaliel_Drop_Condition, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Drop_Galaliel_Drop_Condition, Condition( function Trig_Drop_Galaliel_Drop_Condition_Conditions ) )
call TriggerAddAction( gg_trg_Drop_Galaliel_Drop_Condition, function Trig_Drop_Galaliel_Drop_Condition_Actions )
endfunction
function Trig_Use_Angelic_Set_Condition_Func002C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I062' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I061' ) ) then
return true
endif
return false
endfunction
function Trig_Use_Angelic_Set_Condition_Conditions takes nothing returns boolean
if ( not Trig_Use_Angelic_Set_Condition_Func002C() ) then
return false
endif
return true
endfunction
function Trig_Use_Angelic_Set_Condition_Func001Func003C takes nothing returns boolean
if ( ( GetUnitTypeId(GetManipulatingUnit()) == 'H02D' ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Paladin" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "White Mage" ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I01G') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I01H') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I05Z') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I01C') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I012') == true ) ) then
return true
endif
return false
endfunction
function Trig_Use_Angelic_Set_Condition_Func001C takes nothing returns boolean
if ( not Trig_Use_Angelic_Set_Condition_Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Use_Angelic_Set_Condition_Actions takes nothing returns nothing
if ( Trig_Use_Angelic_Set_Condition_Func001C() ) then
call DoNothing( )
else
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
endif
endfunction
//===========================================================================
function InitTrig_Use_Angelic_Set_Condition takes nothing returns nothing
set gg_trg_Use_Angelic_Set_Condition = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Use_Angelic_Set_Condition, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Use_Angelic_Set_Condition, Condition( function Trig_Use_Angelic_Set_Condition_Conditions ) )
call TriggerAddAction( gg_trg_Use_Angelic_Set_Condition, function Trig_Use_Angelic_Set_Condition_Actions )
endfunction
function Trig_Spear_of_Fear_Func002C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05P' ) ) then
return true
endif
return false
endfunction
function Trig_Spear_of_Fear_Conditions takes nothing returns boolean
if ( not Trig_Spear_of_Fear_Func002C() ) then
return false
endif
return true
endfunction
function Trig_Spear_of_Fear_Func001Func003C takes nothing returns boolean
if ( ( GetUnitTypeId(GetManipulatingUnit()) == 'H02D' ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Dragoon" ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I02W') == true ) ) then
return true
endif
return false
endfunction
function Trig_Spear_of_Fear_Func001C takes nothing returns boolean
if ( not Trig_Spear_of_Fear_Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Spear_of_Fear_Actions takes nothing returns nothing
if ( Trig_Spear_of_Fear_Func001C() ) then
call DoNothing( )
else
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
endif
endfunction
//===========================================================================
function InitTrig_Spear_of_Fear takes nothing returns nothing
set gg_trg_Spear_of_Fear = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Spear_of_Fear, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Spear_of_Fear, Condition( function Trig_Spear_of_Fear_Conditions ) )
call TriggerAddAction( gg_trg_Spear_of_Fear, function Trig_Spear_of_Fear_Actions )
endfunction
function Trig_Double_Arrows_Drop_Condition_Func005C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I059' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05G' ) ) then
return true
endif
return false
endfunction
function Trig_Double_Arrows_Drop_Condition_Conditions takes nothing returns boolean
if ( not Trig_Double_Arrows_Drop_Condition_Func005C() ) then
return false
endif
return true
endfunction
function Trig_Double_Arrows_Drop_Condition_Func002Func001Func001C takes nothing returns boolean
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I059' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I05G' ) ) then
return true
endif
return false
endfunction
function Trig_Double_Arrows_Drop_Condition_Func002Func001C takes nothing returns boolean
if ( not Trig_Double_Arrows_Drop_Condition_Func002Func001Func001C() ) then
return false
endif
return true
endfunction
function Trig_Double_Arrows_Drop_Condition_Func003001 takes nothing returns boolean
return ( udg_ArrowsEquiped > 1 )
endfunction
function Trig_Double_Arrows_Drop_Condition_Actions takes nothing returns nothing
set udg_ArrowsEquiped = 0
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Double_Arrows_Drop_Condition_Func002Func001C() ) then
set udg_ArrowsEquiped = ( udg_ArrowsEquiped + 1 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
if ( Trig_Double_Arrows_Drop_Condition_Func003001() ) then
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
else
call DoNothing( )
endif
set udg_ArrowsEquiped = 0
endfunction
//===========================================================================
function InitTrig_Double_Arrows_Drop_Condition takes nothing returns nothing
set gg_trg_Double_Arrows_Drop_Condition = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Double_Arrows_Drop_Condition, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Double_Arrows_Drop_Condition, Condition( function Trig_Double_Arrows_Drop_Condition_Conditions ) )
call TriggerAddAction( gg_trg_Double_Arrows_Drop_Condition, function Trig_Double_Arrows_Drop_Condition_Actions )
endfunction
function Trig_Drop_Arrows_Condition_Func005C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I059' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05G' ) ) then
return true
endif
return false
endfunction
function Trig_Drop_Arrows_Condition_Conditions takes nothing returns boolean
if ( not Trig_Drop_Arrows_Condition_Func005C() ) then
return false
endif
return true
endfunction
function Trig_Drop_Arrows_Condition_Func002Func001Func001Func001C takes nothing returns boolean
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I03T' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I03V' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I03W' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I03U' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I03X' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I05F' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I05R' ) ) then
return true
endif
return false
endfunction
function Trig_Drop_Arrows_Condition_Func002Func001Func001C takes nothing returns boolean
if ( not Trig_Drop_Arrows_Condition_Func002Func001Func001Func001C() ) then
return false
endif
return true
endfunction
function Trig_Drop_Arrows_Condition_Func002Func002C takes nothing returns boolean
if ( ( GetUnitTypeId(GetManipulatingUnit()) == 'H02D' ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Archer" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Beastmaster" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Hunter" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Chemist" ) ) then
return true
endif
if ( ( GetUnitTypeId(GetManipulatingUnit()) == 'H00T' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetManipulatingUnit()) == 'ewsp' ) ) then
return true
endif
return false
endfunction
function Trig_Drop_Arrows_Condition_Func002C takes nothing returns boolean
if ( not Trig_Drop_Arrows_Condition_Func002Func002C() ) then
return false
endif
return true
endfunction
function Trig_Drop_Arrows_Condition_Func003C takes nothing returns boolean
if ( not ( udg_Bowequiped == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Drop_Arrows_Condition_Actions takes nothing returns nothing
set udg_Bowequiped = 0
if ( Trig_Drop_Arrows_Condition_Func002C() ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Drop_Arrows_Condition_Func002Func001Func001C() ) then
set udg_Bowequiped = ( udg_Bowequiped + 1 )
else
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
endif
if ( Trig_Drop_Arrows_Condition_Func003C() ) then
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
else
call DoNothing( )
endif
set udg_Bowequiped = 0
endfunction
//===========================================================================
function InitTrig_Drop_Arrows_Condition takes nothing returns nothing
set gg_trg_Drop_Arrows_Condition = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Drop_Arrows_Condition, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Drop_Arrows_Condition, Condition( function Trig_Drop_Arrows_Condition_Conditions ) )
call TriggerAddAction( gg_trg_Drop_Arrows_Condition, function Trig_Drop_Arrows_Condition_Actions )
endfunction
function Trig_Drop_Boot_Condition_Func005C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I050' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05B' ) ) then
return true
endif
return false
endfunction
function Trig_Drop_Boot_Condition_Conditions takes nothing returns boolean
if ( not Trig_Drop_Boot_Condition_Func005C() ) then
return false
endif
return true
endfunction
function Trig_Drop_Boot_Condition_Func002Func001Func001C takes nothing returns boolean
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I050' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I05B' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetManipulatingUnit()) == 'ewsp' ) ) then
return true
endif
return false
endfunction
function Trig_Drop_Boot_Condition_Func002Func001C takes nothing returns boolean
if ( not Trig_Drop_Boot_Condition_Func002Func001Func001C() ) then
return false
endif
return true
endfunction
function Trig_Drop_Boot_Condition_Func003001 takes nothing returns boolean
return ( udg_AlreadyCarryingEquip > 1 )
endfunction
function Trig_Drop_Boot_Condition_Actions takes nothing returns nothing
set udg_AlreadyCarryingEquip = 0
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Drop_Boot_Condition_Func002Func001C() ) then
set udg_AlreadyCarryingEquip = ( udg_AlreadyCarryingEquip + 1 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
if ( Trig_Drop_Boot_Condition_Func003001() ) then
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
else
call DoNothing( )
endif
set udg_AlreadyCarryingEquip = 0
endfunction
//===========================================================================
function InitTrig_Drop_Boot_Condition takes nothing returns nothing
set gg_trg_Drop_Boot_Condition = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Drop_Boot_Condition, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Drop_Boot_Condition, Condition( function Trig_Drop_Boot_Condition_Conditions ) )
call TriggerAddAction( gg_trg_Drop_Boot_Condition, function Trig_Drop_Boot_Condition_Actions )
endfunction
function Trig_Drop_Glove_Condition_Func005C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I055' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05N' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05Q' ) ) then
return true
endif
return false
endfunction
function Trig_Drop_Glove_Condition_Conditions takes nothing returns boolean
if ( not Trig_Drop_Glove_Condition_Func005C() ) then
return false
endif
return true
endfunction
function Trig_Drop_Glove_Condition_Func002Func001Func001C takes nothing returns boolean
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I055' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I05N' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetManipulatingUnit()) == 'ewsp' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I05Q' ) ) then
return true
endif
return false
endfunction
function Trig_Drop_Glove_Condition_Func002Func001C takes nothing returns boolean
if ( not Trig_Drop_Glove_Condition_Func002Func001Func001C() ) then
return false
endif
return true
endfunction
function Trig_Drop_Glove_Condition_Func003001 takes nothing returns boolean
return ( udg_AlreadyCarryingEquip > 1 )
endfunction
function Trig_Drop_Glove_Condition_Actions takes nothing returns nothing
set udg_AlreadyCarryingEquip = 0
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Drop_Glove_Condition_Func002Func001C() ) then
set udg_AlreadyCarryingEquip = ( udg_AlreadyCarryingEquip + 1 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
if ( Trig_Drop_Glove_Condition_Func003001() ) then
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
else
call DoNothing( )
endif
set udg_AlreadyCarryingEquip = 0
endfunction
//===========================================================================
function InitTrig_Drop_Glove_Condition takes nothing returns nothing
set gg_trg_Drop_Glove_Condition = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Drop_Glove_Condition, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Drop_Glove_Condition, Condition( function Trig_Drop_Glove_Condition_Conditions ) )
call TriggerAddAction( gg_trg_Drop_Glove_Condition, function Trig_Drop_Glove_Condition_Actions )
endfunction
function Trig_Drop_Bracers_Condition_Func005C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05H' ) ) then
return true
endif
return false
endfunction
function Trig_Drop_Bracers_Condition_Conditions takes nothing returns boolean
if ( not Trig_Drop_Bracers_Condition_Func005C() ) then
return false
endif
return true
endfunction
function Trig_Drop_Bracers_Condition_Func002Func001Func001C takes nothing returns boolean
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I05H' ) ) then
return true
endif
return false
endfunction
function Trig_Drop_Bracers_Condition_Func002Func001C takes nothing returns boolean
if ( not Trig_Drop_Bracers_Condition_Func002Func001Func001C() ) then
return false
endif
return true
endfunction
function Trig_Drop_Bracers_Condition_Func003001 takes nothing returns boolean
return ( udg_AlreadyCarryingEquip > 1 )
endfunction
function Trig_Drop_Bracers_Condition_Actions takes nothing returns nothing
set udg_AlreadyCarryingEquip = 0
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Drop_Bracers_Condition_Func002Func001C() ) then
set udg_AlreadyCarryingEquip = ( udg_AlreadyCarryingEquip + 1 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
if ( Trig_Drop_Bracers_Condition_Func003001() ) then
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
else
call DoNothing( )
endif
set udg_AlreadyCarryingEquip = 0
endfunction
//===========================================================================
function InitTrig_Drop_Bracers_Condition takes nothing returns nothing
set gg_trg_Drop_Bracers_Condition = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Drop_Bracers_Condition, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Drop_Bracers_Condition, Condition( function Trig_Drop_Bracers_Condition_Conditions ) )
call TriggerAddAction( gg_trg_Drop_Bracers_Condition, function Trig_Drop_Bracers_Condition_Actions )
endfunction
function Trig_Drop_Belt_Condition_Func005C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05A' ) ) then
return true
endif
return false
endfunction
function Trig_Drop_Belt_Condition_Conditions takes nothing returns boolean
if ( not Trig_Drop_Belt_Condition_Func005C() ) then
return false
endif
return true
endfunction
function Trig_Drop_Belt_Condition_Func002Func001Func001C takes nothing returns boolean
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I05A' ) ) then
return true
endif
return false
endfunction
function Trig_Drop_Belt_Condition_Func002Func001C takes nothing returns boolean
if ( not Trig_Drop_Belt_Condition_Func002Func001Func001C() ) then
return false
endif
return true
endfunction
function Trig_Drop_Belt_Condition_Func003001 takes nothing returns boolean
return ( udg_AlreadyCarryingEquip > 1 )
endfunction
function Trig_Drop_Belt_Condition_Actions takes nothing returns nothing
set udg_AlreadyCarryingEquip = 0
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Drop_Belt_Condition_Func002Func001C() ) then
set udg_AlreadyCarryingEquip = ( udg_AlreadyCarryingEquip + 1 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
if ( Trig_Drop_Belt_Condition_Func003001() ) then
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
else
call DoNothing( )
endif
set udg_AlreadyCarryingEquip = 0
endfunction
//===========================================================================
function InitTrig_Drop_Belt_Condition takes nothing returns nothing
set gg_trg_Drop_Belt_Condition = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Drop_Belt_Condition, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Drop_Belt_Condition, Condition( function Trig_Drop_Belt_Condition_Conditions ) )
call TriggerAddAction( gg_trg_Drop_Belt_Condition, function Trig_Drop_Belt_Condition_Actions )
endfunction
function Trig_Drop_Helm_Condition_Func005C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05J' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05M' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05O' ) ) then
return true
endif
return false
endfunction
function Trig_Drop_Helm_Condition_Conditions takes nothing returns boolean
if ( not Trig_Drop_Helm_Condition_Func005C() ) then
return false
endif
return true
endfunction
function Trig_Drop_Helm_Condition_Func002Func001Func001C takes nothing returns boolean
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I05J' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I05M' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I05O' ) ) then
return true
endif
return false
endfunction
function Trig_Drop_Helm_Condition_Func002Func001C takes nothing returns boolean
if ( not Trig_Drop_Helm_Condition_Func002Func001Func001C() ) then
return false
endif
return true
endfunction
function Trig_Drop_Helm_Condition_Func003001 takes nothing returns boolean
return ( udg_AlreadyCarryingEquip > 1 )
endfunction
function Trig_Drop_Helm_Condition_Actions takes nothing returns nothing
set udg_AlreadyCarryingEquip = 0
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Drop_Helm_Condition_Func002Func001C() ) then
set udg_AlreadyCarryingEquip = ( udg_AlreadyCarryingEquip + 1 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
if ( Trig_Drop_Helm_Condition_Func003001() ) then
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
else
call DoNothing( )
endif
set udg_AlreadyCarryingEquip = 0
endfunction
//===========================================================================
function InitTrig_Drop_Helm_Condition takes nothing returns nothing
set gg_trg_Drop_Helm_Condition = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Drop_Helm_Condition, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Drop_Helm_Condition, Condition( function Trig_Drop_Helm_Condition_Conditions ) )
call TriggerAddAction( gg_trg_Drop_Helm_Condition, function Trig_Drop_Helm_Condition_Actions )
endfunction
function Trig_Drop_Rashul_Condition_Func005C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I054' ) ) then
return true
endif
return false
endfunction
function Trig_Drop_Rashul_Condition_Conditions takes nothing returns boolean
if ( not Trig_Drop_Rashul_Condition_Func005C() ) then
return false
endif
return true
endfunction
function Trig_Drop_Rashul_Condition_Func002Func001Func001C takes nothing returns boolean
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I054' ) ) then
return true
endif
return false
endfunction
function Trig_Drop_Rashul_Condition_Func002Func001C takes nothing returns boolean
if ( not Trig_Drop_Rashul_Condition_Func002Func001Func001C() ) then
return false
endif
return true
endfunction
function Trig_Drop_Rashul_Condition_Func003C takes nothing returns boolean
if ( not ( udg_AlreadyCarryingEquip > 1 ) ) then
return false
endif
return true
endfunction
function Trig_Drop_Rashul_Condition_Actions takes nothing returns nothing
set udg_AlreadyCarryingEquip = 0
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Drop_Rashul_Condition_Func002Func001C() ) then
set udg_AlreadyCarryingEquip = ( udg_AlreadyCarryingEquip + 1 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
if ( Trig_Drop_Rashul_Condition_Func003C() ) then
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_986" )
else
endif
set udg_AlreadyCarryingEquip = 0
endfunction
//===========================================================================
function InitTrig_Drop_Rashul_Condition takes nothing returns nothing
set gg_trg_Drop_Rashul_Condition = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Drop_Rashul_Condition, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Drop_Rashul_Condition, Condition( function Trig_Drop_Rashul_Condition_Conditions ) )
call TriggerAddAction( gg_trg_Drop_Rashul_Condition, function Trig_Drop_Rashul_Condition_Actions )
endfunction
function Trig_Drop_Sword_Set_Item_Conditions_Func004C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05I' ) ) then
return true
endif
return false
endfunction
function Trig_Drop_Sword_Set_Item_Conditions_Conditions takes nothing returns boolean
if ( not Trig_Drop_Sword_Set_Item_Conditions_Func004C() ) then
return false
endif
return true
endfunction
function Trig_Drop_Sword_Set_Item_Conditions_Func002Func002Func001Func001C takes nothing returns boolean
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I05I' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I05L' ) ) then
return true
endif
return false
endfunction
function Trig_Drop_Sword_Set_Item_Conditions_Func002Func002Func001C takes nothing returns boolean
if ( not Trig_Drop_Sword_Set_Item_Conditions_Func002Func002Func001Func001C() ) then
return false
endif
return true
endfunction
function Trig_Drop_Sword_Set_Item_Conditions_Func002Func003C takes nothing returns boolean
if ( not ( udg_AlreadyCarryingEquip > 1 ) ) then
return false
endif
return true
endfunction
function Trig_Drop_Sword_Set_Item_Conditions_Func002Func004C takes nothing returns boolean
if ( ( GetUnitTypeId(GetManipulatingUnit()) == 'ewsp' ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Fighter" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Samurai" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Dark Knight" ) ) then
return true
endif
if ( ( GetUnitTypeId(GetManipulatingUnit()) == 'ewsp' ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Ninja" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Berserker" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Black Belt" ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I001') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I034') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I014') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I01D') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I01E') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I01F') == true ) ) then
return true
endif
return false
endfunction
function Trig_Drop_Sword_Set_Item_Conditions_Func002C takes nothing returns boolean
if ( not Trig_Drop_Sword_Set_Item_Conditions_Func002Func004C() ) then
return false
endif
return true
endfunction
function Trig_Drop_Sword_Set_Item_Conditions_Actions takes nothing returns nothing
set udg_AlreadyCarryingEquip = 0
if ( Trig_Drop_Sword_Set_Item_Conditions_Func002C() ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Drop_Sword_Set_Item_Conditions_Func002Func002Func001C() ) then
set udg_AlreadyCarryingEquip = ( udg_AlreadyCarryingEquip + 1 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
if ( Trig_Drop_Sword_Set_Item_Conditions_Func002Func003C() ) then
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
else
endif
else
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
endif
set udg_AlreadyCarryingEquip = 0
endfunction
//===========================================================================
function InitTrig_Drop_Sword_Set_Item_Conditions takes nothing returns nothing
set gg_trg_Drop_Sword_Set_Item_Conditions = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Drop_Sword_Set_Item_Conditions, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Drop_Sword_Set_Item_Conditions, Condition( function Trig_Drop_Sword_Set_Item_Conditions_Conditions ) )
call TriggerAddAction( gg_trg_Drop_Sword_Set_Item_Conditions, function Trig_Drop_Sword_Set_Item_Conditions_Actions )
endfunction
function Trig_Dukati_Assassin_Set_Conditions_Func004C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05L' ) ) then
return true
endif
return false
endfunction
function Trig_Dukati_Assassin_Set_Conditions_Conditions takes nothing returns boolean
if ( not Trig_Dukati_Assassin_Set_Conditions_Func004C() ) then
return false
endif
return true
endfunction
function Trig_Dukati_Assassin_Set_Conditions_Func002Func001Func001Func001C takes nothing returns boolean
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I05I' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I05L' ) ) then
return true
endif
return false
endfunction
function Trig_Dukati_Assassin_Set_Conditions_Func002Func001Func001C takes nothing returns boolean
if ( not Trig_Dukati_Assassin_Set_Conditions_Func002Func001Func001Func001C() ) then
return false
endif
return true
endfunction
function Trig_Dukati_Assassin_Set_Conditions_Func002Func002C takes nothing returns boolean
if ( not ( udg_AlreadyCarryingEquip > 1 ) ) then
return false
endif
return true
endfunction
function Trig_Dukati_Assassin_Set_Conditions_Func002Func004C takes nothing returns boolean
if ( ( GetUnitTypeId(GetManipulatingUnit()) == 'ewsp' ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Ninja" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Samurai" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Black Belt" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Fighter" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Berserker" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Thief" ) ) then
return true
endif
return false
endfunction
function Trig_Dukati_Assassin_Set_Conditions_Func002C takes nothing returns boolean
if ( not Trig_Dukati_Assassin_Set_Conditions_Func002Func004C() ) then
return false
endif
return true
endfunction
function Trig_Dukati_Assassin_Set_Conditions_Actions takes nothing returns nothing
set udg_AlreadyCarryingEquip = 0
if ( Trig_Dukati_Assassin_Set_Conditions_Func002C() ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Dukati_Assassin_Set_Conditions_Func002Func001Func001C() ) then
set udg_AlreadyCarryingEquip = ( udg_AlreadyCarryingEquip + 1 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
if ( Trig_Dukati_Assassin_Set_Conditions_Func002Func002C() ) then
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
else
call DoNothing( )
endif
else
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
endif
set udg_AlreadyCarryingEquip = 0
endfunction
//===========================================================================
function InitTrig_Dukati_Assassin_Set_Conditions takes nothing returns nothing
set gg_trg_Dukati_Assassin_Set_Conditions = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Dukati_Assassin_Set_Conditions, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Dukati_Assassin_Set_Conditions, Condition( function Trig_Dukati_Assassin_Set_Conditions_Conditions ) )
call TriggerAddAction( gg_trg_Dukati_Assassin_Set_Conditions, function Trig_Dukati_Assassin_Set_Conditions_Actions )
endfunction
function Trig_Drop_Angelic_Staff_Condition_Func004C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I061' ) ) then
return true
endif
return false
endfunction
function Trig_Drop_Angelic_Staff_Condition_Conditions takes nothing returns boolean
if ( not Trig_Drop_Angelic_Staff_Condition_Func004C() ) then
return false
endif
return true
endfunction
function Trig_Drop_Angelic_Staff_Condition_Func002Func002Func001Func001C takes nothing returns boolean
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I061' ) ) then
return true
endif
return false
endfunction
function Trig_Drop_Angelic_Staff_Condition_Func002Func002Func001C takes nothing returns boolean
if ( not Trig_Drop_Angelic_Staff_Condition_Func002Func002Func001Func001C() ) then
return false
endif
return true
endfunction
function Trig_Drop_Angelic_Staff_Condition_Func002Func003C takes nothing returns boolean
if ( not ( udg_AlreadyCarryingEquip > 1 ) ) then
return false
endif
return true
endfunction
function Trig_Drop_Angelic_Staff_Condition_Func002Func004C takes nothing returns boolean
if ( ( GetUnitTypeId(GetManipulatingUnit()) == 'ewsp' ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Paladin" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "White Mage" ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I01G') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I01H') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I05Z') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I01C') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I012') == true ) ) then
return true
endif
return false
endfunction
function Trig_Drop_Angelic_Staff_Condition_Func002C takes nothing returns boolean
if ( not Trig_Drop_Angelic_Staff_Condition_Func002Func004C() ) then
return false
endif
return true
endfunction
function Trig_Drop_Angelic_Staff_Condition_Actions takes nothing returns nothing
set udg_AlreadyCarryingEquip = 0
if ( Trig_Drop_Angelic_Staff_Condition_Func002C() ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Drop_Angelic_Staff_Condition_Func002Func002Func001C() ) then
set udg_AlreadyCarryingEquip = ( udg_AlreadyCarryingEquip + 1 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
if ( Trig_Drop_Angelic_Staff_Condition_Func002Func003C() ) then
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
else
endif
else
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
endif
set udg_AlreadyCarryingEquip = 0
endfunction
//===========================================================================
function InitTrig_Drop_Angelic_Staff_Condition takes nothing returns nothing
set gg_trg_Drop_Angelic_Staff_Condition = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Drop_Angelic_Staff_Condition, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Drop_Angelic_Staff_Condition, Condition( function Trig_Drop_Angelic_Staff_Condition_Conditions ) )
call TriggerAddAction( gg_trg_Drop_Angelic_Staff_Condition, function Trig_Drop_Angelic_Staff_Condition_Actions )
endfunction
function Trig_Drop_Bow_Set_Condition_Func004C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I03T' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I03V' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I03W' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I03U' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I03X' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05F' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05R' ) ) then
return true
endif
return false
endfunction
function Trig_Drop_Bow_Set_Condition_Conditions takes nothing returns boolean
if ( not Trig_Drop_Bow_Set_Condition_Func004C() ) then
return false
endif
return true
endfunction
function Trig_Drop_Bow_Set_Condition_Func002Func001Func001Func001C takes nothing returns boolean
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I03T' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I03V' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I03W' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I03U' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I03X' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I05F' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I05R' ) ) then
return true
endif
return false
endfunction
function Trig_Drop_Bow_Set_Condition_Func002Func001Func001Func004C takes nothing returns boolean
if ( not ( udg_AlreadyCarryingEquip > 1 ) ) then
return false
endif
return true
endfunction
function Trig_Drop_Bow_Set_Condition_Func002Func001Func001C takes nothing returns boolean
if ( not Trig_Drop_Bow_Set_Condition_Func002Func001Func001Func001C() ) then
return false
endif
return true
endfunction
function Trig_Drop_Bow_Set_Condition_Func002Func004C takes nothing returns boolean
if ( ( GetUnitTypeId(GetManipulatingUnit()) == 'ewsp' ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Archer" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Beastmaster" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Hunter" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Chemist" ) ) then
return true
endif
if ( ( GetUnitTypeId(GetManipulatingUnit()) == 'H00T' ) ) then
return true
endif
return false
endfunction
function Trig_Drop_Bow_Set_Condition_Func002C takes nothing returns boolean
if ( not Trig_Drop_Bow_Set_Condition_Func002Func004C() ) then
return false
endif
return true
endfunction
function Trig_Drop_Bow_Set_Condition_Actions takes nothing returns nothing
set udg_AlreadyCarryingEquip = 0
if ( Trig_Drop_Bow_Set_Condition_Func002C() ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Drop_Bow_Set_Condition_Func002Func001Func001C() ) then
set udg_AlreadyCarryingEquip = ( udg_AlreadyCarryingEquip + 1 )
if ( Trig_Drop_Bow_Set_Condition_Func002Func001Func001Func004C() ) then
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
else
call DoNothing( )
endif
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call DoNothing( )
else
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
endif
set udg_AlreadyCarryingEquip = 0
endfunction
//===========================================================================
function InitTrig_Drop_Bow_Set_Condition takes nothing returns nothing
set gg_trg_Drop_Bow_Set_Condition = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Drop_Bow_Set_Condition, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Drop_Bow_Set_Condition, Condition( function Trig_Drop_Bow_Set_Condition_Conditions ) )
call TriggerAddAction( gg_trg_Drop_Bow_Set_Condition, function Trig_Drop_Bow_Set_Condition_Actions )
endfunction
function Trig_Drop_Ring_Condition_Func017C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05C' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05D' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05E' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I062' ) ) then
return true
endif
return false
endfunction
function Trig_Drop_Ring_Condition_Conditions takes nothing returns boolean
if ( not Trig_Drop_Ring_Condition_Func017C() ) then
return false
endif
return true
endfunction
function Trig_Drop_Ring_Condition_Func005Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I05C' ) ) then
return false
endif
return true
endfunction
function Trig_Drop_Ring_Condition_Func006Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I05D' ) ) then
return false
endif
return true
endfunction
function Trig_Drop_Ring_Condition_Func007Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I05E' ) ) then
return false
endif
return true
endfunction
function Trig_Drop_Ring_Condition_Func008Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I062' ) ) then
return false
endif
return true
endfunction
function Trig_Drop_Ring_Condition_Func009001 takes nothing returns boolean
return ( udg_EmeraldRing > 1 )
endfunction
function Trig_Drop_Ring_Condition_Func010001 takes nothing returns boolean
return ( udg_OnyxRing > 1 )
endfunction
function Trig_Drop_Ring_Condition_Func011001 takes nothing returns boolean
return ( udg_MysticRing > 1 )
endfunction
function Trig_Drop_Ring_Condition_Func012001 takes nothing returns boolean
return ( udg_AngelicRing > 1 )
endfunction
function Trig_Drop_Ring_Condition_Actions takes nothing returns nothing
set udg_EmeraldRing = 0
set udg_OnyxRing = 0
set udg_MysticRing = 0
set udg_AngelicRing = 0
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Drop_Ring_Condition_Func005Func001C() ) then
set udg_EmeraldRing = ( udg_EmeraldRing + 1 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Drop_Ring_Condition_Func006Func001C() ) then
set udg_OnyxRing = ( udg_OnyxRing + 1 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Drop_Ring_Condition_Func007Func001C() ) then
set udg_MysticRing = ( udg_MysticRing + 1 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Drop_Ring_Condition_Func008Func001C() ) then
set udg_AngelicRing = ( udg_AngelicRing + 1 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
if ( Trig_Drop_Ring_Condition_Func009001() ) then
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
else
call DoNothing( )
endif
if ( Trig_Drop_Ring_Condition_Func010001() ) then
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
else
call DoNothing( )
endif
if ( Trig_Drop_Ring_Condition_Func011001() ) then
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
else
call DoNothing( )
endif
if ( Trig_Drop_Ring_Condition_Func012001() ) then
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
else
call DoNothing( )
endif
set udg_EmeraldRing = 0
set udg_OnyxRing = 0
set udg_MysticRing = 0
set udg_AngelicRing = 0
endfunction
//===========================================================================
function InitTrig_Drop_Ring_Condition takes nothing returns nothing
set gg_trg_Drop_Ring_Condition = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Drop_Ring_Condition, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Drop_Ring_Condition, Condition( function Trig_Drop_Ring_Condition_Conditions ) )
call TriggerAddAction( gg_trg_Drop_Ring_Condition, function Trig_Drop_Ring_Condition_Actions )
endfunction
function Trig_Drop_Weapon_Condition_Fixed_Func006C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I00N' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I03J' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I03T' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I03I' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I03L' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I03G' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I03M' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I03V' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I03W' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I03U' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I03H' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I03K' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I03X' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I00O' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I00I' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I00K' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I00J' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I04N' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I00M' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I004' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I00L' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I027' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I026' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I028' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I02D' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I02C' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I02F' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I02E' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I02G' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I054' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05S' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05P' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05L' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05I' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I060' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I061' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I063' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05R' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05F' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05P' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05I' ) ) then
return true
endif
return false
endfunction
function Trig_Drop_Weapon_Condition_Fixed_Conditions takes nothing returns boolean
if ( not Trig_Drop_Weapon_Condition_Fixed_Func006C() ) then
return false
endif
return true
endfunction
function Trig_Drop_Weapon_Condition_Fixed_Func001Func001Func001C takes nothing returns boolean
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I03J' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I03T' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I03I' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I03L' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I03G' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I03M' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I04N' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I03V' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I03W' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I03U' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I03H' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I03K' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I03X' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I00I' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I00K' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I00J' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I00M' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I00L' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I004' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I00O' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I00N' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I027' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I026' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I028' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I02D' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I02C' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I02F' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I02E' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I02G' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I054' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I05S' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I05P' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I05L' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I05I' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I060' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I061' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I063' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I05F' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I05P' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I05R' ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetManipulatingUnit(), GetForLoopIndexA())) == 'I05I' ) ) then
return true
endif
return false
endfunction
function Trig_Drop_Weapon_Condition_Fixed_Func001Func001C takes nothing returns boolean
if ( not Trig_Drop_Weapon_Condition_Fixed_Func001Func001Func001C() ) then
return false
endif
return true
endfunction
function Trig_Drop_Weapon_Condition_Fixed_Func002C takes nothing returns boolean
if ( not ( udg_AlreadyCarryingEquip > 2 ) ) then
return false
endif
return true
endfunction
function Trig_Drop_Weapon_Condition_Fixed_Func003Func005C takes nothing returns boolean
if ( ( GetUnitTypeId(GetManipulatingUnit()) == 'H012' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetManipulatingUnit()) == 'H018' ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I034') == true ) ) then
return true
endif
return false
endfunction
function Trig_Drop_Weapon_Condition_Fixed_Func003C takes nothing returns boolean
if ( not ( udg_AlreadyCarryingEquip > 1 ) ) then
return false
endif
if ( not Trig_Drop_Weapon_Condition_Fixed_Func003Func005C() ) then
return false
endif
return true
endfunction
function Trig_Drop_Weapon_Condition_Fixed_Func004Func004C takes nothing returns boolean
if ( ( GetUnitTypeId(GetManipulatingUnit()) != 'H018' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetManipulatingUnit()) != 'H012' ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), 'I034') == false ) ) then
return true
endif
return false
endfunction
function Trig_Drop_Weapon_Condition_Fixed_Func004C takes nothing returns boolean
if ( not ( udg_AlreadyCarryingEquip > 1 ) ) then
return false
endif
if ( not Trig_Drop_Weapon_Condition_Fixed_Func004Func004C() ) then
return false
endif
return true
endfunction
function Trig_Drop_Weapon_Condition_Fixed_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Drop_Weapon_Condition_Fixed_Func001Func001C() ) then
set udg_AlreadyCarryingEquip = ( udg_AlreadyCarryingEquip + 1 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
if ( Trig_Drop_Weapon_Condition_Fixed_Func002C() ) then
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
else
call DoNothing( )
endif
if ( Trig_Drop_Weapon_Condition_Fixed_Func003C() ) then
set udg_AlreadyCarryingEquip = 0
return
else
call DoNothing( )
endif
if ( Trig_Drop_Weapon_Condition_Fixed_Func004C() ) then
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
else
call DoNothing( )
endif
set udg_AlreadyCarryingEquip = 0
endfunction
//===========================================================================
function InitTrig_Drop_Weapon_Condition_Fixed takes nothing returns nothing
set gg_trg_Drop_Weapon_Condition_Fixed = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Drop_Weapon_Condition_Fixed, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Drop_Weapon_Condition_Fixed, Condition( function Trig_Drop_Weapon_Condition_Fixed_Conditions ) )
call TriggerAddAction( gg_trg_Drop_Weapon_Condition_Fixed, function Trig_Drop_Weapon_Condition_Fixed_Actions )
endfunction
function Trig_FullLife_Protect_Func001C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'e005' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'e007' ) ) then
return true
endif
return false
endfunction
function Trig_FullLife_Protect_Conditions takes nothing returns boolean
if ( not Trig_FullLife_Protect_Func001C() ) then
return false
endif
return true
endfunction
function Trig_FullLife_Protect_Actions takes nothing returns nothing
call SetUnitOwner( GetTriggerUnit(), Player(PLAYER_NEUTRAL_PASSIVE), true )
endfunction
//===========================================================================
function InitTrig_FullLife_Protect takes nothing returns nothing
set gg_trg_FullLife_Protect = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_FullLife_Protect, Player(0), false )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_FullLife_Protect, Player(1), false )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_FullLife_Protect, Player(2), false )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_FullLife_Protect, Player(3), false )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_FullLife_Protect, Player(4), false )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_FullLife_Protect, Player(5), false )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_FullLife_Protect, Player(6), false )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_FullLife_Protect, Player(7), false )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_FullLife_Protect, Player(8), false )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_FullLife_Protect, Player(9), false )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_FullLife_Protect, Player(10), false )
call TriggerAddCondition( gg_trg_FullLife_Protect, Condition( function Trig_FullLife_Protect_Conditions ) )
call TriggerAddAction( gg_trg_FullLife_Protect, function Trig_FullLife_Protect_Actions )
endfunction
function Trig_Create_Starting_Life_Respawn_Func002C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'e007' ) ) then
return false
endif
if ( not ( RectContainsUnit(gg_rct_Life_Spawn, GetTriggerUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Create_Starting_Life_Respawn_Conditions takes nothing returns boolean
if ( not Trig_Create_Starting_Life_Respawn_Func002C() ) then
return false
endif
return true
endfunction
function Trig_Create_Starting_Life_Respawn_Actions takes nothing returns nothing
call ConditionalTriggerExecute( gg_trg_Create_Starting_Life )
endfunction
//===========================================================================
function InitTrig_Create_Starting_Life_Respawn takes nothing returns nothing
set gg_trg_Create_Starting_Life_Respawn = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Create_Starting_Life_Respawn, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Create_Starting_Life_Respawn, Condition( function Trig_Create_Starting_Life_Respawn_Conditions ) )
call TriggerAddAction( gg_trg_Create_Starting_Life_Respawn, function Trig_Create_Starting_Life_Respawn_Actions )
endfunction
function Trig_Satyr_Quests_Initialize_Actions takes nothing returns nothing
call CreateQuestBJ( bj_QUESTTYPE_REQ_DISCOVERED, "TRIGSTR_582", "TRIGSTR_583", "ReplaceableTextures\\CommandButtons\\BTNSatyr.blp" )
call QuestSetEnabledBJ( false, GetLastCreatedQuestBJ() )
set udg_Quests[8] = GetLastCreatedQuestBJ()
call CreateQuestBJ( bj_QUESTTYPE_REQ_DISCOVERED, "TRIGSTR_580", "TRIGSTR_581", "ReplaceableTextures\\CommandButtons\\BTNSatyrTrickster.blp" )
call QuestSetEnabledBJ( false, GetLastCreatedQuestBJ() )
set udg_Quests[9] = GetLastCreatedQuestBJ()
endfunction
//===========================================================================
function InitTrig_Satyr_Quests_Initialize takes nothing returns nothing
set gg_trg_Satyr_Quests_Initialize = CreateTrigger( )
call TriggerAddAction( gg_trg_Satyr_Quests_Initialize, function Trig_Satyr_Quests_Initialize_Actions )
endfunction
function Trig_Satyr_Prisoner_Func001C takes nothing returns boolean
if ( ( GetTriggerUnit() == gg_unit_nsat_0169 ) ) then
return true
endif
if ( ( GetTriggerUnit() == gg_unit_nsty_0173 ) ) then
return true
endif
return false
endfunction
function Trig_Satyr_Prisoner_Conditions takes nothing returns boolean
if ( not Trig_Satyr_Prisoner_Func001C() ) then
return false
endif
return true
endfunction
function Trig_Satyr_Prisoner_Func014A takes nothing returns nothing
call CameraSetupApplyForPlayer( true, gg_cam_Satyr_Prisoner, GetTriggerPlayer(), 0 )
endfunction
function Trig_Satyr_Prisoner_Func020A takes nothing returns nothing
call ResetToGameCameraForPlayer( GetTriggerPlayer(), 0 )
endfunction
function Trig_Satyr_Prisoner_Actions takes nothing returns nothing
call CinematicModeBJ( true, GetForceOfPlayer(GetTriggerPlayer()) )
call ForForce( GetForceOfPlayer(GetTriggerPlayer()), function Trig_Satyr_Prisoner_Func014A )
call TransmissionFromUnitTypeWithNameBJ( GetForceOfPlayer(GetTriggerPlayer()), Player(PLAYER_NEUTRAL_PASSIVE), 'nsty', "TRIGSTR_506", GetRectCenter(GetPlayableMapRect()), null, "TRIGSTR_514", bj_TIMETYPE_ADD, 7.00, false )
call TriggerSleepAction( 7.00 )
call TransmissionFromUnitTypeWithNameBJ( GetForceOfPlayer(GetTriggerPlayer()), Player(PLAYER_NEUTRAL_PASSIVE), 'nsat', "TRIGSTR_519", GetRectCenter(GetPlayableMapRect()), null, "TRIGSTR_575", bj_TIMETYPE_ADD, 5.00, false )
call TriggerSleepAction( 5.00 )
call CinematicModeBJ( false, GetForceOfPlayer(GetTriggerPlayer()) )
call ForForce( GetForceOfPlayer(GetTriggerPlayer()), function Trig_Satyr_Prisoner_Func020A )
call QuestSetEnabledBJ( true, udg_Quests[9] )
call FlashQuestDialogButtonBJ( )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_579" )
call DisableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Satyr_Prisoner takes nothing returns nothing
set gg_trg_Satyr_Prisoner = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Prisoner, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Prisoner, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Prisoner, Player(2), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Prisoner, Player(3), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Prisoner, Player(4), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Prisoner, Player(5), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Prisoner, Player(6), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Prisoner, Player(7), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Prisoner, Player(8), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Prisoner, Player(9), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Prisoner, Player(10), true )
call TriggerAddCondition( gg_trg_Satyr_Prisoner, Condition( function Trig_Satyr_Prisoner_Conditions ) )
call TriggerAddAction( gg_trg_Satyr_Prisoner, function Trig_Satyr_Prisoner_Actions )
endfunction
function Trig_Satyr_Prisoner_Complete_Func001C takes nothing returns boolean
if ( ( GetTriggerUnit() == gg_unit_nsat_0169 ) ) then
return true
endif
if ( ( GetTriggerUnit() == gg_unit_nsty_0173 ) ) then
return true
endif
return false
endfunction
function Trig_Satyr_Prisoner_Complete_Conditions takes nothing returns boolean
if ( not Trig_Satyr_Prisoner_Complete_Func001C() ) then
return false
endif
if ( not ( udg_QuestSatyrPrisoner == true ) ) then
return false
endif
return true
endfunction
function Trig_Satyr_Prisoner_Complete_Func004A takes nothing returns nothing
call CameraSetupApplyForPlayer( true, gg_cam_Satyr_Prisoner_Copy, GetTriggerPlayer(), 0 )
endfunction
function Trig_Satyr_Prisoner_Complete_Func008A takes nothing returns nothing
call ResetToGameCameraForPlayer( GetTriggerPlayer(), 0 )
endfunction
function Trig_Satyr_Prisoner_Complete_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call CinematicModeBJ( true, GetForceOfPlayer(GetTriggerPlayer()) )
call ForForce( GetForceOfPlayer(GetTriggerPlayer()), function Trig_Satyr_Prisoner_Complete_Func004A )
call TransmissionFromUnitTypeWithNameBJ( GetForceOfPlayer(GetTriggerPlayer()), Player(PLAYER_NEUTRAL_PASSIVE), 'nsat', "TRIGSTR_603", GetRectCenter(GetPlayableMapRect()), null, "TRIGSTR_606", bj_TIMETYPE_ADD, 18.00, false )
call TriggerSleepAction( 18.00 )
call CinematicModeBJ( false, GetForceOfPlayer(GetTriggerPlayer()) )
call ForForce( GetForceOfPlayer(GetTriggerPlayer()), function Trig_Satyr_Prisoner_Complete_Func008A )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_615" )
call CreateItemLoc( 'I054', GetUnitLoc(gg_unit_nsat_0169) )
call QuestSetCompletedBJ( udg_Quests[9], true )
call DisableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Satyr_Prisoner_Complete takes nothing returns nothing
set gg_trg_Satyr_Prisoner_Complete = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Prisoner_Complete, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Prisoner_Complete, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Prisoner_Complete, Player(2), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Prisoner_Complete, Player(3), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Prisoner_Complete, Player(4), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Prisoner_Complete, Player(5), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Prisoner_Complete, Player(6), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Prisoner_Complete, Player(7), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Prisoner_Complete, Player(8), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Prisoner_Complete, Player(9), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Prisoner_Complete, Player(10), true )
call TriggerAddCondition( gg_trg_Satyr_Prisoner_Complete, Condition( function Trig_Satyr_Prisoner_Complete_Conditions ) )
call TriggerAddAction( gg_trg_Satyr_Prisoner_Complete, function Trig_Satyr_Prisoner_Complete_Actions )
endfunction
function Trig_Spawn_Prisoner_Actions takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'n02K', Player(PLAYER_NEUTRAL_PASSIVE), GetRectCenter(gg_rct_Prisoner_Spawn), bj_UNIT_FACING )
call MakeUnitRescuableToForceBJ( GetLastCreatedUnit(), true, GetPlayersByMapControl(MAP_CONTROL_USER) )
call EnableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Spawn_Prisoner takes nothing returns nothing
set gg_trg_Spawn_Prisoner = CreateTrigger( )
call TriggerRegisterDeathEvent( gg_trg_Spawn_Prisoner, gg_dest_LOcg_2026 )
call TriggerAddAction( gg_trg_Spawn_Prisoner, function Trig_Spawn_Prisoner_Actions )
endfunction
function Trig_Prisoner_Protect_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'n02K' ) ) then
return false
endif
return true
endfunction
function Trig_Prisoner_Protect_Func005Func001Func003C takes nothing returns boolean
if ( ( GetUnitTypeId(GetEnumUnit()) == 'n02M' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetEnumUnit()) == 'n02N' ) ) then
return true
endif
return false
endfunction
function Trig_Prisoner_Protect_Func005Func001C takes nothing returns boolean
if ( not Trig_Prisoner_Protect_Func005Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Prisoner_Protect_Func005A takes nothing returns nothing
if ( Trig_Prisoner_Protect_Func005Func001C() ) then
call IssueTargetOrderBJ( GetEnumUnit(), "attack", GetTriggerUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_Prisoner_Protect_Func008Func001Func003C takes nothing returns boolean
if ( ( GetUnitTypeId(GetEnumUnit()) == 'n02M' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetEnumUnit()) == 'n02N' ) ) then
return true
endif
return false
endfunction
function Trig_Prisoner_Protect_Func008Func001C takes nothing returns boolean
if ( not Trig_Prisoner_Protect_Func008Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Prisoner_Protect_Func008A takes nothing returns nothing
if ( Trig_Prisoner_Protect_Func008Func001C() ) then
call IssueTargetOrderBJ( GetEnumUnit(), "attack", GetTriggerUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_Prisoner_Protect_Actions takes nothing returns nothing
call DisplayTimedTextToForce( GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit())), 30, "TRIGSTR_617" )
call PlaySoundBJ( gg_snd_DivineShield )
call CreateNUnitsAtLocFacingLocBJ( 6, 'n02M', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_Spawn_Pirates), GetUnitLoc(GetTriggerUnit()) )
call CreateNUnitsAtLocFacingLocBJ( 1, 'n02N', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_Spawn_Pirates), GetUnitLoc(GetTriggerUnit()) )
call ForGroupBJ( GetUnitsInRectAll(gg_rct_Spawn_Pirates), function Trig_Prisoner_Protect_Func005A )
call CreateNUnitsAtLocFacingLocBJ( 6, 'n02M', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_Pirate_Spawn_2), GetUnitLoc(GetTriggerUnit()) )
call CreateNUnitsAtLocFacingLocBJ( 2, 'n02N', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_Pirate_Spawn_2), GetUnitLoc(GetTriggerUnit()) )
call ForGroupBJ( GetUnitsInRectAll(gg_rct_Pirate_Spawn_2), function Trig_Prisoner_Protect_Func008A )
endfunction
//===========================================================================
function InitTrig_Prisoner_Protect takes nothing returns nothing
set gg_trg_Prisoner_Protect = CreateTrigger( )
call TriggerRegisterLeaveRectSimple( gg_trg_Prisoner_Protect, gg_rct_Prisoner_Spawn )
call TriggerAddCondition( gg_trg_Prisoner_Protect, Condition( function Trig_Prisoner_Protect_Conditions ) )
call TriggerAddAction( gg_trg_Prisoner_Protect, function Trig_Prisoner_Protect_Actions )
endfunction
function Trig_Satyr_Prisoner_Verify_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'n02K' ) ) then
return false
endif
return true
endfunction
function Trig_Satyr_Prisoner_Verify_Actions takes nothing returns nothing
call SetUnitOwner( GetTriggerUnit(), Player(PLAYER_NEUTRAL_PASSIVE), true )
set udg_QuestSatyrPrisoner = true
call IssuePointOrderLocBJ( GetTriggerUnit(), "move", GetRectCenter(gg_rct_Denerall_Move) )
endfunction
//===========================================================================
function InitTrig_Satyr_Prisoner_Verify takes nothing returns nothing
set gg_trg_Satyr_Prisoner_Verify = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Satyr_Prisoner_Verify, gg_rct_Satyr_Village )
call TriggerAddCondition( gg_trg_Satyr_Prisoner_Verify, Condition( function Trig_Satyr_Prisoner_Verify_Conditions ) )
call TriggerAddAction( gg_trg_Satyr_Prisoner_Verify, function Trig_Satyr_Prisoner_Verify_Actions )
endfunction
function Trig_Satyr_Prisoner_Pirate_kill_Func001C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n02M' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n02N' ) ) then
return true
endif
return false
endfunction
function Trig_Satyr_Prisoner_Pirate_kill_Conditions takes nothing returns boolean
if ( not Trig_Satyr_Prisoner_Pirate_kill_Func001C() ) then
return false
endif
return true
endfunction
function Trig_Satyr_Prisoner_Pirate_kill_Actions takes nothing returns nothing
call KillUnit( GetTriggerUnit() )
endfunction
//===========================================================================
function InitTrig_Satyr_Prisoner_Pirate_kill takes nothing returns nothing
set gg_trg_Satyr_Prisoner_Pirate_kill = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Satyr_Prisoner_Pirate_kill, gg_rct_Satyr_Village )
call TriggerAddCondition( gg_trg_Satyr_Prisoner_Pirate_kill, Condition( function Trig_Satyr_Prisoner_Pirate_kill_Conditions ) )
call TriggerAddAction( gg_trg_Satyr_Prisoner_Pirate_kill, function Trig_Satyr_Prisoner_Pirate_kill_Actions )
endfunction
function Trig_Satyr_Guard_Conditions takes nothing returns boolean
if ( not ( udg_KefkaCount == 5 ) ) then
return false
endif
if ( not ( GetTriggerUnit() == gg_unit_nsty_0191 ) ) then
return false
endif
if ( not ( udg_QuestSatyrPrisoner == true ) ) then
return false
endif
if ( not ( udg_QuestAdamontoise == true ) ) then
return false
endif
if ( not ( udg_QuestCactuar == true ) ) then
return false
endif
if ( not ( udg_QuestSatyrShop == true ) ) then
return false
endif
return true
endfunction
function Trig_Satyr_Guard_Func019A takes nothing returns nothing
call CameraSetupApplyForPlayer( true, gg_cam_Satyr_Guard, GetTriggerPlayer(), 0 )
endfunction
function Trig_Satyr_Guard_Func025A takes nothing returns nothing
call ResetToGameCameraForPlayer( GetTriggerPlayer(), 0 )
endfunction
function Trig_Satyr_Guard_Actions takes nothing returns nothing
call CinematicModeBJ( true, GetForceOfPlayer(GetTriggerPlayer()) )
call ForForce( GetForceOfPlayer(GetTriggerPlayer()), function Trig_Satyr_Guard_Func019A )
call TransmissionFromUnitTypeWithNameBJ( GetForceOfPlayer(GetTriggerPlayer()), Player(PLAYER_NEUTRAL_PASSIVE), 'nsty', "TRIGSTR_634", GetRectCenter(GetPlayableMapRect()), null, "TRIGSTR_649", bj_TIMETYPE_ADD, 7.00, false )
call TriggerSleepAction( 16.00 )
call TransmissionFromUnitTypeWithNameBJ( GetForceOfPlayer(GetTriggerPlayer()), Player(PLAYER_NEUTRAL_PASSIVE), 'nsty', "TRIGSTR_662", GetRectCenter(GetPlayableMapRect()), null, "TRIGSTR_664", bj_TIMETYPE_ADD, 5.00, false )
call TriggerSleepAction( 18.00 )
call CinematicModeBJ( false, GetForceOfPlayer(GetTriggerPlayer()) )
call ForForce( GetForceOfPlayer(GetTriggerPlayer()), function Trig_Satyr_Guard_Func025A )
call CreateItemLoc( 'I055', GetRectCenter(gg_rct_Guarditem) )
call DisableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Satyr_Guard takes nothing returns nothing
set gg_trg_Satyr_Guard = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Guard, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Guard, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Guard, Player(2), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Guard, Player(3), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Guard, Player(4), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Guard, Player(5), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Guard, Player(6), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Guard, Player(7), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Guard, Player(8), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Guard, Player(9), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Guard, Player(10), true )
call TriggerAddCondition( gg_trg_Satyr_Guard, Condition( function Trig_Satyr_Guard_Conditions ) )
call TriggerAddAction( gg_trg_Satyr_Guard, function Trig_Satyr_Guard_Actions )
endfunction
function Trig_Enter_Satyr_Village_Conditions takes nothing returns boolean
if ( not ( IsUnitEnemy(GetEnteringUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Enter_Satyr_Village_Func001A takes nothing returns nothing
call CreateFogModifierRectBJ( true, GetEnumPlayer(), FOG_OF_WAR_VISIBLE, gg_rct_SatyrLife )
endfunction
function Trig_Enter_Satyr_Village_Actions takes nothing returns nothing
call ForForce( GetPlayersAll(), function Trig_Enter_Satyr_Village_Func001A )
call DisableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Enter_Satyr_Village takes nothing returns nothing
set gg_trg_Enter_Satyr_Village = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Enter_Satyr_Village, gg_rct_Satyr_Village )
call TriggerAddCondition( gg_trg_Enter_Satyr_Village, Condition( function Trig_Enter_Satyr_Village_Conditions ) )
call TriggerAddAction( gg_trg_Enter_Satyr_Village, function Trig_Enter_Satyr_Village_Actions )
endfunction
function Trig_Satyr_Warrior_Shop_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == gg_unit_n02L_0229 ) ) then
return false
endif
return true
endfunction
function Trig_Satyr_Warrior_Shop_Func014A takes nothing returns nothing
call CameraSetupApplyForPlayer( true, gg_cam_Satyr_Shop, GetTriggerPlayer(), 0 )
endfunction
function Trig_Satyr_Warrior_Shop_Func020A takes nothing returns nothing
call ResetToGameCameraForPlayer( GetTriggerPlayer(), 0 )
endfunction
function Trig_Satyr_Warrior_Shop_Actions takes nothing returns nothing
call CinematicModeBJ( true, GetForceOfPlayer(GetTriggerPlayer()) )
call ForForce( GetForceOfPlayer(GetTriggerPlayer()), function Trig_Satyr_Warrior_Shop_Func014A )
call TransmissionFromUnitTypeWithNameBJ( GetForceOfPlayer(GetTriggerPlayer()), Player(PLAYER_NEUTRAL_PASSIVE), 'n02L', "TRIGSTR_500", GetRectCenter(GetPlayableMapRect()), null, "TRIGSTR_504", bj_TIMETYPE_ADD, 2.00, false )
call TriggerSleepAction( 5.00 )
call TransmissionFromUnitTypeWithNameBJ( GetForceOfPlayer(GetTriggerPlayer()), Player(PLAYER_NEUTRAL_PASSIVE), 'n02L', "TRIGSTR_510", GetRectCenter(GetPlayableMapRect()), null, "TRIGSTR_511", bj_TIMETYPE_ADD, 20.00, false )
call TriggerSleepAction( 22.00 )
call CinematicModeBJ( false, GetForceOfPlayer(GetTriggerPlayer()) )
call ForForce( GetForceOfPlayer(GetTriggerPlayer()), function Trig_Satyr_Warrior_Shop_Func020A )
call QuestSetEnabledBJ( true, udg_Quests[8] )
call FlashQuestDialogButtonBJ( )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_513" )
call DisableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Satyr_Warrior_Shop takes nothing returns nothing
set gg_trg_Satyr_Warrior_Shop = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Warrior_Shop, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Warrior_Shop, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Warrior_Shop, Player(2), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Warrior_Shop, Player(3), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Warrior_Shop, Player(4), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Warrior_Shop, Player(5), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Warrior_Shop, Player(6), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Warrior_Shop, Player(7), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Warrior_Shop, Player(8), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Warrior_Shop, Player(9), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Warrior_Shop, Player(10), true )
call TriggerAddCondition( gg_trg_Satyr_Warrior_Shop, Condition( function Trig_Satyr_Warrior_Shop_Conditions ) )
call TriggerAddAction( gg_trg_Satyr_Warrior_Shop, function Trig_Satyr_Warrior_Shop_Actions )
endfunction
function Trig_Satyr_Warrior_Shop_Complete_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == gg_unit_n02L_0229 ) ) then
return false
endif
if ( not ( udg_QuestSatyrShop == true ) ) then
return false
endif
return true
endfunction
function Trig_Satyr_Warrior_Shop_Complete_Func003A takes nothing returns nothing
call CameraSetupApplyForPlayer( true, gg_cam_Satyr_Shop, GetTriggerPlayer(), 0 )
endfunction
function Trig_Satyr_Warrior_Shop_Complete_Func009A takes nothing returns nothing
call ResetToGameCameraForPlayer( GetTriggerPlayer(), 0 )
endfunction
function Trig_Satyr_Warrior_Shop_Complete_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call CinematicModeBJ( true, GetForceOfPlayer(GetTriggerPlayer()) )
call ForForce( GetForceOfPlayer(GetTriggerPlayer()), function Trig_Satyr_Warrior_Shop_Complete_Func003A )
call TransmissionFromUnitTypeWithNameBJ( GetForceOfPlayer(GetTriggerPlayer()), Player(PLAYER_NEUTRAL_PASSIVE), 'n02L', "TRIGSTR_522", GetRectCenter(GetPlayableMapRect()), null, "TRIGSTR_523", bj_TIMETYPE_ADD, 5.00, false )
call TriggerSleepAction( 7.00 )
call TransmissionFromUnitTypeWithNameBJ( GetForceOfPlayer(GetTriggerPlayer()), Player(PLAYER_NEUTRAL_PASSIVE), 'n02L', "TRIGSTR_524", GetRectCenter(GetPlayableMapRect()), null, "TRIGSTR_525", bj_TIMETYPE_ADD, 15.00, false )
call TriggerSleepAction( 19.00 )
call CinematicModeBJ( false, GetForceOfPlayer(GetTriggerPlayer()) )
call ForForce( GetForceOfPlayer(GetTriggerPlayer()), function Trig_Satyr_Warrior_Shop_Complete_Func009A )
call UnitAddAbilityBJ( 'Aneu', gg_unit_n02L_0229 )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_515" )
call QuestSetCompletedBJ( udg_Quests[8], true )
call DisableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Satyr_Warrior_Shop_Complete takes nothing returns nothing
set gg_trg_Satyr_Warrior_Shop_Complete = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Warrior_Shop_Complete, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Warrior_Shop_Complete, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Warrior_Shop_Complete, Player(2), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Warrior_Shop_Complete, Player(3), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Warrior_Shop_Complete, Player(4), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Warrior_Shop_Complete, Player(5), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Warrior_Shop_Complete, Player(6), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Warrior_Shop_Complete, Player(7), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Warrior_Shop_Complete, Player(8), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Warrior_Shop_Complete, Player(9), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Satyr_Warrior_Shop_Complete, Player(10), true )
call TriggerAddCondition( gg_trg_Satyr_Warrior_Shop_Complete, Condition( function Trig_Satyr_Warrior_Shop_Complete_Conditions ) )
call TriggerAddAction( gg_trg_Satyr_Warrior_Shop_Complete, function Trig_Satyr_Warrior_Shop_Complete_Actions )
endfunction
function Trig_Satyr_Warrior_Shop_Centaur_death_Actions takes nothing returns nothing
set udg_QuestSatyrShop = true
endfunction
//===========================================================================
function InitTrig_Satyr_Warrior_Shop_Centaur_death takes nothing returns nothing
set gg_trg_Satyr_Warrior_Shop_Centaur_death = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_Satyr_Warrior_Shop_Centaur_death, gg_unit_n01S_0015, EVENT_UNIT_DEATH )
call TriggerAddAction( gg_trg_Satyr_Warrior_Shop_Centaur_death, function Trig_Satyr_Warrior_Shop_Centaur_death_Actions )
endfunction
function Trig_Stamina_Tonic_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I052' ) ) then
return false
endif
return true
endfunction
function Trig_Stamina_Tonic_Actions takes nothing returns nothing
call ModifyHeroStat( bj_HEROSTAT_STR, GetManipulatingUnit(), bj_MODIFYMETHOD_ADD, ( GetHeroStatBJ(bj_HEROSTAT_STR, GetManipulatingUnit(), false) + 0 ) )
call SuspendHeroXPBJ( false, GetManipulatingUnit() )
call TriggerSleepAction( 20.00 )
call ModifyHeroStat( bj_HEROSTAT_STR, GetManipulatingUnit(), bj_MODIFYMETHOD_SUB, ( GetHeroStatBJ(bj_HEROSTAT_STR, GetManipulatingUnit(), false) / 4 ) )
call SuspendHeroXPBJ( true, GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Stamina_Tonic takes nothing returns nothing
set gg_trg_Stamina_Tonic = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Stamina_Tonic, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_Stamina_Tonic, Condition( function Trig_Stamina_Tonic_Conditions ) )
call TriggerAddAction( gg_trg_Stamina_Tonic, function Trig_Stamina_Tonic_Actions )
endfunction
function Trig_Mana_Tonic_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I053' ) ) then
return false
endif
return true
endfunction
function Trig_Mana_Tonic_Actions takes nothing returns nothing
call ModifyHeroStat( bj_HEROSTAT_INT, GetManipulatingUnit(), bj_MODIFYMETHOD_ADD, ( GetHeroStatBJ(bj_HEROSTAT_INT, GetManipulatingUnit(), false) + 0 ) )
call SuspendHeroXPBJ( false, GetManipulatingUnit() )
call TriggerSleepAction( 20.00 )
call ModifyHeroStat( bj_HEROSTAT_INT, GetManipulatingUnit(), bj_MODIFYMETHOD_SUB, ( GetHeroStatBJ(bj_HEROSTAT_INT, GetManipulatingUnit(), false) / 4 ) )
call SuspendHeroXPBJ( true, GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Mana_Tonic takes nothing returns nothing
set gg_trg_Mana_Tonic = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Mana_Tonic, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_Mana_Tonic, Condition( function Trig_Mana_Tonic_Conditions ) )
call TriggerAddAction( gg_trg_Mana_Tonic, function Trig_Mana_Tonic_Actions )
endfunction
function Trig_Chemist_Geyser_Conditions takes nothing returns boolean
if ( not ( 'A04O' == GetSpellAbilityId() ) ) then
return false
endif
return true
endfunction
function Trig_Chemist_Geyser_Actions takes nothing returns nothing
call SetUnitLifeBJ( GetTriggerUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetTriggerUnit()) / 2.00 ) )
call TriggerSleepAction( 7.00 )
call SetUnitLifeBJ( GetTriggerUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetTriggerUnit()) / 2.00 ) )
endfunction
//===========================================================================
function InitTrig_Chemist_Geyser takes nothing returns nothing
set gg_trg_Chemist_Geyser = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Chemist_Geyser, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Chemist_Geyser, Condition( function Trig_Chemist_Geyser_Conditions ) )
call TriggerAddAction( gg_trg_Chemist_Geyser, function Trig_Chemist_Geyser_Actions )
endfunction
function Trig_Angel_of_death_Conditions takes nothing returns boolean
if ( not ( 'A04U' == GetSpellAbilityId() ) ) then
return false
endif
return true
endfunction
function Trig_Angel_of_death_Actions takes nothing returns nothing
call SetUnitLifeBJ( GetTriggerUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetTriggerUnit()) / 5.00 ) )
endfunction
//===========================================================================
function InitTrig_Angel_of_death takes nothing returns nothing
set gg_trg_Angel_of_death = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Angel_of_death, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Angel_of_death, Condition( function Trig_Angel_of_death_Conditions ) )
call TriggerAddAction( gg_trg_Angel_of_death, function Trig_Angel_of_death_Actions )
endfunction
function Trig_Pirate_Quests_Initialize_Actions takes nothing returns nothing
call CreateQuestBJ( bj_QUESTTYPE_REQ_DISCOVERED, "TRIGSTR_1015", "TRIGSTR_1016", "ReplaceableTextures\\CommandButtons\\BTNBanditLord.blp" )
call QuestSetEnabledBJ( false, GetLastCreatedQuestBJ() )
set udg_Quests[10] = GetLastCreatedQuestBJ()
endfunction
//===========================================================================
function InitTrig_Pirate_Quests_Initialize takes nothing returns nothing
set gg_trg_Pirate_Quests_Initialize = CreateTrigger( )
call TriggerAddAction( gg_trg_Pirate_Quests_Initialize, function Trig_Pirate_Quests_Initialize_Actions )
endfunction
function Trig_Pirate_Defense_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == gg_unit_nwzd_0223 ) ) then
return false
endif
return true
endfunction
function Trig_Pirate_Defense_Actions takes nothing returns nothing
call EnableTrigger( gg_trg_Pirate_Defense_II )
call EnableTrigger( gg_trg_Pirate_Defense_III )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1000" )
call PolledWait( 4.00 )
call DialogClearBJ( udg_PirateDefense )
call DialogSetMessageBJ( udg_PirateDefense, "TRIGSTR_1001" )
call DialogAddButtonBJ( udg_PirateDefense, "TRIGSTR_1002" )
set udg_YesButton = GetLastCreatedButtonBJ()
call DialogAddButtonBJ( udg_PirateDefense, "TRIGSTR_1003" )
set udg_NoButton = GetLastCreatedButtonBJ()
call DialogDisplayBJ( true, udg_PirateDefense, GetTriggerPlayer() )
call QuestSetEnabledBJ( true, udg_Quests[10] )
call FlashQuestDialogButtonBJ( )
set udg_Quests[10] = GetLastCreatedQuestBJ()
call DisableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Pirate_Defense takes nothing returns nothing
set gg_trg_Pirate_Defense = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Pirate_Defense, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Pirate_Defense, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Pirate_Defense, Player(2), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Pirate_Defense, Player(3), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Pirate_Defense, Player(4), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Pirate_Defense, Player(5), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Pirate_Defense, Player(6), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Pirate_Defense, Player(7), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Pirate_Defense, Player(8), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Pirate_Defense, Player(9), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Pirate_Defense, Player(10), true )
call TriggerAddCondition( gg_trg_Pirate_Defense, Condition( function Trig_Pirate_Defense_Conditions ) )
call TriggerAddAction( gg_trg_Pirate_Defense, function Trig_Pirate_Defense_Actions )
endfunction
function Trig_Pirate_Defense_II_Conditions takes nothing returns boolean
if ( not ( GetClickedButtonBJ() == udg_YesButton ) ) then
return false
endif
return true
endfunction
function Trig_Pirate_Defense_II_Func009001001 takes nothing returns boolean
return ( GetPlayerSlotState(GetFilterPlayer()) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Pirate_Defense_II_Func009Func001001002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Pirate_Defense_II_Func009Func001Func001C takes nothing returns boolean
if ( not ( IsUnitEnemy(GetEnumUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Pirate_Defense_II_Func009Func001A takes nothing returns nothing
if ( Trig_Pirate_Defense_II_Func009Func001Func001C() ) then
call SetUnitPositionLoc( GetEnumUnit(), GetRectCenter(gg_rct_Pirate_Camp) )
else
endif
endfunction
function Trig_Pirate_Defense_II_Func009A takes nothing returns nothing
call ForGroupBJ( GetUnitsOfPlayerMatching(GetEnumPlayer(), Condition(function Trig_Pirate_Defense_II_Func009Func001001002)), function Trig_Pirate_Defense_II_Func009Func001A )
endfunction
function Trig_Pirate_Defense_II_Func040Func003002 takes nothing returns nothing
call SetUnitInvulnerable( GetEnumUnit(), false )
endfunction
function Trig_Pirate_Defense_II_Func040C takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectOfPlayer(gg_rct_Pirate_Camp, Player(11))) <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Pirate_Defense_II_Actions takes nothing returns nothing
call DisableTrigger( gg_trg_Tropical_Peninsula )
call DisableTrigger( gg_trg_Tropical_Peninsula_Clear )
call DisableTrigger( gg_trg_Ancient_Forest )
call DisableTrigger( gg_trg_Ancient_Forest_Clear )
call ClearTextMessagesBJ( GetForceOfPlayer(GetTriggerPlayer()) )
call UnitAddIndicatorBJ( GetTriggerUnit(), 0.00, 100, 0.00, 0 )
call ForForce( GetPlayersMatching(Condition(function Trig_Pirate_Defense_II_Func009001001)), function Trig_Pirate_Defense_II_Func009A )
call CreateFogModifierRectBJ( true, ForcePickRandomPlayer(GetPlayersAllies(Player(PLAYER_NEUTRAL_PASSIVE))), FOG_OF_WAR_VISIBLE, gg_rct_Pirate_Camp )
call CreateNUnitsAtLoc( 1, 'nban', Player(PLAYER_NEUTRAL_PASSIVE), GetRectCenter(gg_rct_Pirate_Scout_Spawn), bj_UNIT_FACING )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "move", GetRectCenter(gg_rct_Pirate_Scout_Move) )
call TriggerSleepAction( 3.75 )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_1004" )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_1005" )
call PolledWait( 15.00 )
call CreateNUnitsAtLoc( 4, 'nmyr', Player(11), GetRectCenter(gg_rct_Naga_Spawn_West), bj_UNIT_FACING )
call GroupPointOrderLocBJ( GetLastCreatedGroup(), "attack", GetRectCenter(gg_rct_Naga_Attack) )
call TriggerSleepAction( 0.50 )
call CreateNUnitsAtLoc( 4, 'nmyr', Player(11), GetRectCenter(gg_rct_Naga_Spawn_east), bj_UNIT_FACING )
call GroupPointOrderLocBJ( GetLastCreatedGroup(), "attack", GetRectCenter(gg_rct_Naga_Attack) )
call PolledWait( 15.00 )
call CreateNUnitsAtLoc( 4, 'nsnp', Player(11), GetRectCenter(gg_rct_Naga_Spawn_North), bj_UNIT_FACING )
call GroupPointOrderLocBJ( GetLastCreatedGroup(), "attack", GetRectCenter(gg_rct_Naga_Attack) )
call PolledWait( 15.00 )
call CreateNUnitsAtLoc( 4, 'nnrg', Player(11), GetRectCenter(gg_rct_Naga_Spawn_South), bj_UNIT_FACING )
call GroupPointOrderLocBJ( GetLastCreatedGroup(), "attack", GetRectCenter(gg_rct_Naga_Attack) )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1012" )
call PolledWait( 15.00 )
call CreateNUnitsAtLoc( 2, 'nnmg', Player(11), GetRectCenter(gg_rct_Naga_Spawn_South), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nnsw', Player(11), GetRectCenter(gg_rct_Naga_Spawn_South), bj_UNIT_FACING )
call GroupPointOrderLocBJ( GetUnitsInRectAll(gg_rct_Naga_Spawn_South), "attack", GetRectCenter(gg_rct_Naga_Attack) )
call CreateNUnitsAtLoc( 2, 'nnmg', Player(11), GetRectCenter(gg_rct_Naga_Spawn_North), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nnsw', Player(11), GetRectCenter(gg_rct_Naga_Spawn_North), bj_UNIT_FACING )
call GroupPointOrderLocBJ( GetUnitsInRectAll(gg_rct_Naga_Spawn_North), "attack", GetRectCenter(gg_rct_Naga_Attack) )
call CreateNUnitsAtLoc( 2, 'nnmg', Player(11), GetRectCenter(gg_rct_Naga_Spawn_east), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nnsw', Player(11), GetRectCenter(gg_rct_Naga_Spawn_east), bj_UNIT_FACING )
call GroupPointOrderLocBJ( GetUnitsInRectAll(gg_rct_Naga_Spawn_east), "attack", GetRectCenter(gg_rct_Naga_Attack) )
call PolledWait( 60.00 )
if ( Trig_Pirate_Defense_II_Func040C() ) then
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1014" )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1020" )
call CreateItemLoc( 'I05A', GetRectCenter(gg_rct_Pirate_Scout_Move) )
call QuestSetCompletedBJ( udg_Quests[10], true )
call FogModifierStop( GetLastCreatedFogModifier() )
call EnableTrigger( gg_trg_Ancient_Forest )
call EnableTrigger( gg_trg_Ancient_Forest_Clear )
call EnableTrigger( gg_trg_Tropical_Peninsula )
call EnableTrigger( gg_trg_Tropical_Peninsula_Clear )
else
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_1013" )
call SetPlayerAllianceStateBJ( Player(11), Player(PLAYER_NEUTRAL_PASSIVE), bj_ALLIANCE_UNALLIED )
call ForGroupBJ( GetUnitsInRectAll(gg_rct_Pirate_Camp), function Trig_Pirate_Defense_II_Func040Func003002 )
call FogModifierStop( GetLastCreatedFogModifier() )
call QuestSetFailedBJ( udg_Quests[10], true )
call EnableTrigger( gg_trg_Ancient_Forest )
call EnableTrigger( gg_trg_Ancient_Forest_Clear )
call EnableTrigger( gg_trg_Tropical_Peninsula )
call EnableTrigger( gg_trg_Tropical_Peninsula_Clear )
endif
endfunction
//===========================================================================
function InitTrig_Pirate_Defense_II takes nothing returns nothing
set gg_trg_Pirate_Defense_II = CreateTrigger( )
call DisableTrigger( gg_trg_Pirate_Defense_II )
call TriggerRegisterDialogEventBJ( gg_trg_Pirate_Defense_II, udg_PirateDefense )
call TriggerAddCondition( gg_trg_Pirate_Defense_II, Condition( function Trig_Pirate_Defense_II_Conditions ) )
call TriggerAddAction( gg_trg_Pirate_Defense_II, function Trig_Pirate_Defense_II_Actions )
endfunction
function Trig_Pirate_Defense_III_Conditions takes nothing returns boolean
if ( not ( GetClickedButtonBJ() == udg_NoButton ) ) then
return false
endif
return true
endfunction
function Trig_Pirate_Defense_III_Actions takes nothing returns nothing
call DoNothing( )
endfunction
//===========================================================================
function InitTrig_Pirate_Defense_III takes nothing returns nothing
set gg_trg_Pirate_Defense_III = CreateTrigger( )
call DisableTrigger( gg_trg_Pirate_Defense_III )
call TriggerRegisterDialogEventBJ( gg_trg_Pirate_Defense_III, udg_PirateDefense )
call TriggerAddCondition( gg_trg_Pirate_Defense_III, Condition( function Trig_Pirate_Defense_III_Conditions ) )
call TriggerAddAction( gg_trg_Pirate_Defense_III, function Trig_Pirate_Defense_III_Actions )
endfunction
function Trig_Player_1_items_Func001Func002Func001C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I030' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I03F' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I01B' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05W' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I011' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05Y' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05T' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05X' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I02T' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I02W' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I031' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I001' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I034' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I064' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I01H' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05Z' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I015' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I036' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I03A' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I03E' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I01F' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I017' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I012' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I065' ) ) then
return true
endif
return false
endfunction
function Trig_Player_1_items_Func001Func002C takes nothing returns boolean
if ( not Trig_Player_1_items_Func001Func002Func001C() ) then
return false
endif
return true
endfunction
function Trig_Player_1_items_Func001Func003C takes nothing returns boolean
if ( ( GetItemUserData(GetManipulatedItem()) == 2 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 3 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 4 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 5 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 6 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 7 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 8 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 9 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 10 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 11 ) ) then
return true
endif
return false
endfunction
function Trig_Player_1_items_Func001C takes nothing returns boolean
if ( not Trig_Player_1_items_Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Player_1_items_Actions takes nothing returns nothing
if ( Trig_Player_1_items_Func001C() ) then
if ( Trig_Player_1_items_Func001Func002C() ) then
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1140" )
else
endif
else
call PolledWait( 30.00 )
call SetItemUserData( GetManipulatedItem(), 1 )
endif
endfunction
//===========================================================================
function InitTrig_Player_1_items takes nothing returns nothing
set gg_trg_Player_1_items = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Player_1_items, Player(0), EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddAction( gg_trg_Player_1_items, function Trig_Player_1_items_Actions )
endfunction
function Trig_Player_2_items_Func001Func002Func001C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I030' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I03F' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I01B' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05W' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I011' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05Y' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05T' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05X' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I02T' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I02W' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I031' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I001' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I034' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I064' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I01H' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05Z' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I015' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I036' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I03A' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I03E' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I01F' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I017' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I012' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I065' ) ) then
return true
endif
return false
endfunction
function Trig_Player_2_items_Func001Func002C takes nothing returns boolean
if ( not Trig_Player_2_items_Func001Func002Func001C() ) then
return false
endif
return true
endfunction
function Trig_Player_2_items_Func001Func003C takes nothing returns boolean
if ( ( GetItemUserData(GetManipulatedItem()) == 1 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 3 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 4 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 5 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 6 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 7 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 8 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 9 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 10 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 11 ) ) then
return true
endif
return false
endfunction
function Trig_Player_2_items_Func001C takes nothing returns boolean
if ( not Trig_Player_2_items_Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Player_2_items_Actions takes nothing returns nothing
if ( Trig_Player_2_items_Func001C() ) then
if ( Trig_Player_2_items_Func001Func002C() ) then
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1100" )
else
endif
else
call PolledWait( 30.00 )
call SetItemUserData( GetManipulatedItem(), 2 )
endif
endfunction
//===========================================================================
function InitTrig_Player_2_items takes nothing returns nothing
set gg_trg_Player_2_items = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Player_2_items, Player(1), EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddAction( gg_trg_Player_2_items, function Trig_Player_2_items_Actions )
endfunction
function Trig_Player_3_items_Func001Func002Func001C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I030' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I03F' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I01B' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05W' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I011' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05Y' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05T' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05X' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I02T' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I02W' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I031' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I001' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I034' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I064' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I01H' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05Z' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I015' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I036' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I03A' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I03E' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I01F' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I017' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I012' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I065' ) ) then
return true
endif
return false
endfunction
function Trig_Player_3_items_Func001Func002C takes nothing returns boolean
if ( not Trig_Player_3_items_Func001Func002Func001C() ) then
return false
endif
return true
endfunction
function Trig_Player_3_items_Func001Func003C takes nothing returns boolean
if ( ( GetItemUserData(GetManipulatedItem()) == 1 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 2 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 4 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 5 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 6 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 7 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 8 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 9 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 10 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 11 ) ) then
return true
endif
return false
endfunction
function Trig_Player_3_items_Func001C takes nothing returns boolean
if ( not Trig_Player_3_items_Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Player_3_items_Actions takes nothing returns nothing
if ( Trig_Player_3_items_Func001C() ) then
if ( Trig_Player_3_items_Func001Func002C() ) then
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1109" )
else
endif
else
call PolledWait( 30.00 )
call SetItemUserData( GetManipulatedItem(), 3 )
endif
endfunction
//===========================================================================
function InitTrig_Player_3_items takes nothing returns nothing
set gg_trg_Player_3_items = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Player_3_items, Player(2), EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddAction( gg_trg_Player_3_items, function Trig_Player_3_items_Actions )
endfunction
function Trig_Player_4_items_Func001Func002Func001C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I030' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I03F' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I01B' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05W' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I011' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05Y' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05T' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05X' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I02T' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I02W' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I031' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I001' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I034' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I064' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I01H' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05Z' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I015' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I036' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I03A' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I03E' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I01F' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I017' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I012' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I065' ) ) then
return true
endif
return false
endfunction
function Trig_Player_4_items_Func001Func002C takes nothing returns boolean
if ( not Trig_Player_4_items_Func001Func002Func001C() ) then
return false
endif
return true
endfunction
function Trig_Player_4_items_Func001Func003C takes nothing returns boolean
if ( ( GetItemUserData(GetManipulatedItem()) == 1 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 2 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 3 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 5 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 6 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 7 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 8 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 9 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 10 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 11 ) ) then
return true
endif
return false
endfunction
function Trig_Player_4_items_Func001C takes nothing returns boolean
if ( not Trig_Player_4_items_Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Player_4_items_Actions takes nothing returns nothing
if ( Trig_Player_4_items_Func001C() ) then
if ( Trig_Player_4_items_Func001Func002C() ) then
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1110" )
else
endif
else
call PolledWait( 30.00 )
call SetItemUserData( GetManipulatedItem(), 4 )
endif
endfunction
//===========================================================================
function InitTrig_Player_4_items takes nothing returns nothing
set gg_trg_Player_4_items = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Player_4_items, Player(3), EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddAction( gg_trg_Player_4_items, function Trig_Player_4_items_Actions )
endfunction
function Trig_Player_5_items_Func001Func002Func001C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I030' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I03F' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I01B' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05W' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I011' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05Y' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05T' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05X' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I02T' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I02W' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I031' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I001' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I034' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I064' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I01H' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05Z' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I015' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I036' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I03A' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I03E' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I01F' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I017' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I012' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I065' ) ) then
return true
endif
return false
endfunction
function Trig_Player_5_items_Func001Func002C takes nothing returns boolean
if ( not Trig_Player_5_items_Func001Func002Func001C() ) then
return false
endif
return true
endfunction
function Trig_Player_5_items_Func001Func003C takes nothing returns boolean
if ( ( GetItemUserData(GetManipulatedItem()) == 1 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 2 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 3 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 4 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 6 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 7 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 8 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 9 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 10 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 11 ) ) then
return true
endif
return false
endfunction
function Trig_Player_5_items_Func001C takes nothing returns boolean
if ( not Trig_Player_5_items_Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Player_5_items_Actions takes nothing returns nothing
if ( Trig_Player_5_items_Func001C() ) then
if ( Trig_Player_5_items_Func001Func002C() ) then
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1215" )
else
endif
else
call PolledWait( 30.00 )
call SetItemUserData( GetManipulatedItem(), 5 )
endif
endfunction
//===========================================================================
function InitTrig_Player_5_items takes nothing returns nothing
set gg_trg_Player_5_items = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Player_5_items, Player(4), EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddAction( gg_trg_Player_5_items, function Trig_Player_5_items_Actions )
endfunction
function Trig_Player_6_items_Func001Func002Func001C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I030' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I03F' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I01B' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05W' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I011' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05Y' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05T' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05X' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I02T' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I02W' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I031' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I001' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I034' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I064' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I01H' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05Z' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I015' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I036' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I03A' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I03E' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I01F' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I017' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I012' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I065' ) ) then
return true
endif
return false
endfunction
function Trig_Player_6_items_Func001Func002C takes nothing returns boolean
if ( not Trig_Player_6_items_Func001Func002Func001C() ) then
return false
endif
return true
endfunction
function Trig_Player_6_items_Func001Func003C takes nothing returns boolean
if ( ( GetItemUserData(GetManipulatedItem()) == 1 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 2 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 3 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 4 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 5 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 7 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 8 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 9 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 10 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 11 ) ) then
return true
endif
return false
endfunction
function Trig_Player_6_items_Func001C takes nothing returns boolean
if ( not Trig_Player_6_items_Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Player_6_items_Actions takes nothing returns nothing
if ( Trig_Player_6_items_Func001C() ) then
if ( Trig_Player_6_items_Func001Func002C() ) then
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1216" )
else
endif
else
call PolledWait( 30.00 )
call SetItemUserData( GetManipulatedItem(), 6 )
endif
endfunction
//===========================================================================
function InitTrig_Player_6_items takes nothing returns nothing
set gg_trg_Player_6_items = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Player_6_items, Player(5), EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddAction( gg_trg_Player_6_items, function Trig_Player_6_items_Actions )
endfunction
function Trig_Player_7_items_Func001Func002Func001C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I030' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I03F' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I01B' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05W' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I011' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05Y' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05T' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05X' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I02T' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I02W' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I031' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I001' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I034' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I064' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I01H' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05Z' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I015' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I036' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I03A' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I03E' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I01F' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I017' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I012' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I065' ) ) then
return true
endif
return false
endfunction
function Trig_Player_7_items_Func001Func002C takes nothing returns boolean
if ( not Trig_Player_7_items_Func001Func002Func001C() ) then
return false
endif
return true
endfunction
function Trig_Player_7_items_Func001Func003C takes nothing returns boolean
if ( ( GetItemUserData(GetManipulatedItem()) == 1 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 2 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 3 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 4 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 5 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 6 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 8 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 9 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 10 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 11 ) ) then
return true
endif
return false
endfunction
function Trig_Player_7_items_Func001C takes nothing returns boolean
if ( not Trig_Player_7_items_Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Player_7_items_Actions takes nothing returns nothing
if ( Trig_Player_7_items_Func001C() ) then
if ( Trig_Player_7_items_Func001Func002C() ) then
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1217" )
else
endif
else
call PolledWait( 30.00 )
call SetItemUserData( GetManipulatedItem(), 7 )
endif
endfunction
//===========================================================================
function InitTrig_Player_7_items takes nothing returns nothing
set gg_trg_Player_7_items = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Player_7_items, Player(6), EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddAction( gg_trg_Player_7_items, function Trig_Player_7_items_Actions )
endfunction
function Trig_Player_8_items_Func001Func002Func001C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I030' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I03F' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I01B' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05W' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I011' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05Y' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05T' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05X' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I02T' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I02W' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I031' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I001' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I034' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I064' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I01H' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05Z' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I015' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I036' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I03A' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I03E' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I01F' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I017' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I012' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I065' ) ) then
return true
endif
return false
endfunction
function Trig_Player_8_items_Func001Func002C takes nothing returns boolean
if ( not Trig_Player_8_items_Func001Func002Func001C() ) then
return false
endif
return true
endfunction
function Trig_Player_8_items_Func001Func003C takes nothing returns boolean
if ( ( GetItemUserData(GetManipulatedItem()) == 1 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 2 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 3 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 4 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 5 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 6 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 7 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 9 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 10 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 11 ) ) then
return true
endif
return false
endfunction
function Trig_Player_8_items_Func001C takes nothing returns boolean
if ( not Trig_Player_8_items_Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Player_8_items_Actions takes nothing returns nothing
if ( Trig_Player_8_items_Func001C() ) then
if ( Trig_Player_8_items_Func001Func002C() ) then
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1221" )
else
endif
else
call PolledWait( 30.00 )
call SetItemUserData( GetManipulatedItem(), 8 )
endif
endfunction
//===========================================================================
function InitTrig_Player_8_items takes nothing returns nothing
set gg_trg_Player_8_items = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Player_8_items, Player(7), EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddAction( gg_trg_Player_8_items, function Trig_Player_8_items_Actions )
endfunction
function Trig_Player_9_items_Func001Func002Func001C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I030' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I03F' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I01B' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05W' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I011' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05Y' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05T' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05X' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I02T' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I02W' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I031' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I001' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I034' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I064' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I01H' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05Z' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I015' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I036' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I03A' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I03E' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I01F' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I017' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I012' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I065' ) ) then
return true
endif
return false
endfunction
function Trig_Player_9_items_Func001Func002C takes nothing returns boolean
if ( not Trig_Player_9_items_Func001Func002Func001C() ) then
return false
endif
return true
endfunction
function Trig_Player_9_items_Func001Func003C takes nothing returns boolean
if ( ( GetItemUserData(GetManipulatedItem()) == 1 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 2 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 3 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 4 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 5 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 6 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 7 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 8 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 10 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 11 ) ) then
return true
endif
return false
endfunction
function Trig_Player_9_items_Func001C takes nothing returns boolean
if ( not Trig_Player_9_items_Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Player_9_items_Actions takes nothing returns nothing
if ( Trig_Player_9_items_Func001C() ) then
if ( Trig_Player_9_items_Func001Func002C() ) then
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1224" )
else
endif
else
call PolledWait( 30.00 )
call SetItemUserData( GetManipulatedItem(), 9 )
endif
endfunction
//===========================================================================
function InitTrig_Player_9_items takes nothing returns nothing
set gg_trg_Player_9_items = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Player_9_items, Player(8), EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddAction( gg_trg_Player_9_items, function Trig_Player_9_items_Actions )
endfunction
function Trig_Player_10_items_Func001Func002Func001C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I030' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I03F' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I01B' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05W' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I011' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05Y' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05T' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05X' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I02T' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I02W' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I031' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I001' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I034' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I064' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I01H' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05Z' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I015' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I036' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I03A' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I03E' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I01F' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I017' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I012' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I065' ) ) then
return true
endif
return false
endfunction
function Trig_Player_10_items_Func001Func002C takes nothing returns boolean
if ( not Trig_Player_10_items_Func001Func002Func001C() ) then
return false
endif
return true
endfunction
function Trig_Player_10_items_Func001Func003C takes nothing returns boolean
if ( ( GetItemUserData(GetManipulatedItem()) == 1 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 2 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 3 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 4 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 5 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 6 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 7 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 8 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 9 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 11 ) ) then
return true
endif
return false
endfunction
function Trig_Player_10_items_Func001C takes nothing returns boolean
if ( not Trig_Player_10_items_Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Player_10_items_Actions takes nothing returns nothing
if ( Trig_Player_10_items_Func001C() ) then
if ( Trig_Player_10_items_Func001Func002C() ) then
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1228" )
else
endif
else
call PolledWait( 30.00 )
call SetItemUserData( GetManipulatedItem(), 10 )
endif
endfunction
//===========================================================================
function InitTrig_Player_10_items takes nothing returns nothing
set gg_trg_Player_10_items = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Player_10_items, Player(9), EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddAction( gg_trg_Player_10_items, function Trig_Player_10_items_Actions )
endfunction
function Trig_Player_11_items_Func001Func002Func001C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I030' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I03F' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I01B' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05W' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I011' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05Y' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05T' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05X' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I02T' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I02W' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I031' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I001' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I034' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I064' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I01H' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I05Z' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I015' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I036' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I03A' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I03E' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I01F' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I017' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I012' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) != 'I065' ) ) then
return true
endif
return false
endfunction
function Trig_Player_11_items_Func001Func002C takes nothing returns boolean
if ( not Trig_Player_11_items_Func001Func002Func001C() ) then
return false
endif
return true
endfunction
function Trig_Player_11_items_Func001Func003C takes nothing returns boolean
if ( ( GetItemUserData(GetManipulatedItem()) == 1 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 2 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 3 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 4 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 5 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 6 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 7 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 8 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 9 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 10 ) ) then
return true
endif
return false
endfunction
function Trig_Player_11_items_Func001C takes nothing returns boolean
if ( not Trig_Player_11_items_Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Player_11_items_Actions takes nothing returns nothing
if ( Trig_Player_11_items_Func001C() ) then
if ( Trig_Player_11_items_Func001Func002C() ) then
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1229" )
else
endif
else
call PolledWait( 30.00 )
call SetItemUserData( GetManipulatedItem(), 11 )
endif
endfunction
//===========================================================================
function InitTrig_Player_11_items takes nothing returns nothing
set gg_trg_Player_11_items = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Player_11_items, Player(10), EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddAction( gg_trg_Player_11_items, function Trig_Player_11_items_Actions )
endfunction
function Trig_Angelic_Set_Acquired_Func005C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I062' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I061' ) ) then
return true
endif
return false
endfunction
function Trig_Angelic_Set_Acquired_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'ewsp' ) ) then
return false
endif
if ( not Trig_Angelic_Set_Acquired_Func005C() ) then
return false
endif
return true
endfunction
function Trig_Angelic_Set_Acquired_Func003C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(udg_AngelicUnit, 'I062') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(udg_AngelicUnit, 'I061') == true ) ) then
return false
endif
return true
endfunction
function Trig_Angelic_Set_Acquired_Func004C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(udg_AngelicUnit, 'I062') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(udg_AngelicUnit, 'I061') == true ) ) then
return false
endif
return true
endfunction
function Trig_Angelic_Set_Acquired_Actions takes nothing returns nothing
set udg_AngelicUnit = GetManipulatingUnit()
if ( Trig_Angelic_Set_Acquired_Func003C() ) then
call TriggerSleepAction( 0.50 )
else
call DoNothing( )
endif
if ( Trig_Angelic_Set_Acquired_Func004C() ) then
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(udg_AngelicUnit)), "TRIGSTR_1163" )
call UnitAddAbilityBJ( 'A04U', GetManipulatingUnit() )
call UnitAddAbilityBJ( 'A01I', GetManipulatingUnit() )
call AddSpecialEffectTargetUnitBJ( "left hand", GetTriggerUnit(), "Abilities\\Spells\\Items\\OrbCorruption\\OrbCorruptionMissile.mdl" )
set udg_Angeliceffect = GetLastCreatedEffectBJ()
call AddSpecialEffectTargetUnitBJ( "right hand", GetTriggerUnit(), "Abilities\\Spells\\Items\\OrbCorruption\\OrbCorruptionMissile.mdl" )
set udg_Angeliceffect2 = GetLastCreatedEffectBJ()
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Angelic_Set_Acquired takes nothing returns nothing
set gg_trg_Angelic_Set_Acquired = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Angelic_Set_Acquired, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Angelic_Set_Acquired, Condition( function Trig_Angelic_Set_Acquired_Conditions ) )
call TriggerAddAction( gg_trg_Angelic_Set_Acquired, function Trig_Angelic_Set_Acquired_Actions )
endfunction
function Trig_Angelic_Set_Removed_Func003C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I062' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I061' ) ) then
return true
endif
return false
endfunction
function Trig_Angelic_Set_Removed_Conditions takes nothing returns boolean
if ( not Trig_Angelic_Set_Removed_Func003C() ) then
return false
endif
return true
endfunction
function Trig_Angelic_Set_Removed_Func002C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(udg_AngelicUnit, 'I062') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(udg_AngelicUnit, 'I061') == true ) ) then
return false
endif
return true
endfunction
function Trig_Angelic_Set_Removed_Actions takes nothing returns nothing
set udg_JursachianUnit = GetManipulatingUnit()
if ( Trig_Angelic_Set_Removed_Func002C() ) then
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(udg_AngelicUnit)), "TRIGSTR_1164" )
call UnitRemoveAbilityBJ( 'A04U', GetTriggerUnit() )
call UnitRemoveAbilityBJ( 'A01I', GetTriggerUnit() )
call DestroyEffectBJ( udg_Angeliceffect )
call DestroyEffectBJ( udg_Angeliceffect2 )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Angelic_Set_Removed takes nothing returns nothing
set gg_trg_Angelic_Set_Removed = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Angelic_Set_Removed, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_Angelic_Set_Removed, Condition( function Trig_Angelic_Set_Removed_Conditions ) )
call TriggerAddAction( gg_trg_Angelic_Set_Removed, function Trig_Angelic_Set_Removed_Actions )
endfunction
function Trig_Jursachian_Set_Acquired_Func005C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05Q' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05R' ) ) then
return true
endif
return false
endfunction
function Trig_Jursachian_Set_Acquired_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'ewsp' ) ) then
return false
endif
if ( not Trig_Jursachian_Set_Acquired_Func005C() ) then
return false
endif
return true
endfunction
function Trig_Jursachian_Set_Acquired_Func003C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(udg_JursachianUnit, 'I05Q') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(udg_JursachianUnit, 'I05R') == true ) ) then
return false
endif
return true
endfunction
function Trig_Jursachian_Set_Acquired_Func004C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(udg_JursachianUnit, 'I05Q') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(udg_JursachianUnit, 'I05R') == true ) ) then
return false
endif
return true
endfunction
function Trig_Jursachian_Set_Acquired_Actions takes nothing returns nothing
set udg_JursachianUnit = GetManipulatingUnit()
if ( Trig_Jursachian_Set_Acquired_Func003C() ) then
call TriggerSleepAction( 0.50 )
else
call DoNothing( )
endif
if ( Trig_Jursachian_Set_Acquired_Func004C() ) then
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(udg_JursachianUnit)), "TRIGSTR_1061" )
call UnitAddAbilityBJ( 'A04G', GetManipulatingUnit() )
call UnitAddAbilityBJ( 'A01I', GetManipulatingUnit() )
call AddSpecialEffectTargetUnitBJ( "left hand", GetTriggerUnit(), "Abilities\\Weapons\\IllidanMissile\\IllidanMissile.mdl" )
set udg_JursachiEffect = GetLastCreatedEffectBJ()
call AddSpecialEffectTargetUnitBJ( "right hand", GetTriggerUnit(), "Abilities\\Weapons\\IllidanMissile\\IllidanMissile.mdl" )
set udg_JursachiEffect2 = GetLastCreatedEffectBJ()
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Jursachian_Set_Acquired takes nothing returns nothing
set gg_trg_Jursachian_Set_Acquired = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Jursachian_Set_Acquired, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Jursachian_Set_Acquired, Condition( function Trig_Jursachian_Set_Acquired_Conditions ) )
call TriggerAddAction( gg_trg_Jursachian_Set_Acquired, function Trig_Jursachian_Set_Acquired_Actions )
endfunction
function Trig_Jursachian_Set_Removed_Func003C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05Q' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05R' ) ) then
return true
endif
return false
endfunction
function Trig_Jursachian_Set_Removed_Conditions takes nothing returns boolean
if ( not Trig_Jursachian_Set_Removed_Func003C() ) then
return false
endif
return true
endfunction
function Trig_Jursachian_Set_Removed_Func002C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(udg_JursachianUnit, 'I05Q') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(udg_JursachianUnit, 'I05R') == true ) ) then
return false
endif
return true
endfunction
function Trig_Jursachian_Set_Removed_Actions takes nothing returns nothing
set udg_JursachianUnit = GetManipulatingUnit()
if ( Trig_Jursachian_Set_Removed_Func002C() ) then
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(udg_JursachianUnit)), "TRIGSTR_1062" )
call UnitRemoveAbilityBJ( 'A04G', GetTriggerUnit() )
call UnitRemoveAbilityBJ( 'A01I', GetTriggerUnit() )
call DestroyEffectBJ( udg_JursachiEffect )
call DestroyEffectBJ( udg_JursachiEffect2 )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Jursachian_Set_Removed takes nothing returns nothing
set gg_trg_Jursachian_Set_Removed = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Jursachian_Set_Removed, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_Jursachian_Set_Removed, Condition( function Trig_Jursachian_Set_Removed_Conditions ) )
call TriggerAddAction( gg_trg_Jursachian_Set_Removed, function Trig_Jursachian_Set_Removed_Actions )
endfunction
function Trig_Dukati_Assassin_Set_Acquired_Func004C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05L' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05N' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05M' ) ) then
return true
endif
return false
endfunction
function Trig_Dukati_Assassin_Set_Acquired_Conditions takes nothing returns boolean
if ( not Trig_Dukati_Assassin_Set_Acquired_Func004C() ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'ewsp' ) ) then
return false
endif
return true
endfunction
function Trig_Dukati_Assassin_Set_Acquired_Func002C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(udg_DukatiAssassin, 'I05L') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(udg_DukatiAssassin, 'I05N') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(udg_DukatiAssassin, 'I05M') == true ) ) then
return false
endif
return true
endfunction
function Trig_Dukati_Assassin_Set_Acquired_Func003C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(udg_DukatiAssassin, 'I05L') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(udg_DukatiAssassin, 'I05N') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(udg_DukatiAssassin, 'I05M') == true ) ) then
return false
endif
return true
endfunction
function Trig_Dukati_Assassin_Set_Acquired_Actions takes nothing returns nothing
set udg_DukatiAssassin = GetManipulatingUnit()
if ( Trig_Dukati_Assassin_Set_Acquired_Func002C() ) then
call TriggerSleepAction( 0.50 )
else
call DoNothing( )
endif
if ( Trig_Dukati_Assassin_Set_Acquired_Func003C() ) then
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(udg_DukatiAssassin)), "TRIGSTR_1033" )
call UnitAddAbilityBJ( 'A04C', GetManipulatingUnit() )
call UnitAddAbilityBJ( 'A01I', GetManipulatingUnit() )
call AddSpecialEffectTargetUnitBJ( "left hand", GetTriggerUnit(), "Abilities\\Weapons\\DemolisherFireMissile\\DemolisherFireMissile.mdl" )
set udg_DukatiEffectLeft = GetLastCreatedEffectBJ()
call AddSpecialEffectTargetUnitBJ( "right hand", GetTriggerUnit(), "Abilities\\Weapons\\DemolisherFireMissile\\DemolisherFireMissile.mdl" )
set udg_DukatiEffectRight = GetLastCreatedEffectBJ()
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Dukati_Assassin_Set_Acquired takes nothing returns nothing
set gg_trg_Dukati_Assassin_Set_Acquired = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Dukati_Assassin_Set_Acquired, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Dukati_Assassin_Set_Acquired, Condition( function Trig_Dukati_Assassin_Set_Acquired_Conditions ) )
call TriggerAddAction( gg_trg_Dukati_Assassin_Set_Acquired, function Trig_Dukati_Assassin_Set_Acquired_Actions )
endfunction
function Trig_Dukati_Assassin_Set_Removed_Func003C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05L' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05N' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05M' ) ) then
return true
endif
return false
endfunction
function Trig_Dukati_Assassin_Set_Removed_Conditions takes nothing returns boolean
if ( not Trig_Dukati_Assassin_Set_Removed_Func003C() ) then
return false
endif
return true
endfunction
function Trig_Dukati_Assassin_Set_Removed_Func002C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(udg_DukatiAssassin, 'I05L') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(udg_DukatiAssassin, 'I05N') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(udg_DukatiAssassin, 'I05M') == true ) ) then
return false
endif
return true
endfunction
function Trig_Dukati_Assassin_Set_Removed_Actions takes nothing returns nothing
set udg_DukatiAssassin = GetManipulatingUnit()
if ( Trig_Dukati_Assassin_Set_Removed_Func002C() ) then
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(udg_DukatiAssassin)), "TRIGSTR_1048" )
call UnitRemoveAbilityBJ( 'A04C', GetTriggerUnit() )
call UnitRemoveAbilityBJ( 'A01I', GetTriggerUnit() )
call DestroyEffectBJ( udg_DukatiEffectLeft )
call DestroyEffectBJ( udg_DukatiEffectRight )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Dukati_Assassin_Set_Removed takes nothing returns nothing
set gg_trg_Dukati_Assassin_Set_Removed = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Dukati_Assassin_Set_Removed, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_Dukati_Assassin_Set_Removed, Condition( function Trig_Dukati_Assassin_Set_Removed_Conditions ) )
call TriggerAddAction( gg_trg_Dukati_Assassin_Set_Removed, function Trig_Dukati_Assassin_Set_Removed_Actions )
endfunction
function Trig_Demon_Slayer_Warrior_Set_Acquired_Func004C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05I' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05J' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05H' ) ) then
return true
endif
return false
endfunction
function Trig_Demon_Slayer_Warrior_Set_Acquired_Conditions takes nothing returns boolean
if ( not Trig_Demon_Slayer_Warrior_Set_Acquired_Func004C() ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'ewsp' ) ) then
return false
endif
return true
endfunction
function Trig_Demon_Slayer_Warrior_Set_Acquired_Func002C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(udg_DemonSlayerWarriorPlayer, 'I05I') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(udg_DemonSlayerWarriorPlayer, 'I05J') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(udg_DemonSlayerWarriorPlayer, 'I05H') == true ) ) then
return false
endif
return true
endfunction
function Trig_Demon_Slayer_Warrior_Set_Acquired_Func003C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(udg_DemonSlayerWarriorPlayer, 'I05I') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(udg_DemonSlayerWarriorPlayer, 'I05J') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(udg_DemonSlayerWarriorPlayer, 'I05H') == true ) ) then
return false
endif
return true
endfunction
function Trig_Demon_Slayer_Warrior_Set_Acquired_Actions takes nothing returns nothing
set udg_DemonSlayerWarriorPlayer = GetManipulatingUnit()
if ( Trig_Demon_Slayer_Warrior_Set_Acquired_Func002C() ) then
call TriggerSleepAction( 0.50 )
else
call DoNothing( )
endif
if ( Trig_Demon_Slayer_Warrior_Set_Acquired_Func003C() ) then
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(udg_WizardPlayer)), "TRIGSTR_972" )
call UnitAddAbilityBJ( 'A04B', GetManipulatingUnit() )
call UnitAddAbilityBJ( 'A01I', GetManipulatingUnit() )
call AddSpecialEffectTargetUnitBJ( "left hand", GetTriggerUnit(), "Abilities\\Spells\\Human\\ManaFlare\\ManaFlareMissile.mdl" )
set udg_WarriorSetEffectLeft = GetLastCreatedEffectBJ()
call AddSpecialEffectTargetUnitBJ( "right hand", GetTriggerUnit(), "Abilities\\Spells\\Human\\ManaFlare\\ManaFlareMissile.mdl" )
set udg_WarriorSetEffectRight = GetLastCreatedEffectBJ()
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Demon_Slayer_Warrior_Set_Acquired takes nothing returns nothing
set gg_trg_Demon_Slayer_Warrior_Set_Acquired = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Demon_Slayer_Warrior_Set_Acquired, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Demon_Slayer_Warrior_Set_Acquired, Condition( function Trig_Demon_Slayer_Warrior_Set_Acquired_Conditions ) )
call TriggerAddAction( gg_trg_Demon_Slayer_Warrior_Set_Acquired, function Trig_Demon_Slayer_Warrior_Set_Acquired_Actions )
endfunction
function Trig_Demon_Slayer_Warrior_Set_Removed_Func003C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05I' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05J' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05H' ) ) then
return true
endif
return false
endfunction
function Trig_Demon_Slayer_Warrior_Set_Removed_Conditions takes nothing returns boolean
if ( not Trig_Demon_Slayer_Warrior_Set_Removed_Func003C() ) then
return false
endif
return true
endfunction
function Trig_Demon_Slayer_Warrior_Set_Removed_Func002C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(udg_DemonSlayerWarriorPlayer, 'I05I') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(udg_DemonSlayerWarriorPlayer, 'I05J') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(udg_DemonSlayerWarriorPlayer, 'I05H') == true ) ) then
return false
endif
return true
endfunction
function Trig_Demon_Slayer_Warrior_Set_Removed_Actions takes nothing returns nothing
set udg_DemonSlayerWarriorPlayer = GetManipulatingUnit()
if ( Trig_Demon_Slayer_Warrior_Set_Removed_Func002C() ) then
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(udg_DemonSlayerWarriorPlayer)), "TRIGSTR_1038" )
call UnitRemoveAbilityBJ( 'A04B', GetTriggerUnit() )
call UnitRemoveAbilityBJ( 'A01I', GetTriggerUnit() )
call DestroyEffectBJ( udg_WarriorSetEffectLeft )
call DestroyEffectBJ( udg_WarriorSetEffectRight )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Demon_Slayer_Warrior_Set_Removed takes nothing returns nothing
set gg_trg_Demon_Slayer_Warrior_Set_Removed = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Demon_Slayer_Warrior_Set_Removed, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_Demon_Slayer_Warrior_Set_Removed, Condition( function Trig_Demon_Slayer_Warrior_Set_Removed_Conditions ) )
call TriggerAddAction( gg_trg_Demon_Slayer_Warrior_Set_Removed, function Trig_Demon_Slayer_Warrior_Set_Removed_Actions )
endfunction
function Trig_Demon_Slayer_Bow_Set_Acquired_Func004C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05F' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05G' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05H' ) ) then
return true
endif
return false
endfunction
function Trig_Demon_Slayer_Bow_Set_Acquired_Conditions takes nothing returns boolean
if ( not Trig_Demon_Slayer_Bow_Set_Acquired_Func004C() ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'ewsp' ) ) then
return false
endif
return true
endfunction
function Trig_Demon_Slayer_Bow_Set_Acquired_Func002C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(udg_DemonSlayerBowPlayer, 'I05F') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(udg_DemonSlayerBowPlayer, 'I05G') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(udg_DemonSlayerBowPlayer, 'I05H') == true ) ) then
return false
endif
return true
endfunction
function Trig_Demon_Slayer_Bow_Set_Acquired_Func003C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(udg_DemonSlayerBowPlayer, 'I05F') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(udg_DemonSlayerBowPlayer, 'I05G') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(udg_DemonSlayerBowPlayer, 'I05H') == true ) ) then
return false
endif
return true
endfunction
function Trig_Demon_Slayer_Bow_Set_Acquired_Actions takes nothing returns nothing
set udg_DemonSlayerBowPlayer = GetManipulatingUnit()
if ( Trig_Demon_Slayer_Bow_Set_Acquired_Func002C() ) then
call TriggerSleepAction( 0.50 )
else
call DoNothing( )
endif
if ( Trig_Demon_Slayer_Bow_Set_Acquired_Func003C() ) then
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(udg_DemonSlayerBowPlayer)), "TRIGSTR_925" )
call UnitAddAbilityBJ( 'A048', GetManipulatingUnit() )
call UnitAddAbilityBJ( 'A01I', GetManipulatingUnit() )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Demon_Slayer_Bow_Set_Acquired takes nothing returns nothing
set gg_trg_Demon_Slayer_Bow_Set_Acquired = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Demon_Slayer_Bow_Set_Acquired, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Demon_Slayer_Bow_Set_Acquired, Condition( function Trig_Demon_Slayer_Bow_Set_Acquired_Conditions ) )
call TriggerAddAction( gg_trg_Demon_Slayer_Bow_Set_Acquired, function Trig_Demon_Slayer_Bow_Set_Acquired_Actions )
endfunction
function Trig_Demon_Slayer_Bow_Set_Removed_Func003C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05F' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05G' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05H' ) ) then
return true
endif
return false
endfunction
function Trig_Demon_Slayer_Bow_Set_Removed_Conditions takes nothing returns boolean
if ( not Trig_Demon_Slayer_Bow_Set_Removed_Func003C() ) then
return false
endif
return true
endfunction
function Trig_Demon_Slayer_Bow_Set_Removed_Func002C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(udg_DemonSlayerBowPlayer, 'I05F') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(udg_DemonSlayerBowPlayer, 'I05G') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(udg_DemonSlayerBowPlayer, 'I05H') == true ) ) then
return false
endif
return true
endfunction
function Trig_Demon_Slayer_Bow_Set_Removed_Actions takes nothing returns nothing
set udg_DemonSlayerBowPlayer = GetManipulatingUnit()
if ( Trig_Demon_Slayer_Bow_Set_Removed_Func002C() ) then
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(udg_DemonSlayerBowPlayer)), "TRIGSTR_927" )
call UnitRemoveAbilityBJ( 'A048', GetManipulatingUnit() )
call UnitRemoveAbilityBJ( 'A01I', GetTriggerUnit() )
else
endif
endfunction
//===========================================================================
function InitTrig_Demon_Slayer_Bow_Set_Removed takes nothing returns nothing
set gg_trg_Demon_Slayer_Bow_Set_Removed = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Demon_Slayer_Bow_Set_Removed, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_Demon_Slayer_Bow_Set_Removed, Condition( function Trig_Demon_Slayer_Bow_Set_Removed_Conditions ) )
call TriggerAddAction( gg_trg_Demon_Slayer_Bow_Set_Removed, function Trig_Demon_Slayer_Bow_Set_Removed_Actions )
endfunction
function Trig_Pirates_Initial_Issue_Acquired_Func001C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05A' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05B' ) ) then
return true
endif
return false
endfunction
function Trig_Pirates_Initial_Issue_Acquired_Conditions takes nothing returns boolean
if ( not Trig_Pirates_Initial_Issue_Acquired_Func001C() ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'ewsp' ) ) then
return false
endif
return true
endfunction
function Trig_Pirates_Initial_Issue_Acquired_Func004C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(udg_PiratePlayer, 'I05A') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(udg_PiratePlayer, 'I05B') == true ) ) then
return false
endif
return true
endfunction
function Trig_Pirates_Initial_Issue_Acquired_Func005C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(udg_PiratePlayer, 'I05A') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(udg_PiratePlayer, 'I05B') == true ) ) then
return false
endif
return true
endfunction
function Trig_Pirates_Initial_Issue_Acquired_Actions takes nothing returns nothing
set udg_PiratePlayer = GetManipulatingUnit()
if ( Trig_Pirates_Initial_Issue_Acquired_Func004C() ) then
call TriggerSleepAction( 0.50 )
else
endif
if ( Trig_Pirates_Initial_Issue_Acquired_Func005C() ) then
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(udg_PiratePlayer)), "TRIGSTR_985" )
call UnitAddAbilityBJ( 'A03Z', GetManipulatingUnit() )
call UnitAddAbilityBJ( 'A046', GetManipulatingUnit() )
call AddSpecialEffectTargetUnitBJ( "left foot", GetTriggerUnit(), "Abilities\\Weapons\\FaerieDragonMissile\\FaerieDragonMissile.mdl" )
set udg_PirateEffectLeft = GetLastCreatedEffectBJ()
call AddSpecialEffectTargetUnitBJ( "right foot", GetTriggerUnit(), "Abilities\\Weapons\\FaerieDragonMissile\\FaerieDragonMissile.mdl" )
set udg_PirateEffectRight = GetLastCreatedEffectBJ()
else
endif
endfunction
//===========================================================================
function InitTrig_Pirates_Initial_Issue_Acquired takes nothing returns nothing
set gg_trg_Pirates_Initial_Issue_Acquired = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Pirates_Initial_Issue_Acquired, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Pirates_Initial_Issue_Acquired, Condition( function Trig_Pirates_Initial_Issue_Acquired_Conditions ) )
call TriggerAddAction( gg_trg_Pirates_Initial_Issue_Acquired, function Trig_Pirates_Initial_Issue_Acquired_Actions )
endfunction
function Trig_Pirates_Initial_Issue_Removed_Func003C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05A' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05B' ) ) then
return true
endif
return false
endfunction
function Trig_Pirates_Initial_Issue_Removed_Conditions takes nothing returns boolean
if ( not Trig_Pirates_Initial_Issue_Removed_Func003C() ) then
return false
endif
return true
endfunction
function Trig_Pirates_Initial_Issue_Removed_Func002C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(udg_PiratePlayer, 'I05A') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(udg_PiratePlayer, 'I05B') == true ) ) then
return false
endif
return true
endfunction
function Trig_Pirates_Initial_Issue_Removed_Actions takes nothing returns nothing
set udg_PiratePlayer = GetManipulatingUnit()
if ( Trig_Pirates_Initial_Issue_Removed_Func002C() ) then
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(udg_PiratePlayer)), "TRIGSTR_915" )
call UnitRemoveAbilityBJ( 'A03Z', GetManipulatingUnit() )
call UnitRemoveAbilityBJ( 'A046', GetManipulatingUnit() )
call DestroyEffectBJ( udg_PirateEffectLeft )
call DestroyEffectBJ( udg_PirateEffectRight )
else
endif
endfunction
//===========================================================================
function InitTrig_Pirates_Initial_Issue_Removed takes nothing returns nothing
set gg_trg_Pirates_Initial_Issue_Removed = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Pirates_Initial_Issue_Removed, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_Pirates_Initial_Issue_Removed, Condition( function Trig_Pirates_Initial_Issue_Removed_Conditions ) )
call TriggerAddAction( gg_trg_Pirates_Initial_Issue_Removed, function Trig_Pirates_Initial_Issue_Removed_Actions )
endfunction
function Trig_Wizard_Ring_Set_Requirements_Func002C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05C' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05D' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05E' ) ) then
return true
endif
return false
endfunction
function Trig_Wizard_Ring_Set_Requirements_Conditions takes nothing returns boolean
if ( not Trig_Wizard_Ring_Set_Requirements_Func002C() ) then
return false
endif
return true
endfunction
function Trig_Wizard_Ring_Set_Requirements_Func001Func003C takes nothing returns boolean
if ( ( GetUnitTypeId(GetManipulatingUnit()) == 'H02D' ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "White Mage" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Black Mage" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Red Mage" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Time Mage" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Summoner" ) ) then
return true
endif
if ( ( GetUnitName(GetManipulatingUnit()) == "Sage" ) ) then
return true
endif
return false
endfunction
function Trig_Wizard_Ring_Set_Requirements_Func001C takes nothing returns boolean
if ( not Trig_Wizard_Ring_Set_Requirements_Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Wizard_Ring_Set_Requirements_Actions takes nothing returns nothing
if ( Trig_Wizard_Ring_Set_Requirements_Func001C() ) then
call DoNothing( )
else
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
endif
endfunction
//===========================================================================
function InitTrig_Wizard_Ring_Set_Requirements takes nothing returns nothing
set gg_trg_Wizard_Ring_Set_Requirements = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Wizard_Ring_Set_Requirements, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Wizard_Ring_Set_Requirements, Condition( function Trig_Wizard_Ring_Set_Requirements_Conditions ) )
call TriggerAddAction( gg_trg_Wizard_Ring_Set_Requirements, function Trig_Wizard_Ring_Set_Requirements_Actions )
endfunction
function Trig_Wizard_Ring_Acquired_Func005C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05C' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05D' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05E' ) ) then
return true
endif
return false
endfunction
function Trig_Wizard_Ring_Acquired_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'ewsp' ) ) then
return false
endif
if ( not Trig_Wizard_Ring_Acquired_Func005C() ) then
return false
endif
return true
endfunction
function Trig_Wizard_Ring_Acquired_Func003C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(udg_WizardPlayer, 'I05C') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(udg_WizardPlayer, 'I05D') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(udg_WizardPlayer, 'I05E') == true ) ) then
return false
endif
return true
endfunction
function Trig_Wizard_Ring_Acquired_Func004C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(udg_WizardPlayer, 'I05C') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(udg_WizardPlayer, 'I05D') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(udg_WizardPlayer, 'I05E') == true ) ) then
return false
endif
return true
endfunction
function Trig_Wizard_Ring_Acquired_Actions takes nothing returns nothing
set udg_WizardPlayer = GetManipulatingUnit()
if ( Trig_Wizard_Ring_Acquired_Func003C() ) then
call TriggerSleepAction( 0.50 )
else
call DoNothing( )
endif
if ( Trig_Wizard_Ring_Acquired_Func004C() ) then
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(udg_WizardPlayer)), "TRIGSTR_980" )
call UnitAddAbilityBJ( 'A043', GetManipulatingUnit() )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Wizard_Ring_Acquired takes nothing returns nothing
set gg_trg_Wizard_Ring_Acquired = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Wizard_Ring_Acquired, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Wizard_Ring_Acquired, Condition( function Trig_Wizard_Ring_Acquired_Conditions ) )
call TriggerAddAction( gg_trg_Wizard_Ring_Acquired, function Trig_Wizard_Ring_Acquired_Actions )
endfunction
function Trig_Wizard_Ring_Removed_Func003C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05C' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05D' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I05E' ) ) then
return true
endif
return false
endfunction
function Trig_Wizard_Ring_Removed_Conditions takes nothing returns boolean
if ( not Trig_Wizard_Ring_Removed_Func003C() ) then
return false
endif
return true
endfunction
function Trig_Wizard_Ring_Removed_Func002C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(udg_WizardPlayer, 'I05C') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(udg_WizardPlayer, 'I05D') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(udg_WizardPlayer, 'I05E') == true ) ) then
return false
endif
return true
endfunction
function Trig_Wizard_Ring_Removed_Actions takes nothing returns nothing
set udg_WizardPlayer = GetManipulatingUnit()
if ( Trig_Wizard_Ring_Removed_Func002C() ) then
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(udg_WizardPlayer)), "TRIGSTR_947" )
call UnitRemoveAbilityBJ( 'A043', GetManipulatingUnit() )
else
endif
endfunction
//===========================================================================
function InitTrig_Wizard_Ring_Removed takes nothing returns nothing
set gg_trg_Wizard_Ring_Removed = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Wizard_Ring_Removed, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_Wizard_Ring_Removed, Condition( function Trig_Wizard_Ring_Removed_Conditions ) )
call TriggerAddAction( gg_trg_Wizard_Ring_Removed, function Trig_Wizard_Ring_Removed_Actions )
endfunction
function Trig_Randomize_Copy_Func003001 takes nothing returns boolean
return ( udg_Playername == "a" )
endfunction
function Trig_Randomize_Copy_Func004001 takes nothing returns boolean
return ( udg_Playername == "b" )
endfunction
function Trig_Randomize_Copy_Func005001 takes nothing returns boolean
return ( udg_Playername == "c" )
endfunction
function Trig_Randomize_Copy_Func006001 takes nothing returns boolean
return ( udg_Playername == "d" )
endfunction
function Trig_Randomize_Copy_Func007001 takes nothing returns boolean
return ( udg_Playername == "e" )
endfunction
function Trig_Randomize_Copy_Func008001 takes nothing returns boolean
return ( udg_Playername == "f" )
endfunction
function Trig_Randomize_Copy_Func009001 takes nothing returns boolean
return ( udg_Playername == "g" )
endfunction
function Trig_Randomize_Copy_Func010001 takes nothing returns boolean
return ( udg_Playername == "h" )
endfunction
function Trig_Randomize_Copy_Func011001 takes nothing returns boolean
return ( udg_Playername == "i" )
endfunction
function Trig_Randomize_Copy_Func012001 takes nothing returns boolean
return ( udg_Playername == "j" )
endfunction
function Trig_Randomize_Copy_Func013001 takes nothing returns boolean
return ( udg_Playername == "k" )
endfunction
function Trig_Randomize_Copy_Func014001 takes nothing returns boolean
return ( udg_Playername == "l" )
endfunction
function Trig_Randomize_Copy_Func015001 takes nothing returns boolean
return ( udg_Playername == "m" )
endfunction
function Trig_Randomize_Copy_Func016001 takes nothing returns boolean
return ( udg_Playername == "n" )
endfunction
function Trig_Randomize_Copy_Func017001 takes nothing returns boolean
return ( udg_Playername == "o" )
endfunction
function Trig_Randomize_Copy_Func018001 takes nothing returns boolean
return ( udg_Playername == "p" )
endfunction
function Trig_Randomize_Copy_Func019001 takes nothing returns boolean
return ( udg_Playername == "q" )
endfunction
function Trig_Randomize_Copy_Func020001 takes nothing returns boolean
return ( udg_Playername == "r" )
endfunction
function Trig_Randomize_Copy_Func021001 takes nothing returns boolean
return ( udg_Playername == "s" )
endfunction
function Trig_Randomize_Copy_Func022001 takes nothing returns boolean
return ( udg_Playername == "t" )
endfunction
function Trig_Randomize_Copy_Func023001 takes nothing returns boolean
return ( udg_Playername == "u" )
endfunction
function Trig_Randomize_Copy_Func024001 takes nothing returns boolean
return ( udg_Playername == "v" )
endfunction
function Trig_Randomize_Copy_Func025001 takes nothing returns boolean
return ( udg_Playername == "w" )
endfunction
function Trig_Randomize_Copy_Func026001 takes nothing returns boolean
return ( udg_Playername == "x" )
endfunction
function Trig_Randomize_Copy_Func027001 takes nothing returns boolean
return ( udg_Playername == "y" )
endfunction
function Trig_Randomize_Copy_Func028001 takes nothing returns boolean
return ( udg_Playername == "z" )
endfunction
function Trig_Randomize_Copy_Func029001 takes nothing returns boolean
return ( udg_Playername == "A" )
endfunction
function Trig_Randomize_Copy_Func030001 takes nothing returns boolean
return ( udg_Playername == "B" )
endfunction
function Trig_Randomize_Copy_Func031001 takes nothing returns boolean
return ( udg_Playername == "C" )
endfunction
function Trig_Randomize_Copy_Func032001 takes nothing returns boolean
return ( udg_Playername == "D" )
endfunction
function Trig_Randomize_Copy_Func033001 takes nothing returns boolean
return ( udg_Playername == "E" )
endfunction
function Trig_Randomize_Copy_Func034001 takes nothing returns boolean
return ( udg_Playername == "F" )
endfunction
function Trig_Randomize_Copy_Func035001 takes nothing returns boolean
return ( udg_Playername == "G" )
endfunction
function Trig_Randomize_Copy_Func036001 takes nothing returns boolean
return ( udg_Playername == "H" )
endfunction
function Trig_Randomize_Copy_Func037001 takes nothing returns boolean
return ( udg_Playername == "I" )
endfunction
function Trig_Randomize_Copy_Func038001 takes nothing returns boolean
return ( udg_Playername == "J" )
endfunction
function Trig_Randomize_Copy_Func039001 takes nothing returns boolean
return ( udg_Playername == "K" )
endfunction
function Trig_Randomize_Copy_Func040001 takes nothing returns boolean
return ( udg_Playername == "L" )
endfunction
function Trig_Randomize_Copy_Func041001 takes nothing returns boolean
return ( udg_Playername == "M" )
endfunction
function Trig_Randomize_Copy_Func042001 takes nothing returns boolean
return ( udg_Playername == "N" )
endfunction
function Trig_Randomize_Copy_Func043001 takes nothing returns boolean
return ( udg_Playername == "O" )
endfunction
function Trig_Randomize_Copy_Func044001 takes nothing returns boolean
return ( udg_Playername == "P" )
endfunction
function Trig_Randomize_Copy_Func045001 takes nothing returns boolean
return ( udg_Playername == "Q" )
endfunction
function Trig_Randomize_Copy_Func046001 takes nothing returns boolean
return ( udg_Playername == "R" )
endfunction
function Trig_Randomize_Copy_Func047001 takes nothing returns boolean
return ( udg_Playername == "S" )
endfunction
function Trig_Randomize_Copy_Func048001 takes nothing returns boolean
return ( udg_Playername == "T" )
endfunction
function Trig_Randomize_Copy_Func049001 takes nothing returns boolean
return ( udg_Playername == "U" )
endfunction
function Trig_Randomize_Copy_Func050001 takes nothing returns boolean
return ( udg_Playername == "V" )
endfunction
function Trig_Randomize_Copy_Func051001 takes nothing returns boolean
return ( udg_Playername == "W" )
endfunction
function Trig_Randomize_Copy_Func052001 takes nothing returns boolean
return ( udg_Playername == "X" )
endfunction
function Trig_Randomize_Copy_Func053001 takes nothing returns boolean
return ( udg_Playername == "Y" )
endfunction
function Trig_Randomize_Copy_Func054001 takes nothing returns boolean
return ( udg_Playername == "Z" )
endfunction
function Trig_Randomize_Copy_Actions takes nothing returns nothing
set udg_Playername = SubStringBJ(udg_Playername, 1, 1)
set udg_RandomizeCode = 17
if ( Trig_Randomize_Copy_Func003001() ) then
set udg_RandomizeCode = 8
else
call DoNothing( )
endif
if ( Trig_Randomize_Copy_Func004001() ) then
set udg_RandomizeCode = 6
else
call DoNothing( )
endif
if ( Trig_Randomize_Copy_Func005001() ) then
set udg_RandomizeCode = 1
else
call DoNothing( )
endif
if ( Trig_Randomize_Copy_Func006001() ) then
set udg_RandomizeCode = 9
else
call DoNothing( )
endif
if ( Trig_Randomize_Copy_Func007001() ) then
set udg_RandomizeCode = 5
else
call DoNothing( )
endif
if ( Trig_Randomize_Copy_Func008001() ) then
set udg_RandomizeCode = 8
else
call DoNothing( )
endif
if ( Trig_Randomize_Copy_Func009001() ) then
set udg_RandomizeCode = 2
else
call DoNothing( )
endif
if ( Trig_Randomize_Copy_Func010001() ) then
set udg_RandomizeCode = 1
else
call DoNothing( )
endif
if ( Trig_Randomize_Copy_Func011001() ) then
set udg_RandomizeCode = 11
else
call DoNothing( )
endif
if ( Trig_Randomize_Copy_Func012001() ) then
set udg_RandomizeCode = 13
else
call DoNothing( )
endif
if ( Trig_Randomize_Copy_Func013001() ) then
set udg_RandomizeCode = 10
else
call DoNothing( )
endif
if ( Trig_Randomize_Copy_Func014001() ) then
set udg_RandomizeCode = 4
else
call DoNothing( )
endif
if ( Trig_Randomize_Copy_Func015001() ) then
set udg_RandomizeCode = 7
else
call DoNothing( )
endif
if ( Trig_Randomize_Copy_Func016001() ) then
set udg_RandomizeCode = 12
else
call DoNothing( )
endif
if ( Trig_Randomize_Copy_Func017001() ) then
set udg_RandomizeCode = 3
else
call DoNothing( )
endif
if ( Trig_Randomize_Copy_Func018001() ) then
set udg_RandomizeCode = 15
else
call DoNothing( )
endif
if ( Trig_Randomize_Copy_Func019001() ) then
set udg_RandomizeCode = 14
else
call DoNothing( )
endif
if ( Trig_Randomize_Copy_Func020001() ) then
set udg_RandomizeCode = 12
else
call DoNothing( )
endif
if ( Trig_Randomize_Copy_Func021001() ) then
set udg_RandomizeCode = 7
else
call DoNothing( )
endif
if ( Trig_Randomize_Copy_Func022001() ) then
set udg_RandomizeCode = 6
else
call DoNothing( )
endif
if ( Trig_Randomize_Copy_Func023001() ) then
set udg_RandomizeCode = 2
else
call DoNothing( )
endif
if ( Trig_Randomize_Copy_Func024001() ) then
set udg_RandomizeCode = 9
else
call DoNothing( )
endif
if ( Trig_Randomize_Copy_Func025001() ) then
set udg_RandomizeCode = 9
else
call DoNothing( )
endif
if ( Trig_Randomize_Copy_Func026001() ) then
set udg_RandomizeCode = 1
else
call DoNothing( )
endif
if ( Trig_Randomize_Copy_Func027001() ) then
set udg_RandomizeCode = 10
else
call DoNothing( )
endif
if ( Trig_Randomize_Copy_Func028001() ) then
set udg_RandomizeCode = 14
else
call DoNothing( )
endif
if ( Trig_Randomize_Copy_Func029001() ) then
set udg_RandomizeCode = 15
else
call DoNothing( )
endif
if ( Trig_Randomize_Copy_Func030001() ) then
set udg_RandomizeCode = 14
else
call DoNothing( )
endif
if ( Trig_Randomize_Copy_Func031001() ) then
set udg_RandomizeCode = 11
else
call DoNothing( )
endif
if ( Trig_Randomize_Copy_Func032001() ) then
set udg_RandomizeCode = 5
else
call DoNothing( )
endif
if ( Trig_Randomize_Copy_Func033001() ) then
set udg_RandomizeCode = 13
else
call DoNothing( )
endif
if ( Trig_Randomize_Copy_Func034001() ) then
set udg_RandomizeCode = 3
else
call DoNothing( )
endif
if ( Trig_Randomize_Copy_Func035001() ) then
set udg_RandomizeCode = 4
else
call DoNothing( )
endif
if ( Trig_Randomize_Copy_Func036001() ) then
set udg_RandomizeCode = 8
else
call DoNothing( )
endif
if ( Trig_Randomize_Copy_Func037001() ) then
set udg_RandomizeCode = 9
else
call DoNothing( )
endif
if ( Trig_Randomize_Copy_Func038001() ) then
set udg_RandomizeCode = 8
else
call DoNothing( )
endif
if ( Trig_Randomize_Copy_Func039001() ) then
set udg_RandomizeCode = 14
else
call DoNothing( )
endif
if ( Trig_Randomize_Copy_Func040001() ) then
set udg_RandomizeCode = 13
else
call DoNothing( )
endif
if ( Trig_Randomize_Copy_Func041001() ) then
set udg_RandomizeCode = 11
else
call DoNothing( )
endif
if ( Trig_Randomize_Copy_Func042001() ) then
set udg_RandomizeCode = 15
else
call DoNothing( )
endif
if ( Trig_Randomize_Copy_Func043001() ) then
set udg_RandomizeCode = 13
else
call DoNothing( )
endif
if ( Trig_Randomize_Copy_Func044001() ) then
set udg_RandomizeCode = 12
else
call DoNothing( )
endif
if ( Trig_Randomize_Copy_Func045001() ) then
set udg_RandomizeCode = 15
else
call DoNothing( )
endif
if ( Trig_Randomize_Copy_Func046001() ) then
set udg_RandomizeCode = 2
else
call DoNothing( )
endif
if ( Trig_Randomize_Copy_Func047001() ) then
set udg_RandomizeCode = 5
else
call DoNothing( )
endif
if ( Trig_Randomize_Copy_Func048001() ) then
set udg_RandomizeCode = 6
else
call DoNothing( )
endif
if ( Trig_Randomize_Copy_Func049001() ) then
set udg_RandomizeCode = 7
else
call DoNothing( )
endif
if ( Trig_Randomize_Copy_Func050001() ) then
set udg_RandomizeCode = 1
else
call DoNothing( )
endif
if ( Trig_Randomize_Copy_Func051001() ) then
set udg_RandomizeCode = 10
else
call DoNothing( )
endif
if ( Trig_Randomize_Copy_Func052001() ) then
set udg_RandomizeCode = 3
else
call DoNothing( )
endif
if ( Trig_Randomize_Copy_Func053001() ) then
set udg_RandomizeCode = 4
else
call DoNothing( )
endif
if ( Trig_Randomize_Copy_Func054001() ) then
set udg_RandomizeCode = 5
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Randomize_Copy takes nothing returns nothing
set gg_trg_Randomize_Copy = CreateTrigger( )
call TriggerAddAction( gg_trg_Randomize_Copy, function Trig_Randomize_Copy_Actions )
endfunction
function Trig_Repick_Func001Func001C takes nothing returns boolean
if ( not ( GetItemUserData(GetEnumItem()) == GetConvertedPlayerId(GetTriggerPlayer()) ) ) then
return false
endif
return true
endfunction
function Trig_Repick_Func001A takes nothing returns nothing
if ( Trig_Repick_Func001Func001C() ) then
call RemoveItem( GetEnumItem() )
else
call DoNothing( )
endif
endfunction
function Trig_Repick_Func002Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'e007' ) ) then
return false
endif
return true
endfunction
function Trig_Repick_Func002A takes nothing returns nothing
if ( Trig_Repick_Func002Func001C() ) then
call RemoveUnit( GetEnumUnit() )
else
endif
endfunction
function Trig_Repick_Actions takes nothing returns nothing
call EnumItemsInRectBJ( GetPlayableMapRect(), function Trig_Repick_Func001A )
call ForGroupBJ( GetUnitsOfPlayerAll(GetTriggerPlayer()), function Trig_Repick_Func002A )
call CreateNUnitsAtLoc( 1, 'ewsp', GetTriggerPlayer(), GetRectCenter(gg_rct_Wisp_Starting_Area), bj_UNIT_FACING )
call SetPlayerStateBJ( GetTriggerPlayer(), PLAYER_STATE_RESOURCE_GOLD, 1500 )
endfunction
//===========================================================================
function InitTrig_Repick takes nothing returns nothing
set gg_trg_Repick = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Repick, Player(0), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Repick, Player(1), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Repick, Player(2), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Repick, Player(3), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Repick, Player(4), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Repick, Player(5), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Repick, Player(6), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Repick, Player(7), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Repick, Player(8), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Repick, Player(9), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Repick, Player(10), "-repick", true )
call TriggerAddAction( gg_trg_Repick, function Trig_Repick_Actions )
endfunction
function Trig_Base10_to_Base32_Func003Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_Base10Convert >= 32 ) ) then
return false
endif
return true
endfunction
function Trig_Base10_to_Base32_Func003Func001C takes nothing returns boolean
if ( not ( udg_Base10Convert >= 1024 ) ) then
return false
endif
return true
endfunction
function Trig_Base10_to_Base32_Func004Func001001 takes nothing returns boolean
return ( udg_Base32Int[GetForLoopIndexA()] == 23 )
endfunction
function Trig_Base10_to_Base32_Func004Func002001 takes nothing returns boolean
return ( udg_Base32Int[GetForLoopIndexA()] == 26 )
endfunction
function Trig_Base10_to_Base32_Func004Func003001 takes nothing returns boolean
return ( udg_Base32Int[GetForLoopIndexA()] == 17 )
endfunction
function Trig_Base10_to_Base32_Func004Func004001 takes nothing returns boolean
return ( udg_Base32Int[GetForLoopIndexA()] == 24 )
endfunction
function Trig_Base10_to_Base32_Func004Func005001 takes nothing returns boolean
return ( udg_Base32Int[GetForLoopIndexA()] == 6 )
endfunction
function Trig_Base10_to_Base32_Func004Func006001 takes nothing returns boolean
return ( udg_Base32Int[GetForLoopIndexA()] == 5 )
endfunction
function Trig_Base10_to_Base32_Func004Func007001 takes nothing returns boolean
return ( udg_Base32Int[GetForLoopIndexA()] == 11 )
endfunction
function Trig_Base10_to_Base32_Func004Func008001 takes nothing returns boolean
return ( udg_Base32Int[GetForLoopIndexA()] == 4 )
endfunction
function Trig_Base10_to_Base32_Func004Func009001 takes nothing returns boolean
return ( udg_Base32Int[GetForLoopIndexA()] == 10 )
endfunction
function Trig_Base10_to_Base32_Func004Func010001 takes nothing returns boolean
return ( udg_Base32Int[GetForLoopIndexA()] == 13 )
endfunction
function Trig_Base10_to_Base32_Func004Func011001 takes nothing returns boolean
return ( udg_Base32Int[GetForLoopIndexA()] == 0 )
endfunction
function Trig_Base10_to_Base32_Func004Func012001 takes nothing returns boolean
return ( udg_Base32Int[GetForLoopIndexA()] == 9 )
endfunction
function Trig_Base10_to_Base32_Func004Func013001 takes nothing returns boolean
return ( udg_Base32Int[GetForLoopIndexA()] == 18 )
endfunction
function Trig_Base10_to_Base32_Func004Func014001 takes nothing returns boolean
return ( udg_Base32Int[GetForLoopIndexA()] == 31 )
endfunction
function Trig_Base10_to_Base32_Func004Func015001 takes nothing returns boolean
return ( udg_Base32Int[GetForLoopIndexA()] == 1 )
endfunction
function Trig_Base10_to_Base32_Func004Func016001 takes nothing returns boolean
return ( udg_Base32Int[GetForLoopIndexA()] == 21 )
endfunction
function Trig_Base10_to_Base32_Func004Func017001 takes nothing returns boolean
return ( udg_Base32Int[GetForLoopIndexA()] == 30 )
endfunction
function Trig_Base10_to_Base32_Func004Func018001 takes nothing returns boolean
return ( udg_Base32Int[GetForLoopIndexA()] == 27 )
endfunction
function Trig_Base10_to_Base32_Func004Func019001 takes nothing returns boolean
return ( udg_Base32Int[GetForLoopIndexA()] == 25 )
endfunction
function Trig_Base10_to_Base32_Func004Func020001 takes nothing returns boolean
return ( udg_Base32Int[GetForLoopIndexA()] == 3 )
endfunction
function Trig_Base10_to_Base32_Func004Func021001 takes nothing returns boolean
return ( udg_Base32Int[GetForLoopIndexA()] == 8 )
endfunction
function Trig_Base10_to_Base32_Func004Func022001 takes nothing returns boolean
return ( udg_Base32Int[GetForLoopIndexA()] == 2 )
endfunction
function Trig_Base10_to_Base32_Func004Func023001 takes nothing returns boolean
return ( udg_Base32Int[GetForLoopIndexA()] == 14 )
endfunction
function Trig_Base10_to_Base32_Func004Func024001 takes nothing returns boolean
return ( udg_Base32Int[GetForLoopIndexA()] == 22 )
endfunction
function Trig_Base10_to_Base32_Func004Func025001 takes nothing returns boolean
return ( udg_Base32Int[GetForLoopIndexA()] == 16 )
endfunction
function Trig_Base10_to_Base32_Func004Func026001 takes nothing returns boolean
return ( udg_Base32Int[GetForLoopIndexA()] == 7 )
endfunction
function Trig_Base10_to_Base32_Func004Func027001 takes nothing returns boolean
return ( udg_Base32Int[GetForLoopIndexA()] == 12 )
endfunction
function Trig_Base10_to_Base32_Func004Func028001 takes nothing returns boolean
return ( udg_Base32Int[GetForLoopIndexA()] == 15 )
endfunction
function Trig_Base10_to_Base32_Func004Func029001 takes nothing returns boolean
return ( udg_Base32Int[GetForLoopIndexA()] == 28 )
endfunction
function Trig_Base10_to_Base32_Func004Func030001 takes nothing returns boolean
return ( udg_Base32Int[GetForLoopIndexA()] == 20 )
endfunction
function Trig_Base10_to_Base32_Func004Func031001 takes nothing returns boolean
return ( udg_Base32Int[GetForLoopIndexA()] == 29 )
endfunction
function Trig_Base10_to_Base32_Func004Func032001 takes nothing returns boolean
return ( udg_Base32Int[GetForLoopIndexA()] == 19 )
endfunction
function Trig_Base10_to_Base32_Actions takes nothing returns nothing
set bj_forLoopAIndex = 0
set bj_forLoopAIndexEnd = 2
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set udg_Base32Int[GetForLoopIndexA()] = 0
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set udg_Base10Convert = udg_Base10Input
set udg_WhileLoop = 1
loop
exitwhen udg_WhileLoop > 31
if ( Trig_Base10_to_Base32_Func003Func001C() ) then
set udg_Base10Convert = ( udg_Base10Convert - 1024 )
set udg_Base32Int[2] = ( udg_Base32Int[2] + 1 )
else
set udg_WhileLoop = 1
loop
exitwhen udg_WhileLoop > 31
if ( Trig_Base10_to_Base32_Func003Func001Func001Func001C() ) then
set udg_Base10Convert = ( udg_Base10Convert - 32 )
set udg_Base32Int[1] = ( udg_Base32Int[1] + 1 )
else
set udg_Base32Int[0] = udg_Base10Convert
set udg_WhileLoop = 31
endif
set udg_WhileLoop = udg_WhileLoop + 1
endloop
set udg_WhileLoop = 31
endif
set udg_WhileLoop = udg_WhileLoop + 1
endloop
set bj_forLoopAIndex = 0
set bj_forLoopAIndexEnd = 2
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Base10_to_Base32_Func004Func001001() ) then
set udg_Base32String[GetForLoopIndexA()] = "0"
else
call DoNothing( )
endif
if ( Trig_Base10_to_Base32_Func004Func002001() ) then
set udg_Base32String[GetForLoopIndexA()] = "1"
else
call DoNothing( )
endif
if ( Trig_Base10_to_Base32_Func004Func003001() ) then
set udg_Base32String[GetForLoopIndexA()] = "2"
else
call DoNothing( )
endif
if ( Trig_Base10_to_Base32_Func004Func004001() ) then
set udg_Base32String[GetForLoopIndexA()] = "3"
else
call DoNothing( )
endif
if ( Trig_Base10_to_Base32_Func004Func005001() ) then
set udg_Base32String[GetForLoopIndexA()] = "4"
else
call DoNothing( )
endif
if ( Trig_Base10_to_Base32_Func004Func006001() ) then
set udg_Base32String[GetForLoopIndexA()] = "5"
else
call DoNothing( )
endif
if ( Trig_Base10_to_Base32_Func004Func007001() ) then
set udg_Base32String[GetForLoopIndexA()] = "6"
else
call DoNothing( )
endif
if ( Trig_Base10_to_Base32_Func004Func008001() ) then
set udg_Base32String[GetForLoopIndexA()] = "7"
else
call DoNothing( )
endif
if ( Trig_Base10_to_Base32_Func004Func009001() ) then
set udg_Base32String[GetForLoopIndexA()] = "8"
else
call DoNothing( )
endif
if ( Trig_Base10_to_Base32_Func004Func010001() ) then
set udg_Base32String[GetForLoopIndexA()] = "9"
else
call DoNothing( )
endif
if ( Trig_Base10_to_Base32_Func004Func011001() ) then
set udg_Base32String[GetForLoopIndexA()] = "a"
else
call DoNothing( )
endif
if ( Trig_Base10_to_Base32_Func004Func012001() ) then
set udg_Base32String[GetForLoopIndexA()] = "b"
else
call DoNothing( )
endif
if ( Trig_Base10_to_Base32_Func004Func013001() ) then
set udg_Base32String[GetForLoopIndexA()] = "c"
else
call DoNothing( )
endif
if ( Trig_Base10_to_Base32_Func004Func014001() ) then
set udg_Base32String[GetForLoopIndexA()] = "d"
else
call DoNothing( )
endif
if ( Trig_Base10_to_Base32_Func004Func015001() ) then
set udg_Base32String[GetForLoopIndexA()] = "e"
else
call DoNothing( )
endif
if ( Trig_Base10_to_Base32_Func004Func016001() ) then
set udg_Base32String[GetForLoopIndexA()] = "f"
else
call DoNothing( )
endif
if ( Trig_Base10_to_Base32_Func004Func017001() ) then
set udg_Base32String[GetForLoopIndexA()] = "g"
else
call DoNothing( )
endif
if ( Trig_Base10_to_Base32_Func004Func018001() ) then
set udg_Base32String[GetForLoopIndexA()] = "h"
else
call DoNothing( )
endif
if ( Trig_Base10_to_Base32_Func004Func019001() ) then
set udg_Base32String[GetForLoopIndexA()] = "i"
else
call DoNothing( )
endif
if ( Trig_Base10_to_Base32_Func004Func020001() ) then
set udg_Base32String[GetForLoopIndexA()] = "k"
else
call DoNothing( )
endif
if ( Trig_Base10_to_Base32_Func004Func021001() ) then
set udg_Base32String[GetForLoopIndexA()] = "m"
else
call DoNothing( )
endif
if ( Trig_Base10_to_Base32_Func004Func022001() ) then
set udg_Base32String[GetForLoopIndexA()] = "n"
else
call DoNothing( )
endif
if ( Trig_Base10_to_Base32_Func004Func023001() ) then
set udg_Base32String[GetForLoopIndexA()] = "p"
else
call DoNothing( )
endif
if ( Trig_Base10_to_Base32_Func004Func024001() ) then
set udg_Base32String[GetForLoopIndexA()] = "r"
else
call DoNothing( )
endif
if ( Trig_Base10_to_Base32_Func004Func025001() ) then
set udg_Base32String[GetForLoopIndexA()] = "s"
else
call DoNothing( )
endif
if ( Trig_Base10_to_Base32_Func004Func026001() ) then
set udg_Base32String[GetForLoopIndexA()] = "t"
else
call DoNothing( )
endif
if ( Trig_Base10_to_Base32_Func004Func027001() ) then
set udg_Base32String[GetForLoopIndexA()] = "u"
else
call DoNothing( )
endif
if ( Trig_Base10_to_Base32_Func004Func028001() ) then
set udg_Base32String[GetForLoopIndexA()] = "v"
else
call DoNothing( )
endif
if ( Trig_Base10_to_Base32_Func004Func029001() ) then
set udg_Base32String[GetForLoopIndexA()] = "w"
else
call DoNothing( )
endif
if ( Trig_Base10_to_Base32_Func004Func030001() ) then
set udg_Base32String[GetForLoopIndexA()] = "x"
else
call DoNothing( )
endif
if ( Trig_Base10_to_Base32_Func004Func031001() ) then
set udg_Base32String[GetForLoopIndexA()] = "y"
else
call DoNothing( )
endif
if ( Trig_Base10_to_Base32_Func004Func032001() ) then
set udg_Base32String[GetForLoopIndexA()] = "z"
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Base10_to_Base32 takes nothing returns nothing
set gg_trg_Base10_to_Base32 = CreateTrigger( )
call TriggerAddAction( gg_trg_Base10_to_Base32, function Trig_Base10_to_Base32_Actions )
endfunction
function Trig_Base32_to_Base10_Func004Func001001 takes nothing returns boolean
return ( udg_Base32String[GetForLoopIndexA()] == "0" )
endfunction
function Trig_Base32_to_Base10_Func004Func002001 takes nothing returns boolean
return ( udg_Base32String[GetForLoopIndexA()] == "1" )
endfunction
function Trig_Base32_to_Base10_Func004Func003001 takes nothing returns boolean
return ( udg_Base32String[GetForLoopIndexA()] == "2" )
endfunction
function Trig_Base32_to_Base10_Func004Func004001 takes nothing returns boolean
return ( udg_Base32String[GetForLoopIndexA()] == "3" )
endfunction
function Trig_Base32_to_Base10_Func004Func005001 takes nothing returns boolean
return ( udg_Base32String[GetForLoopIndexA()] == "4" )
endfunction
function Trig_Base32_to_Base10_Func004Func006001 takes nothing returns boolean
return ( udg_Base32String[GetForLoopIndexA()] == "5" )
endfunction
function Trig_Base32_to_Base10_Func004Func007001 takes nothing returns boolean
return ( udg_Base32String[GetForLoopIndexA()] == "6" )
endfunction
function Trig_Base32_to_Base10_Func004Func008001 takes nothing returns boolean
return ( udg_Base32String[GetForLoopIndexA()] == "7" )
endfunction
function Trig_Base32_to_Base10_Func004Func009001 takes nothing returns boolean
return ( udg_Base32String[GetForLoopIndexA()] == "8" )
endfunction
function Trig_Base32_to_Base10_Func004Func010001 takes nothing returns boolean
return ( udg_Base32String[GetForLoopIndexA()] == "9" )
endfunction
function Trig_Base32_to_Base10_Func004Func011001 takes nothing returns boolean
return ( udg_Base32String[GetForLoopIndexA()] == "a" )
endfunction
function Trig_Base32_to_Base10_Func004Func012001 takes nothing returns boolean
return ( udg_Base32String[GetForLoopIndexA()] == "b" )
endfunction
function Trig_Base32_to_Base10_Func004Func013001 takes nothing returns boolean
return ( udg_Base32String[GetForLoopIndexA()] == "c" )
endfunction
function Trig_Base32_to_Base10_Func004Func014001 takes nothing returns boolean
return ( udg_Base32String[GetForLoopIndexA()] == "d" )
endfunction
function Trig_Base32_to_Base10_Func004Func015001 takes nothing returns boolean
return ( udg_Base32String[GetForLoopIndexA()] == "e" )
endfunction
function Trig_Base32_to_Base10_Func004Func016001 takes nothing returns boolean
return ( udg_Base32String[GetForLoopIndexA()] == "f" )
endfunction
function Trig_Base32_to_Base10_Func004Func017001 takes nothing returns boolean
return ( udg_Base32String[GetForLoopIndexA()] == "g" )
endfunction
function Trig_Base32_to_Base10_Func004Func018001 takes nothing returns boolean
return ( udg_Base32String[GetForLoopIndexA()] == "h" )
endfunction
function Trig_Base32_to_Base10_Func004Func019001 takes nothing returns boolean
return ( udg_Base32String[GetForLoopIndexA()] == "i" )
endfunction
function Trig_Base32_to_Base10_Func004Func020001 takes nothing returns boolean
return ( udg_Base32String[GetForLoopIndexA()] == "k" )
endfunction
function Trig_Base32_to_Base10_Func004Func021001 takes nothing returns boolean
return ( udg_Base32String[GetForLoopIndexA()] == "m" )
endfunction
function Trig_Base32_to_Base10_Func004Func022001 takes nothing returns boolean
return ( udg_Base32String[GetForLoopIndexA()] == "n" )
endfunction
function Trig_Base32_to_Base10_Func004Func023001 takes nothing returns boolean
return ( udg_Base32String[GetForLoopIndexA()] == "p" )
endfunction
function Trig_Base32_to_Base10_Func004Func024001 takes nothing returns boolean
return ( udg_Base32String[GetForLoopIndexA()] == "r" )
endfunction
function Trig_Base32_to_Base10_Func004Func025001 takes nothing returns boolean
return ( udg_Base32String[GetForLoopIndexA()] == "s" )
endfunction
function Trig_Base32_to_Base10_Func004Func026001 takes nothing returns boolean
return ( udg_Base32String[GetForLoopIndexA()] == "t" )
endfunction
function Trig_Base32_to_Base10_Func004Func027001 takes nothing returns boolean
return ( udg_Base32String[GetForLoopIndexA()] == "u" )
endfunction
function Trig_Base32_to_Base10_Func004Func028001 takes nothing returns boolean
return ( udg_Base32String[GetForLoopIndexA()] == "v" )
endfunction
function Trig_Base32_to_Base10_Func004Func029001 takes nothing returns boolean
return ( udg_Base32String[GetForLoopIndexA()] == "w" )
endfunction
function Trig_Base32_to_Base10_Func004Func030001 takes nothing returns boolean
return ( udg_Base32String[GetForLoopIndexA()] == "x" )
endfunction
function Trig_Base32_to_Base10_Func004Func031001 takes nothing returns boolean
return ( udg_Base32String[GetForLoopIndexA()] == "y" )
endfunction
function Trig_Base32_to_Base10_Func004Func032001 takes nothing returns boolean
return ( udg_Base32String[GetForLoopIndexA()] == "z" )
endfunction
function Trig_Base32_to_Base10_Actions takes nothing returns nothing
set udg_Base32String[2] = SubStringBJ(udg_Base32Input, 1, 1)
set udg_Base32String[1] = SubStringBJ(udg_Base32Input, 2, 2)
set udg_Base32String[0] = SubStringBJ(udg_Base32Input, 3, 3)
set bj_forLoopAIndex = 0
set bj_forLoopAIndexEnd = 2
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Base32_to_Base10_Func004Func001001() ) then
set udg_Base32Int[GetForLoopIndexA()] = 23
else
call DoNothing( )
endif
if ( Trig_Base32_to_Base10_Func004Func002001() ) then
set udg_Base32Int[GetForLoopIndexA()] = 26
else
call DoNothing( )
endif
if ( Trig_Base32_to_Base10_Func004Func003001() ) then
set udg_Base32Int[GetForLoopIndexA()] = 17
else
call DoNothing( )
endif
if ( Trig_Base32_to_Base10_Func004Func004001() ) then
set udg_Base32Int[GetForLoopIndexA()] = 24
else
call DoNothing( )
endif
if ( Trig_Base32_to_Base10_Func004Func005001() ) then
set udg_Base32Int[GetForLoopIndexA()] = 6
else
call DoNothing( )
endif
if ( Trig_Base32_to_Base10_Func004Func006001() ) then
set udg_Base32Int[GetForLoopIndexA()] = 5
else
call DoNothing( )
endif
if ( Trig_Base32_to_Base10_Func004Func007001() ) then
set udg_Base32Int[GetForLoopIndexA()] = 11
else
call DoNothing( )
endif
if ( Trig_Base32_to_Base10_Func004Func008001() ) then
set udg_Base32Int[GetForLoopIndexA()] = 4
else
call DoNothing( )
endif
if ( Trig_Base32_to_Base10_Func004Func009001() ) then
set udg_Base32Int[GetForLoopIndexA()] = 10
else
call DoNothing( )
endif
if ( Trig_Base32_to_Base10_Func004Func010001() ) then
set udg_Base32Int[GetForLoopIndexA()] = 13
else
call DoNothing( )
endif
if ( Trig_Base32_to_Base10_Func004Func011001() ) then
set udg_Base32Int[GetForLoopIndexA()] = 0
else
call DoNothing( )
endif
if ( Trig_Base32_to_Base10_Func004Func012001() ) then
set udg_Base32Int[GetForLoopIndexA()] = 9
else
call DoNothing( )
endif
if ( Trig_Base32_to_Base10_Func004Func013001() ) then
set udg_Base32Int[GetForLoopIndexA()] = 18
else
call DoNothing( )
endif
if ( Trig_Base32_to_Base10_Func004Func014001() ) then
set udg_Base32Int[GetForLoopIndexA()] = 31
else
call DoNothing( )
endif
if ( Trig_Base32_to_Base10_Func004Func015001() ) then
set udg_Base32Int[GetForLoopIndexA()] = 1
else
call DoNothing( )
endif
if ( Trig_Base32_to_Base10_Func004Func016001() ) then
set udg_Base32Int[GetForLoopIndexA()] = 21
else
call DoNothing( )
endif
if ( Trig_Base32_to_Base10_Func004Func017001() ) then
set udg_Base32Int[GetForLoopIndexA()] = 30
else
call DoNothing( )
endif
if ( Trig_Base32_to_Base10_Func004Func018001() ) then
set udg_Base32Int[GetForLoopIndexA()] = 27
else
call DoNothing( )
endif
if ( Trig_Base32_to_Base10_Func004Func019001() ) then
set udg_Base32Int[GetForLoopIndexA()] = 25
else
call DoNothing( )
endif
if ( Trig_Base32_to_Base10_Func004Func020001() ) then
set udg_Base32Int[GetForLoopIndexA()] = 3
else
call DoNothing( )
endif
if ( Trig_Base32_to_Base10_Func004Func021001() ) then
set udg_Base32Int[GetForLoopIndexA()] = 8
else
call DoNothing( )
endif
if ( Trig_Base32_to_Base10_Func004Func022001() ) then
set udg_Base32Int[GetForLoopIndexA()] = 2
else
call DoNothing( )
endif
if ( Trig_Base32_to_Base10_Func004Func023001() ) then
set udg_Base32Int[GetForLoopIndexA()] = 14
else
call DoNothing( )
endif
if ( Trig_Base32_to_Base10_Func004Func024001() ) then
set udg_Base32Int[GetForLoopIndexA()] = 22
else
call DoNothing( )
endif
if ( Trig_Base32_to_Base10_Func004Func025001() ) then
set udg_Base32Int[GetForLoopIndexA()] = 16
else
call DoNothing( )
endif
if ( Trig_Base32_to_Base10_Func004Func026001() ) then
set udg_Base32Int[GetForLoopIndexA()] = 7
else
call DoNothing( )
endif
if ( Trig_Base32_to_Base10_Func004Func027001() ) then
set udg_Base32Int[GetForLoopIndexA()] = 12
else
call DoNothing( )
endif
if ( Trig_Base32_to_Base10_Func004Func028001() ) then
set udg_Base32Int[GetForLoopIndexA()] = 15
else
call DoNothing( )
endif
if ( Trig_Base32_to_Base10_Func004Func029001() ) then
set udg_Base32Int[GetForLoopIndexA()] = 28
else
call DoNothing( )
endif
if ( Trig_Base32_to_Base10_Func004Func030001() ) then
set udg_Base32Int[GetForLoopIndexA()] = 20
else
call DoNothing( )
endif
if ( Trig_Base32_to_Base10_Func004Func031001() ) then
set udg_Base32Int[GetForLoopIndexA()] = 29
else
call DoNothing( )
endif
if ( Trig_Base32_to_Base10_Func004Func032001() ) then
set udg_Base32Int[GetForLoopIndexA()] = 19
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set udg_Base10Output = ( ( ( udg_Base32Int[2] * 1024 ) + ( udg_Base32Int[1] * 32 ) ) + udg_Base32Int[0] )
endfunction
//===========================================================================
function InitTrig_Base32_to_Base10 takes nothing returns nothing
set gg_trg_Base32_to_Base10 = CreateTrigger( )
call TriggerAddAction( gg_trg_Base32_to_Base10, function Trig_Base32_to_Base10_Actions )
endfunction
function Trig_Save_Char_Copy_Conditions takes nothing returns boolean
if ( not ( SubStringBJ(GetEventPlayerChatString(), 1, 10) == "-save char" ) ) then
return false
endif
return true
endfunction
function Trig_Save_Char_Copy_Func004001002001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Save_Char_Copy_Func004001002002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) != 'H02D' )
endfunction
function Trig_Save_Char_Copy_Func004001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Save_Char_Copy_Func004001002001(), Trig_Save_Char_Copy_Func004001002002() )
endfunction
function Trig_Save_Char_Copy_Func004Func001Func004C takes nothing returns boolean
if ( ( GetUnitTypeId(GetEnumUnit()) == 'ewsp' ) ) then
return true
endif
return false
endfunction
function Trig_Save_Char_Copy_Func004Func001C takes nothing returns boolean
if ( not Trig_Save_Char_Copy_Func004Func001Func004C() ) then
return false
endif
return true
endfunction
function Trig_Save_Char_Copy_Func004Func005001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H00W' )
endfunction
function Trig_Save_Char_Copy_Func004Func006001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H00O' )
endfunction
function Trig_Save_Char_Copy_Func004Func007001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H00P' )
endfunction
function Trig_Save_Char_Copy_Func004Func008001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H013' )
endfunction
function Trig_Save_Char_Copy_Func004Func009001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H022' )
endfunction
function Trig_Save_Char_Copy_Func004Func010001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H006' )
endfunction
function Trig_Save_Char_Copy_Func004Func011001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H01B' )
endfunction
function Trig_Save_Char_Copy_Func004Func012001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H01L' )
endfunction
function Trig_Save_Char_Copy_Func004Func013001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H01F' )
endfunction
function Trig_Save_Char_Copy_Func004Func014001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H002' )
endfunction
function Trig_Save_Char_Copy_Func004Func015001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H010' )
endfunction
function Trig_Save_Char_Copy_Func004Func016001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H01S' )
endfunction
function Trig_Save_Char_Copy_Func004Func017001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H00T' )
endfunction
function Trig_Save_Char_Copy_Func004Func018001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H01D' )
endfunction
function Trig_Save_Char_Copy_Func004Func019001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H01I' )
endfunction
function Trig_Save_Char_Copy_Func004Func020001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H014' )
endfunction
function Trig_Save_Char_Copy_Func004Func021001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H024' )
endfunction
function Trig_Save_Char_Copy_Func004Func022001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H023' )
endfunction
function Trig_Save_Char_Copy_Func004Func023001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H01K' )
endfunction
function Trig_Save_Char_Copy_Func004Func024001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H01C' )
endfunction
function Trig_Save_Char_Copy_Func004Func025001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H021' )
endfunction
function Trig_Save_Char_Copy_Func004Func026001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H01Q' )
endfunction
function Trig_Save_Char_Copy_Func004Func027001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H01H' )
endfunction
function Trig_Save_Char_Copy_Func004Func028001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H00Y' )
endfunction
function Trig_Save_Char_Copy_Func004Func029001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H01A' )
endfunction
function Trig_Save_Char_Copy_Func004Func030001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H001' )
endfunction
function Trig_Save_Char_Copy_Func004Func031001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H025' )
endfunction
function Trig_Save_Char_Copy_Func004Func032001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H00R' )
endfunction
function Trig_Save_Char_Copy_Func004Func033001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H018' )
endfunction
function Trig_Save_Char_Copy_Func004Func034001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H012' )
endfunction
function Trig_Save_Char_Copy_Func004Func035001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H007' )
endfunction
function Trig_Save_Char_Copy_Func004Func036001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H01M' )
endfunction
function Trig_Save_Char_Copy_Func004Func037001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H01X' )
endfunction
function Trig_Save_Char_Copy_Func004Func038001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H01U' )
endfunction
function Trig_Save_Char_Copy_Func004Func039001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H004' )
endfunction
function Trig_Save_Char_Copy_Func004Func040001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H020' )
endfunction
function Trig_Save_Char_Copy_Func004Func041001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H00V' )
endfunction
function Trig_Save_Char_Copy_Func004Func042001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H01V' )
endfunction
function Trig_Save_Char_Copy_Func004Func043001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H008' )
endfunction
function Trig_Save_Char_Copy_Func004Func044001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H016' )
endfunction
function Trig_Save_Char_Copy_Func004Func045001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H00Q' )
endfunction
function Trig_Save_Char_Copy_Func004Func046001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H011' )
endfunction
function Trig_Save_Char_Copy_Func004Func047001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H01W' )
endfunction
function Trig_Save_Char_Copy_Func004Func048001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H015' )
endfunction
function Trig_Save_Char_Copy_Func004Func049001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H01P' )
endfunction
function Trig_Save_Char_Copy_Func004Func050001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H00N' )
endfunction
function Trig_Save_Char_Copy_Func004Func051001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H005' )
endfunction
function Trig_Save_Char_Copy_Func004Func052001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H01J' )
endfunction
function Trig_Save_Char_Copy_Func004Func053001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H01T' )
endfunction
function Trig_Save_Char_Copy_Func004Func054001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H019' )
endfunction
function Trig_Save_Char_Copy_Func004Func055001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H01Z' )
endfunction
function Trig_Save_Char_Copy_Func004Func056001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H00U' )
endfunction
function Trig_Save_Char_Copy_Func004Func057001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H01R' )
endfunction
function Trig_Save_Char_Copy_Func004Func058001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H01N' )
endfunction
function Trig_Save_Char_Copy_Func004Func059001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H00Z' )
endfunction
function Trig_Save_Char_Copy_Func004Func060001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H003' )
endfunction
function Trig_Save_Char_Copy_Func004Func061001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H017' )
endfunction
function Trig_Save_Char_Copy_Func004Func062001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H000' )
endfunction
function Trig_Save_Char_Copy_Func004Func063001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H00S' )
endfunction
function Trig_Save_Char_Copy_Func004Func064001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H00X' )
endfunction
function Trig_Save_Char_Copy_Func004Func065001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H01Y' )
endfunction
function Trig_Save_Char_Copy_Func004Func066001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H01E' )
endfunction
function Trig_Save_Char_Copy_Func004Func067001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H01G' )
endfunction
function Trig_Save_Char_Copy_Func004Func068001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'E00J' )
endfunction
function Trig_Save_Char_Copy_Func004Func069001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'H01O' )
endfunction
function Trig_Save_Char_Copy_Func004Func070001 takes nothing returns boolean
return ( udg_Part1 != "NONE" )
endfunction
function Trig_Save_Char_Copy_Func004A takes nothing returns nothing
if ( Trig_Save_Char_Copy_Func004Func001C() ) then
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1342" )
call EnableTrigger( GetTriggeringTrigger() )
return
else
endif
set udg_LevelCode = GetHeroLevel(GetEnumUnit())
set udg_Mathmo = ( GetHeroLevel(GetEnumUnit()) + ( 400 / 3 ) )
set udg_LoadLevelCode = I2S(udg_Mathmo)
if ( Trig_Save_Char_Copy_Func004Func005001() ) then
set udg_Part1 = "01"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func006001() ) then
set udg_Part1 = "02"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func007001() ) then
set udg_Part1 = "03"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func008001() ) then
set udg_Part1 = "04"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func009001() ) then
set udg_Part1 = "05"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func010001() ) then
set udg_Part1 = "06"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func011001() ) then
set udg_Part1 = "07"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func012001() ) then
set udg_Part1 = "08"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func013001() ) then
set udg_Part1 = "09"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func014001() ) then
set udg_Part1 = "10"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func015001() ) then
set udg_Part1 = "11"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func016001() ) then
set udg_Part1 = "12"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func017001() ) then
set udg_Part1 = "13"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func018001() ) then
set udg_Part1 = "14"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func019001() ) then
set udg_Part1 = "15"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func020001() ) then
set udg_Part1 = "16"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func021001() ) then
set udg_Part1 = "17"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func022001() ) then
set udg_Part1 = "18"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func023001() ) then
set udg_Part1 = "19"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func024001() ) then
set udg_Part1 = "20"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func025001() ) then
set udg_Part1 = "21"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func026001() ) then
set udg_Part1 = "22"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func027001() ) then
set udg_Part1 = "23"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func028001() ) then
set udg_Part1 = "24"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func029001() ) then
set udg_Part1 = "25"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func030001() ) then
set udg_Part1 = "26"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func031001() ) then
set udg_Part1 = "27"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func032001() ) then
set udg_Part1 = "28"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func033001() ) then
set udg_Part1 = "29"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func034001() ) then
set udg_Part1 = "30"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func035001() ) then
set udg_Part1 = "31"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func036001() ) then
set udg_Part1 = "32"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func037001() ) then
set udg_Part1 = "33"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func038001() ) then
set udg_Part1 = "34"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func039001() ) then
set udg_Part1 = "35"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func040001() ) then
set udg_Part1 = "36"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func041001() ) then
set udg_Part1 = "37"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func042001() ) then
set udg_Part1 = "38"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func043001() ) then
set udg_Part1 = "39"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func044001() ) then
set udg_Part1 = "40"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func045001() ) then
set udg_Part1 = "41"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func046001() ) then
set udg_Part1 = "42"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func047001() ) then
set udg_Part1 = "43"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func048001() ) then
set udg_Part1 = "44"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func049001() ) then
set udg_Part1 = "45"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func050001() ) then
set udg_Part1 = "46"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func051001() ) then
set udg_Part1 = "47"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func052001() ) then
set udg_Part1 = "48"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func053001() ) then
set udg_Part1 = "49"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func054001() ) then
set udg_Part1 = "50"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func055001() ) then
set udg_Part1 = "51"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func056001() ) then
set udg_Part1 = "52"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func057001() ) then
set udg_Part1 = "53"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func058001() ) then
set udg_Part1 = "54"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func059001() ) then
set udg_Part1 = "55"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func060001() ) then
set udg_Part1 = "56"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func061001() ) then
set udg_Part1 = "57"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func062001() ) then
set udg_Part1 = "58"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func063001() ) then
set udg_Part1 = "59"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func064001() ) then
set udg_Part1 = "60"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func065001() ) then
set udg_Part1 = "61"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func066001() ) then
set udg_Part1 = "62"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func067001() ) then
set udg_Part1 = "63"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func068001() ) then
set udg_Part1 = "64"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func069001() ) then
set udg_Part1 = "65"
else
call DoNothing( )
endif
if ( Trig_Save_Char_Copy_Func004Func070001() ) then
set udg_SavingHero = GetEnumUnit()
else
call DoNothing( )
endif
endfunction
function Trig_Save_Char_Copy_Func005C takes nothing returns boolean
if ( not ( udg_Part1 == "NONE" ) ) then
return false
endif
return true
endfunction
function Trig_Save_Char_Copy_Func015Func001Func001001 takes nothing returns boolean
return ( GetItemTypeId(UnitItemInSlotBJ(udg_SavingHero, ( GetForLoopIndexB() + 1 ))) == udg_InitializeItems[GetForLoopIndexA()] )
endfunction
function Trig_Save_Char_Copy_Func016Func001Func001C takes nothing returns boolean
if ( not ( udg_CarriedItems[udg_WhileLoop] > udg_CarriedItems[GetForLoopIndexB()] ) ) then
return false
endif
return true
endfunction
function Trig_Save_Char_Copy_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
set udg_Part1 = "NONE"
call ForGroupBJ( GetUnitsOfPlayerMatching(GetTriggerPlayer(), Condition(function Trig_Save_Char_Copy_Func004001002)), function Trig_Save_Char_Copy_Func004A )
if ( Trig_Save_Char_Copy_Func005C() ) then
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1343" )
call EnableTrigger( GetTriggeringTrigger() )
return
else
endif
set udg_Playername = GetPlayerName(GetTriggerPlayer())
call TriggerExecute( gg_trg_Randomize_Copy )
set udg_Base10Input = ( S2I(udg_Part1) * udg_RandomizeCode )
call TriggerExecute( gg_trg_Base10_to_Base32 )
set udg_SaveCode[0] = ( udg_Base32String[1] + udg_Base32String[0] )
set udg_Base10Input = ( ( udg_LevelCode * udg_RandomizeCode ) * ( ModuloInteger(S2I(udg_Part1), 9) + 1 ) )
call TriggerExecute( gg_trg_Base10_to_Base32 )
set udg_SaveCode[1] = ( ( udg_Base32String[2] + udg_Base32String[1] ) + udg_Base32String[0] )
set bj_forLoopAIndex = 0
set bj_forLoopAIndexEnd = 5
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set udg_CarriedItems[GetForLoopIndexA()] = 500
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopBIndex = 0
set bj_forLoopBIndexEnd = 5
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
set bj_forLoopAIndex = 190
set bj_forLoopAIndexEnd = 458
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Save_Char_Copy_Func015Func001Func001001() ) then
set udg_CarriedItems[GetForLoopIndexB()] = GetForLoopIndexA()
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
set udg_WhileLoop = 0
loop
exitwhen udg_WhileLoop > 4
set bj_forLoopBIndex = ( udg_WhileLoop + 1 )
set bj_forLoopBIndexEnd = 5
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
if ( Trig_Save_Char_Copy_Func016Func001Func001C() ) then
set udg_SortTempInt = udg_CarriedItems[udg_WhileLoop]
set udg_CarriedItems[udg_WhileLoop] = udg_CarriedItems[GetForLoopIndexB()]
set udg_CarriedItems[GetForLoopIndexB()] = udg_SortTempInt
else
endif
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
set udg_WhileLoop = udg_WhileLoop + 1
endloop
set bj_forLoopBIndex = 0
set bj_forLoopBIndexEnd = 5
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
set udg_Base10Input = ( ( S2I(udg_Part1) + GetForLoopIndexB() ) + ( ( udg_CarriedItems[GetForLoopIndexB()] - 100 ) * ( ModuloInteger(udg_RandomizeCode, 2) + 1 ) ) )
call TriggerExecute( gg_trg_Base10_to_Base32 )
set udg_SaveCode[( GetForLoopIndexB() + 2 )] = ( udg_Base32String[1] + udg_Base32String[0] )
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
set udg_FinalCode = ( ( ( udg_SaveCode[0] + udg_SaveCode[1] ) + ( udg_SaveCode[2] + udg_SaveCode[3] ) ) + ( ( udg_SaveCode[4] + udg_SaveCode[5] ) + ( udg_SaveCode[6] + ( udg_SaveCode[7] + udg_LoadLevelCode ) ) ) )
call DisplayTimedTextToForce( GetForceOfPlayer(GetTriggerPlayer()), 200.00, "TRIGSTR_1344" )
call DisplayTimedTextToForce( GetForceOfPlayer(GetTriggerPlayer()), 200.00, ( ( ( "Character: " + udg_HeroName[GetConvertedPlayerId(GetTriggerPlayer())] ) + " - " ) + ( "Loading Code: " + udg_FinalCode ) ) )
call DisplayTimedTextToForce( GetForceOfPlayer(GetTriggerPlayer()), 200.00, "TRIGSTR_1345" )
call EnableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Save_Char_Copy takes nothing returns nothing
set gg_trg_Save_Char_Copy = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Save_Char_Copy, Player(0), "-save char", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Save_Char_Copy, Player(1), "-save char", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Save_Char_Copy, Player(2), "-save char", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Save_Char_Copy, Player(3), "-save char", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Save_Char_Copy, Player(4), "-save char", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Save_Char_Copy, Player(5), "-save char", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Save_Char_Copy, Player(6), "-save char", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Save_Char_Copy, Player(7), "-save char", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Save_Char_Copy, Player(8), "-save char", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Save_Char_Copy, Player(9), "-save char", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Save_Char_Copy, Player(10), "-save char", true )
call TriggerAddCondition( gg_trg_Save_Char_Copy, Condition( function Trig_Save_Char_Copy_Conditions ) )
call TriggerAddAction( gg_trg_Save_Char_Copy, function Trig_Save_Char_Copy_Actions )
endfunction
function Trig_Load_Char_Copy_Conditions takes nothing returns boolean
if ( not ( SubStringBJ(GetEventPlayerChatString(), 1, 10) == "-load char" ) ) then
return false
endif
if ( not ( GetUnitName(GroupPickRandomUnit(GetUnitsOfPlayerAll(GetTriggerPlayer()))) == "Onion Knight" ) ) then
return false
endif
return true
endfunction
function Trig_Load_Char_Copy_Func003C takes nothing returns boolean
if ( not ( udg_LoadCharAttempts[GetConvertedPlayerId(GetTriggerPlayer())] >= 50 ) ) then
return false
endif
return true
endfunction
function Trig_Load_Char_Copy_Func004Func001C takes nothing returns boolean
if ( ( StringLength(GetEventPlayerChatString()) != 31 ) ) then
return true
endif
return false
endfunction
function Trig_Load_Char_Copy_Func004Func002Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'ewsp' ) ) then
return false
endif
return true
endfunction
function Trig_Load_Char_Copy_Func004Func002A takes nothing returns nothing
if ( Trig_Load_Char_Copy_Func004Func002Func001C() ) then
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1363" )
return
else
call DoNothing( )
endif
endfunction
function Trig_Load_Char_Copy_Func004C takes nothing returns boolean
if ( not Trig_Load_Char_Copy_Func004Func001C() ) then
return false
endif
return true
endfunction
function Trig_Load_Char_Copy_Func017Func002C takes nothing returns boolean
if ( ( udg_UnitNumber > 64 ) ) then
return true
endif
if ( ( udg_UnitNumber < 1 ) ) then
return true
endif
if ( ( udg_LoadLevel > 1000 ) ) then
return true
endif
if ( ( udg_LoadLevel < 0 ) ) then
return true
endif
return false
endfunction
function Trig_Load_Char_Copy_Func017C takes nothing returns boolean
if ( not Trig_Load_Char_Copy_Func017Func002C() ) then
return false
endif
return true
endfunction
function Trig_Load_Char_Copy_Func018001002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) != 'H02D' )
endfunction
function Trig_Load_Char_Copy_Func018002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Load_Char_Copy_Func019001 takes nothing returns boolean
return ( udg_UnitNumber == 1 )
endfunction
function Trig_Load_Char_Copy_Func020001 takes nothing returns boolean
return ( udg_UnitNumber == 2 )
endfunction
function Trig_Load_Char_Copy_Func021001 takes nothing returns boolean
return ( udg_UnitNumber == 3 )
endfunction
function Trig_Load_Char_Copy_Func022001 takes nothing returns boolean
return ( udg_UnitNumber == 4 )
endfunction
function Trig_Load_Char_Copy_Func023001 takes nothing returns boolean
return ( udg_UnitNumber == 5 )
endfunction
function Trig_Load_Char_Copy_Func024001 takes nothing returns boolean
return ( udg_UnitNumber == 6 )
endfunction
function Trig_Load_Char_Copy_Func025001 takes nothing returns boolean
return ( udg_UnitNumber == 7 )
endfunction
function Trig_Load_Char_Copy_Func026001 takes nothing returns boolean
return ( udg_UnitNumber == 8 )
endfunction
function Trig_Load_Char_Copy_Func027001 takes nothing returns boolean
return ( udg_UnitNumber == 9 )
endfunction
function Trig_Load_Char_Copy_Func028001 takes nothing returns boolean
return ( udg_UnitNumber == 10 )
endfunction
function Trig_Load_Char_Copy_Func029001 takes nothing returns boolean
return ( udg_UnitNumber == 11 )
endfunction
function Trig_Load_Char_Copy_Func030001 takes nothing returns boolean
return ( udg_UnitNumber == 12 )
endfunction
function Trig_Load_Char_Copy_Func031001 takes nothing returns boolean
return ( udg_UnitNumber == 13 )
endfunction
function Trig_Load_Char_Copy_Func032001 takes nothing returns boolean
return ( udg_UnitNumber == 14 )
endfunction
function Trig_Load_Char_Copy_Func033001 takes nothing returns boolean
return ( udg_UnitNumber == 15 )
endfunction
function Trig_Load_Char_Copy_Func034001 takes nothing returns boolean
return ( udg_UnitNumber == 16 )
endfunction
function Trig_Load_Char_Copy_Func035001 takes nothing returns boolean
return ( udg_UnitNumber == 17 )
endfunction
function Trig_Load_Char_Copy_Func036001 takes nothing returns boolean
return ( udg_UnitNumber == 18 )
endfunction
function Trig_Load_Char_Copy_Func037001 takes nothing returns boolean
return ( udg_UnitNumber == 19 )
endfunction
function Trig_Load_Char_Copy_Func038001 takes nothing returns boolean
return ( udg_UnitNumber == 20 )
endfunction
function Trig_Load_Char_Copy_Func039001 takes nothing returns boolean
return ( udg_UnitNumber == 21 )
endfunction
function Trig_Load_Char_Copy_Func040001 takes nothing returns boolean
return ( udg_UnitNumber == 22 )
endfunction
function Trig_Load_Char_Copy_Func041001 takes nothing returns boolean
return ( udg_UnitNumber == 23 )
endfunction
function Trig_Load_Char_Copy_Func042001 takes nothing returns boolean
return ( udg_UnitNumber == 24 )
endfunction
function Trig_Load_Char_Copy_Func043001 takes nothing returns boolean
return ( udg_UnitNumber == 25 )
endfunction
function Trig_Load_Char_Copy_Func044001 takes nothing returns boolean
return ( udg_UnitNumber == 26 )
endfunction
function Trig_Load_Char_Copy_Func045001 takes nothing returns boolean
return ( udg_UnitNumber == 27 )
endfunction
function Trig_Load_Char_Copy_Func046001 takes nothing returns boolean
return ( udg_UnitNumber == 28 )
endfunction
function Trig_Load_Char_Copy_Func047001 takes nothing returns boolean
return ( udg_UnitNumber == 29 )
endfunction
function Trig_Load_Char_Copy_Func048001 takes nothing returns boolean
return ( udg_UnitNumber == 30 )
endfunction
function Trig_Load_Char_Copy_Func049001 takes nothing returns boolean
return ( udg_UnitNumber == 31 )
endfunction
function Trig_Load_Char_Copy_Func050001 takes nothing returns boolean
return ( udg_UnitNumber == 32 )
endfunction
function Trig_Load_Char_Copy_Func051001 takes nothing returns boolean
return ( udg_UnitNumber == 33 )
endfunction
function Trig_Load_Char_Copy_Func052001 takes nothing returns boolean
return ( udg_UnitNumber == 34 )
endfunction
function Trig_Load_Char_Copy_Func053001 takes nothing returns boolean
return ( udg_UnitNumber == 35 )
endfunction
function Trig_Load_Char_Copy_Func054001 takes nothing returns boolean
return ( udg_UnitNumber == 36 )
endfunction
function Trig_Load_Char_Copy_Func055001 takes nothing returns boolean
return ( udg_UnitNumber == 37 )
endfunction
function Trig_Load_Char_Copy_Func056001 takes nothing returns boolean
return ( udg_UnitNumber == 38 )
endfunction
function Trig_Load_Char_Copy_Func057001 takes nothing returns boolean
return ( udg_UnitNumber == 39 )
endfunction
function Trig_Load_Char_Copy_Func058001 takes nothing returns boolean
return ( udg_UnitNumber == 40 )
endfunction
function Trig_Load_Char_Copy_Func059001 takes nothing returns boolean
return ( udg_UnitNumber == 41 )
endfunction
function Trig_Load_Char_Copy_Func060001 takes nothing returns boolean
return ( udg_UnitNumber == 42 )
endfunction
function Trig_Load_Char_Copy_Func061001 takes nothing returns boolean
return ( udg_UnitNumber == 43 )
endfunction
function Trig_Load_Char_Copy_Func062001 takes nothing returns boolean
return ( udg_UnitNumber == 44 )
endfunction
function Trig_Load_Char_Copy_Func063001 takes nothing returns boolean
return ( udg_UnitNumber == 45 )
endfunction
function Trig_Load_Char_Copy_Func064001 takes nothing returns boolean
return ( udg_UnitNumber == 46 )
endfunction
function Trig_Load_Char_Copy_Func065001 takes nothing returns boolean
return ( udg_UnitNumber == 47 )
endfunction
function Trig_Load_Char_Copy_Func066001 takes nothing returns boolean
return ( udg_UnitNumber == 48 )
endfunction
function Trig_Load_Char_Copy_Func067001 takes nothing returns boolean
return ( udg_UnitNumber == 49 )
endfunction
function Trig_Load_Char_Copy_Func068001 takes nothing returns boolean
return ( udg_UnitNumber == 50 )
endfunction
function Trig_Load_Char_Copy_Func069001 takes nothing returns boolean
return ( udg_UnitNumber == 51 )
endfunction
function Trig_Load_Char_Copy_Func070001 takes nothing returns boolean
return ( udg_UnitNumber == 52 )
endfunction
function Trig_Load_Char_Copy_Func071001 takes nothing returns boolean
return ( udg_UnitNumber == 53 )
endfunction
function Trig_Load_Char_Copy_Func072001 takes nothing returns boolean
return ( udg_UnitNumber == 54 )
endfunction
function Trig_Load_Char_Copy_Func073001 takes nothing returns boolean
return ( udg_UnitNumber == 55 )
endfunction
function Trig_Load_Char_Copy_Func074001 takes nothing returns boolean
return ( udg_UnitNumber == 56 )
endfunction
function Trig_Load_Char_Copy_Func075001 takes nothing returns boolean
return ( udg_UnitNumber == 57 )
endfunction
function Trig_Load_Char_Copy_Func076001 takes nothing returns boolean
return ( udg_UnitNumber == 58 )
endfunction
function Trig_Load_Char_Copy_Func077001 takes nothing returns boolean
return ( udg_UnitNumber == 59 )
endfunction
function Trig_Load_Char_Copy_Func078001 takes nothing returns boolean
return ( udg_UnitNumber == 60 )
endfunction
function Trig_Load_Char_Copy_Func079001 takes nothing returns boolean
return ( udg_UnitNumber == 61 )
endfunction
function Trig_Load_Char_Copy_Func080001 takes nothing returns boolean
return ( udg_UnitNumber == 62 )
endfunction
function Trig_Load_Char_Copy_Func081001 takes nothing returns boolean
return ( udg_UnitNumber == 63 )
endfunction
function Trig_Load_Char_Copy_Func082001 takes nothing returns boolean
return ( udg_UnitNumber == 64 )
endfunction
function Trig_Load_Char_Copy_Func083001 takes nothing returns boolean
return ( udg_UnitNumber == 65 )
endfunction
function Trig_Load_Char_Copy_Func088Func005Func002C takes nothing returns boolean
if ( not ( udg_ItemNumber == 500 ) ) then
return false
endif
return true
endfunction
function Trig_Load_Char_Copy_Func088Func005Func004002001002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Load_Char_Copy_Func088Func005Func005Func001001 takes nothing returns boolean
return ( udg_ItemNumber < 190 )
endfunction
function Trig_Load_Char_Copy_Func088Func005Func005Func001002 takes nothing returns boolean
return ( udg_ItemNumber > 458 )
endfunction
function Trig_Load_Char_Copy_Func088Func005Func005C takes nothing returns boolean
if ( GetBooleanOr( Trig_Load_Char_Copy_Func088Func005Func005Func001001(), Trig_Load_Char_Copy_Func088Func005Func005Func001002() ) ) then
return true
endif
if ( ( udg_InitializeItems[udg_ItemNumber] == 'I04M' ) ) then
return true
endif
return false
endfunction
function Trig_Load_Char_Copy_Func088Func005C takes nothing returns boolean
if ( not Trig_Load_Char_Copy_Func088Func005Func005C() ) then
return false
endif
return true
endfunction
function Trig_Load_Char_Copy_Actions takes nothing returns nothing
set udg_PlayerLoadingCode = GetTriggerPlayer()
set udg_LoadCharAttempts[GetConvertedPlayerId(GetTriggerPlayer())] = ( udg_LoadCharAttempts[GetConvertedPlayerId(GetTriggerPlayer())] + 1 )
if ( Trig_Load_Char_Copy_Func003C() ) then
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1362" )
return
else
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), ( "You have used the -load char feature " + ( I2S(udg_LoadCharAttempts[GetConvertedPlayerId(GetTriggerPlayer())]) + " numer of times, you have 5 chances in all." ) ) )
endif
if ( Trig_Load_Char_Copy_Func004C() ) then
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1364" )
return
else
call ForGroupBJ( GetUnitsInRectOfPlayer(GetPlayableMapRect(), GetTriggerPlayer()), function Trig_Load_Char_Copy_Func004Func002A )
endif
call DisableTrigger( GetTriggeringTrigger() )
set udg_Playername = GetPlayerName(GetTriggerPlayer())
set udg_LoadString = GetEventPlayerChatString()
call TriggerExecute( gg_trg_Randomize_Copy )
set udg_Base32Input = ( "a" + SubStringBJ(udg_LoadString, 12, 13) )
call TriggerExecute( gg_trg_Base32_to_Base10 )
set udg_UnitNumber = ( udg_Base10Output / udg_RandomizeCode )
set udg_Base32Input = SubStringBJ(udg_LoadString, 14, 16)
call TriggerExecute( gg_trg_Base32_to_Base10 )
set udg_LoadLevel = ( udg_Base10Output / ( udg_RandomizeCode * ( ModuloInteger(udg_UnitNumber, 9) + 1 ) ) )
if ( Trig_Load_Char_Copy_Func017C() ) then
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1365" )
call EnableTrigger( GetTriggeringTrigger() )
return
else
call DoNothing( )
endif
call ForGroupBJ( GetUnitsOfPlayerMatching(GetTriggerPlayer(), Condition(function Trig_Load_Char_Copy_Func018001002)), function Trig_Load_Char_Copy_Func018002 )
if ( Trig_Load_Char_Copy_Func019001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H00W', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func020001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H00O', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func021001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H00P', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func022001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H013', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func023001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H022', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func024001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H006', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func025001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H01B', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func026001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H01L', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func027001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H01F', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func028001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H002', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func029001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H010', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func030001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H01S', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func031001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H00T', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func032001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H01D', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func033001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H01I', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func034001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H014', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func035001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H024', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func036001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H023', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func037001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H01K', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func038001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H01C', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func039001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H021', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func040001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H01Q', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func041001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H01H', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func042001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H00Y', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func043001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H01A', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func044001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H001', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func045001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H025', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func046001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H00R', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func047001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H018', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func048001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H012', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func049001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H007', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func050001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H01M', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func051001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H01X', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func052001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H01U', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func053001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H004', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func054001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H020', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func055001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H00V', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func056001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H01V', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func057001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H008', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func058001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H016', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func059001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H00Q', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func060001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H011', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func061001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H01W', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func062001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H015', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func063001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H01P', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func064001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H00N', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func065001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H005', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func066001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H01J', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func067001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H01T', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func068001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H019', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func069001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H01Z', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func070001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H00U', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func071001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H01R', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func072001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H01N', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func073001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H00Z', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func074001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H003', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func075001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H017', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func076001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H000', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func077001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H00S', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func078001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H00X', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func079001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H01Y', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func080001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H01E', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func081001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H01G', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func082001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'E00J', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
if ( Trig_Load_Char_Copy_Func083001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'H01O', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
set udg_ClassAbilityGained[GetConvertedPlayerId(GetTriggerPlayer())] = 0
call SetHeroLevelBJ( GetLastCreatedUnit(), udg_LoadLevel, true )
call TriggerSleepAction( 0.50 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call UnitRemoveItemFromSlotSwapped( GetForLoopIndexA(), GetLastCreatedUnit() )
call RemoveItem( GetLastRemovedItem() )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopBIndex = 0
set bj_forLoopBIndexEnd = 5
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
set udg_Base32Input = ( "a" + SubStringBJ(udg_LoadString, ( 17 + ( GetForLoopIndexB() * 2 ) ), ( 18 + ( GetForLoopIndexB() * 2 ) )) )
call TriggerExecute( gg_trg_Base32_to_Base10 )
set udg_ItemNumber = ( ( udg_Base10Output - ( udg_UnitNumber + GetForLoopIndexB() ) ) / ( ModuloInteger(udg_RandomizeCode, 2) + 1 ) )
set udg_ItemNumber = ( udg_ItemNumber + 100 )
if ( Trig_Load_Char_Copy_Func088Func005C() ) then
if ( Trig_Load_Char_Copy_Func088Func005Func002C() ) then
call DoNothing( )
else
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), ( ( "|c00ff0000ERROR:Code Error Bit |r" + I2S(( GetForLoopIndexB() + 3 )) ) + " Continuing Load..." ) )
endif
else
call CreateItemLoc( udg_InitializeItems[udg_ItemNumber], GetUnitLoc(GroupPickRandomUnit(GetUnitsOfPlayerAll(GetTriggerPlayer()))) )
call SetItemUserData( GetLastCreatedItem(), GetConvertedPlayerId(GetTriggerPlayer()) )
call UnitAddItemSwapped( GetLastCreatedItem(), GroupPickRandomUnit(GetUnitsOfPlayerMatching(GetTriggerPlayer(), Condition(function Trig_Load_Char_Copy_Func088Func005Func004002001002))) )
endif
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
call EnableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Load_Char_Copy takes nothing returns nothing
set gg_trg_Load_Char_Copy = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Load_Char_Copy, Player(0), "-load char", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Load_Char_Copy, Player(1), "-load char", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Load_Char_Copy, Player(2), "-load char", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Load_Char_Copy, Player(3), "-load char", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Load_Char_Copy, Player(4), "-load char", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Load_Char_Copy, Player(5), "-load char", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Load_Char_Copy, Player(6), "-load char", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Load_Char_Copy, Player(7), "-load char", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Load_Char_Copy, Player(8), "-load char", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Load_Char_Copy, Player(9), "-load char", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Load_Char_Copy, Player(10), "-load char", false )
call TriggerAddCondition( gg_trg_Load_Char_Copy, Condition( function Trig_Load_Char_Copy_Conditions ) )
call TriggerAddAction( gg_trg_Load_Char_Copy, function Trig_Load_Char_Copy_Actions )
endfunction
function Trig_Initialize_Items_Actions takes nothing returns nothing
set udg_InitializeItems[190] = 'I02X'
set udg_InitializeItems[191] = 'I02Y'
set udg_InitializeItems[192] = 'I02Z'
set udg_InitializeItems[193] = 'I030'
set udg_InitializeItems[196] = 'I02Q'
set udg_InitializeItems[197] = 'I03F'
set udg_InitializeItems[202] = 'I019'
set udg_InitializeItems[203] = 'I01A'
set udg_InitializeItems[204] = 'I01B'
set udg_InitializeItems[214] = 'I010'
set udg_InitializeItems[215] = 'I011'
set udg_InitializeItems[220] = 'I02R'
set udg_InitializeItems[226] = 'I02U'
set udg_InitializeItems[227] = 'I02T'
set udg_InitializeItems[232] = 'I02V'
set udg_InitializeItems[233] = 'I02W'
set udg_InitializeItems[238] = 'I009'
set udg_InitializeItems[239] = 'I002'
set udg_InitializeItems[240] = 'I001'
set udg_InitializeItems[244] = 'I032'
set udg_InitializeItems[245] = 'I031'
set udg_InitializeItems[250] = 'I033'
set udg_InitializeItems[251] = 'I035'
set udg_InitializeItems[252] = 'I034'
set udg_InitializeItems[256] = 'I01G'
set udg_InitializeItems[257] = 'I01H'
set udg_InitializeItems[262] = 'I018'
set udg_InitializeItems[263] = 'I016'
set udg_InitializeItems[264] = 'I015'
set udg_InitializeItems[268] = 'I037'
set udg_InitializeItems[269] = 'I036'
set udg_InitializeItems[274] = 'I014'
set udg_InitializeItems[275] = 'I01D'
set udg_InitializeItems[276] = 'I01E'
set udg_InitializeItems[277] = 'I01F'
set udg_InitializeItems[280] = 'I039'
set udg_InitializeItems[281] = 'I038'
set udg_InitializeItems[282] = 'I03A'
set udg_InitializeItems[286] = 'I03B'
set udg_InitializeItems[287] = 'I03C'
set udg_InitializeItems[288] = 'I03D'
set udg_InitializeItems[289] = 'I03E'
set udg_InitializeItems[292] = 'I013'
set udg_InitializeItems[293] = 'I017'
set udg_InitializeItems[298] = 'I01C'
set udg_InitializeItems[299] = 'I012'
set udg_InitializeItems[304] = 'I044'
set udg_InitializeItems[305] = 'I03Y'
set udg_InitializeItems[306] = 'I03S'
set udg_InitializeItems[307] = 'I02L'
set udg_InitializeItems[308] = 'I00F'
set udg_InitializeItems[309] = 'I00Z'
set udg_InitializeItems[310] = 'I04C'
set udg_InitializeItems[311] = 'I00D'
set udg_InitializeItems[312] = 'I042'
set udg_InitializeItems[313] = 'I00R'
set udg_InitializeItems[314] = 'I00P'
set udg_InitializeItems[315] = 'I00T'
set udg_InitializeItems[316] = 'I02O'
set udg_InitializeItems[317] = 'I022'
set udg_InitializeItems[318] = 'I01K'
set udg_InitializeItems[319] = 'I01J'
set udg_InitializeItems[320] = 'I01L'
set udg_InitializeItems[321] = 'I02N'
set udg_InitializeItems[322] = 'I01W'
set udg_InitializeItems[323] = 'I041'
set udg_InitializeItems[324] = 'I043'
set udg_InitializeItems[325] = 'I040'
set udg_InitializeItems[326] = 'I02K'
set udg_InitializeItems[327] = 'I047'
set udg_InitializeItems[328] = 'I000'
set udg_InitializeItems[329] = 'I00U'
set udg_InitializeItems[330] = 'I00S'
set udg_InitializeItems[331] = 'I00Q'
set udg_InitializeItems[332] = 'I01I'
set udg_InitializeItems[333] = 'I01P'
set udg_InitializeItems[334] = 'I01U'
set udg_InitializeItems[335] = 'I01N'
set udg_InitializeItems[336] = 'I02P'
set udg_InitializeItems[337] = 'I021'
set udg_InitializeItems[338] = 'I03R'
set udg_InitializeItems[339] = 'I01O'
set udg_InitializeItems[340] = 'I046'
set udg_InitializeItems[341] = 'I024'
set udg_InitializeItems[342] = 'I023'
set udg_InitializeItems[343] = 'I01R'
set udg_InitializeItems[344] = 'I02S'
set udg_InitializeItems[345] = 'I02H'
set udg_InitializeItems[346] = 'I048'
set udg_InitializeItems[347] = 'I00H'
set udg_InitializeItems[348] = 'I04B'
set udg_InitializeItems[349] = 'I01M'
set udg_InitializeItems[350] = 'I049'
set udg_InitializeItems[351] = 'I01Y'
set udg_InitializeItems[352] = 'I01T'
set udg_InitializeItems[353] = 'I00C'
set udg_InitializeItems[354] = 'I01X'
set udg_InitializeItems[355] = 'I02M'
set udg_InitializeItems[356] = 'I00G'
set udg_InitializeItems[357] = 'I01Q'
set udg_InitializeItems[358] = 'I03Q'
set udg_InitializeItems[359] = 'I00Y'
set udg_InitializeItems[360] = 'I01V'
set udg_InitializeItems[361] = 'I01Z'
set udg_InitializeItems[362] = 'I02I'
set udg_InitializeItems[363] = 'I020'
set udg_InitializeItems[364] = 'I025'
set udg_InitializeItems[365] = 'I02J'
set udg_InitializeItems[366] = 'I00X'
set udg_InitializeItems[367] = 'I00W'
set udg_InitializeItems[368] = 'I00V'
set udg_InitializeItems[369] = 'I00B'
set udg_InitializeItems[370] = 'I04A'
set udg_InitializeItems[371] = 'I01S'
set udg_InitializeItems[372] = 'I045'
set udg_InitializeItems[373] = 'I00E'
set udg_InitializeItems[374] = 'I008'
set udg_InitializeItems[375] = 'I027'
set udg_InitializeItems[376] = 'I03J'
set udg_InitializeItems[377] = 'I026'
set udg_InitializeItems[378] = 'I03T'
set udg_InitializeItems[379] = 'I007'
set udg_InitializeItems[380] = 'I03I'
set udg_InitializeItems[381] = 'I03L'
set udg_InitializeItems[382] = 'I00L'
set udg_InitializeItems[383] = 'I04K'
set udg_InitializeItems[384] = 'I006'
set udg_InitializeItems[385] = 'I03G'
set udg_InitializeItems[386] = 'I00M'
set udg_InitializeItems[387] = 'I03V'
set udg_InitializeItems[388] = 'I00K'
set udg_InitializeItems[389] = 'I00A'
set udg_InitializeItems[390] = 'I03W'
set udg_InitializeItems[391] = 'I02A'
set udg_InitializeItems[392] = 'I003'
set udg_InitializeItems[393] = 'I028'
set udg_InitializeItems[394] = 'I03U'
set udg_InitializeItems[395] = 'I03H'
set udg_InitializeItems[396] = 'I02D'
set udg_InitializeItems[397] = 'I03K'
set udg_InitializeItems[398] = 'I00I'
set udg_InitializeItems[399] = 'I029'
set udg_InitializeItems[400] = 'I02C'
set udg_InitializeItems[401] = 'I02B'
set udg_InitializeItems[402] = 'I02E'
set udg_InitializeItems[403] = 'I005'
set udg_InitializeItems[404] = 'I00N'
set udg_InitializeItems[405] = 'I02G'
set udg_InitializeItems[406] = 'I03M'
set udg_InitializeItems[408] = 'I00J'
set udg_InitializeItems[410] = 'I00O'
set udg_InitializeItems[412] = 'I02F'
set udg_InitializeItems[414] = 'I03X'
set udg_InitializeItems[415] = 'I04N'
set udg_InitializeItems[416] = 'I04R'
set udg_InitializeItems[417] = 'I04O'
set udg_InitializeItems[418] = 'I04Q'
set udg_InitializeItems[419] = 'I04T'
set udg_InitializeItems[420] = 'I04P'
set udg_InitializeItems[421] = 'I04S'
set udg_InitializeItems[422] = 'I04Z'
set udg_InitializeItems[423] = 'I050'
set udg_InitializeItems[424] = 'I051'
set udg_InitializeItems[425] = 'I054'
set udg_InitializeItems[426] = 'I055'
set udg_InitializeItems[427] = 'I059'
set udg_InitializeItems[428] = 'I05G'
set udg_InitializeItems[429] = 'I05F'
set udg_InitializeItems[430] = 'I05H'
set udg_InitializeItems[431] = 'I05I'
set udg_InitializeItems[432] = 'I05J'
set udg_InitializeItems[433] = 'I05L'
set udg_InitializeItems[434] = 'I05N'
set udg_InitializeItems[435] = 'I05M'
set udg_InitializeItems[436] = 'I05C'
set udg_InitializeItems[437] = 'I05E'
set udg_InitializeItems[438] = 'I05A'
set udg_InitializeItems[439] = 'I05B'
set udg_InitializeItems[440] = 'I05D'
set udg_InitializeItems[441] = 'I05Q'
set udg_InitializeItems[442] = 'I05R'
set udg_InitializeItems[443] = 'I05S'
set udg_InitializeItems[444] = 'I05P'
set udg_InitializeItems[445] = 'I05O'
set udg_InitializeItems[446] = 'I063'
set udg_InitializeItems[447] = 'I062'
set udg_InitializeItems[448] = 'I061'
set udg_InitializeItems[449] = 'I060'
set udg_InitializeItems[450] = 'I05U'
set udg_InitializeItems[451] = 'I05V'
set udg_InitializeItems[452] = 'I05W'
set udg_InitializeItems[453] = 'I05Y'
set udg_InitializeItems[454] = 'I05T'
set udg_InitializeItems[455] = 'I05X'
set udg_InitializeItems[456] = 'I064'
set udg_InitializeItems[457] = 'I05Z'
set udg_InitializeItems[458] = 'I065'
set udg_InitializeItems[459] = 'I069'
set udg_InitializeItems[459] = 'I068'
set udg_InitializeItems[459] = 'I068'
set udg_InitializeItems[459] = 'I068'
set udg_InitializeItems[459] = 'I068'
endfunction
//===========================================================================
function InitTrig_Initialize_Items takes nothing returns nothing
set gg_trg_Initialize_Items = CreateTrigger( )
call TriggerAddAction( gg_trg_Initialize_Items, function Trig_Initialize_Items_Actions )
endfunction
function Trig_Disable_Loading_Warning_Actions takes nothing returns nothing
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_1366" )
endfunction
//===========================================================================
function InitTrig_Disable_Loading_Warning takes nothing returns nothing
set gg_trg_Disable_Loading_Warning = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Disable_Loading_Warning, 420.00 )
call TriggerAddAction( gg_trg_Disable_Loading_Warning, function Trig_Disable_Loading_Warning_Actions )
endfunction
function Trig_Save_Morb_Conditions takes nothing returns boolean
if ( not ( SubStringBJ(GetEventPlayerChatString(), 1, 10) == "-save Morb" ) ) then
return false
endif
return true
endfunction
function Trig_Save_Morb_Func004Func001Func001C takes nothing returns boolean
if ( ( false == true ) ) then
return true
endif
return false
endfunction
function Trig_Save_Morb_Func004Func001C takes nothing returns boolean
if ( not Trig_Save_Morb_Func004Func001Func001C() ) then
return false
endif
return true
endfunction
function Trig_Save_Morb_Func004Func005001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'ewsp' )
endfunction
function Trig_Save_Morb_Func004Func006001 takes nothing returns boolean
return ( udg_Part1 != "NONE" )
endfunction
function Trig_Save_Morb_Func004A takes nothing returns nothing
if ( Trig_Save_Morb_Func004Func001C() ) then
return
else
endif
set udg_LevelCode = GetHeroLevel(GetEnumUnit())
set udg_Mathmo = ( GetHeroLevel(GetEnumUnit()) + ( 400 / 3 ) )
set udg_LoadLevelCode = I2S(udg_Mathmo)
if ( Trig_Save_Morb_Func004Func005001() ) then
set udg_Part1 = "59"
else
call DoNothing( )
endif
if ( Trig_Save_Morb_Func004Func006001() ) then
set udg_SavingHero = GetEnumUnit()
else
call DoNothing( )
endif
endfunction
function Trig_Save_Morb_Func005C takes nothing returns boolean
if ( not ( udg_Part1 == "NONE" ) ) then
return false
endif
return true
endfunction
function Trig_Save_Morb_Func015Func001Func001001 takes nothing returns boolean
return ( GetItemTypeId(UnitItemInSlotBJ(udg_SavingHero, ( GetForLoopIndexB() + 1 ))) == udg_InitializeItems[GetForLoopIndexA()] )
endfunction
function Trig_Save_Morb_Func016Func001Func001C takes nothing returns boolean
if ( not ( udg_CarriedItems[udg_WhileLoop] > udg_CarriedItems[GetForLoopIndexB()] ) ) then
return false
endif
return true
endfunction
function Trig_Save_Morb_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
set udg_Part1 = "NONE"
call ForGroupBJ( GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), 'ewsp'), function Trig_Save_Morb_Func004A )
if ( Trig_Save_Morb_Func005C() ) then
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1367" )
call EnableTrigger( GetTriggeringTrigger() )
return
else
endif
set udg_Playername = GetPlayerName(GetTriggerPlayer())
call TriggerExecute( gg_trg_Randomize_Copy )
set udg_Base10Input = ( S2I(udg_Part1) * udg_RandomizeCode )
call TriggerExecute( gg_trg_Base10_to_Base32 )
set udg_SaveCode[0] = ( udg_Base32String[1] + udg_Base32String[0] )
set udg_Base10Input = ( ( udg_LevelCode * udg_RandomizeCode ) * ( ModuloInteger(S2I(udg_Part1), 9) + 1 ) )
call TriggerExecute( gg_trg_Base10_to_Base32 )
set udg_SaveCode[1] = ( ( udg_Base32String[2] + udg_Base32String[1] ) + udg_Base32String[0] )
set bj_forLoopAIndex = 0
set bj_forLoopAIndexEnd = 5
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set udg_CarriedItems[GetForLoopIndexA()] = 500
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopBIndex = 0
set bj_forLoopBIndexEnd = 5
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
set bj_forLoopAIndex = 190
set bj_forLoopAIndexEnd = 458
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Save_Morb_Func015Func001Func001001() ) then
set udg_CarriedItems[GetForLoopIndexB()] = GetForLoopIndexA()
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
set udg_WhileLoop = 0
loop
exitwhen udg_WhileLoop > 4
set bj_forLoopBIndex = ( udg_WhileLoop + 1 )
set bj_forLoopBIndexEnd = 5
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
if ( Trig_Save_Morb_Func016Func001Func001C() ) then
set udg_SortTempInt = udg_CarriedItems[udg_WhileLoop]
set udg_CarriedItems[udg_WhileLoop] = udg_CarriedItems[GetForLoopIndexB()]
set udg_CarriedItems[GetForLoopIndexB()] = udg_SortTempInt
else
endif
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
set udg_WhileLoop = udg_WhileLoop + 1
endloop
set bj_forLoopBIndex = 0
set bj_forLoopBIndexEnd = 5
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
set udg_Base10Input = ( ( S2I(udg_Part1) + GetForLoopIndexB() ) + ( ( udg_CarriedItems[GetForLoopIndexB()] - 100 ) * ( ModuloInteger(udg_RandomizeCode, 2) + 1 ) ) )
call TriggerExecute( gg_trg_Base10_to_Base32 )
set udg_SaveCode[( GetForLoopIndexB() + 2 )] = ( udg_Base32String[1] + udg_Base32String[0] )
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
set udg_FinalCode = ( ( ( udg_SaveCode[0] + udg_SaveCode[1] ) + ( udg_SaveCode[2] + udg_SaveCode[3] ) ) + ( ( udg_SaveCode[4] + udg_SaveCode[5] ) + ( udg_SaveCode[6] + ( udg_SaveCode[7] + udg_LoadLevelCode ) ) ) )
call DisplayTimedTextToForce( GetForceOfPlayer(GetTriggerPlayer()), 200.00, "TRIGSTR_1368" )
call DisplayTimedTextToForce( GetForceOfPlayer(GetTriggerPlayer()), 200.00, ( ( ( "Character: " + udg_HeroName[GetConvertedPlayerId(GetTriggerPlayer())] ) + " - " ) + ( "Loading Code: " + udg_FinalCode ) ) )
call EnableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Save_Morb takes nothing returns nothing
set gg_trg_Save_Morb = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Save_Morb, Player(0), "-save Morb", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Save_Morb, Player(1), "-save Morb", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Save_Morb, Player(2), "-save Morb", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Save_Morb, Player(3), "-save Morb", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Save_Morb, Player(4), "-save Morb", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Save_Morb, Player(5), "-save Morb", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Save_Morb, Player(6), "-save Morb", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Save_Morb, Player(7), "-save Morb", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Save_Morb, Player(8), "-save Morb", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Save_Morb, Player(9), "-save Morb", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Save_Morb, Player(10), "-save Morb", true )
call TriggerAddCondition( gg_trg_Save_Morb, Condition( function Trig_Save_Morb_Conditions ) )
call TriggerAddAction( gg_trg_Save_Morb, function Trig_Save_Morb_Actions )
endfunction
function Trig_Disable_Loading_Actions takes nothing returns nothing
call DisableTrigger( gg_trg_Load_Char_Copy )
call DisableTrigger( gg_trg_Repick )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_1369" )
endfunction
//===========================================================================
function InitTrig_Disable_Loading takes nothing returns nothing
set gg_trg_Disable_Loading = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Disable_Loading, 480.00 )
call TriggerAddAction( gg_trg_Disable_Loading, function Trig_Disable_Loading_Actions )
endfunction
function Trig_Load_Morb_Conditions takes nothing returns boolean
if ( not ( SubStringBJ(GetEventPlayerChatString(), 1, 10) == "-load Morb" ) ) then
return false
endif
return true
endfunction
function Trig_Load_Morb_Func003C takes nothing returns boolean
if ( not ( udg_MorbLoadAttempts[GetConvertedPlayerId(GetTriggerPlayer())] >= 50 ) ) then
return false
endif
return true
endfunction
function Trig_Load_Morb_Func004Func001C takes nothing returns boolean
if ( ( StringLength(GetEventPlayerChatString()) != 31 ) ) then
return true
endif
return false
endfunction
function Trig_Load_Morb_Func004Func002Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'ewsp' ) ) then
return false
endif
return true
endfunction
function Trig_Load_Morb_Func004Func002A takes nothing returns nothing
if ( Trig_Load_Morb_Func004Func002Func001C() ) then
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1371" )
return
else
call DoNothing( )
endif
endfunction
function Trig_Load_Morb_Func004C takes nothing returns boolean
if ( not Trig_Load_Morb_Func004Func001C() ) then
return false
endif
return true
endfunction
function Trig_Load_Morb_Func016Func002C takes nothing returns boolean
if ( ( udg_UnitNumber > 64 ) ) then
return true
endif
if ( ( udg_UnitNumber < 1 ) ) then
return true
endif
if ( ( udg_LoadLevel > 1000 ) ) then
return true
endif
if ( ( udg_LoadLevel < 0 ) ) then
return true
endif
return false
endfunction
function Trig_Load_Morb_Func016C takes nothing returns boolean
if ( not Trig_Load_Morb_Func016Func002C() ) then
return false
endif
return true
endfunction
function Trig_Load_Morb_Func017002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Load_Morb_Func018001 takes nothing returns boolean
return ( udg_UnitNumber == 59 )
endfunction
function Trig_Load_Morb_Func023Func005Func004C takes nothing returns boolean
if ( not ( udg_ItemNumber == 500 ) ) then
return false
endif
return true
endfunction
function Trig_Load_Morb_Func023Func005Func005Func001001 takes nothing returns boolean
return ( udg_ItemNumber < 190 )
endfunction
function Trig_Load_Morb_Func023Func005Func005Func001002 takes nothing returns boolean
return ( udg_ItemNumber > 458 )
endfunction
function Trig_Load_Morb_Func023Func005Func005C takes nothing returns boolean
if ( GetBooleanOr( Trig_Load_Morb_Func023Func005Func005Func001001(), Trig_Load_Morb_Func023Func005Func005Func001002() ) ) then
return true
endif
if ( ( udg_InitializeItems[udg_ItemNumber] == 'I04M' ) ) then
return true
endif
return false
endfunction
function Trig_Load_Morb_Func023Func005C takes nothing returns boolean
if ( not Trig_Load_Morb_Func023Func005Func005C() ) then
return false
endif
return true
endfunction
function Trig_Load_Morb_Actions takes nothing returns nothing
set udg_PlayerLoadingMorb = GetTriggerPlayer()
set udg_MorbLoadAttempts[GetConvertedPlayerId(GetTriggerPlayer())] = ( udg_MorbLoadAttempts[GetConvertedPlayerId(GetTriggerPlayer())] + 1 )
if ( Trig_Load_Morb_Func003C() ) then
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1370" )
return
else
endif
if ( Trig_Load_Morb_Func004C() ) then
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1372" )
return
else
call ForGroupBJ( GetUnitsInRectOfPlayer(GetPlayableMapRect(), GetTriggerPlayer()), function Trig_Load_Morb_Func004Func002A )
endif
call DisableTrigger( GetTriggeringTrigger() )
set udg_Playername = GetPlayerName(GetTriggerPlayer())
set udg_LoadString = GetEventPlayerChatString()
call TriggerExecute( gg_trg_Randomize_Copy )
set udg_Base32Input = ( "a" + SubStringBJ(udg_LoadString, 12, 13) )
call TriggerExecute( gg_trg_Base32_to_Base10 )
set udg_UnitNumber = ( udg_Base10Output / udg_RandomizeCode )
set udg_Base32Input = SubStringBJ(udg_LoadString, 14, 16)
call TriggerExecute( gg_trg_Base32_to_Base10 )
set udg_LoadLevel = ( udg_Base10Output / ( udg_RandomizeCode * ( ModuloInteger(udg_UnitNumber, 9) + 1 ) ) )
if ( Trig_Load_Morb_Func016C() ) then
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "TRIGSTR_1373" )
call EnableTrigger( GetTriggeringTrigger() )
return
else
call DoNothing( )
endif
call ForGroupBJ( GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), 'ewsp'), function Trig_Load_Morb_Func017002 )
if ( Trig_Load_Morb_Func018001() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'ewsp', GetTriggerPlayer(), GetRectCenter(gg_rct_Enter_the_World), GetUnitLoc(GetTriggerUnit()) )
else
call DoNothing( )
endif
set udg_ClassAbilityGained[GetConvertedPlayerId(GetTriggerPlayer())] = 0
call SetHeroLevelBJ( GetLastCreatedUnit(), udg_LoadLevel, true )
call TriggerSleepAction( 0.50 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call UnitRemoveItemFromSlotSwapped( GetForLoopIndexA(), GetLastCreatedUnit() )
call RemoveItem( GetLastRemovedItem() )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopBIndex = 0
set bj_forLoopBIndexEnd = 5
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
set udg_Base32Input = ( "a" + SubStringBJ(udg_LoadString, ( 17 + ( GetForLoopIndexB() * 2 ) ), ( 18 + ( GetForLoopIndexB() * 2 ) )) )
call TriggerExecute( gg_trg_Base32_to_Base10 )
set udg_ItemNumber = ( ( udg_Base10Output - ( udg_UnitNumber + GetForLoopIndexB() ) ) / ( ModuloInteger(udg_RandomizeCode, 2) + 1 ) )
set udg_ItemNumber = ( udg_ItemNumber + 100 )
if ( Trig_Load_Morb_Func023Func005C() ) then
if ( Trig_Load_Morb_Func023Func005Func004C() ) then
call DoNothing( )
else
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), ( ( "|c00ff0000ERROR:Code Error Bit |r" + I2S(( GetForLoopIndexB() + 3 )) ) + " Continuing Load..." ) )
endif
else
call CreateItemLoc( udg_InitializeItems[udg_ItemNumber], GetUnitLoc(GroupPickRandomUnit(GetUnitsOfPlayerAll(GetTriggerPlayer()))) )
call SetItemUserData( GetLastCreatedItem(), GetConvertedPlayerId(GetTriggerPlayer()) )
call UnitAddItemSwapped( GetLastCreatedItem(), GroupPickRandomUnit(GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), 'ewsp')) )
endif
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
call EnableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Load_Morb takes nothing returns nothing
set gg_trg_Load_Morb = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Load_Morb, Player(0), "-load Morb", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Load_Morb, Player(1), "-load Morb", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Load_Morb, Player(2), "-load Morb", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Load_Morb, Player(3), "-load Morb", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Load_Morb, Player(4), "-load Morb", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Load_Morb, Player(5), "-load Morb", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Load_Morb, Player(6), "-load Morb", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Load_Morb, Player(7), "-load Morb", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Load_Morb, Player(8), "-load Morb", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Load_Morb, Player(9), "-load Morb", false )
call TriggerRegisterPlayerChatEvent( gg_trg_Load_Morb, Player(10), "-load Morb", false )
call TriggerAddCondition( gg_trg_Load_Morb, Condition( function Trig_Load_Morb_Conditions ) )
call TriggerAddAction( gg_trg_Load_Morb, function Trig_Load_Morb_Actions )
endfunction