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 |
//===========================================================================
//
// Final Fantasy Open RPG 1.[5]10A3.B.1
//
// Warcraft III map script
// Generated by the Warcraft III World Editor
// Date: Mon Feb 12 09:38:19 2007
// Map Author: Assassin_Lord
//
//===========================================================================
//***************************************************************************
//*
//* Global Variables
//*
//***************************************************************************
globals
// User-defined
integer udg_AlreadyCarryingEquip = 0
unit udg_TheRealUnit = null
boolean udg_CutsceneisOn = false
integer udg_DealDamage = 0
texttag array udg_CleanFloatingText
integer udg_LoopInteger = 0
player udg_PlayerWhoSummoned = null
effect array udg_SpecialEffectsClear
force udg_GoldPlayers = null
integer udg_DiceRoll = 0
boolean array udg_HigherCamera
string array udg_HeroName
boolean udg_InvalidJob = false
integer udg_RandomPotion = 0
integer udg_RandomSteal = 0
boolean array udg_HasShuriken
unit udg_JumpingUnit = null
string udg_Debug
integer udg_DebugLevel = 0
force udg_HumanPlayers = null
force udg_StealingPlayer = null
integer udg_DiceDrop = 0
unit udg_Meteor = null
integer udg_Base10Convert = 0
integer udg_UnitNumber = 0
string udg_Part1
string udg_FinalCode
integer udg_Base10Input = 0
integer udg_Base10Output = 0
string udg_Base32Input
integer udg_ItemNumber = 0
integer udg_LoadLevel = 0
integer udg_NumberOfPlayers = 0
dialog udg_TutorialDialog = null
button udg_YesButton = null
button udg_StartGameButton = null
integer udg_TutorialCounter = 0
boolean udg_QuestLetter = false
boolean udg_QuestAle = false
boolean udg_QuestCactuar = false
boolean udg_HasQuestItem = false
dialog udg_SelectItem = null
button array udg_MateriaPick
string udg_Playername
integer udg_RandomizeCode = 0
integer udg_LevelCode = 0
boolean array udg_PlayerHasAlreadyEnteredCode
integer udg_PlayersWhoHaveChosen = 0
integer array udg_InitializeItems
unit udg_AeroAnimation = null
boolean udg_QuestAdamontoise = false
quest array udg_Quests
dialog udg_SwampDefense = null
button udg_NoButton = null
dialog udg_ElfDefense = null
dialog udg_VakorDefense = null
leaderboard udg_VakorLeaderBoard = null
timer udg_VakorTimer = null
effect array udg_QuestMarkSpecialEffect
integer array udg_ClassAbilityGained
integer array udg_Base32Int
integer udg_WhileLoop = 0
string array udg_Base32String
integer array udg_CarriedItems
string array udg_SaveCode
integer udg_SortTempInt = 0
unit udg_SavingHero = null
string udg_LoadString
unit udg_MagicalOrb = null
unit udg_MagicalOrbDonor = null
item udg_ItemBeingManipulated = null
unit udg_OnionKid = null
string array udg_colors
integer udg_Life = 0
integer array udg_Xmagix
player array udg_Blueban
integer array udg_NumberofRepicks
boolean udg_QuestSatyrShop = false
boolean udg_QuestSatyrPrisoner = false
integer udg_Bowequiped = 0
integer udg_ArrowsEquiped = 0
integer udg_AntiCheat = 0
integer udg_AntiCheat_Copy = 0
unit udg_PiratePlayer = null
unit udg_WizardPlayer = null
integer udg_EmeraldRing = 0
integer udg_OnyxRing = 0
integer udg_MysticRing = 0
item udg_ItemvalueNone = null
dialog udg_PirateDefense = null
unit udg_DemonSlayerBowPlayer = null
boolean udg_KefkaQuest = false
integer udg_KefkaCount = 0
dialog udg_LevelRange = null
button array udg_LevelRangeButton
unit udg_DemonSlayerWarriorPlayer = null
effect udg_WarriorSetEffectLeft = null
effect udg_WarriorSetEffectRight = null
effect udg_PirateEffectLeft = null
effect udg_PirateEffectRight = null
unit udg_DukatiAssassin = null
effect udg_DukatiEffectLeft = null
effect udg_DukatiEffectRight = null
unit udg_JursachianUnit = null
effect udg_JursachiEffect = null
effect udg_JursachiEffect2 = null
boolean array udg_PlayerHasAlreadyEnteredCodeOrb
effect udg_Angeliceffect = null
effect udg_Angeliceffect2 = null
unit udg_AngelicUnit = null
integer udg_AngelicRing = 0
string udg_debugColor
integer udg_debugLeveler = 0
player udg_debugPlayer = null
string udg_DebugLevelNumber
string udg_LoadLevelCode
integer udg_Mathmo = 0
boolean udg_MakerisHere = false
integer array udg_MorbLoadAttempts
integer array udg_LoadCharAttempts
player udg_PlayerLoadingCode = null
player udg_PlayerLoadingMorb = null
unit array udg_UnitToRecieveItem
integer array udg_LoopIntegerPlayer
player udg_Assassin_Lord = null
player array udg_MacSpiffy117
// Generated
rect gg_rct_Cactaur_Deserts = null
rect gg_rct_Calm_Lands = null
rect gg_rct_Calm_Lands_entrance = null
rect gg_rct_Choose_Amarant = null
rect gg_rct_Choose_Butz = null
rect gg_rct_Choose_Tellah = null
rect gg_rct_Choose_Kimari = null
rect gg_rct_Choose_Leonhart = null
rect gg_rct_Choose_Quistis = null
rect gg_rct_Choose_Terra = null
rect gg_rct_Cid_Cutscene = null
rect gg_rct_Dark_Forest = null
rect gg_rct_Dead_Marshes = null
rect gg_rct_Dead_Marshes_Entrance = null
rect gg_rct_Enter_Elf_City = null
rect gg_rct_Enter_the_World = null
rect gg_rct_Great_Forest = null
rect gg_rct_Gurgan_Village = null
rect gg_rct_Icecap = null
rect gg_rct_Large_Medium_Area = null
rect gg_rct_Medium_Casting_Area = null
rect gg_rct_Mountains = null
rect gg_rct_Plains = null
rect gg_rct_Region_013 = null
rect gg_rct_Small_Casting_Area = null
rect gg_rct_Tropical_Island = null
rect gg_rct_Odin = null
rect gg_rct_Tropical_Peninsula = null
rect gg_rct_The_Beach = null
rect gg_rct_Mushroom_Forest = null
rect gg_rct_Southern_Forest = null
rect gg_rct_Southern_Tundra = null
rect gg_rct_Ancient_Forest = null
rect gg_rct_The_Demon_Meadows = null
rect gg_rct_Kefkas_Stronghold = null
rect gg_rct_Ultima_Weapon = null
rect gg_rct_Giant_Lizard = null
rect gg_rct_Adamontoise = null
rect gg_rct_Ocean_Serpent = null
rect gg_rct_Create_Weapon = null
rect gg_rct_Wisp_Starting_Area = null
rect gg_rct_Tutorials = null
rect gg_rct_Tutorial_Items = null
rect gg_rct_Region_044 = null
rect gg_rct_Ship_Route_1 = null
rect gg_rct_Ship_Route_2 = null
rect gg_rct_Ship_Route_3 = null
rect gg_rct_Ship_Route_4 = null
rect gg_rct_Region_049 = null
rect gg_rct_Swamp_Town_Cutscene = null
rect gg_rct_Elf_Town = null
rect gg_rct_Swamp_Town = null
rect gg_rct_Vakor = null
rect gg_rct_Region_055 = null
rect gg_rct_Region_056 = null
rect gg_rct_Elf_Guard = null
rect gg_rct_Return_to_town = null
rect gg_rct_Evil_Ship_Spawn = null
rect gg_rct_Spawn_Battleship = null
rect gg_rct_Airship_Opening = null
rect gg_rct_Hero_Selection_Unit_Stopper = null
rect gg_rct_Hero_Selection_Unit_Stopper_Move = null
rect gg_rct_Life_Spawn = null
rect gg_rct_Elf_town_life = null
rect gg_rct_Satyr_Village = null
rect gg_rct_Pirate_Camp = null
rect gg_rct_Prisoner_Spawn = null
rect gg_rct_Denerall_Move = null
rect gg_rct_Spawn_Pirates = null
rect gg_rct_Guarditem = null
rect gg_rct_Pirate_Spawn_2 = null
rect gg_rct_SatyrLife = null
rect gg_rct_Pirate_Scout_Spawn = null
rect gg_rct_Pirate_Scout_Move = null
rect gg_rct_Naga_Spawn_east = null
rect gg_rct_Naga_Spawn_North = null
rect gg_rct_Naga_Spawn_West = null
rect gg_rct_Naga_Spawn_South = null
rect gg_rct_Naga_Attack = null
rect gg_rct_battle_kefka = null
rect gg_rct_Kefka_Outer_Ruins = null
rect gg_rct_Kefka_fight_no = null
rect gg_rct_Kefka_Fight_no_moved = null
rect gg_rct_Life_Spawn_Copy = null
rect gg_rct_Life_Spawn_Copy_2 = null
rect gg_rct_Life_Spawn_Copy_3 = null
rect gg_rct_Life_Spawn_Copy_4 = null
rect gg_rct_Choose_Sephiroth = null
rect gg_rct_Region_088 = null
rect gg_rct_Red_Items = null
rect gg_rct_Blue_Items = null
rect gg_rct_Teal_Items = null
rect gg_rct_Purple_Items = null
rect gg_rct_Orange_Items = null
rect gg_rct_Yellow_Items = null
rect gg_rct_Green_Items = null
rect gg_rct_Pink_Items = null
rect gg_rct_Gray_Items = null
rect gg_rct_Light_Blue_Items = null
rect gg_rct_Dark_Green_Items = null
camerasetup gg_cam_Camera_001 = null
camerasetup gg_cam_Camera_002 = null
camerasetup gg_cam_Camera_003 = null
camerasetup gg_cam_Camera_004 = null
camerasetup gg_cam_Camera_006 = null
camerasetup gg_cam_Camera_007 = null
camerasetup gg_cam_Opening_1 = null
camerasetup gg_cam_Opening_3 = null
camerasetup gg_cam_Opening_4 = null
camerasetup gg_cam_Opening_5 = null
camerasetup gg_cam_Opening_6 = null
camerasetup gg_cam_Marshes_1 = null
camerasetup gg_cam_Marshes_2 = null
camerasetup gg_cam_Calm_Lands = null
camerasetup gg_cam_Calm_Lands_2 = null
camerasetup gg_cam_Camera_025 = null
camerasetup gg_cam_Desert_1 = null
camerasetup gg_cam_Desert_2 = null
camerasetup gg_cam_SET_HEIGHT = null
camerasetup gg_cam_Beginning = null
camerasetup gg_cam_Ultima_Weapon = null
camerasetup gg_cam_Odin = null
camerasetup gg_cam_Tutorial = null
camerasetup gg_cam_Town1 = null
camerasetup gg_cam_Town2 = null
camerasetup gg_cam_Town3 = null
camerasetup gg_cam_Airship_Elf = null
camerasetup gg_cam_Airship_Gurgan = null
camerasetup gg_cam_Airship_Vakor = null
camerasetup gg_cam_Airship_Swamp = null
camerasetup gg_cam_Camera_040 = null
camerasetup gg_cam_Satyr_town_2 = null
camerasetup gg_cam_Satyr_town_1 = null
camerasetup gg_cam_Satyr_town_3 = null
camerasetup gg_cam_Satyr_town_4b = null
camerasetup gg_cam_Satyr_town_4a = null
camerasetup gg_cam_Satyr_Shop = null
camerasetup gg_cam_Satyr_Prisoner = null
camerasetup gg_cam_Satyr_Prisoner_Copy = null
camerasetup gg_cam_Satyr_Guard = null
camerasetup gg_cam_cid_talk = null
sound gg_snd_kefka = null
string gg_snd_Celtic_Moon
string gg_snd_Clouds_Theme
string gg_snd_Liberi_Fatali
string gg_snd_One_Winged_Angel
string gg_snd_Terras_theme
string gg_snd_DarkVictory
string gg_snd_SadMystery
string gg_snd_PursuitTheme
sound gg_snd_IllidanMorphedWhat4 = null
sound gg_snd_IllidanMorphedYesAttack2 = null
sound gg_snd_UtherTaunt2 = null
sound gg_snd_NazgrelWhat1 = null
sound gg_snd_SargerasLaugh = null
sound gg_snd_DivineShield = null
sound gg_snd_VultureWhat1 = null
sound gg_snd_IllidanWhat4 = null
sound gg_snd_IllidanYes1 = null
sound gg_snd_IllidanYesAttack3 = null
trigger gg_trg_Level_Fire = null
trigger gg_trg_Level_Fira = null
trigger gg_trg_Level_Thunder = null
trigger gg_trg_Level_Thundara = null
trigger gg_trg_Level_Blizzard = null
trigger gg_trg_Level_Blizzara = null
trigger gg_trg_Level_Cure = null
trigger gg_trg_Level_Cura = null
trigger gg_trg_Level_Curaga = null
trigger gg_trg_Level_Aero = null
trigger gg_trg_Level_Tornado = null
trigger gg_trg_Level_Comet = null
trigger gg_trg_Level_Meteo = null
trigger gg_trg_Level_Slow = null
trigger gg_trg_Level_Slowga = null
trigger gg_trg_Level_Shell = null
trigger gg_trg_Level_Demi = null
trigger gg_trg_Level_Drain = null
trigger gg_trg_Level_Life = null
trigger gg_trg_Level_Dia = null
trigger gg_trg_COTW = null
trigger gg_trg_Credits = null
trigger gg_trg_Select_levels = null
trigger gg_trg_Levels_1to50 = null
trigger gg_trg_Levels_50to120 = null
trigger gg_trg_Levels_120 = null
trigger gg_trg_Final_Boss_Kefka_Pre = null
trigger gg_trg_Final_Boss_Kefka_Pre2 = null
trigger gg_trg_Battle_Kefka_Cutscene = null
trigger gg_trg_Supernova = null
trigger gg_trg_Shadow_Flare = null
trigger gg_trg_Select = null
trigger gg_trg_Move = null
trigger gg_trg_Attack = null
trigger gg_trg_Animals = null
trigger gg_trg_Animals_Lose = null
trigger gg_trg_Aim = null
trigger gg_trg_Aim_Lose = null
trigger gg_trg_Xfight = null
trigger gg_trg_Xfight_Lose = null
trigger gg_trg_Charm = null
trigger gg_trg_Charm_Lose = null
trigger gg_trg_Berzerker_lvl_2_Bonus = null
trigger gg_trg_Berzerker_lvl_2_Bonus_Lose = null
trigger gg_trg_Bash = null
trigger gg_trg_Bash_Lose = null
trigger gg_trg_Black_Belt_Evasion = null
trigger gg_trg_Black_Belt_Evasion_lose = null
trigger gg_trg_Black_Belt_Aura = null
trigger gg_trg_Black_Belt_Aura_Lose = null
trigger gg_trg_Black_Belt_Battle_Call = null
trigger gg_trg_Black_Belt_Battle_Call_Lose = null
trigger gg_trg_Black_Mage_Bonus = null
trigger gg_trg_Black_Mage_Bonus_Lose = null
trigger gg_trg_Black_Mage_Death_Aura = null
trigger gg_trg_Black_Mage_Death_Aura_Lose = null
trigger gg_trg_Create_Potion = null
trigger gg_trg_Create_Potion_Lose = null
trigger gg_trg_Molotov_Cocktail = null
trigger gg_trg_Molotov_Cocktail_Lose = null
trigger gg_trg_Shizer_Geyser = null
trigger gg_trg_Shizer_Geyser_Lose = null
trigger gg_trg_Dark_Wave = null
trigger gg_trg_Dark_Wave_Lose = null
trigger gg_trg_Jump = null
trigger gg_trg_Jump_Lose = null
trigger gg_trg_Taunt = null
trigger gg_trg_Taunt_Lose = null
trigger gg_trg_Protect = null
trigger gg_trg_Protect_Lose = null
trigger gg_trg_Ensnare = null
trigger gg_trg_Ensnare_Lose = null
trigger gg_trg_Smoke = null
trigger gg_trg_Smoke_Lose = null
trigger gg_trg_Throw = null
trigger gg_trg_Throw_Lose = null
trigger gg_trg_Spell_Immunity = null
trigger gg_trg_Spell_Immunity_Lose = null
trigger gg_trg_Reflect = null
trigger gg_trg_Reflect_Lose = null
trigger gg_trg_Divine_Intervention = null
trigger gg_trg_Divine_Intervention_Lose = null
trigger gg_trg_Xmagic = null
trigger gg_trg_Xmagic_Lose = null
trigger gg_trg_Evasion = null
trigger gg_trg_Evasion_Lose = null
trigger gg_trg_Gil_Toss = null
trigger gg_trg_Gil_Toss_Lose = null
trigger gg_trg_Slash = null
trigger gg_trg_Slash_Lose = null
trigger gg_trg_Summoner_Bonus = null
trigger gg_trg_Summoner_Bonus_Lose = null
trigger gg_trg_Dash = null
trigger gg_trg_Dash_Lose = null
trigger gg_trg_Steal = null
trigger gg_trg_Steal_Lose = null
trigger gg_trg_Footwork = null
trigger gg_trg_Footwork_Lose = null
trigger gg_trg_Mug = null
trigger gg_trg_Mug_Lose = null
trigger gg_trg_Time_Phase = null
trigger gg_trg_Time_Phase_Lose = null
trigger gg_trg_Archer_Levelup_Abilities = null
trigger gg_trg_Beastmaster_Levelup_Abilities = null
trigger gg_trg_Berserker_Levelup_Abilities = null
trigger gg_trg_Black_Belt_Levelup_Abilities = null
trigger gg_trg_Black_Mage_Levelup_Abilities = null
trigger gg_trg_Chemist_Levelup_Abilities = null
trigger gg_trg_Dark_Knight_Levelup_Abilities = null
trigger gg_trg_Dragoon_Levelup_Abilities = null
trigger gg_trg_Fighter_Levelup_Abilities = null
trigger gg_trg_Hunter_Levelup_Abilities = null
trigger gg_trg_Ninja_Levelup_Abilities = null
trigger gg_trg_Paladin_Levelup_Abilities = null
trigger gg_trg_Red_Mage_Levelup_Abilities = null
trigger gg_trg_Sage_Levelup_Abilities = null
trigger gg_trg_Samurai_Levelup_Abilities = null
trigger gg_trg_Summoner_Levelup_Abilities = null
trigger gg_trg_Time_Mage_Levelup_Abilities = null
trigger gg_trg_Thief_Levelup_Abilities = null
trigger gg_trg_White_Mage_Levelup_Abilities = null
trigger gg_trg_Archer = null
trigger gg_trg_Berserker = null
trigger gg_trg_Beastmaster = null
trigger gg_trg_Black_Belt = null
trigger gg_trg_Black_Mage = null
trigger gg_trg_Chemist = null
trigger gg_trg_Dark_Knight = null
trigger gg_trg_Dragoon = null
trigger gg_trg_Hunter = null
trigger gg_trg_Fighter = null
trigger gg_trg_Ninja = null
trigger gg_trg_Paladin = null
trigger gg_trg_Red_Mage = null
trigger gg_trg_Sage = null
trigger gg_trg_Samurai = null
trigger gg_trg_Summoner = null
trigger gg_trg_Thief = null
trigger gg_trg_Time_Mage = null
trigger gg_trg_White_Mage = null
trigger gg_trg_Sephiroth = null
trigger gg_trg_Use_Heavy_Armor_Condition = null
trigger gg_trg_Use_Onion_Armor = null
trigger gg_trg_Full_Onion_Set = null
trigger gg_trg_Use_Sword_Condition = null
trigger gg_trg_Use_Bow_Condition = null
trigger gg_trg_Use_Spear_Condition = null
trigger gg_trg_Use_Knife_Condition = null
trigger gg_trg_Use_Axe = null
trigger gg_trg_Use_Staff = null
trigger gg_trg_Use_Robes = null
trigger gg_trg_Use_Black_Magic_Condition = null
trigger gg_trg_Use_Summon_Magic_Condition = null
trigger gg_trg_Use_White_Magic_Condition = null
trigger gg_trg_Use_Time_Magic = null
trigger gg_trg_Drop_Armor_Condition = null
trigger gg_trg_Follow_Move = null
trigger gg_trg_Enforce_Region = null
trigger gg_trg_Pause_Orb = null
trigger gg_trg_Unpause_Orb = null
trigger gg_trg_Shiva_Diamond_Dust = null
trigger gg_trg_Cleansing_Fire = null
trigger gg_trg_Remove_Autolife = null
trigger gg_trg_Break = null
trigger gg_trg_Steel_Cutting_Sword = null
trigger gg_trg_Pick_Leonhart = null
trigger gg_trg_Pick_Quistis = null
trigger gg_trg_Pick_Amarant = null
trigger gg_trg_Pick_Kimari = null
trigger gg_trg_Pick_Butz = null
trigger gg_trg_Pick_Tellah = null
trigger gg_trg_Pick_Terra = null
trigger gg_trg_Pick_Sephiroth = null
trigger gg_trg_Odin_Summon_Copy = null
trigger gg_trg_Dark_Wave_Effect = null
trigger gg_trg_Gil_Toss_Effect = null
trigger gg_trg_Slash_Effect = null
trigger gg_trg_Jump_Animation = null
trigger gg_trg_Steal_Effect = null
trigger gg_trg_Mug_Effect = null
trigger gg_trg_Throw_Effect = null
trigger gg_trg_Throw_Drop_Shuriken = null
trigger gg_trg_Chemist_Mix = null
trigger gg_trg_Clean_Up_Aero = null
trigger gg_trg_Aero = null
trigger gg_trg_Tornado = null
trigger gg_trg_Maelstrom = null
trigger gg_trg_Blizzard = null
trigger gg_trg_Blizzara = null
trigger gg_trg_Blizzaga = null
trigger gg_trg_Bio = null
trigger gg_trg_Slow = null
trigger gg_trg_Slowga = null
trigger gg_trg_Comet = null
trigger gg_trg_Meteo = null
trigger gg_trg_Meteor = null
trigger gg_trg_Ultima = null
trigger gg_trg_Demi = null
trigger gg_trg_Quarter = null
trigger gg_trg_FullLife_Effect = null
trigger gg_trg_FullLife_p1 = null
trigger gg_trg_FullLife_p2 = null
trigger gg_trg_FullLife_p3 = null
trigger gg_trg_FullLife_p4 = null
trigger gg_trg_FullLife_p5 = null
trigger gg_trg_FullLife_p6 = null
trigger gg_trg_FullLife_p7 = null
trigger gg_trg_FullLife_p8 = null
trigger gg_trg_FullLife_p9 = null
trigger gg_trg_FullLife_p10 = null
trigger gg_trg_FullLife_p11 = null
trigger gg_trg_Haste_Gained = null
trigger gg_trg_Haste_Lose = null
trigger gg_trg_Flare_Gained = null
trigger gg_trg_Flare_Lose = null
trigger gg_trg_Holy_Gained = null
trigger gg_trg_Holy_Lose = null
trigger gg_trg_Initialize_Help_Quests = null
trigger gg_trg_Initialize_Quests = null
trigger gg_trg_First_Shop_Cutscene = null
trigger gg_trg_Gurgan_1 = null
trigger gg_trg_Gurgan_2 = null
trigger gg_trg_Gurgan_3 = null
trigger gg_trg_Gurgan_4 = null
trigger gg_trg_Gurgan_5 = null
trigger gg_trg_Gurgan_6 = null
trigger gg_trg_Gurgan_7 = null
trigger gg_trg_Gurgan_8 = null
trigger gg_trg_Gurgan_9_Letter_Quest = null
trigger gg_trg_Gurgan_10_Turtle_Quest = null
trigger gg_trg_Gurgan_10_Turtle_Quest_Complete = null
trigger gg_trg_Gurgan_10_Turtle_Quest_Dead_Turtle = null
trigger gg_trg_Elf_1 = null
trigger gg_trg_Elf_2 = null
trigger gg_trg_Elf_3 = null
trigger gg_trg_Elf_4 = null
trigger gg_trg_Elf_5 = null
trigger gg_trg_Elf_6_Ale_Quest = null
trigger gg_trg_Elf_6_Ale_Quest_Complete = null
trigger gg_trg_Elf_6_Ale_Quest_Reward_Dialog = null
trigger gg_trg_Elf_7_Letter_Quest_Complete = null
trigger gg_trg_Elf_8_Cactuar_Quest = null
trigger gg_trg_Elf_8_Cactuar_Quest_Complete = null
trigger gg_trg_Swamp_Critter_1 = null
trigger gg_trg_Swamp_Critter_2 = null
trigger gg_trg_Swamp_Critter_3 = null
trigger gg_trg_Swamp_Critter_4 = null
trigger gg_trg_Swamp_Critter_5 = null
trigger gg_trg_Swamp_Critter_6 = null
trigger gg_trg_Swamp_Critter_7 = null
trigger gg_trg_Swamp_Critter_8 = null
trigger gg_trg_Swamp_Critter_9 = null
trigger gg_trg_Town_Defense_1 = null
trigger gg_trg_Town_Defense_1_Copy = null
trigger gg_trg_Town_Defense_1_Copy_Copy = null
trigger gg_trg_Town_Defense_3 = null
trigger gg_trg_Town_Defense_3_part_2 = null
trigger gg_trg_Town_Defense_3_part_2_Copy = null
trigger gg_trg_Town_Defense_3_part_3 = null
trigger gg_trg_Vakor_1 = null
trigger gg_trg_Vakor_2 = null
trigger gg_trg_Vakor_3 = null
trigger gg_trg_Vakor_4 = null
trigger gg_trg_Vakor_4_Copy = null
trigger gg_trg_Ultima_Weapon_Copy = null
trigger gg_trg_Giant_Lizard_Copy = null
trigger gg_trg_Ocean_Serpent_Copy = null
trigger gg_trg_Adamontoise_Copy = null
trigger gg_trg_Forest_Dragon_Copy = null
trigger gg_trg_Enter_the_City_Copy = null
trigger gg_trg_First_Shop_Cutscene_Copy = null
trigger gg_trg_Omega_Weapon = null
trigger gg_trg_Ultima_Drop = null
trigger gg_trg_Goblin = null
trigger gg_trg_All_sets = null
trigger gg_trg_Antlion = null
trigger gg_trg_Cactuar = null
trigger gg_trg_Ghoul = null
trigger gg_trg_Ghost = null
trigger gg_trg_Adamontoise_drop = null
trigger gg_trg_Tremor_Ram = null
trigger gg_trg_Demon_Commander = null
trigger gg_trg_Yagudo = null
trigger gg_trg_Kefka_Stop = null
trigger gg_trg_Ship_Decoration = null
trigger gg_trg_Ship_Decoration_1 = null
trigger gg_trg_Ship_Decoration_2 = null
trigger gg_trg_Ship_Decoration_3 = null
trigger gg_trg_Ship_Decoration_4 = null
trigger gg_trg_Ship_Decoration_5 = null
trigger gg_trg_Elf_Village = null
trigger gg_trg_Gurgan_Village_Airship = null
trigger gg_trg_Vakor_Airship = null
trigger gg_trg_Swamp_Village_Airship = null
trigger gg_trg_Dead_Unit_Clean_Up = null
trigger gg_trg_Planes = null
trigger gg_trg_Planes_Clear = null
trigger gg_trg_Enter_Planes = null
trigger gg_trg_Leave_Planes = null
trigger gg_trg_Enter_Tropical_Island = null
trigger gg_trg_Leave_Tropical_Island = null
trigger gg_trg_Tropical_Island = null
trigger gg_trg_Tropical_Island_Clear = null
trigger gg_trg_Enter_Marsh = null
trigger gg_trg_Leave_Marsh = null
trigger gg_trg_Marsh = null
trigger gg_trg_Marsh_Clear = null
trigger gg_trg_Enter_Calm_Lands = null
trigger gg_trg_Leave_Calm_Lands = null
trigger gg_trg_Calm_Lands = null
trigger gg_trg_Calm_Lands_Clear = null
trigger gg_trg_Enter_Cactaur_Deserts = null
trigger gg_trg_Leave_Cactaur_Deserts = null
trigger gg_trg_Cactaur_Deserts = null
trigger gg_trg_Cactaur_Deserts_Clear = null
trigger gg_trg_Enter_Great_Forest = null
trigger gg_trg_Leave_Great_Forest = null
trigger gg_trg_Great_Forest = null
trigger gg_trg_Great_Forest_Clear = null
trigger gg_trg_Enter_Mountains = null
trigger gg_trg_Leave_Mountains = null
trigger gg_trg_Mountains = null
trigger gg_trg_Mountains_Clear = null
trigger gg_trg_Enter_Icecap = null
trigger gg_trg_Enter_The_Beach = null
trigger gg_trg_Leave_The_Beach = null
trigger gg_trg_Beach = null
trigger gg_trg_Beach_Clear = null
trigger gg_trg_Enter_Southern_Tundra = null
trigger gg_trg_Leave_Southern_Tundra = null
trigger gg_trg_Southern_Tundra = null
trigger gg_trg_Southern_Tundra_Clear = null
trigger gg_trg_Enter_Mushroom_Forest = null
trigger gg_trg_Leave_Mushroom_Forest = null
trigger gg_trg_Mushroom_Forest = null
trigger gg_trg_Mushroom_Forest_Clear = null
trigger gg_trg_Enter_Southern_Forest = null
trigger gg_trg_Leave_Southern_Forest = null
trigger gg_trg_Southern_Forest = null
trigger gg_trg_Southern_Forest_Clear = null
trigger gg_trg_Enter_Tropical_Peninsula = null
trigger gg_trg_Leave_Tropical_Peninsula = null
trigger gg_trg_Tropical_Peninsula = null
trigger gg_trg_Tropical_Peninsula_Clear = null
trigger gg_trg_Enter_Ancient_Forest = null
trigger gg_trg_Leave_Ancient_Forest = null
trigger gg_trg_Ancient_Forest = null
trigger gg_trg_Ancient_Forest_Clear = null
trigger gg_trg_Enter_Demon_Highlands = null
trigger gg_trg_Leave_Demon_Highlands = null
trigger gg_trg_Demon_Highlands = null
trigger gg_trg_Demon_Highlands_Clear = null
trigger gg_trg_Enter_Kefka_Outer_Ruins = null
trigger gg_trg_Leave_Kefka_Outer_Ruins = null
trigger gg_trg_Kefka_Outer_Ruins = null
trigger gg_trg_Kefka_Outer_Ruins_Clear = null
trigger gg_trg_Human_Players = null
trigger gg_trg_Change_music = null
trigger gg_trg_Town_Guard_Dies_to_Player = null
trigger gg_trg_Town_Guard_Attacked_by_Player = null
trigger gg_trg_Create_Starting_Life = null
trigger gg_trg_Create_Starting_Life_Copy = null
trigger gg_trg_Mountain_Exception_Entering = null
trigger gg_trg_Mountain_Exception_Leaving = null
trigger gg_trg_Initialization = null
trigger gg_trg_Hostile_bombs = null
trigger gg_trg_Cid_killer_protect = null
trigger gg_trg_Magic_Orb_Use_Materia = null
trigger gg_trg_Full_Onion_Set_Remove = null
trigger gg_trg_Init_Variables = null
trigger gg_trg_treasure_drop = null
trigger gg_trg_Poison_Spider = null
trigger gg_trg_Gray_Goblin = null
trigger gg_trg_Sand_Worm = null
trigger gg_trg_Assassin_Drop = null
trigger gg_trg_Flan_Drop = null
trigger gg_trg_Giant_Crab = null
trigger gg_trg_Drop_commons = null
trigger gg_trg_Drop_uncommons = null
trigger gg_trg_Uncommon_Boss_Drops = null
trigger gg_trg_Green_Dragon_Drop = null
trigger gg_trg_Giant_Forest_Dragon_Drop = null
trigger gg_trg_Archdemon_Drop = null
trigger gg_trg_Demon_Overlord_Drop = null
trigger gg_trg_Kefkas_Dragon = null
trigger gg_trg_Kefka_Guard_Drop = null
trigger gg_trg_Kefka_Drop = null
trigger gg_trg_Use_Radagals = null
trigger gg_trg_Drop_Radagals_Drop_Condition = null
trigger gg_trg_Use_Galaliel = null
trigger gg_trg_Drop_Galaliel_Drop_Condition = null
trigger gg_trg_Use_Angelic_Set_Condition = null
trigger gg_trg_Spear_of_Fear = null
trigger gg_trg_Double_Arrows_Drop_Condition = null
trigger gg_trg_Drop_Arrows_Condition = null
trigger gg_trg_Drop_Boot_Condition = null
trigger gg_trg_Drop_Glove_Condition = null
trigger gg_trg_Drop_Bracers_Condition = null
trigger gg_trg_Drop_Belt_Condition = null
trigger gg_trg_Drop_Helm_Condition = null
trigger gg_trg_Drop_Rashul_Condition = null
trigger gg_trg_Drop_Sword_Set_Item_Conditions = null
trigger gg_trg_Dukati_Assassin_Set_Conditions = null
trigger gg_trg_Drop_Angelic_Staff_Condition = null
trigger gg_trg_Drop_Bow_Set_Condition = null
trigger gg_trg_Drop_Ring_Condition = null
trigger gg_trg_Drop_Weapon_Condition_Fixed = null
trigger gg_trg_FullLife_Protect = null
trigger gg_trg_Create_Starting_Life_Respawn = null
trigger gg_trg_Satyr_Quests_Initialize = null
trigger gg_trg_Satyr_Prisoner = null
trigger gg_trg_Satyr_Prisoner_Complete = null
trigger gg_trg_Spawn_Prisoner = null
trigger gg_trg_Prisoner_Protect = null
trigger gg_trg_Satyr_Prisoner_Verify = null
trigger gg_trg_Satyr_Prisoner_Pirate_kill = null
trigger gg_trg_Satyr_Guard = null
trigger gg_trg_Enter_Satyr_Village = null
trigger gg_trg_Satyr_Warrior_Shop = null
trigger gg_trg_Satyr_Warrior_Shop_Complete = null
trigger gg_trg_Satyr_Warrior_Shop_Centaur_death = null
trigger gg_trg_Stamina_Tonic = null
trigger gg_trg_Mana_Tonic = null
trigger gg_trg_Chemist_Geyser = null
trigger gg_trg_Angel_of_death = null
trigger gg_trg_Pirate_Quests_Initialize = null
trigger gg_trg_Pirate_Defense = null
trigger gg_trg_Pirate_Defense_II = null
trigger gg_trg_Pirate_Defense_III = null
trigger gg_trg_Player_1_items = null
trigger gg_trg_Player_2_items = null
trigger gg_trg_Player_3_items = null
trigger gg_trg_Player_4_items = null
trigger gg_trg_Player_5_items = null
trigger gg_trg_Player_6_items = null
trigger gg_trg_Player_7_items = null
trigger gg_trg_Player_8_items = null
trigger gg_trg_Player_9_items = null
trigger gg_trg_Player_10_items = null
trigger gg_trg_Player_11_items = null
trigger gg_trg_Angelic_Set_Acquired = null
trigger gg_trg_Angelic_Set_Removed = null
trigger gg_trg_Jursachian_Set_Acquired = null
trigger gg_trg_Jursachian_Set_Removed = null
trigger gg_trg_Dukati_Assassin_Set_Acquired = null
trigger gg_trg_Dukati_Assassin_Set_Removed = null
trigger gg_trg_Demon_Slayer_Warrior_Set_Acquired = null
trigger gg_trg_Demon_Slayer_Warrior_Set_Removed = null
trigger gg_trg_Demon_Slayer_Bow_Set_Acquired = null
trigger gg_trg_Demon_Slayer_Bow_Set_Removed = null
trigger gg_trg_Pirates_Initial_Issue_Acquired = null
trigger gg_trg_Pirates_Initial_Issue_Removed = null
trigger gg_trg_Wizard_Ring_Set_Requirements = null
trigger gg_trg_Wizard_Ring_Acquired = null
trigger gg_trg_Wizard_Ring_Removed = null
trigger gg_trg_Randomize_Copy = null
trigger gg_trg_Repick = null
trigger gg_trg_Base10_to_Base32 = null
trigger gg_trg_Base32_to_Base10 = null
trigger gg_trg_Save_Char_Copy = null
trigger gg_trg_Load_Char_Copy = null
trigger gg_trg_Initialize_Items = null
trigger gg_trg_Disable_Loading_Warning = null
trigger gg_trg_Save_Morb = null
trigger gg_trg_Disable_Loading = null
trigger gg_trg_Load_Morb = null
trigger gg_trg_DeprotectInfo = null
trigger gg_trg_Untitled_Trigger_001 = null
trigger gg_trg_Untitled_Trigger_001_Copy_2 = null
trigger gg_trg_Untitled_Trigger_001_Copy_2_Copy = null
trigger gg_trg_Untitled_Trigger_001_Copy = null
trigger gg_trg_Untitled_Trigger_001_Copy_Copy = null
unit gg_unit_n005_0107 = null
unit gg_unit_n005_0106 = null
unit gg_unit_n005_0105 = null
unit gg_unit_n02Q_0399 = null
unit gg_unit_n02P_0377 = null
unit gg_unit_h00K_0395 = null
unit gg_unit_n00Y_0003 = null
unit gg_unit_nhem_0294 = null
unit gg_unit_nhem_0293 = null
unit gg_unit_nhem_0292 = null
unit gg_unit_nhef_0289 = null
unit gg_unit_n005_0108 = null
unit gg_unit_nhef_0122 = null
unit gg_unit_N002_0092 = null
unit gg_unit_n005_0115 = null
unit gg_unit_n005_0114 = null
unit gg_unit_n005_0113 = null
unit gg_unit_n005_0111 = null
unit gg_unit_n005_0109 = null
unit gg_unit_nwzd_0223 = null
unit gg_unit_n00V_0150 = null
unit gg_unit_nass_0071 = null
unit gg_unit_nban_0073 = null
unit gg_unit_nban_0074 = null
unit gg_unit_nvlw_0077 = null
unit gg_unit_nvl2_0079 = null
unit gg_unit_nvil_0081 = null
unit gg_unit_nhef_0256 = null
unit gg_unit_nhem_0263 = null
unit gg_unit_nhem_0264 = null
unit gg_unit_hshy_0272 = null
unit gg_unit_n01L_0025 = null
unit gg_unit_n01A_0166 = null
unit gg_unit_nhef_0008 = null
unit gg_unit_n00R_0013 = null
unit gg_unit_U007_0384 = null
unit gg_unit_n01X_0016 = null
unit gg_unit_n01Y_0096 = null
unit gg_unit_n01S_0015 = null
unit gg_unit_nska_0035 = null
unit gg_unit_nska_0087 = null
unit gg_unit_nska_0088 = null
unit gg_unit_nvdw_0091 = null
unit gg_unit_nvdw_0118 = null
unit gg_unit_nvdw_0117 = null
unit gg_unit_nvdw_0120 = null
unit gg_unit_nssn_0141 = null
unit gg_unit_nvil_0143 = null
unit gg_unit_n02G_0157 = null
unit gg_unit_n02I_0005 = null
unit gg_unit_n02L_0229 = null
unit gg_unit_nsat_0169 = null
unit gg_unit_nsty_0173 = null
unit gg_unit_nsty_0191 = null
destructable gg_dest_LTbr_3774 = null
destructable gg_dest_LTbs_3773 = null
destructable gg_dest_LOcg_2026 = null
destructable gg_dest_LTbs_3772 = null
destructable gg_dest_LTbs_3871 = null
destructable gg_dest_LTbs_3949 = null
destructable gg_dest_LTbs_4069 = null
destructable gg_dest_LTbs_4071 = null
destructable gg_dest_LTbs_4072 = null
destructable gg_dest_LTbs_4074 = null
trigger gg_trg_Untitled_Trigger_001_Copy_3 = null
trigger gg_trg_Untitled_Trigger_001_Copy_3_Copy = null
trigger gg_trg_Untitled_Trigger_001_Copy_3_Copy_2 = null
endglobals
function InitGlobals takes nothing returns nothing
local integer i = 0
set udg_AlreadyCarryingEquip = 0
set udg_CutsceneisOn = false
set udg_DealDamage = 0
set udg_LoopInteger = 0
set udg_GoldPlayers = CreateForce()
set udg_DiceRoll = 0
set i = 0
loop
exitwhen (i > 1)
set udg_HigherCamera[i] = false
set i = i + 1
endloop
set i = 0
loop
exitwhen (i > 1)
set udg_HeroName[i] = ""
set i = i + 1
endloop
set udg_InvalidJob = false
set udg_RandomPotion = 0
set udg_RandomSteal = 0
set i = 0
loop
exitwhen (i > 1)
set udg_HasShuriken[i] = false
set i = i + 1
endloop
set udg_Debug = ""
set udg_DebugLevel = 0
set udg_HumanPlayers = CreateForce()
set udg_StealingPlayer = CreateForce()
set udg_DiceDrop = 0
set udg_Base10Convert = 0
set udg_UnitNumber = 0
set udg_Part1 = ""
set udg_FinalCode = ""
set udg_Base10Input = 0
set udg_Base10Output = 0
set udg_Base32Input = ""
set udg_ItemNumber = 0
set udg_LoadLevel = 0
set udg_NumberOfPlayers = 0
set udg_TutorialDialog = DialogCreate()
set udg_TutorialCounter = 0
set udg_QuestLetter = false
set udg_QuestAle = false
set udg_QuestCactuar = false
set udg_HasQuestItem = false
set udg_SelectItem = DialogCreate()
set udg_Playername = ""
set udg_RandomizeCode = 0
set udg_LevelCode = 0
set i = 0
loop
exitwhen (i > 1)
set udg_PlayerHasAlreadyEnteredCode[i] = false
set i = i + 1
endloop
set udg_PlayersWhoHaveChosen = 0
set udg_QuestAdamontoise = false
set udg_SwampDefense = DialogCreate()
set udg_ElfDefense = DialogCreate()
set udg_VakorDefense = DialogCreate()
set udg_VakorTimer = CreateTimer()
set i = 0
loop
exitwhen (i > 1)
set udg_ClassAbilityGained[i] = 0
set i = i + 1
endloop
set i = 0
loop
exitwhen (i > 1)
set udg_Base32Int[i] = 0
set i = i + 1
endloop
set udg_WhileLoop = 0
set i = 0
loop
exitwhen (i > 1)
set udg_Base32String[i] = ""
set i = i + 1
endloop
set i = 0
loop
exitwhen (i > 1)
set udg_CarriedItems[i] = 0
set i = i + 1
endloop
set i = 0
loop
exitwhen (i > 1)
set udg_SaveCode[i] = ""
set i = i + 1
endloop
set udg_SortTempInt = 0
set udg_LoadString = ""
set i = 0
loop
exitwhen (i > 1)
set udg_colors[i] = ""
set i = i + 1
endloop
set udg_Life = 'e007'
set i = 0
loop
exitwhen (i > 1)
set udg_Xmagix[i] = 1
set i = i + 1
endloop
set i = 0
loop
exitwhen (i > 1)
set udg_NumberofRepicks[i] = 0
set i = i + 1
endloop
set udg_QuestSatyrShop = false
set udg_QuestSatyrPrisoner = false
set udg_Bowequiped = 0
set udg_ArrowsEquiped = 0
set udg_AntiCheat = 0
set udg_AntiCheat_Copy = 0
set udg_EmeraldRing = 0
set udg_OnyxRing = 0
set udg_MysticRing = 0
set udg_PirateDefense = DialogCreate()
set udg_KefkaQuest = false
set udg_KefkaCount = 0
set udg_LevelRange = DialogCreate()
set i = 0
loop
exitwhen (i > 1)
set udg_PlayerHasAlreadyEnteredCodeOrb[i] = false
set i = i + 1
endloop
set udg_AngelicRing = 0
set udg_debugColor = ""
set udg_debugLeveler = 0
set udg_DebugLevelNumber = ""
set udg_LoadLevelCode = ""
set udg_Mathmo = 0
set udg_MakerisHere = false
set i = 0
loop
exitwhen (i > 1)
set udg_MorbLoadAttempts[i] = 0
set i = i + 1
endloop
set i = 0
loop
exitwhen (i > 1)
set udg_LoadCharAttempts[i] = 0
set i = i + 1
endloop
set i = 0
loop
exitwhen (i > 1)
set udg_LoopIntegerPlayer[i] = 0
set i = i + 1
endloop
endfunction
//***************************************************************************
//*
//* Map Item Tables
//*
//***************************************************************************
function ItemTable000000_DropItems takes nothing returns nothing
local widget trigWidget = null
local unit trigUnit = null
local integer itemID = 0
local boolean canDrop = true
set trigWidget = bj_lastDyingWidget
if (trigWidget == null) then
set trigUnit = GetTriggerUnit()
endif
if (trigUnit != null) then
set canDrop = not IsUnitHidden(trigUnit)
if (canDrop and GetChangingUnit() != null) then
set canDrop = (GetChangingUnitPrevOwner() == Player(PLAYER_NEUTRAL_AGGRESSIVE))
endif
endif
if (canDrop) then
// Item set 0
call RandomDistReset( )
call RandomDistAddItem( 'I025', 10 )
call RandomDistAddItem( -1, 90 )
set itemID = RandomDistChoose( )
if (trigUnit != null) then
call UnitDropItem( trigUnit, itemID )
else
call WidgetDropItem( trigWidget, itemID )
endif
// Item set 1
call RandomDistReset( )
call RandomDistAddItem( 'I01P', 12 )
call RandomDistAddItem( 'I04C', 11 )
call RandomDistAddItem( 'I00G', 11 )
call RandomDistAddItem( 'I02M', 11 )
call RandomDistAddItem( 'I00H', 11 )
call RandomDistAddItem( 'I01N', 11 )
call RandomDistAddItem( 'I01I', 11 )
call RandomDistAddItem( 'I02L', 11 )
call RandomDistAddItem( 'I02H', 1 )
call RandomDistAddItem( -1, 10 )
set itemID = RandomDistChoose( )
if (trigUnit != null) then
call UnitDropItem( trigUnit, itemID )
else
call WidgetDropItem( trigWidget, itemID )
endif
endif
set bj_lastDyingWidget = null
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//***************************************************************************
//*
//* Unit Item Tables
//*
//***************************************************************************
function Unit000016_DropItems takes nothing returns nothing
local widget trigWidget = null
local unit trigUnit = null
local integer itemID = 0
local boolean canDrop = true
set trigWidget = bj_lastDyingWidget
if (trigWidget == null) then
set trigUnit = GetTriggerUnit()
endif
if (trigUnit != null) then
set canDrop = not IsUnitHidden(trigUnit)
if (canDrop and GetChangingUnit() != null) then
set canDrop = (GetChangingUnitPrevOwner() == Player(PLAYER_NEUTRAL_AGGRESSIVE))
endif
endif
if (canDrop) then
// Item set 0
call RandomDistReset( )
call RandomDistAddItem( 'I069', 100 )
set itemID = RandomDistChoose( )
if (trigUnit != null) then
call UnitDropItem( trigUnit, itemID )
else
call WidgetDropItem( trigWidget, itemID )
endif
endif
set bj_lastDyingWidget = null
call DestroyTrigger(GetTriggeringTrigger())
endfunction
function Unit000039_DropItems takes nothing returns nothing
local widget trigWidget = null
local unit trigUnit = null
local integer itemID = 0
local boolean canDrop = true
set trigWidget = bj_lastDyingWidget
if (trigWidget == null) then
set trigUnit = GetTriggerUnit()
endif
if (trigUnit != null) then
set canDrop = not IsUnitHidden(trigUnit)
if (canDrop and GetChangingUnit() != null) then
set canDrop = (GetChangingUnitPrevOwner() == Player(PLAYER_NEUTRAL_AGGRESSIVE))
endif
endif
if (canDrop) then
// Item set 0
call RandomDistReset( )
call RandomDistAddItem( 'I04T', 17 )
call RandomDistAddItem( 'I04P', 17 )
call RandomDistAddItem( 'I04R', 17 )
call RandomDistAddItem( 'I04S', 17 )
call RandomDistAddItem( 'I04O', 16 )
call RandomDistAddItem( -1, 16 )
set itemID = RandomDistChoose( )
if (trigUnit != null) then
call UnitDropItem( trigUnit, itemID )
else
call WidgetDropItem( trigWidget, itemID )
endif
endif
set bj_lastDyingWidget = null
call DestroyTrigger(GetTriggeringTrigger())
endfunction
function Unit000118_DropItems takes nothing returns nothing
local widget trigWidget = null
local unit trigUnit = null
local integer itemID = 0
local boolean canDrop = true
set trigWidget = bj_lastDyingWidget
if (trigWidget == null) then
set trigUnit = GetTriggerUnit()
endif
if (trigUnit != null) then
set canDrop = not IsUnitHidden(trigUnit)
if (canDrop and GetChangingUnit() != null) then
set canDrop = (GetChangingUnitPrevOwner() == Player(PLAYER_NEUTRAL_AGGRESSIVE))
endif
endif
if (canDrop) then
// Item set 0
call RandomDistReset( )
call RandomDistAddItem( 'I03M', 7 )
call RandomDistAddItem( 'I00O', 7 )
call RandomDistAddItem( 'I023', 7 )
call RandomDistAddItem( 'I01N', 7 )
call RandomDistAddItem( 'I00G', 7 )
call RandomDistAddItem( 'I00H', 7 )
call RandomDistAddItem( 'I02L', 7 )
call RandomDistAddItem( 'I02M', 7 )
call RandomDistAddItem( 'I04B', 7 )
call RandomDistAddItem( 'I03S', 7 )
call RandomDistAddItem( 'I008', 6 )
call RandomDistAddItem( 'I02F', 6 )
call RandomDistAddItem( 'I03X', 6 )
call RandomDistAddItem( 'I02N', 6 )
call RandomDistAddItem( 'I04C', 6 )
set itemID = RandomDistChoose( )
if (trigUnit != null) then
call UnitDropItem( trigUnit, itemID )
else
call WidgetDropItem( trigWidget, itemID )
endif
endif
set bj_lastDyingWidget = null
call DestroyTrigger(GetTriggeringTrigger())
endfunction
function Unit000122_DropItems takes nothing returns nothing
local widget trigWidget = null
local unit trigUnit = null
local integer itemID = 0
local boolean canDrop = true
set trigWidget = bj_lastDyingWidget
if (trigWidget == null) then
set trigUnit = GetTriggerUnit()
endif
if (trigUnit != null) then
set canDrop = not IsUnitHidden(trigUnit)
if (canDrop and GetChangingUnit() != null) then
set canDrop = (GetChangingUnitPrevOwner() == Player(PLAYER_NEUTRAL_AGGRESSIVE))
endif
endif
if (canDrop) then
// Item set 0
call RandomDistReset( )
call RandomDistAddItem( 'I023', 4 )
call RandomDistAddItem( -1, 96 )
set itemID = RandomDistChoose( )
if (trigUnit != null) then
call UnitDropItem( trigUnit, itemID )
else
call WidgetDropItem( trigWidget, itemID )
endif
// Item set 1
call RandomDistReset( )
call RandomDistAddItem( 'I03M', 4 )
call RandomDistAddItem( -1, 96 )
set itemID = RandomDistChoose( )
if (trigUnit != null) then
call UnitDropItem( trigUnit, itemID )
else
call WidgetDropItem( trigWidget, itemID )
endif
// Item set 2
call RandomDistReset( )
call RandomDistAddItem( 'I03X', 4 )
call RandomDistAddItem( -1, 96 )
set itemID = RandomDistChoose( )
if (trigUnit != null) then
call UnitDropItem( trigUnit, itemID )
else
call WidgetDropItem( trigWidget, itemID )
endif
// Item set 3
call RandomDistReset( )
call RandomDistAddItem( 'I01I', 25 )
call RandomDistAddItem( -1, 75 )
set itemID = RandomDistChoose( )
if (trigUnit != null) then
call UnitDropItem( trigUnit, itemID )
else
call WidgetDropItem( trigWidget, itemID )
endif
// Item set 4
call RandomDistReset( )
call RandomDistAddItem( 'I00G', 25 )
call RandomDistAddItem( -1, 75 )
set itemID = RandomDistChoose( )
if (trigUnit != null) then
call UnitDropItem( trigUnit, itemID )
else
call WidgetDropItem( trigWidget, itemID )
endif
endif
set bj_lastDyingWidget = null
call DestroyTrigger(GetTriggeringTrigger())
endfunction
function Unit000210_DropItems takes nothing returns nothing
local widget trigWidget = null
local unit trigUnit = null
local integer itemID = 0
local boolean canDrop = true
set trigWidget = bj_lastDyingWidget
if (trigWidget == null) then
set trigUnit = GetTriggerUnit()
endif
if (trigUnit != null) then
set canDrop = not IsUnitHidden(trigUnit)
if (canDrop and GetChangingUnit() != null) then
set canDrop = (GetChangingUnitPrevOwner() == Player(PLAYER_NEUTRAL_AGGRESSIVE))
endif
endif
if (canDrop) then
// Item set 0
call RandomDistReset( )
call RandomDistAddItem( 'I00J', 1 )
call RandomDistAddItem( -1, 99 )
set itemID = RandomDistChoose( )
if (trigUnit != null) then
call UnitDropItem( trigUnit, itemID )
else
call WidgetDropItem( trigWidget, itemID )
endif
// Item set 1
call RandomDistReset( )
call RandomDistAddItem( 'I025', 1 )
call RandomDistAddItem( -1, 99 )
set itemID = RandomDistChoose( )
if (trigUnit != null) then
call UnitDropItem( trigUnit, itemID )
else
call WidgetDropItem( trigWidget, itemID )
endif
// Item set 2
call RandomDistReset( )
call RandomDistAddItem( 'I02N', 10 )
call RandomDistAddItem( -1, 90 )
set itemID = RandomDistChoose( )
if (trigUnit != null) then
call UnitDropItem( trigUnit, itemID )
else
call WidgetDropItem( trigWidget, itemID )
endif
// Item set 3
call RandomDistReset( )
call RandomDistAddItem( 'I03W', 17 )
call RandomDistAddItem( 'I03S', 17 )
call RandomDistAddItem( 'I003', 17 )
call RandomDistAddItem( 'I02E', 17 )
call RandomDistAddItem( 'I03I', 16 )
call RandomDistAddItem( 'I048', 16 )
set itemID = RandomDistChoose( )
if (trigUnit != null) then
call UnitDropItem( trigUnit, itemID )
else
call WidgetDropItem( trigWidget, itemID )
endif
endif
set bj_lastDyingWidget = null
call DestroyTrigger(GetTriggeringTrigger())
endfunction
function Unit000230_DropItems takes nothing returns nothing
local widget trigWidget = null
local unit trigUnit = null
local integer itemID = 0
local boolean canDrop = true
set trigWidget = bj_lastDyingWidget
if (trigWidget == null) then
set trigUnit = GetTriggerUnit()
endif
if (trigUnit != null) then
set canDrop = not IsUnitHidden(trigUnit)
if (canDrop and GetChangingUnit() != null) then
set canDrop = (GetChangingUnitPrevOwner() == Player(PLAYER_NEUTRAL_AGGRESSIVE))
endif
endif
if (canDrop) then
// Item set 0
call RandomDistReset( )
call RandomDistAddItem( 'I008', 17 )
call RandomDistAddItem( 'I007', 17 )
call RandomDistAddItem( 'I006', 17 )
call RandomDistAddItem( 'I00K', 17 )
call RandomDistAddItem( 'I04B', 16 )
call RandomDistAddItem( 'I04N', 16 )
set itemID = RandomDistChoose( )
if (trigUnit != null) then
call UnitDropItem( trigUnit, itemID )
else
call WidgetDropItem( trigWidget, itemID )
endif
endif
set bj_lastDyingWidget = null
call DestroyTrigger(GetTriggeringTrigger())
endfunction
function Unit000326_DropItems takes nothing returns nothing
local widget trigWidget = null
local unit trigUnit = null
local integer itemID = 0
local boolean canDrop = true
set trigWidget = bj_lastDyingWidget
if (trigWidget == null) then
set trigUnit = GetTriggerUnit()
endif
if (trigUnit != null) then
set canDrop = not IsUnitHidden(trigUnit)
if (canDrop and GetChangingUnit() != null) then
set canDrop = (GetChangingUnitPrevOwner() == Player(PLAYER_NEUTRAL_AGGRESSIVE))
endif
endif
if (canDrop) then
// Item set 0
call RandomDistReset( )
call RandomDistAddItem( 'I06C', 100 )
set itemID = RandomDistChoose( )
if (trigUnit != null) then
call UnitDropItem( trigUnit, itemID )
else
call WidgetDropItem( trigWidget, itemID )
endif
endif
set bj_lastDyingWidget = null
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//***************************************************************************
//*
//* Sounds
//*
//***************************************************************************
function InitSounds takes nothing returns nothing
set gg_snd_kefka = CreateSound( "war3mapImported\\kefka.wav", false, false, false, 10, 10, "" )
call SetSoundChannel( gg_snd_kefka, 0 )
call SetSoundVolume( gg_snd_kefka, 127 )
call SetSoundPitch( gg_snd_kefka, 1.0 )
set gg_snd_Celtic_Moon = "war3mapImported\\Celtic Moon.mp3"
set gg_snd_Clouds_Theme = "war3mapImported\\Clouds Theme.mp3"
set gg_snd_Liberi_Fatali = "war3mapImported\\Liberi Fatali.mp3"
set gg_snd_One_Winged_Angel = "war3mapImported\\One Winged Angel.mp3"
set gg_snd_Terras_theme = "war3mapImported\\Terras theme.mp3"
set gg_snd_DarkVictory = "Sound\\Music\\mp3Music\\DarkVictory.mp3"
set gg_snd_SadMystery = "Sound\\Music\\mp3Music\\SadMystery.mp3"
set gg_snd_PursuitTheme = "Sound\\Music\\mp3Music\\PursuitTheme.mp3"
set gg_snd_IllidanMorphedWhat4 = CreateSound( "Units\\NightElf\\Illidan\\IllidanMorphedWhat4.wav", false, true, true, 10, 10, "HeroAcksEAX" )
call SetSoundParamsFromLabel( gg_snd_IllidanMorphedWhat4, "IllidanMorphedWhat" )
call SetSoundDuration( gg_snd_IllidanMorphedWhat4, 2601 )
call SetSoundPitch( gg_snd_IllidanMorphedWhat4, 0.8 )
set gg_snd_IllidanMorphedYesAttack2 = CreateSound( "Units\\NightElf\\Illidan\\IllidanMorphedYesAttack2.wav", false, true, true, 10, 10, "HeroAcksEAX" )
call SetSoundParamsFromLabel( gg_snd_IllidanMorphedYesAttack2, "IllidanMorphedYesAttack" )
call SetSoundDuration( gg_snd_IllidanMorphedYesAttack2, 1411 )
call SetSoundPitch( gg_snd_IllidanMorphedYesAttack2, 0.8 )
set gg_snd_UtherTaunt2 = CreateSound( "Sound\\Dialogue\\Extra\\UtherTaunt2.mp3", false, false, false, 10, 10, "DefaultEAXON" )
call SetSoundParamsFromLabel( gg_snd_UtherTaunt2, "UtherTaunt2" )
call SetSoundDuration( gg_snd_UtherTaunt2, 1855 )
call SetSoundChannel( gg_snd_UtherTaunt2, 8 )
set gg_snd_NazgrelWhat1 = CreateSound( "Units\\Other\\Nazgrel\\NazgrelWhat1.wav", false, false, true, 10, 10, "DefaultEAXON" )
call SetSoundParamsFromLabel( gg_snd_NazgrelWhat1, "NazgrelWhat" )
call SetSoundDuration( gg_snd_NazgrelWhat1, 1393 )
call SetSoundChannel( gg_snd_NazgrelWhat1, 8 )
set gg_snd_SargerasLaugh = CreateSound( "Sound\\Ambient\\DoodadEffects\\SargerasLaugh.wav", false, false, true, 10, 10, "DefaultEAXON" )
call SetSoundParamsFromLabel( gg_snd_SargerasLaugh, "SargerasLaugh" )
call SetSoundDuration( gg_snd_SargerasLaugh, 3326 )
call SetSoundChannel( gg_snd_SargerasLaugh, 8 )
set gg_snd_DivineShield = CreateSound( "Abilities\\Spells\\Human\\DivineShield\\DivineShield.wav", false, false, true, 10, 10, "SpellsEAX" )
call SetSoundParamsFromLabel( gg_snd_DivineShield, "DivineShield" )
call SetSoundDuration( gg_snd_DivineShield, 1955 )
call SetSoundChannel( gg_snd_DivineShield, 8 )
set gg_snd_VultureWhat1 = CreateSound( "Units\\Critters\\Vulture\\VultureWhat1.wav", false, true, true, 10, 10, "DefaultEAXON" )
call SetSoundParamsFromLabel( gg_snd_VultureWhat1, "VultureWhat" )
call SetSoundDuration( gg_snd_VultureWhat1, 1756 )
call SetSoundPitch( gg_snd_VultureWhat1, 0.8 )
set gg_snd_IllidanWhat4 = CreateSound( "Units\\NightElf\\Illidan\\IllidanWhat4.wav", false, true, true, 10, 10, "HeroAcksEAX" )
call SetSoundParamsFromLabel( gg_snd_IllidanWhat4, "IllidanWhat" )
call SetSoundDuration( gg_snd_IllidanWhat4, 2463 )
call SetSoundPitch( gg_snd_IllidanWhat4, 0.9 )
call SetSoundDistances( gg_snd_IllidanWhat4, 400.0, 400.0 )
call SetSoundDistanceCutoff( gg_snd_IllidanWhat4, 400.0 )
set gg_snd_IllidanYes1 = CreateSound( "Units\\NightElf\\Illidan\\IllidanYes1.wav", false, true, true, 10, 10, "HeroAcksEAX" )
call SetSoundParamsFromLabel( gg_snd_IllidanYes1, "IllidanYes" )
call SetSoundDuration( gg_snd_IllidanYes1, 846 )
call SetSoundPitch( gg_snd_IllidanYes1, 0.9 )
call SetSoundDistances( gg_snd_IllidanYes1, 400.0, 400.0 )
call SetSoundDistanceCutoff( gg_snd_IllidanYes1, 400.0 )
set gg_snd_IllidanYesAttack3 = CreateSound( "Units\\NightElf\\Illidan\\IllidanYesAttack3.wav", false, true, true, 10, 10, "HeroAcksEAX" )
call SetSoundParamsFromLabel( gg_snd_IllidanYesAttack3, "IllidanYesAttack" )
call SetSoundDuration( gg_snd_IllidanYesAttack3, 2178 )
call SetSoundPitch( gg_snd_IllidanYesAttack3, 0.9 )
call SetSoundDistances( gg_snd_IllidanYesAttack3, 400.0, 400.0 )
call SetSoundDistanceCutoff( gg_snd_IllidanYesAttack3, 400.0 )
endfunction
//***************************************************************************
//*
//* Destructable Objects
//*
//***************************************************************************
function CreateAllDestructables takes nothing returns nothing
local destructable d
local trigger t
local real life
set gg_dest_LOcg_2026 = CreateDestructable( 'LOcg', 6208.0, -11584.0, 258.000, 1.011, 0 )
set gg_dest_LTbr_3774 = CreateDestructable( 'LTbr', -2464.0, 14432.0, 286.000, 1.192, 0 )
set gg_dest_LTbs_3773 = CreateDestructable( 'LTbs', -352.0, 14880.0, 111.000, 1.154, 0 )
set gg_dest_LTbs_3772 = CreateDestructable( 'LTbs', 2656.0, 14816.0, 349.000, 1.111, 0 )
set gg_dest_LTbs_3871 = CreateDestructable( 'LTbs', 12192.0, -15328.0, 111.000, 1.154, 0 )
set gg_dest_LTbs_3949 = CreateDestructable( 'LTbs', -8352.0, 3040.0, 111.000, 1.154, 0 )
set gg_dest_LTbs_4069 = CreateDestructable( 'LTbs', -13664.0, -8864.0, 111.000, 1.154, 0 )
set gg_dest_LTbs_4071 = CreateDestructable( 'LTbs', -7456.0, -14624.0, 111.000, 1.154, 0 )
set gg_dest_LTbs_4072 = CreateDestructable( 'LTbs', -864.0, -11680.0, 111.000, 1.154, 0 )
set gg_dest_LTbs_4074 = CreateDestructable( 'LTbs', 8096.0, -6752.0, 111.000, 1.154, 0 )
endfunction
//***************************************************************************
//*
//* Unit Creation
//*
//***************************************************************************
//===========================================================================
function CreateNeutralHostileBuildings takes nothing returns nothing
local player p = Player(PLAYER_NEUTRAL_AGGRESSIVE)
local unit u
local integer unitID
local trigger t
local real life
set u = CreateUnit( p, 'u003', 15168.0, 14976.0, 270.000 )
endfunction
//===========================================================================
function CreateNeutralHostile takes nothing returns nothing
local player p = Player(PLAYER_NEUTRAL_AGGRESSIVE)
local unit u
local integer unitID
local trigger t
local real life
set u = CreateUnit( p, 'n02M', 6063.1, -11737.1, 159.109 )
set gg_unit_n02I_0005 = CreateUnit( p, 'n02I', 14959.6, -15236.5, 117.170 )
set t = CreateTrigger( )
call TriggerRegisterUnitEvent( t, gg_unit_n02I_0005, EVENT_UNIT_DEATH )
call TriggerRegisterUnitEvent( t, gg_unit_n02I_0005, EVENT_UNIT_CHANGE_OWNER )
call TriggerAddAction( t, function ItemTable000000_DropItems )
set u = CreateUnit( p, 'n01P', -8878.6, -3489.6, 257.040 )
set t = CreateTrigger( )
call TriggerRegisterUnitEvent( t, u, EVENT_UNIT_DEATH )
call TriggerRegisterUnitEvent( t, u, EVENT_UNIT_CHANGE_OWNER )
call TriggerAddAction( t, function Unit000122_DropItems )
set u = CreateUnit( p, 'n00S', -7416.8, 10722.0, 270.000 )
set t = CreateTrigger( )
call TriggerRegisterUnitEvent( t, u, EVENT_UNIT_DEATH )
call TriggerRegisterUnitEvent( t, u, EVENT_UNIT_CHANGE_OWNER )
call TriggerAddAction( t, function Unit000210_DropItems )
set gg_unit_n00R_0013 = CreateUnit( p, 'n00R', -4851.6, -2750.7, 341.720 )
set t = CreateTrigger( )
call TriggerRegisterUnitEvent( t, gg_unit_n00R_0013, EVENT_UNIT_DEATH )
call TriggerRegisterUnitEvent( t, gg_unit_n00R_0013, EVENT_UNIT_CHANGE_OWNER )
call TriggerAddAction( t, function Unit000230_DropItems )
set u = CreateUnit( p, 'n01Q', 7327.3, 13467.9, 226.370 )
set t = CreateTrigger( )
call TriggerRegisterUnitEvent( t, u, EVENT_UNIT_DEATH )
call TriggerRegisterUnitEvent( t, u, EVENT_UNIT_CHANGE_OWNER )
call TriggerAddAction( t, function Unit000118_DropItems )
set gg_unit_n01S_0015 = CreateUnit( p, 'n01S', -14521.9, -15034.1, 245.220 )
call SetUnitState( gg_unit_n01S_0015, UNIT_STATE_MANA, 0 )
set t = CreateTrigger( )
call TriggerRegisterUnitEvent( t, gg_unit_n01S_0015, EVENT_UNIT_DEATH )
call TriggerRegisterUnitEvent( t, gg_unit_n01S_0015, EVENT_UNIT_CHANGE_OWNER )
call TriggerAddAction( t, function ItemTable000000_DropItems )
set gg_unit_n01X_0016 = CreateUnit( p, 'n01X', 6858.6, -15255.8, 125.430 )
set t = CreateTrigger( )
call TriggerRegisterUnitEvent( t, gg_unit_n01X_0016, EVENT_UNIT_DEATH )
call TriggerRegisterUnitEvent( t, gg_unit_n01X_0016, EVENT_UNIT_CHANGE_OWNER )
call TriggerAddAction( t, function ItemTable000000_DropItems )
set u = CreateUnit( p, 'n00O', -13104.4, -8750.4, 144.453 )
set u = CreateUnit( p, 'n024', -13436.8, -8417.0, 256.637 )
set u = CreateUnit( p, 'n00R', -13473.7, -7495.1, 10.877 )
set u = CreateUnit( p, 'n00P', -8234.9, -14450.3, 125.709 )
set u = CreateUnit( p, 'n01Z', -8370.8, -14324.7, 72.391 )
set u = CreateUnit( p, 'n02D', -8542.2, -14075.4, 337.829 )
set u = CreateUnit( p, 'n028', -8471.7, -14458.6, 168.382 )
set u = CreateUnit( p, 'n02C', 2905.2, -14051.1, 66.623 )
set u = CreateUnit( p, 'n026', 3534.7, -14101.7, 359.187 )
set u = CreateUnit( p, 'n01T', 2593.6, -14093.2, 41.035 )
set u = CreateUnit( p, 'n025', 2001.3, -7049.6, 162.537 )
set u = CreateUnit( p, 'n027', 1860.5, -6687.7, 152.429 )
set u = CreateUnit( p, 'n023', 1669.0, -6466.4, 200.430 )
set u = CreateUnit( p, 'n020', 13312.8, -13030.0, 137.190 )
set u = CreateUnit( p, 'n021', 13569.8, -13143.0, 118.216 )
set u = CreateUnit( p, 'n022', 13586.1, -12664.2, 236.224 )
set u = CreateUnit( p, 'n01U', 14306.0, -8148.9, 7.636 )
set u = CreateUnit( p, 'n01V', 14656.7, -8101.7, 220.656 )
set u = CreateUnit( p, 'n02E', 14491.6, -7804.2, 248.738 )
set u = CreateUnit( p, 'hkni', 9529.2, 5613.0, 237.740 )
set t = CreateTrigger( )
call TriggerRegisterUnitEvent( t, u, EVENT_UNIT_DEATH )
call TriggerRegisterUnitEvent( t, u, EVENT_UNIT_CHANGE_OWNER )
call TriggerAddAction( t, function Unit000326_DropItems )
set u = CreateUnit( p, 'n01W', 13912.9, -8096.3, 151.089 )
set gg_unit_n01Y_0096 = CreateUnit( p, 'n01Y', -1168.9, -8184.1, 247.410 )
set t = CreateTrigger( )
call TriggerRegisterUnitEvent( t, gg_unit_n01Y_0096, EVENT_UNIT_DEATH )
call TriggerRegisterUnitEvent( t, gg_unit_n01Y_0096, EVENT_UNIT_CHANGE_OWNER )
call TriggerAddAction( t, function ItemTable000000_DropItems )
set u = CreateUnit( p, 'n01D', -10067.1, -3385.0, 29.763 )
set u = CreateUnit( p, 'n02Y', 8531.9, 11021.6, 221.970 )
set u = CreateUnit( p, 'n02Z', 8286.0, 11109.3, 250.000 )
set u = CreateUnit( p, 'n00Q', -2397.9, 13176.2, 198.617 )
set u = CreateUnit( p, 'n00Q', -1104.9, 12813.3, 232.917 )
set u = CreateUnit( p, 'n00Q', -842.6, 13255.2, 184.169 )
set u = CreateUnit( p, 'n00Q', -1649.7, 13702.1, 334.895 )
set u = CreateUnit( p, 'n00Q', -1306.2, 13507.6, 78.862 )
set u = CreateUnit( p, 'n00Q', -1470.1, 14273.4, 269.778 )
set u = CreateUnit( p, 'n00Q', -1764.4, 14427.2, 221.271 )
set u = CreateUnit( p, 'n00Q', -1420.6, 14690.0, 277.666 )
set u = CreateUnit( p, 'n00Q', -1800.4, 14727.3, 202.682 )
set u = CreateUnit( p, 'n00Q', -1986.4, 12546.3, 196.716 )
set u = CreateUnit( p, 'n00Q', -617.9, 12371.4, 350.376 )
set u = CreateUnit( p, 'n02M', 6357.8, -11622.9, 343.487 )
set u = CreateUnit( p, 'n02M', 6168.8, -11386.5, 304.429 )
set u = CreateUnit( p, 'n02M', 6401.4, -11877.7, 193.178 )
set u = CreateUnit( p, 'n02N', 6232.3, -11800.0, 348.630 )
call SetUnitState( u, UNIT_STATE_MANA, 0 )
set t = CreateTrigger( )
call TriggerRegisterUnitEvent( t, u, EVENT_UNIT_DEATH )
call TriggerRegisterUnitEvent( t, u, EVENT_UNIT_CHANGE_OWNER )
call TriggerAddAction( t, function ItemTable000000_DropItems )
set u = CreateUnit( p, 'n02M', 6176.0, -12018.8, 132.367 )
set u = CreateUnit( p, 'n01S', -14646.9, -14881.1, 193.570 )
call SetUnitState( u, UNIT_STATE_MANA, 0 )
set t = CreateTrigger( )
call TriggerRegisterUnitEvent( t, u, EVENT_UNIT_DEATH )
call TriggerRegisterUnitEvent( t, u, EVENT_UNIT_CHANGE_OWNER )
call TriggerAddAction( t, function ItemTable000000_DropItems )
set u = CreateUnit( p, 'n01S', -14400.7, -14793.3, 156.360 )
call SetUnitState( u, UNIT_STATE_MANA, 0 )
set t = CreateTrigger( )
call TriggerRegisterUnitEvent( t, u, EVENT_UNIT_DEATH )
call TriggerRegisterUnitEvent( t, u, EVENT_UNIT_CHANGE_OWNER )
call TriggerAddAction( t, function ItemTable000000_DropItems )
set u = CreateUnit( p, 'ncnk', -14340.9, -15267.1, 320.635 )
call SetUnitState( u, UNIT_STATE_MANA, 0 )
set u = CreateUnit( p, 'ncen', -14863.7, -14660.9, 84.334 )
set u = CreateUnit( p, 'ncen', -14748.2, -15333.8, 330.611 )
set u = CreateUnit( p, 'ncks', -14931.3, -15124.8, 141.827 )
call SetUnitState( u, UNIT_STATE_MANA, 0 )
set u = CreateUnit( p, 'n031', 13789.5, 14324.5, 316.060 )
set u = CreateUnit( p, 'n02X', -12979.0, -8079.9, 206.400 )
set u = CreateUnit( p, 'n031', 14152.6, 14305.8, 250.913 )
set u = CreateUnit( p, 'n031', 14150.7, 14875.2, 318.888 )
set u = CreateUnit( p, 'n031', 14466.5, 15067.8, 224.381 )
set u = CreateUnit( p, 'n031', 14993.5, 13662.7, 232.961 )
set u = CreateUnit( p, 'n031', 15425.5, 13312.0, 179.566 )
set u = CreateUnit( p, 'n031', 15291.0, 13612.7, 69.546 )
set u = CreateUnit( p, 'n031', 13272.8, 11991.0, 146.320 )
set u = CreateUnit( p, 'n031', 13728.6, 11775.4, 179.797 )
set u = CreateUnit( p, 'n031', 13643.2, 12104.3, 65.700 )
set u = CreateUnit( p, 'n031', 14348.9, 13104.4, 339.818 )
set u = CreateUnit( p, 'n031', 13681.2, 13719.5, 331.171 )
set u = CreateUnit( p, 'u00A', 11361.7, 8370.3, 189.720 )
set u = CreateUnit( p, 'u00B', 11207.2, 8263.9, 240.000 )
set u = CreateUnit( p, 'n032', 14257.6, 13817.1, 342.250 )
set u = CreateUnit( p, 'n031', 14066.2, 7292.7, 198.990 )
set u = CreateUnit( p, 'n031', 13796.5, 7541.0, 94.529 )
set u = CreateUnit( p, 'n031', 13640.9, 8322.3, 102.714 )
set u = CreateUnit( p, 'n031', 13299.5, 7616.6, 340.916 )
set u = CreateUnit( p, 'n031', 14321.4, 7844.8, 111.668 )
set u = CreateUnit( p, 'n031', 14035.6, 8148.5, 14.502 )
set u = CreateUnit( p, 'n031', 14614.6, 7697.5, 23.632 )
set u = CreateUnit( p, 'n031', 14402.1, 8284.7, 353.265 )
set u = CreateUnit( p, 'n031', 14144.1, 8642.7, 51.231 )
set u = CreateUnit( p, 'n031', 14919.3, 7872.8, 155.967 )
set u = CreateUnit( p, 'n031', 14869.8, 8630.8, 32.800 )
set u = CreateUnit( p, 'n031', 13364.4, 8562.3, 274.853 )
set u = CreateUnit( p, 'n031', 13863.3, 8862.2, 247.387 )
set u = CreateUnit( p, 'n02Q', 10469.5, 14976.0, 275.000 )
call IssueImmediateOrder( u, "" )
set gg_unit_n02P_0377 = CreateUnit( p, 'n02P', 14867.2, -1698.1, 212.420 )
set gg_unit_h00K_0395 = CreateUnit( p, 'h00K', 10743.3, 14799.4, 262.490 )
call SetUnitColor( gg_unit_h00K_0395, ConvertPlayerColor(3) )
set t = CreateTrigger( )
call TriggerRegisterUnitEvent( t, gg_unit_h00K_0395, EVENT_UNIT_DEATH )
call TriggerRegisterUnitEvent( t, gg_unit_h00K_0395, EVENT_UNIT_CHANGE_OWNER )
call TriggerAddAction( t, function Unit000039_DropItems )
set u = CreateUnit( p, 'n02O', 11527.4, 8259.6, 250.000 )
set u = CreateUnit( p, 'u00C', 11256.4, 8503.3, 214.317 )
set u = CreateUnit( p, 'u00D', 11554.1, 8506.7, 88.420 )
set gg_unit_n02Q_0399 = CreateUnit( p, 'n02Q', 10582.5, 12008.9, 288.270 )
endfunction
//===========================================================================
function CreateNeutralPassiveBuildings takes nothing returns nothing
local player p = Player(PLAYER_NEUTRAL_PASSIVE)
local unit u
local integer unitID
local trigger t
local real life
set u = CreateUnit( p, 'n006', 896.0, -1152.0, 270.000 )
set gg_unit_n00Y_0003 = CreateUnit( p, 'n00Y', 1088.0, 7104.0, 270.000 )
set u = CreateUnit( p, 'n01K', 3840.0, -256.0, 270.000 )
set u = CreateUnit( p, 'ntn2', -3744.0, -14496.0, 270.000 )
set u = CreateUnit( p, 'nten', -2784.0, -15008.0, 270.000 )
set u = CreateUnit( p, 'ntn2', -3424.0, -15520.0, 270.000 )
set u = CreateUnit( p, 'ntn2', -3168.0, -15520.0, 270.000 )
set u = CreateUnit( p, 'nmh1', -4128.0, -15456.0, 270.000 )
set u = CreateUnit( p, 'n00U', -64.0, 1664.0, 270.000 )
set gg_unit_n01L_0025 = CreateUnit( p, 'n01L', -224.0, -4064.0, 270.000 )
set u = CreateUnit( p, 'n00U', -5824.0, 2816.0, 270.000 )
set u = CreateUnit( p, 'n00U', -5760.0, 13248.0, 270.000 )
set u = CreateUnit( p, 'n00U', -7552.0, -4608.0, 270.000 )
set u = CreateUnit( p, 'n00U', 3904.0, -1280.0, 270.000 )
set u = CreateUnit( p, 'n00U', -10240.0, -14976.0, 270.000 )
set u = CreateUnit( p, 'n00T', 640.0, 2816.0, 270.000 )
set u = CreateUnit( p, 'n01B', 1504.0, 7072.0, 270.000 )
set u = CreateUnit( p, 'n01H', -7296.0, -4032.0, 270.000 )
set u = CreateUnit( p, 'nmh1', -2784.0, -13920.0, 270.000 )
set u = CreateUnit( p, 'nmh1', -3616.0, -13856.0, 270.000 )
set u = CreateUnit( p, 'n000', -4512.0, 3040.0, 270.000 )
set u = CreateUnit( p, 'n01O', 5440.0, 11648.0, 270.000 )
set u = CreateUnit( p, 'n029', -7680.0, 14656.0, 270.000 )
set gg_unit_n02G_0157 = CreateUnit( p, 'n02G', 5440.0, -64.0, 270.000 )
set u = CreateUnit( p, 'n02F', -4032.0, 2752.0, 270.000 )
set u = CreateUnit( p, 'nmh0', -4192.0, -14560.0, 270.000 )
set u = CreateUnit( p, 'n01L', -3872.0, -13024.0, 270.000 )
set u = CreateUnit( p, 'n01C', -6912.0, 14400.0, 270.000 )
set u = CreateUnit( p, 'nmh1', -2208.0, -14624.0, 270.000 )
set u = CreateUnit( p, 'nmh1', -2272.0, -15520.0, 270.000 )
set u = CreateUnit( p, 'nfr2', -3328.0, -14400.0, 270.000 )
set u = CreateUnit( p, 'n02J', 8896.0, -7872.0, 270.000 )
set u = CreateUnit( p, 'ngt2', 9888.0, -7072.0, 270.000 )
set u = CreateUnit( p, 'ngnh', 10336.0, -7136.0, 270.000 )
set u = CreateUnit( p, 'o000', 8960.0, -6912.0, 270.000 )
set u = CreateUnit( p, 'o000', 9280.0, -7744.0, 270.000 )
set u = CreateUnit( p, 'o000', 10944.0, -7616.0, 270.000 )
set u = CreateUnit( p, 'o000', 9984.0, -8128.0, 270.000 )
set u = CreateUnit( p, 'o000', 7424.0, -8000.0, 270.000 )
set u = CreateUnit( p, 'o000', 8192.0, -8128.0, 270.000 )
set u = CreateUnit( p, 'ntn2', 8480.0, -8160.0, 270.000 )
set u = CreateUnit( p, 'ntn2', 7904.0, -8096.0, 270.000 )
set u = CreateUnit( p, 'ntn2', 7648.0, -8032.0, 270.000 )
set u = CreateUnit( p, 'nten', 8992.0, -7776.0, 270.000 )
set gg_unit_n02L_0229 = CreateUnit( p, 'n02L', -2880.0, -15104.0, 270.000 )
set u = CreateUnit( p, 'n001', -15424.0, -5440.0, 270.000 )
set u = CreateUnit( p, 'n00J', -15040.0, -5440.0, 270.000 )
set u = CreateUnit( p, 'n01L', -14560.0, -6560.0, 270.000 )
set u = CreateUnit( p, 'nef2', -5920.0, 13920.0, 270.000 )
set u = CreateUnit( p, 'nef0', -6496.0, 14176.0, 270.000 )
set u = CreateUnit( p, 'nef6', -7264.0, 13792.0, 270.000 )
set gg_unit_hshy_0272 = CreateUnit( p, 'hshy', -4704.0, 13216.0, 270.000 )
set u = CreateUnit( p, 'nef2', -6496.0, 15008.0, 270.000 )
set u = CreateUnit( p, 'nef0', -7008.0, 14944.0, 270.000 )
set u = CreateUnit( p, 'nef3', -5152.0, 13344.0, 270.000 )
set u = CreateUnit( p, 'nef3', -6240.0, 12896.0, 270.000 )
set u = CreateUnit( p, 'net2', -5504.0, 13504.0, 270.000 )
set u = CreateUnit( p, 'net2', -6208.0, 14208.0, 270.000 )
set u = CreateUnit( p, 'net2', -6144.0, 14656.0, 270.000 )
set u = CreateUnit( p, 'net2', -5952.0, 15040.0, 270.000 )
set u = CreateUnit( p, 'net2', -5184.0, 13568.0, 270.000 )
set u = CreateUnit( p, 'ngme', -832.0, 704.0, 270.000 )
set u = CreateUnit( p, 'n00L', -14656.0, -5440.0, 270.000 )
set u = CreateUnit( p, 'n01M', -14592.0, -5888.0, 270.000 )
set u = CreateUnit( p, 'n019', -14592.0, -6272.0, 270.000 )
set u = CreateUnit( p, 'n01I', -14976.0, -6208.0, 270.000 )
set u = CreateUnit( p, 'n01G', -15360.0, -6144.0, 270.000 )
set u = CreateUnit( p, 'n00H', -14976.0, -5824.0, 270.000 )
set u = CreateUnit( p, 'n01J', -15424.0, -4608.0, 270.000 )
set u = CreateUnit( p, 'n00K', -14976.0, -4736.0, 270.000 )
endfunction
//===========================================================================
function CreateNeutralPassive takes nothing returns nothing
local player p = Player(PLAYER_NEUTRAL_PASSIVE)
local unit u
local integer unitID
local trigger t
local real life
set gg_unit_nhef_0008 = CreateUnit( p, 'nhef', -5296.9, 12788.0, 270.000 )
set u = CreateUnit( p, 'nmed', 5772.4, 11523.1, 335.250 )
set u = CreateUnit( p, 'nass', 7412.4, -7628.8, 6.164 )
set u = CreateUnit( p, 'e007', -6693.4, 14012.0, 322.850 )
call SetUnitColor( u, ConvertPlayerColor(1) )
set gg_unit_nska_0035 = CreateUnit( p, 'nska', 727.0, 6009.8, 300.771 )
set u = CreateUnit( p, 'H01E', 8318.3, 309.2, 270.000 )
call SetUnitState( u, UNIT_STATE_MANA, 0 )
call SetUnitColor( u, ConvertPlayerColor(0) )
set u = CreateUnit( p, 'H01G', 8353.1, -217.2, 270.000 )
call SetUnitState( u, UNIT_STATE_MANA, 0 )
call SetUnitColor( u, ConvertPlayerColor(12) )
set u = CreateUnit( p, 'H01O', 8704.1, -522.0, 270.000 )
call SetUnitState( u, UNIT_STATE_MANA, 0 )
set u = CreateUnit( p, 'H01Y', 9093.8, -525.2, 270.000 )
call SetUnitState( u, UNIT_STATE_MANA, 0 )
call SetUnitColor( u, ConvertPlayerColor(12) )
set u = CreateUnit( p, 'H00S', 9478.1, -290.1, 270.000 )
call SetUnitState( u, UNIT_STATE_MANA, 45 )
set u = CreateUnit( p, 'nbrg', 5310.3, -1569.3, 325.304 )
set u = CreateUnit( p, 'nban', 5645.8, -1330.1, 338.213 )
set u = CreateUnit( p, 'nban', 5327.2, -897.1, 352.760 )
set u = CreateUnit( p, 'nban', 4874.1, -2208.3, 304.309 )
set u = CreateUnit( p, 'nrog', 4280.3, -2332.5, 221.700 )
set gg_unit_nass_0071 = CreateUnit( p, 'nass', 3725.6, -1514.8, 159.779 )
set u = CreateUnit( p, 'nban', 3737.5, -616.5, 305.100 )
set gg_unit_nban_0073 = CreateUnit( p, 'nban', 3652.8, -362.4, 31.257 )
set gg_unit_nban_0074 = CreateUnit( p, 'nban', 4527.7, -400.8, 298.936 )
set u = CreateUnit( p, 'nvlw', 4915.5, -512.2, 102.780 )
set u = CreateUnit( p, 'nvlw', 4531.1, -1799.3, 102.725 )
set gg_unit_nvlw_0077 = CreateUnit( p, 'nvlw', 5030.8, -1528.0, 12.821 )
set u = CreateUnit( p, 'nvlw', 4144.6, -1117.9, 124.863 )
set gg_unit_nvl2_0079 = CreateUnit( p, 'nvl2', 4485.0, -1520.2, 148.067 )
set u = CreateUnit( p, 'nvl2', 5483.9, -1010.2, 206.483 )
set gg_unit_nvil_0081 = CreateUnit( p, 'nvil', 5306.1, -597.9, 90.519 )
set u = CreateUnit( p, 'nvlk', 5583.7, -1404.5, 357.451 )
set u = CreateUnit( p, 'nvk2', 4318.3, -540.9, 194.431 )
set u = CreateUnit( p, 'n01D', -7582.2, -3838.1, 17.348 )
set gg_unit_nska_0087 = CreateUnit( p, 'nska', 959.4, 5811.2, 350.343 )
set gg_unit_nska_0088 = CreateUnit( p, 'nska', 1103.8, 5773.1, 213.031 )
set u = CreateUnit( p, 'nska', 659.4, 6200.0, 171.963 )
set gg_unit_nvdw_0091 = CreateUnit( p, 'nvdw', 1279.1, 6131.7, 349.266 )
call SetUnitState( gg_unit_nvdw_0091, UNIT_STATE_MANA, 0 )
set gg_unit_N002_0092 = CreateUnit( p, 'N002', 539.5, -1076.4, 133.800 )
call SetHeroLevel( gg_unit_N002_0092, 275, false )
set u = CreateUnit( p, 'n003', -5239.9, 2520.1, 55.131 )
set u = CreateUnit( p, 'n003', -4341.5, 1620.0, 188.817 )
set u = CreateUnit( p, 'n003', -3768.6, 1806.9, 111.943 )
set u = CreateUnit( p, 'n004', -4043.8, 1762.2, 340.455 )
set u = CreateUnit( p, 'n004', -5947.9, 2144.6, 231.676 )
set u = CreateUnit( p, 'n004', -6007.0, 2151.9, 245.618 )
set u = CreateUnit( p, 'n004', -5381.3, 2218.2, 158.483 )
set u = CreateUnit( p, 'n004', -5078.0, 2606.3, 68.007 )
set u = CreateUnit( p, 'n004', -5028.3, 3048.5, 149.792 )
set u = CreateUnit( p, 'n004', -3964.4, 1787.1, 53.824 )
set gg_unit_n005_0105 = CreateUnit( p, 'n005', -4301.8, 1620.1, 236.741 )
set gg_unit_n005_0106 = CreateUnit( p, 'n005', -4530.2, 1232.6, 91.222 )
set gg_unit_n005_0107 = CreateUnit( p, 'n005', -4837.4, 1340.9, 209.988 )
set gg_unit_n005_0108 = CreateUnit( p, 'n005', -5059.2, 1913.8, 124.907 )
set gg_unit_n005_0109 = CreateUnit( p, 'n005', -5419.6, 1896.8, 64.909 )
set u = CreateUnit( p, 'n005', -5763.4, 2348.2, 172.776 )
set gg_unit_n005_0111 = CreateUnit( p, 'n005', -5932.4, 1998.0, 168.250 )
set u = CreateUnit( p, 'n005', -4677.6, 2818.4, 270.000 )
set gg_unit_n005_0113 = CreateUnit( p, 'n005', -4706.8, 2514.2, 161.954 )
set gg_unit_n005_0114 = CreateUnit( p, 'n005', -4883.7, 2586.0, 330.556 )
set gg_unit_n005_0115 = CreateUnit( p, 'n005', -4967.5, 2855.5, 129.071 )
set gg_unit_nvdw_0117 = CreateUnit( p, 'nvdw', 1359.5, 5780.8, 231.983 )
call SetUnitState( gg_unit_nvdw_0117, UNIT_STATE_MANA, 0 )
set gg_unit_nvdw_0118 = CreateUnit( p, 'nvdw', 1183.1, 6045.4, 231.983 )
call SetUnitState( gg_unit_nvdw_0118, UNIT_STATE_MANA, 0 )
set gg_unit_nvdw_0120 = CreateUnit( p, 'nvdw', 646.6, 6331.5, 231.983 )
call SetUnitState( gg_unit_nvdw_0120, UNIT_STATE_MANA, 0 )
set u = CreateUnit( p, 'n01D', -7728.6, -3901.0, 17.524 )
set gg_unit_nhef_0122 = CreateUnit( p, 'nhef', 531.2, 2573.7, 279.450 )
set u = CreateUnit( p, 'nshe', 960.3, 2982.3, 306.462 )
set u = CreateUnit( p, 'nshe', 1034.7, 2978.4, 82.499 )
set u = CreateUnit( p, 'n01D', -7815.3, -4106.9, 130.961 )
set u = CreateUnit( p, 'n01D', -7759.0, -4128.8, 289.026 )
set u = CreateUnit( p, 'H00X', 9489.4, 741.1, 270.000 )
call SetUnitState( u, UNIT_STATE_MANA, 45 )
set u = CreateUnit( p, 'nshe', 1008.4, 2858.8, 62.009 )
set u = CreateUnit( p, 'nshe', 937.1, 2879.2, 189.553 )
set u = CreateUnit( p, 'nshe', 1042.4, 2918.3, 75.478 )
set u = CreateUnit( p, 'n01D', -7657.8, -4214.4, 292.915 )
set u = CreateUnit( p, 'n01D', -7634.7, -4295.7, 352.221 )
set u = CreateUnit( p, 'n01D', -7568.2, -4327.5, 305.759 )
set u = CreateUnit( p, 'n01D', -7716.5, -4344.8, 77.302 )
set u = CreateUnit( p, 'n01D', -7925.6, -4012.9, 342.004 )
set u = CreateUnit( p, 'n01D', -7819.7, -3784.7, 7.570 )
set u = CreateUnit( p, 'n01D', -7816.0, -3644.5, 216.723 )
set u = CreateUnit( p, 'n01D', -8077.5, -4231.4, 298.892 )
set u = CreateUnit( p, 'n01D', -8030.4, -4425.7, 215.767 )
set u = CreateUnit( p, 'nchp', 1488.4, 6066.3, 176.435 )
call SetUnitState( u, UNIT_STATE_MANA, 0 )
set gg_unit_nssn_0141 = CreateUnit( p, 'nssn', 1012.9, 6602.7, 137.630 )
set u = CreateUnit( p, 'nvil', 1140.7, 6553.8, 153.945 )
set gg_unit_nvil_0143 = CreateUnit( p, 'nvil', 1305.0, 5970.7, 95.979 )
set u = CreateUnit( p, 'nvl2', 557.1, 6409.1, 178.390 )
set u = CreateUnit( p, 'H000', 9642.9, 210.7, 270.000 )
call SetUnitState( u, UNIT_STATE_MANA, 45 )
set u = CreateUnit( p, 'nvk2', 1322.0, 6428.5, 302.155 )
set u = CreateUnit( p, 'nvk2', 1369.6, 6124.4, 305.407 )
set u = CreateUnit( p, 'n00V', -3940.8, 1448.5, 88.014 )
set u = CreateUnit( p, 'n00V', -4416.3, 1429.9, 313.757 )
set gg_unit_n00V_0150 = CreateUnit( p, 'n00V', -5965.8, 2007.0, 138.050 )
set u = CreateUnit( p, 'n00V', -6357.8, 2325.3, 140.500 )
set u = CreateUnit( p, 'n00V', -6110.2, 2055.5, 146.079 )
set u = CreateUnit( p, 'n00V', -3812.8, 1277.5, 63.646 )
set u = CreateUnit( p, 'n00V', -5619.5, 12295.3, 231.478 )
set u = CreateUnit( p, 'n00V', -4751.6, 12286.4, 165.459 )
set u = CreateUnit( p, 'n007', -5385.3, 14245.5, 344.377 )
set u = CreateUnit( p, 'n007', -4032.8, 1787.9, 351.936 )
set u = CreateUnit( p, 'n007', 4439.3, -1424.5, 288.312 )
set u = CreateUnit( p, 'n007', 1379.7, 6355.7, 84.542 )
set u = CreateUnit( p, 'nsty', -3739.6, -14632.3, 330.410 )
set gg_unit_n01A_0166 = CreateUnit( p, 'n01A', 1594.7, 6859.7, 231.348 )
call SetUnitState( gg_unit_n01A_0166, UNIT_STATE_MANA, 0 )
set gg_unit_nsat_0169 = CreateUnit( p, 'nsat', -3422.6, -15318.3, 77.780 )
call SetUnitState( gg_unit_nsat_0169, UNIT_STATE_MANA, 0 )
set u = CreateUnit( p, 'E00J', 8619.5, 737.3, 270.000 )
set gg_unit_nsty_0173 = CreateUnit( p, 'nsty', -3383.7, -15204.9, 219.579 )
set u = CreateUnit( p, 'nwlt', -2285.2, -14950.2, 10.000 )
set u = CreateUnit( p, 'nsty', -2275.9, -14872.3, 10.000 )
set u = CreateUnit( p, 'nsty', -2645.7, -14034.2, 351.000 )
set u = CreateUnit( p, 'nwlt', -2649.0, -14119.5, 351.211 )
set gg_unit_nsty_0191 = CreateUnit( p, 'nsty', -4162.0, -14708.6, 180.000 )
set u = CreateUnit( p, 'nwlt', -4121.8, -14778.4, 178.885 )
set u = CreateUnit( p, 'nsty', -3795.3, -13893.6, 100.000 )
set u = CreateUnit( p, 'nwlt', -3753.2, -13811.3, 137.564 )
set u = CreateUnit( p, 'nsty', -4044.8, -15271.0, 180.000 )
set u = CreateUnit( p, 'nwlt', -4001.0, -15205.7, 180.000 )
set u = CreateUnit( p, 'nban', 9123.3, -6791.7, 150.000 )
set u = CreateUnit( p, 'nsth', -3292.4, -14725.0, 245.510 )
set u = CreateUnit( p, 'nban', 9474.3, -6782.9, 130.000 )
set u = CreateUnit( p, 'nbrg', 9575.3, -6840.5, 110.000 )
set u = CreateUnit( p, 'nbrg', 7585.2, -7565.8, 100.000 )
set u = CreateUnit( p, 'nban', 7684.0, -7559.1, 100.000 )
set u = CreateUnit( p, 'nrog', 9450.9, -7834.0, 330.000 )
set u = CreateUnit( p, 'nass', 9492.4, -7757.4, 330.000 )
set u = CreateUnit( p, 'nenf', 9856.4, -8131.6, 225.000 )
set u = CreateUnit( p, 'nban', 9831.8, -8038.4, 225.000 )
set u = CreateUnit( p, 'nban', 10778.8, -7678.3, 280.000 )
set u = CreateUnit( p, 'nban', 10492.0, -8035.2, 0.000 )
set u = CreateUnit( p, 'nbrg', 10506.4, -7929.5, 9.613 )
set u = CreateUnit( p, 'nbrg', 10561.2, -7308.3, 50.000 )
set u = CreateUnit( p, 'nbld', 9995.7, -7328.1, 280.000 )
call SetUnitState( u, UNIT_STATE_MANA, 0 )
set gg_unit_nwzd_0223 = CreateUnit( p, 'nwzd', 10261.4, -7324.8, 250.000 )
call SetUnitState( gg_unit_nwzd_0223, UNIT_STATE_MANA, 0 )
set u = CreateUnit( p, 'U00E', -1165.5, 576.1, 300.000 )
call SetHeroLevel( u, 1000, false )
call SetUnitColor( u, ConvertPlayerColor(12) )
set u = CreateUnit( p, 'nhef', -6672.0, 12977.5, 15.777 )
set gg_unit_nhef_0256 = CreateUnit( p, 'nhef', -6708.0, 13121.9, 311.988 )
set u = CreateUnit( p, 'nhef', -6451.9, 12630.5, 148.474 )
set u = CreateUnit( p, 'nhef', -6223.0, 13214.5, 313.087 )
set u = CreateUnit( p, 'nhef', -6476.7, 13270.6, 286.290 )
set u = CreateUnit( p, 'nhem', -6619.3, 13378.3, 76.247 )
set u = CreateUnit( p, 'nhem', -6685.6, 12798.1, 67.546 )
set u = CreateUnit( p, 'nhem', -6990.0, 13482.9, 58.405 )
set gg_unit_nhem_0263 = CreateUnit( p, 'nhem', -6272.3, 13511.7, 150.363 )
set gg_unit_nhem_0264 = CreateUnit( p, 'nhem', -6559.3, 13761.6, 291.256 )
set u = CreateUnit( p, 'nhem', -6869.4, 13780.3, 122.435 )
set u = CreateUnit( p, 'nhem', -7236.5, 13432.1, 212.361 )
set u = CreateUnit( p, 'n00G', -4981.7, 14780.1, 200.720 )
set u = CreateUnit( p, 'nvlk', -7575.3, 13901.1, 52.362 )
set u = CreateUnit( p, 'nvlk', -7489.1, 13812.7, 228.116 )
set u = CreateUnit( p, 'nvlk', -7193.7, 14856.6, 133.741 )
set u = CreateUnit( p, 'nvlk', -7372.1, 14899.6, 98.528 )
set u = CreateUnit( p, 'nvlk', -6564.3, 14402.0, 207.615 )
set u = CreateUnit( p, 'nvlk', -6243.7, 13794.9, 30.631 )
set u = CreateUnit( p, 'nvlk', -6146.7, 13919.9, 317.756 )
set gg_unit_nhef_0289 = CreateUnit( p, 'nhef', -7298.1, 14547.5, 15.777 )
set u = CreateUnit( p, 'nhef', -6652.0, 14699.1, 15.777 )
set u = CreateUnit( p, 'nhef', -6606.5, 14411.6, 15.777 )
set gg_unit_nhem_0292 = CreateUnit( p, 'nhem', -7219.0, 12766.2, 291.256 )
set gg_unit_nhem_0293 = CreateUnit( p, 'nhem', -6950.2, 12768.2, 291.256 )
set gg_unit_nhem_0294 = CreateUnit( p, 'nhem', -6878.9, 12717.2, 150.363 )
set u = CreateUnit( p, 'nhem', -6940.8, 12661.1, 76.247 )
set u = CreateUnit( p, 'nhem', -7251.8, 14536.4, 150.363 )
set u = CreateUnit( p, 'O001', -1144.9, -223.3, 291.340 )
call SetHeroLevel( u, 275, false )
call SelectHeroSkill( u, 'AOwk' )
call SelectHeroSkill( u, 'AOwk' )
call SelectHeroSkill( u, 'AOwk' )
call SelectHeroSkill( u, 'AOmi' )
call SelectHeroSkill( u, 'AOmi' )
call SelectHeroSkill( u, 'AOmi' )
call SelectHeroSkill( u, 'AOfs' )
call SelectHeroSkill( u, 'AOfs' )
call SelectHeroSkill( u, 'AOfs' )
call SelectHeroSkill( u, 'AOcr' )
call SelectHeroSkill( u, 'AOcr' )
call SelectHeroSkill( u, 'AOcr' )
call UnitAddItemToSlotById( u, 'I04L', 0 )
call UnitAddItemToSlotById( u, 'I066', 1 )
set t = CreateTrigger( )
call TriggerRegisterUnitEvent( t, u, EVENT_UNIT_DEATH )
call TriggerRegisterUnitEvent( t, u, EVENT_UNIT_CHANGE_OWNER )
call TriggerAddAction( t, function Unit000016_DropItems )
set u = CreateUnit( p, 'e007', -2902.0, -15517.9, 330.050 )
call SetUnitColor( u, ConvertPlayerColor(1) )
set u = CreateUnit( p, 'nass', 8710.6, -6987.1, 230.489 )
set u = CreateUnit( p, 'nass', 10686.3, -7671.5, 335.170 )
set u = CreateUnit( p, 'nass', 9162.4, -6997.8, 128.039 )
set u = CreateUnit( p, 'nass', 10510.4, -7424.7, 122.688 )
set u = CreateUnit( p, 'nenf', 7571.7, -7674.2, 130.160 )
set u = CreateUnit( p, 'nenf', 9443.1, -7057.4, 88.210 )
set u = CreateUnit( p, 'U007', -390.5, -382.0, 229.160 )
call SetHeroLevel( u, 200, false )
call SelectHeroSkill( u, 'A044' )
call SelectHeroSkill( u, 'A044' )
call SelectHeroSkill( u, 'A044' )
call SelectHeroSkill( u, 'A044' )
call IssueImmediateOrder( u, "" )
call SelectHeroSkill( u, 'AOfs' )
call SelectHeroSkill( u, 'AOfs' )
call SelectHeroSkill( u, 'AOfs' )
call SelectHeroSkill( u, 'AOcr' )
call SelectHeroSkill( u, 'AOcr' )
call SelectHeroSkill( u, 'AOcr' )
call SelectHeroSkill( u, 'AHbh' )
call SelectHeroSkill( u, 'AHbh' )
call SelectHeroSkill( u, 'AHbh' )
call UnitAddItemToSlotById( u, 'I066', 0 )
call UnitAddItemToSlotById( u, 'I067', 1 )
endfunction
//===========================================================================
function CreatePlayerBuildings takes nothing returns nothing
endfunction
//===========================================================================
function CreatePlayerUnits takes nothing returns nothing
endfunction
//===========================================================================
function CreateAllUnits takes nothing returns nothing
call CreateNeutralHostileBuildings( )
call CreateNeutralPassiveBuildings( )
call CreatePlayerBuildings( )
call CreateNeutralHostile( )
call CreateNeutralPassive( )
call CreatePlayerUnits( )
endfunction
//***************************************************************************
//*
//* Regions
//*
//***************************************************************************
function CreateRegions takes nothing returns nothing
local weathereffect we
set gg_rct_Cactaur_Deserts = Rect( -14912.0, -4608.0, -9856.0, 4096.0 )
set gg_rct_Calm_Lands = Rect( -9024.0, 4992.0, -5376.0, 9088.0 )
set we = AddWeatherEffect( gg_rct_Calm_Lands, 'LRaa' )
call EnableWeatherEffect( we, true )
set gg_rct_Calm_Lands_entrance = Rect( -5024.0, 6880.0, -4704.0, 8064.0 )
set gg_rct_Choose_Amarant = Rect( 8192.0, 160.0, 8448.0, 384.0 )
set gg_rct_Choose_Butz = Rect( 8512.0, -640.0, 8768.0, -416.0 )
set gg_rct_Choose_Tellah = Rect( 8960.0, -640.0, 9216.0, -416.0 )
set gg_rct_Choose_Kimari = Rect( 8256.0, -352.0, 8480.0, -96.0 )
set gg_rct_Choose_Leonhart = Rect( 9472.0, 64.0, 9760.0, 384.0 )
set gg_rct_Choose_Quistis = Rect( 9344.0, -384.0, 9632.0, -160.0 )
set gg_rct_Choose_Terra = Rect( 9344.0, 640.0, 9568.0, 832.0 )
set gg_rct_Cid_Cutscene = Rect( -256.0, -1216.0, 32.0, -928.0 )
set gg_rct_Dark_Forest = Rect( 3328.0, 12320.0, 8928.0, 15552.0 )
set we = AddWeatherEffect( gg_rct_Dark_Forest, 'LRma' )
call EnableWeatherEffect( we, true )
set gg_rct_Dead_Marshes = Rect( -3264.0, 2080.0, -512.0, 10784.0 )
set we = AddWeatherEffect( gg_rct_Dead_Marshes, 'FDgl' )
call EnableWeatherEffect( we, true )
set gg_rct_Dead_Marshes_Entrance = Rect( -2528.0, 2144.0, -1248.0, 2400.0 )
set gg_rct_Enter_Elf_City = Rect( -5472.0, 12160.0, -4992.0, 12416.0 )
set gg_rct_Enter_the_World = Rect( -2080.0, -1184.0, -1760.0, -864.0 )
set gg_rct_Great_Forest = Rect( 3200.0, 4288.0, 8640.0, 10368.0 )
set we = AddWeatherEffect( gg_rct_Great_Forest, 'RAlr' )
call EnableWeatherEffect( we, true )
set gg_rct_Gurgan_Village = Rect( -6144.0, 1248.0, -3584.0, 3712.0 )
set gg_rct_Icecap = Rect( -2784.0, 11168.0, 288.0, 15552.0 )
set we = AddWeatherEffect( gg_rct_Icecap, 'SNls' )
call EnableWeatherEffect( we, true )
set gg_rct_Large_Medium_Area = Rect( -2784.0, -864.0, -1792.0, -128.0 )
set gg_rct_Medium_Casting_Area = Rect( -2528.0, -1632.0, -1632.0, -1120.0 )
set gg_rct_Mountains = Rect( -14976.0, 6368.0, -10816.0, 15328.0 )
set we = AddWeatherEffect( gg_rct_Mountains, 'WOlw' )
call EnableWeatherEffect( we, true )
set gg_rct_Plains = Rect( 1248.0, 1696.0, 5824.0, 4128.0 )
set gg_rct_Region_013 = Rect( 1472.0, 1728.0, 2944.0, 3072.0 )
set gg_rct_Small_Casting_Area = Rect( -2368.0, -2144.0, -1888.0, -1728.0 )
set gg_rct_Tropical_Island = Rect( -8192.0, -1440.0, -2912.0, 1248.0 )
set we = AddWeatherEffect( gg_rct_Tropical_Island, 'RAhr' )
call EnableWeatherEffect( we, true )
set gg_rct_Odin = Rect( 704.0, 13504.0, 2304.0, 15008.0 )
set gg_rct_Tropical_Peninsula = Rect( 6976.0, -6496.0, 10336.0, -2080.0 )
set gg_rct_The_Beach = Rect( -14688.0, -11776.0, -9920.0, -5696.0 )
set gg_rct_Mushroom_Forest = Rect( -96.0, -15808.0, 5312.0, -12480.0 )
set gg_rct_Southern_Forest = Rect( 2272.0, -10592.0, 7104.0, -5536.0 )
set gg_rct_Southern_Tundra = Rect( -9152.0, -15776.0, -4416.0, -7104.0 )
set gg_rct_Ancient_Forest = Rect( 8032.0, -15744.0, 15424.0, -8416.0 )
set gg_rct_The_Demon_Meadows = Rect( 12128.0, -8320.0, 15392.0, 6848.0 )
set gg_rct_Kefkas_Stronghold = Rect( 12416.0, 12608.0, 13472.0, 13568.0 )
set gg_rct_Ultima_Weapon = Rect( -14560.0, 13024.0, -13568.0, 13312.0 )
set gg_rct_Giant_Lizard = Rect( -9376.0, -5024.0, -9248.0, -2080.0 )
set gg_rct_Adamontoise = Rect( -5952.0, -2304.0, -5696.0, -1600.0 )
set gg_rct_Ocean_Serpent = Rect( -7648.0, 9504.0, -6336.0, 11616.0 )
set gg_rct_Create_Weapon = Rect( -14464.0, 14240.0, -14176.0, 14592.0 )
set gg_rct_Wisp_Starting_Area = Rect( 8832.0, -32.0, 9088.0, 256.0 )
set gg_rct_Tutorials = Rect( 8032.0, 1696.0, 9696.0, 3232.0 )
set gg_rct_Tutorial_Items = Rect( 8832.0, 2624.0, 9088.0, 2880.0 )
set gg_rct_Region_044 = Rect( 9184.0, 5184.0, 9696.0, 5728.0 )
set gg_rct_Ship_Route_1 = Rect( 1056.0, 5984.0, 1728.0, 6880.0 )
set gg_rct_Ship_Route_2 = Rect( -5760.0, 13856.0, -4960.0, 15072.0 )
set gg_rct_Ship_Route_3 = Rect( -4256.0, 1568.0, -3680.0, 2464.0 )
set gg_rct_Ship_Route_4 = Rect( 4032.0, -1792.0, 4832.0, -896.0 )
set gg_rct_Region_049 = Rect( -7136.0, 12512.0, -7040.0, 12608.0 )
set gg_rct_Swamp_Town_Cutscene = Rect( 288.0, 5376.0, 832.0, 5888.0 )
set gg_rct_Elf_Town = Rect( -8160.0, 12608.0, -5024.0, 15296.0 )
set gg_rct_Swamp_Town = Rect( 160.0, 5504.0, 2176.0, 7744.0 )
set gg_rct_Vakor = Rect( 2752.0, -2784.0, 6240.0, 448.0 )
set gg_rct_Region_055 = Rect( -512.0, 4352.0, -64.0, 4768.0 )
set gg_rct_Region_056 = Rect( -6048.0, 9184.0, -5632.0, 9568.0 )
set gg_rct_Elf_Guard = Rect( -5760.0, 11904.0, -4544.0, 12480.0 )
set gg_rct_Return_to_town = Rect( -6336.0, 9216.0, -4608.0, 12032.0 )
set gg_rct_Evil_Ship_Spawn = Rect( 6464.0, 1696.0, 7200.0, 2464.0 )
set gg_rct_Spawn_Battleship = Rect( 5120.0, 1760.0, 5376.0, 2080.0 )
set gg_rct_Airship_Opening = Rect( 12000.0, 8448.0, 15520.0, 10848.0 )
set gg_rct_Hero_Selection_Unit_Stopper = Rect( 7456.0, -1248.0, 10560.0, 1952.0 )
set gg_rct_Hero_Selection_Unit_Stopper_Move = Rect( 896.0, 1568.0, 1120.0, 1856.0 )
set gg_rct_Life_Spawn = Rect( -64.0, 608.0, 64.0, 736.0 )
set gg_rct_Elf_town_life = Rect( -6784.0, 13920.0, -6624.0, 14112.0 )
set gg_rct_Satyr_Village = Rect( -4224.0, -15872.0, -2144.0, -13760.0 )
set gg_rct_Pirate_Camp = Rect( 7264.0, -8224.0, 11040.0, -6560.0 )
set gg_rct_Prisoner_Spawn = Rect( 6144.0, -11680.0, 6272.0, -11520.0 )
set gg_rct_Denerall_Move = Rect( -3264.0, -15360.0, -3136.0, -15232.0 )
set gg_rct_Spawn_Pirates = Rect( 4960.0, -10944.0, 6176.0, -10624.0 )
set gg_rct_Guarditem = Rect( -4224.0, -14752.0, -4160.0, -14688.0 )
set gg_rct_Pirate_Spawn_2 = Rect( 6080.0, -12608.0, 6912.0, -12448.0 )
set gg_rct_SatyrLife = Rect( -2976.0, -15616.0, -2816.0, -15456.0 )
set gg_rct_Pirate_Scout_Spawn = Rect( 9184.0, -6848.0, 9376.0, -6592.0 )
set gg_rct_Pirate_Scout_Move = Rect( 10016.0, -7616.0, 10208.0, -7392.0 )
set gg_rct_Naga_Spawn_east = Rect( 11328.0, -7296.0, 11520.0, -6912.0 )
set gg_rct_Naga_Spawn_North = Rect( 8928.0, -5056.0, 9632.0, -4576.0 )
set gg_rct_Naga_Spawn_West = Rect( 7136.0, -6464.0, 7360.0, -6016.0 )
set gg_rct_Naga_Spawn_South = Rect( 9696.0, -10048.0, 10080.0, -9760.0 )
set gg_rct_Naga_Attack = Rect( 9312.0, -7520.0, 9472.0, -7328.0 )
set gg_rct_battle_kefka = Rect( 10336.0, 13632.0, 11168.0, 14496.0 )
set gg_rct_Kefka_Outer_Ruins = Rect( 9952.0, 6464.0, 11904.0, 12544.0 )
set gg_rct_Kefka_fight_no = Rect( 10112.0, 12960.0, 12960.0, 15424.0 )
set gg_rct_Kefka_Fight_no_moved = Rect( 12352.0, 12832.0, 12960.0, 12960.0 )
set gg_rct_Life_Spawn_Copy = Rect( 320.0, 608.0, 448.0, 736.0 )
set gg_rct_Life_Spawn_Copy_2 = Rect( 704.0, 608.0, 832.0, 736.0 )
set gg_rct_Life_Spawn_Copy_3 = Rect( 448.0, 96.0, 576.0, 224.0 )
set gg_rct_Life_Spawn_Copy_4 = Rect( 832.0, 96.0, 960.0, 224.0 )
set gg_rct_Choose_Sephiroth = Rect( 8448.0, 640.0, 8704.0, 896.0 )
set gg_rct_Region_088 = Rect( 9056.0, 4736.0, 10240.0, 5536.0 )
set gg_rct_Red_Items = Rect( -15520.0, -5632.0, -15328.0, -5408.0 )
set gg_rct_Blue_Items = Rect( -15328.0, -5632.0, -15136.0, -5408.0 )
set gg_rct_Teal_Items = Rect( -15136.0, -5632.0, -14944.0, -5408.0 )
set gg_rct_Purple_Items = Rect( -14944.0, -5632.0, -14752.0, -5408.0 )
set gg_rct_Orange_Items = Rect( -15520.0, -5856.0, -15328.0, -5632.0 )
set gg_rct_Yellow_Items = Rect( -15328.0, -5856.0, -15136.0, -5632.0 )
set gg_rct_Green_Items = Rect( -15136.0, -5856.0, -14944.0, -5632.0 )
set gg_rct_Pink_Items = Rect( -14944.0, -5856.0, -14752.0, -5632.0 )
set gg_rct_Gray_Items = Rect( -15520.0, -6080.0, -15328.0, -5856.0 )
set gg_rct_Light_Blue_Items = Rect( -15328.0, -6080.0, -15136.0, -5856.0 )
set gg_rct_Dark_Green_Items = Rect( -15136.0, -6080.0, -14944.0, -5856.0 )
endfunction
//***************************************************************************
//*
//* Cameras
//*
//***************************************************************************
function CreateCameras takes nothing returns nothing
set gg_cam_Camera_001 = CreateCameraSetup( )
call CameraSetupSetField( gg_cam_Camera_001, CAMERA_FIELD_ZOFFSET, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_001, CAMERA_FIELD_ROTATION, 359.3, 0.0 )
call CameraSetupSetField( gg_cam_Camera_001, CAMERA_FIELD_ANGLE_OF_ATTACK, 346.5, 0.0 )
call CameraSetupSetField( gg_cam_Camera_001, CAMERA_FIELD_TARGET_DISTANCE, 1656.2, 0.0 )
call CameraSetupSetField( gg_cam_Camera_001, CAMERA_FIELD_ROLL, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_001, CAMERA_FIELD_FIELD_OF_VIEW, 70.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_001, CAMERA_FIELD_FARZ, 5500.0, 0.0 )
call CameraSetupSetDestPosition( gg_cam_Camera_001, 1121.8, -1098.3, 0.0 )
set gg_cam_Camera_002 = CreateCameraSetup( )
call CameraSetupSetField( gg_cam_Camera_002, CAMERA_FIELD_ZOFFSET, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_002, CAMERA_FIELD_ROTATION, 84.6, 0.0 )
call CameraSetupSetField( gg_cam_Camera_002, CAMERA_FIELD_ANGLE_OF_ATTACK, 338.7, 0.0 )
call CameraSetupSetField( gg_cam_Camera_002, CAMERA_FIELD_TARGET_DISTANCE, 2424.9, 0.0 )
call CameraSetupSetField( gg_cam_Camera_002, CAMERA_FIELD_ROLL, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_002, CAMERA_FIELD_FIELD_OF_VIEW, 70.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_002, CAMERA_FIELD_FARZ, 5500.0, 0.0 )
call CameraSetupSetDestPosition( gg_cam_Camera_002, -5388.8, 2909.3, 0.0 )
set gg_cam_Camera_003 = CreateCameraSetup( )
call CameraSetupSetField( gg_cam_Camera_003, CAMERA_FIELD_ZOFFSET, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_003, CAMERA_FIELD_ROTATION, 103.2, 0.0 )
call CameraSetupSetField( gg_cam_Camera_003, CAMERA_FIELD_ANGLE_OF_ATTACK, 350.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_003, CAMERA_FIELD_TARGET_DISTANCE, 2424.9, 0.0 )
call CameraSetupSetField( gg_cam_Camera_003, CAMERA_FIELD_ROLL, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_003, CAMERA_FIELD_FIELD_OF_VIEW, 70.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_003, CAMERA_FIELD_FARZ, 5500.0, 0.0 )
call CameraSetupSetDestPosition( gg_cam_Camera_003, -4489.9, 2607.9, 0.0 )
set gg_cam_Camera_004 = CreateCameraSetup( )
call CameraSetupSetField( gg_cam_Camera_004, CAMERA_FIELD_ZOFFSET, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_004, CAMERA_FIELD_ROTATION, 184.1, 0.0 )
call CameraSetupSetField( gg_cam_Camera_004, CAMERA_FIELD_ANGLE_OF_ATTACK, 333.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_004, CAMERA_FIELD_TARGET_DISTANCE, 1505.7, 0.0 )
call CameraSetupSetField( gg_cam_Camera_004, CAMERA_FIELD_ROLL, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_004, CAMERA_FIELD_FIELD_OF_VIEW, 70.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_004, CAMERA_FIELD_FARZ, 5500.0, 0.0 )
call CameraSetupSetDestPosition( gg_cam_Camera_004, -4706.5, 1555.7, 0.0 )
set gg_cam_Camera_006 = CreateCameraSetup( )
call CameraSetupSetField( gg_cam_Camera_006, CAMERA_FIELD_ZOFFSET, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_006, CAMERA_FIELD_ROTATION, 72.5, 0.0 )
call CameraSetupSetField( gg_cam_Camera_006, CAMERA_FIELD_ANGLE_OF_ATTACK, 357.8, 0.0 )
call CameraSetupSetField( gg_cam_Camera_006, CAMERA_FIELD_TARGET_DISTANCE, 2430.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_006, CAMERA_FIELD_ROLL, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_006, CAMERA_FIELD_FIELD_OF_VIEW, 70.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_006, CAMERA_FIELD_FARZ, 5000.0, 0.0 )
call CameraSetupSetDestPosition( gg_cam_Camera_006, -6126.1, 14029.3, 0.0 )
set gg_cam_Camera_007 = CreateCameraSetup( )
call CameraSetupSetField( gg_cam_Camera_007, CAMERA_FIELD_ZOFFSET, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_007, CAMERA_FIELD_ROTATION, 35.3, 0.0 )
call CameraSetupSetField( gg_cam_Camera_007, CAMERA_FIELD_ANGLE_OF_ATTACK, 350.3, 0.0 )
call CameraSetupSetField( gg_cam_Camera_007, CAMERA_FIELD_TARGET_DISTANCE, 2430.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_007, CAMERA_FIELD_ROLL, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_007, CAMERA_FIELD_FIELD_OF_VIEW, 70.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_007, CAMERA_FIELD_FARZ, 5000.0, 0.0 )
call CameraSetupSetDestPosition( gg_cam_Camera_007, -6126.1, 14029.3, 0.0 )
set gg_cam_Opening_1 = CreateCameraSetup( )
call CameraSetupSetField( gg_cam_Opening_1, CAMERA_FIELD_ZOFFSET, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Opening_1, CAMERA_FIELD_ROTATION, 345.8, 0.0 )
call CameraSetupSetField( gg_cam_Opening_1, CAMERA_FIELD_ANGLE_OF_ATTACK, 348.5, 0.0 )
call CameraSetupSetField( gg_cam_Opening_1, CAMERA_FIELD_TARGET_DISTANCE, 1656.2, 0.0 )
call CameraSetupSetField( gg_cam_Opening_1, CAMERA_FIELD_ROLL, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Opening_1, CAMERA_FIELD_FIELD_OF_VIEW, 70.0, 0.0 )
call CameraSetupSetField( gg_cam_Opening_1, CAMERA_FIELD_FARZ, 5500.0, 0.0 )
call CameraSetupSetDestPosition( gg_cam_Opening_1, -1922.3, -8294.3, 0.0 )
set gg_cam_Opening_3 = CreateCameraSetup( )
call CameraSetupSetField( gg_cam_Opening_3, CAMERA_FIELD_ZOFFSET, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Opening_3, CAMERA_FIELD_ROTATION, 51.2, 0.0 )
call CameraSetupSetField( gg_cam_Opening_3, CAMERA_FIELD_ANGLE_OF_ATTACK, 359.9, 0.0 )
call CameraSetupSetField( gg_cam_Opening_3, CAMERA_FIELD_TARGET_DISTANCE, 2415.8, 0.0 )
call CameraSetupSetField( gg_cam_Opening_3, CAMERA_FIELD_ROLL, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Opening_3, CAMERA_FIELD_FIELD_OF_VIEW, 70.0, 0.0 )
call CameraSetupSetField( gg_cam_Opening_3, CAMERA_FIELD_FARZ, 5000.0, 0.0 )
call CameraSetupSetDestPosition( gg_cam_Opening_3, 4653.3, -1607.0, 0.0 )
set gg_cam_Opening_4 = CreateCameraSetup( )
call CameraSetupSetField( gg_cam_Opening_4, CAMERA_FIELD_ZOFFSET, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Opening_4, CAMERA_FIELD_ROTATION, 49.8, 0.0 )
call CameraSetupSetField( gg_cam_Opening_4, CAMERA_FIELD_ANGLE_OF_ATTACK, 357.7, 0.0 )
call CameraSetupSetField( gg_cam_Opening_4, CAMERA_FIELD_TARGET_DISTANCE, 1127.0, 0.0 )
call CameraSetupSetField( gg_cam_Opening_4, CAMERA_FIELD_ROLL, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Opening_4, CAMERA_FIELD_FIELD_OF_VIEW, 70.0, 0.0 )
call CameraSetupSetField( gg_cam_Opening_4, CAMERA_FIELD_FARZ, 5000.0, 0.0 )
call CameraSetupSetDestPosition( gg_cam_Opening_4, 4653.3, -1607.0, 0.0 )
set gg_cam_Opening_5 = CreateCameraSetup( )
call CameraSetupSetField( gg_cam_Opening_5, CAMERA_FIELD_ZOFFSET, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Opening_5, CAMERA_FIELD_ROTATION, 107.5, 0.0 )
call CameraSetupSetField( gg_cam_Opening_5, CAMERA_FIELD_ANGLE_OF_ATTACK, 356.4, 0.0 )
call CameraSetupSetField( gg_cam_Opening_5, CAMERA_FIELD_TARGET_DISTANCE, 931.4, 0.0 )
call CameraSetupSetField( gg_cam_Opening_5, CAMERA_FIELD_ROLL, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Opening_5, CAMERA_FIELD_FIELD_OF_VIEW, 70.0, 0.0 )
call CameraSetupSetField( gg_cam_Opening_5, CAMERA_FIELD_FARZ, 5000.0, 0.0 )
call CameraSetupSetDestPosition( gg_cam_Opening_5, 4653.4, -1818.1, 0.0 )
set gg_cam_Opening_6 = CreateCameraSetup( )
call CameraSetupSetField( gg_cam_Opening_6, CAMERA_FIELD_ZOFFSET, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Opening_6, CAMERA_FIELD_ROTATION, 103.2, 0.0 )
call CameraSetupSetField( gg_cam_Opening_6, CAMERA_FIELD_ANGLE_OF_ATTACK, 349.9, 0.0 )
call CameraSetupSetField( gg_cam_Opening_6, CAMERA_FIELD_TARGET_DISTANCE, 931.4, 0.0 )
call CameraSetupSetField( gg_cam_Opening_6, CAMERA_FIELD_ROLL, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Opening_6, CAMERA_FIELD_FIELD_OF_VIEW, 70.0, 0.0 )
call CameraSetupSetField( gg_cam_Opening_6, CAMERA_FIELD_FARZ, 5000.0, 0.0 )
call CameraSetupSetDestPosition( gg_cam_Opening_6, 4684.3, -887.8, 0.0 )
set gg_cam_Marshes_1 = CreateCameraSetup( )
call CameraSetupSetField( gg_cam_Marshes_1, CAMERA_FIELD_ZOFFSET, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Marshes_1, CAMERA_FIELD_ROTATION, 86.5, 0.0 )
call CameraSetupSetField( gg_cam_Marshes_1, CAMERA_FIELD_ANGLE_OF_ATTACK, 358.1, 0.0 )
call CameraSetupSetField( gg_cam_Marshes_1, CAMERA_FIELD_TARGET_DISTANCE, 2667.4, 0.0 )
call CameraSetupSetField( gg_cam_Marshes_1, CAMERA_FIELD_ROLL, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Marshes_1, CAMERA_FIELD_FIELD_OF_VIEW, 70.0, 0.0 )
call CameraSetupSetField( gg_cam_Marshes_1, CAMERA_FIELD_FARZ, 5500.0, 0.0 )
call CameraSetupSetDestPosition( gg_cam_Marshes_1, -782.0, 8090.7, 0.0 )
set gg_cam_Marshes_2 = CreateCameraSetup( )
call CameraSetupSetField( gg_cam_Marshes_2, CAMERA_FIELD_ZOFFSET, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Marshes_2, CAMERA_FIELD_ROTATION, 87.3, 0.0 )
call CameraSetupSetField( gg_cam_Marshes_2, CAMERA_FIELD_ANGLE_OF_ATTACK, 358.1, 0.0 )
call CameraSetupSetField( gg_cam_Marshes_2, CAMERA_FIELD_TARGET_DISTANCE, 2667.4, 0.0 )
call CameraSetupSetField( gg_cam_Marshes_2, CAMERA_FIELD_ROLL, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Marshes_2, CAMERA_FIELD_FIELD_OF_VIEW, 70.0, 0.0 )
call CameraSetupSetField( gg_cam_Marshes_2, CAMERA_FIELD_FARZ, 5500.0, 0.0 )
call CameraSetupSetDestPosition( gg_cam_Marshes_2, -1617.2, 3835.6, 0.0 )
set gg_cam_Calm_Lands = CreateCameraSetup( )
call CameraSetupSetField( gg_cam_Calm_Lands, CAMERA_FIELD_ZOFFSET, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Calm_Lands, CAMERA_FIELD_ROTATION, 37.8, 0.0 )
call CameraSetupSetField( gg_cam_Calm_Lands, CAMERA_FIELD_ANGLE_OF_ATTACK, 328.6, 0.0 )
call CameraSetupSetField( gg_cam_Calm_Lands, CAMERA_FIELD_TARGET_DISTANCE, 2667.4, 0.0 )
call CameraSetupSetField( gg_cam_Calm_Lands, CAMERA_FIELD_ROLL, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Calm_Lands, CAMERA_FIELD_FIELD_OF_VIEW, 70.0, 0.0 )
call CameraSetupSetField( gg_cam_Calm_Lands, CAMERA_FIELD_FARZ, 5500.0, 0.0 )
call CameraSetupSetDestPosition( gg_cam_Calm_Lands, -8819.9, 5921.1, 0.0 )
set gg_cam_Calm_Lands_2 = CreateCameraSetup( )
call CameraSetupSetField( gg_cam_Calm_Lands_2, CAMERA_FIELD_ZOFFSET, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Calm_Lands_2, CAMERA_FIELD_ROTATION, 347.7, 0.0 )
call CameraSetupSetField( gg_cam_Calm_Lands_2, CAMERA_FIELD_ANGLE_OF_ATTACK, 352.3, 0.0 )
call CameraSetupSetField( gg_cam_Calm_Lands_2, CAMERA_FIELD_TARGET_DISTANCE, 2667.4, 0.0 )
call CameraSetupSetField( gg_cam_Calm_Lands_2, CAMERA_FIELD_ROLL, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Calm_Lands_2, CAMERA_FIELD_FIELD_OF_VIEW, 70.0, 0.0 )
call CameraSetupSetField( gg_cam_Calm_Lands_2, CAMERA_FIELD_FARZ, 5500.0, 0.0 )
call CameraSetupSetDestPosition( gg_cam_Calm_Lands_2, -4007.1, 7194.7, 0.0 )
set gg_cam_Camera_025 = CreateCameraSetup( )
call CameraSetupSetField( gg_cam_Camera_025, CAMERA_FIELD_ZOFFSET, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_025, CAMERA_FIELD_ROTATION, 92.5, 0.0 )
call CameraSetupSetField( gg_cam_Camera_025, CAMERA_FIELD_ANGLE_OF_ATTACK, 351.1, 0.0 )
call CameraSetupSetField( gg_cam_Camera_025, CAMERA_FIELD_TARGET_DISTANCE, 1028.4, 0.0 )
call CameraSetupSetField( gg_cam_Camera_025, CAMERA_FIELD_ROLL, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_025, CAMERA_FIELD_FIELD_OF_VIEW, 70.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_025, CAMERA_FIELD_FARZ, 5500.0, 0.0 )
call CameraSetupSetDestPosition( gg_cam_Camera_025, -5329.2, 12553.2, 0.0 )
set gg_cam_Desert_1 = CreateCameraSetup( )
call CameraSetupSetField( gg_cam_Desert_1, CAMERA_FIELD_ZOFFSET, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Desert_1, CAMERA_FIELD_ROTATION, 222.5, 0.0 )
call CameraSetupSetField( gg_cam_Desert_1, CAMERA_FIELD_ANGLE_OF_ATTACK, 352.5, 0.0 )
call CameraSetupSetField( gg_cam_Desert_1, CAMERA_FIELD_TARGET_DISTANCE, 1650.0, 0.0 )
call CameraSetupSetField( gg_cam_Desert_1, CAMERA_FIELD_ROLL, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Desert_1, CAMERA_FIELD_FIELD_OF_VIEW, 70.0, 0.0 )
call CameraSetupSetField( gg_cam_Desert_1, CAMERA_FIELD_FARZ, 5000.0, 0.0 )
call CameraSetupSetDestPosition( gg_cam_Desert_1, -10842.2, 3044.3, 0.0 )
set gg_cam_Desert_2 = CreateCameraSetup( )
call CameraSetupSetField( gg_cam_Desert_2, CAMERA_FIELD_ZOFFSET, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Desert_2, CAMERA_FIELD_ROTATION, 161.8, 0.0 )
call CameraSetupSetField( gg_cam_Desert_2, CAMERA_FIELD_ANGLE_OF_ATTACK, 355.0, 0.0 )
call CameraSetupSetField( gg_cam_Desert_2, CAMERA_FIELD_TARGET_DISTANCE, 1650.0, 0.0 )
call CameraSetupSetField( gg_cam_Desert_2, CAMERA_FIELD_ROLL, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Desert_2, CAMERA_FIELD_FIELD_OF_VIEW, 70.0, 0.0 )
call CameraSetupSetField( gg_cam_Desert_2, CAMERA_FIELD_FARZ, 5000.0, 0.0 )
call CameraSetupSetDestPosition( gg_cam_Desert_2, -11093.5, 917.2, 0.0 )
set gg_cam_SET_HEIGHT = CreateCameraSetup( )
call CameraSetupSetField( gg_cam_SET_HEIGHT, CAMERA_FIELD_ZOFFSET, 150.0, 0.0 )
call CameraSetupSetField( gg_cam_SET_HEIGHT, CAMERA_FIELD_ROTATION, 90.0, 0.0 )
call CameraSetupSetField( gg_cam_SET_HEIGHT, CAMERA_FIELD_ANGLE_OF_ATTACK, 304.0, 0.0 )
call CameraSetupSetField( gg_cam_SET_HEIGHT, CAMERA_FIELD_TARGET_DISTANCE, 1650.0, 0.0 )
call CameraSetupSetField( gg_cam_SET_HEIGHT, CAMERA_FIELD_ROLL, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_SET_HEIGHT, CAMERA_FIELD_FIELD_OF_VIEW, 70.0, 0.0 )
call CameraSetupSetField( gg_cam_SET_HEIGHT, CAMERA_FIELD_FARZ, 5000.0, 0.0 )
call CameraSetupSetDestPosition( gg_cam_SET_HEIGHT, 67.5, 538.3, 0.0 )
set gg_cam_Beginning = CreateCameraSetup( )
call CameraSetupSetField( gg_cam_Beginning, CAMERA_FIELD_ZOFFSET, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Beginning, CAMERA_FIELD_ROTATION, 90.0, 0.0 )
call CameraSetupSetField( gg_cam_Beginning, CAMERA_FIELD_ANGLE_OF_ATTACK, 304.0, 0.0 )
call CameraSetupSetField( gg_cam_Beginning, CAMERA_FIELD_TARGET_DISTANCE, 1650.0, 0.0 )
call CameraSetupSetField( gg_cam_Beginning, CAMERA_FIELD_ROLL, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Beginning, CAMERA_FIELD_FIELD_OF_VIEW, 70.0, 0.0 )
call CameraSetupSetField( gg_cam_Beginning, CAMERA_FIELD_FARZ, 5000.0, 0.0 )
call CameraSetupSetDestPosition( gg_cam_Beginning, 9003.0, -6.8, 0.0 )
set gg_cam_Ultima_Weapon = CreateCameraSetup( )
call CameraSetupSetField( gg_cam_Ultima_Weapon, CAMERA_FIELD_ZOFFSET, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Ultima_Weapon, CAMERA_FIELD_ROTATION, 90.9, 0.0 )
call CameraSetupSetField( gg_cam_Ultima_Weapon, CAMERA_FIELD_ANGLE_OF_ATTACK, 336.1, 0.0 )
call CameraSetupSetField( gg_cam_Ultima_Weapon, CAMERA_FIELD_TARGET_DISTANCE, 1645.6, 0.0 )
call CameraSetupSetField( gg_cam_Ultima_Weapon, CAMERA_FIELD_ROLL, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Ultima_Weapon, CAMERA_FIELD_FIELD_OF_VIEW, 70.0, 0.0 )
call CameraSetupSetField( gg_cam_Ultima_Weapon, CAMERA_FIELD_FARZ, 3756.6, 0.0 )
call CameraSetupSetDestPosition( gg_cam_Ultima_Weapon, -14092.3, 13506.7, 0.0 )
set gg_cam_Odin = CreateCameraSetup( )
call CameraSetupSetField( gg_cam_Odin, CAMERA_FIELD_ZOFFSET, 389.0, 0.0 )
call CameraSetupSetField( gg_cam_Odin, CAMERA_FIELD_ROTATION, 147.8, 0.0 )
call CameraSetupSetField( gg_cam_Odin, CAMERA_FIELD_ANGLE_OF_ATTACK, 351.3, 0.0 )
call CameraSetupSetField( gg_cam_Odin, CAMERA_FIELD_TARGET_DISTANCE, 2415.8, 0.0 )
call CameraSetupSetField( gg_cam_Odin, CAMERA_FIELD_ROLL, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Odin, CAMERA_FIELD_FIELD_OF_VIEW, 56.0, 0.0 )
call CameraSetupSetField( gg_cam_Odin, CAMERA_FIELD_FARZ, 5001.0, 0.0 )
call CameraSetupSetDestPosition( gg_cam_Odin, 9318.6, 5616.2, 0.0 )
set gg_cam_Tutorial = CreateCameraSetup( )
call CameraSetupSetField( gg_cam_Tutorial, CAMERA_FIELD_ZOFFSET, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Tutorial, CAMERA_FIELD_ROTATION, 90.0, 0.0 )
call CameraSetupSetField( gg_cam_Tutorial, CAMERA_FIELD_ANGLE_OF_ATTACK, 304.0, 0.0 )
call CameraSetupSetField( gg_cam_Tutorial, CAMERA_FIELD_TARGET_DISTANCE, 1693.1, 0.0 )
call CameraSetupSetField( gg_cam_Tutorial, CAMERA_FIELD_ROLL, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Tutorial, CAMERA_FIELD_FIELD_OF_VIEW, 70.0, 0.0 )
call CameraSetupSetField( gg_cam_Tutorial, CAMERA_FIELD_FARZ, 5000.0, 0.0 )
call CameraSetupSetDestPosition( gg_cam_Tutorial, 8843.7, 2434.5, 0.0 )
set gg_cam_Town1 = CreateCameraSetup( )
call CameraSetupSetField( gg_cam_Town1, CAMERA_FIELD_ZOFFSET, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Town1, CAMERA_FIELD_ROTATION, 276.7, 0.0 )
call CameraSetupSetField( gg_cam_Town1, CAMERA_FIELD_ANGLE_OF_ATTACK, 335.3, 0.0 )
call CameraSetupSetField( gg_cam_Town1, CAMERA_FIELD_TARGET_DISTANCE, 3215.4, 0.0 )
call CameraSetupSetField( gg_cam_Town1, CAMERA_FIELD_ROLL, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Town1, CAMERA_FIELD_FIELD_OF_VIEW, 70.0, 0.0 )
call CameraSetupSetField( gg_cam_Town1, CAMERA_FIELD_FARZ, 5000.0, 0.0 )
call CameraSetupSetDestPosition( gg_cam_Town1, 879.3, 6865.3, 0.0 )
set gg_cam_Town2 = CreateCameraSetup( )
call CameraSetupSetField( gg_cam_Town2, CAMERA_FIELD_ZOFFSET, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Town2, CAMERA_FIELD_ROTATION, 220.0, 0.0 )
call CameraSetupSetField( gg_cam_Town2, CAMERA_FIELD_ANGLE_OF_ATTACK, 331.7, 0.0 )
call CameraSetupSetField( gg_cam_Town2, CAMERA_FIELD_TARGET_DISTANCE, 1516.5, 0.0 )
call CameraSetupSetField( gg_cam_Town2, CAMERA_FIELD_ROLL, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Town2, CAMERA_FIELD_FIELD_OF_VIEW, 70.0, 0.0 )
call CameraSetupSetField( gg_cam_Town2, CAMERA_FIELD_FARZ, 5000.0, 0.0 )
call CameraSetupSetDestPosition( gg_cam_Town2, 879.3, 6865.3, 0.0 )
set gg_cam_Town3 = CreateCameraSetup( )
call CameraSetupSetField( gg_cam_Town3, CAMERA_FIELD_ZOFFSET, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Town3, CAMERA_FIELD_ROTATION, 216.9, 0.0 )
call CameraSetupSetField( gg_cam_Town3, CAMERA_FIELD_ANGLE_OF_ATTACK, 354.8, 0.0 )
call CameraSetupSetField( gg_cam_Town3, CAMERA_FIELD_TARGET_DISTANCE, 1516.5, 0.0 )
call CameraSetupSetField( gg_cam_Town3, CAMERA_FIELD_ROLL, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Town3, CAMERA_FIELD_FIELD_OF_VIEW, 70.0, 0.0 )
call CameraSetupSetField( gg_cam_Town3, CAMERA_FIELD_FARZ, 5000.0, 0.0 )
call CameraSetupSetDestPosition( gg_cam_Town3, 499.7, 5968.9, 0.0 )
set gg_cam_Airship_Elf = CreateCameraSetup( )
call CameraSetupSetField( gg_cam_Airship_Elf, CAMERA_FIELD_ZOFFSET, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Airship_Elf, CAMERA_FIELD_ROTATION, 195.4, 0.0 )
call CameraSetupSetField( gg_cam_Airship_Elf, CAMERA_FIELD_ANGLE_OF_ATTACK, 341.3, 0.0 )
call CameraSetupSetField( gg_cam_Airship_Elf, CAMERA_FIELD_TARGET_DISTANCE, 3536.9, 0.0 )
call CameraSetupSetField( gg_cam_Airship_Elf, CAMERA_FIELD_ROLL, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Airship_Elf, CAMERA_FIELD_FIELD_OF_VIEW, 70.0, 0.0 )
call CameraSetupSetField( gg_cam_Airship_Elf, CAMERA_FIELD_FARZ, 5000.0, 0.0 )
call CameraSetupSetDestPosition( gg_cam_Airship_Elf, -7469.9, 13920.3, 0.0 )
set gg_cam_Airship_Gurgan = CreateCameraSetup( )
call CameraSetupSetField( gg_cam_Airship_Gurgan, CAMERA_FIELD_ZOFFSET, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Airship_Gurgan, CAMERA_FIELD_ROTATION, 252.5, 0.0 )
call CameraSetupSetField( gg_cam_Airship_Gurgan, CAMERA_FIELD_ANGLE_OF_ATTACK, 343.4, 0.0 )
call CameraSetupSetField( gg_cam_Airship_Gurgan, CAMERA_FIELD_TARGET_DISTANCE, 4279.7, 0.0 )
call CameraSetupSetField( gg_cam_Airship_Gurgan, CAMERA_FIELD_ROLL, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Airship_Gurgan, CAMERA_FIELD_FIELD_OF_VIEW, 70.0, 0.0 )
call CameraSetupSetField( gg_cam_Airship_Gurgan, CAMERA_FIELD_FARZ, 5000.0, 0.0 )
call CameraSetupSetDestPosition( gg_cam_Airship_Gurgan, -4954.8, -1043.9, 0.0 )
set gg_cam_Airship_Vakor = CreateCameraSetup( )
call CameraSetupSetField( gg_cam_Airship_Vakor, CAMERA_FIELD_ZOFFSET, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Airship_Vakor, CAMERA_FIELD_ROTATION, 351.9, 0.0 )
call CameraSetupSetField( gg_cam_Airship_Vakor, CAMERA_FIELD_ANGLE_OF_ATTACK, 343.6, 0.0 )
call CameraSetupSetField( gg_cam_Airship_Vakor, CAMERA_FIELD_TARGET_DISTANCE, 3890.6, 0.0 )
call CameraSetupSetField( gg_cam_Airship_Vakor, CAMERA_FIELD_ROLL, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Airship_Vakor, CAMERA_FIELD_FIELD_OF_VIEW, 70.0, 0.0 )
call CameraSetupSetField( gg_cam_Airship_Vakor, CAMERA_FIELD_FARZ, 5000.0, 0.0 )
call CameraSetupSetDestPosition( gg_cam_Airship_Vakor, 7083.2, -1875.6, 0.0 )
set gg_cam_Airship_Swamp = CreateCameraSetup( )
call CameraSetupSetField( gg_cam_Airship_Swamp, CAMERA_FIELD_ZOFFSET, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Airship_Swamp, CAMERA_FIELD_ROTATION, 105.8, 0.0 )
call CameraSetupSetField( gg_cam_Airship_Swamp, CAMERA_FIELD_ANGLE_OF_ATTACK, 334.2, 0.0 )
call CameraSetupSetField( gg_cam_Airship_Swamp, CAMERA_FIELD_TARGET_DISTANCE, 3215.4, 0.0 )
call CameraSetupSetField( gg_cam_Airship_Swamp, CAMERA_FIELD_ROLL, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Airship_Swamp, CAMERA_FIELD_FIELD_OF_VIEW, 70.0, 0.0 )
call CameraSetupSetField( gg_cam_Airship_Swamp, CAMERA_FIELD_FARZ, 5000.0, 0.0 )
call CameraSetupSetDestPosition( gg_cam_Airship_Swamp, 907.3, 8248.2, 0.0 )
set gg_cam_Camera_040 = CreateCameraSetup( )
call CameraSetupSetField( gg_cam_Camera_040, CAMERA_FIELD_ZOFFSET, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_040, CAMERA_FIELD_ROTATION, 59.6, 0.0 )
call CameraSetupSetField( gg_cam_Camera_040, CAMERA_FIELD_ANGLE_OF_ATTACK, 346.5, 0.0 )
call CameraSetupSetField( gg_cam_Camera_040, CAMERA_FIELD_TARGET_DISTANCE, 2923.1, 0.0 )
call CameraSetupSetField( gg_cam_Camera_040, CAMERA_FIELD_ROLL, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_040, CAMERA_FIELD_FIELD_OF_VIEW, 70.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_040, CAMERA_FIELD_FARZ, 5000.0, 0.0 )
call CameraSetupSetDestPosition( gg_cam_Camera_040, 5562.4, 116.7, 0.0 )
set gg_cam_Satyr_town_2 = CreateCameraSetup( )
call CameraSetupSetField( gg_cam_Satyr_town_2, CAMERA_FIELD_ZOFFSET, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Satyr_town_2, CAMERA_FIELD_ROTATION, 300.0, 0.0 )
call CameraSetupSetField( gg_cam_Satyr_town_2, CAMERA_FIELD_ANGLE_OF_ATTACK, 345.0, 0.0 )
call CameraSetupSetField( gg_cam_Satyr_town_2, CAMERA_FIELD_TARGET_DISTANCE, 1000.0, 0.0 )
call CameraSetupSetField( gg_cam_Satyr_town_2, CAMERA_FIELD_ROLL, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Satyr_town_2, CAMERA_FIELD_FIELD_OF_VIEW, 70.0, 0.0 )
call CameraSetupSetField( gg_cam_Satyr_town_2, CAMERA_FIELD_FARZ, 5000.0, 0.0 )
call CameraSetupSetDestPosition( gg_cam_Satyr_town_2, -3225.9, -13694.9, 0.0 )
set gg_cam_Satyr_town_1 = CreateCameraSetup( )
call CameraSetupSetField( gg_cam_Satyr_town_1, CAMERA_FIELD_ZOFFSET, 100.0, 0.0 )
call CameraSetupSetField( gg_cam_Satyr_town_1, CAMERA_FIELD_ROTATION, 300.0, 0.0 )
call CameraSetupSetField( gg_cam_Satyr_town_1, CAMERA_FIELD_ANGLE_OF_ATTACK, 304.0, 0.0 )
call CameraSetupSetField( gg_cam_Satyr_town_1, CAMERA_FIELD_TARGET_DISTANCE, 1650.0, 0.0 )
call CameraSetupSetField( gg_cam_Satyr_town_1, CAMERA_FIELD_ROLL, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Satyr_town_1, CAMERA_FIELD_FIELD_OF_VIEW, 70.0, 0.0 )
call CameraSetupSetField( gg_cam_Satyr_town_1, CAMERA_FIELD_FARZ, 5000.0, 0.0 )
call CameraSetupSetDestPosition( gg_cam_Satyr_town_1, -3555.6, -13134.6, 0.0 )
set gg_cam_Satyr_town_3 = CreateCameraSetup( )
call CameraSetupSetField( gg_cam_Satyr_town_3, CAMERA_FIELD_ZOFFSET, 180.0, 0.0 )
call CameraSetupSetField( gg_cam_Satyr_town_3, CAMERA_FIELD_ROTATION, 300.0, 0.0 )
call CameraSetupSetField( gg_cam_Satyr_town_3, CAMERA_FIELD_ANGLE_OF_ATTACK, 5.0, 0.0 )
call CameraSetupSetField( gg_cam_Satyr_town_3, CAMERA_FIELD_TARGET_DISTANCE, 1000.0, 0.0 )
call CameraSetupSetField( gg_cam_Satyr_town_3, CAMERA_FIELD_ROLL, 360.0, 0.0 )
call CameraSetupSetField( gg_cam_Satyr_town_3, CAMERA_FIELD_FIELD_OF_VIEW, 70.0, 0.0 )
call CameraSetupSetField( gg_cam_Satyr_town_3, CAMERA_FIELD_FARZ, 5000.0, 0.0 )
call CameraSetupSetDestPosition( gg_cam_Satyr_town_3, -2486.6, -14928.0, 0.0 )
set gg_cam_Satyr_town_4b = CreateCameraSetup( )
call CameraSetupSetField( gg_cam_Satyr_town_4b, CAMERA_FIELD_ZOFFSET, 300.0, 0.0 )
call CameraSetupSetField( gg_cam_Satyr_town_4b, CAMERA_FIELD_ROTATION, 90.0, 0.0 )
call CameraSetupSetField( gg_cam_Satyr_town_4b, CAMERA_FIELD_ANGLE_OF_ATTACK, 360.0, 0.0 )
call CameraSetupSetField( gg_cam_Satyr_town_4b, CAMERA_FIELD_TARGET_DISTANCE, 1000.0, 0.0 )
call CameraSetupSetField( gg_cam_Satyr_town_4b, CAMERA_FIELD_ROLL, 45.0, 0.0 )
call CameraSetupSetField( gg_cam_Satyr_town_4b, CAMERA_FIELD_FIELD_OF_VIEW, 70.0, 0.0 )
call CameraSetupSetField( gg_cam_Satyr_town_4b, CAMERA_FIELD_FARZ, 5000.0, 0.0 )
call CameraSetupSetDestPosition( gg_cam_Satyr_town_4b, -3887.4, -15466.5, 0.0 )
set gg_cam_Satyr_town_4a = CreateCameraSetup( )
call CameraSetupSetField( gg_cam_Satyr_town_4a, CAMERA_FIELD_ZOFFSET, 300.0, 0.0 )
call CameraSetupSetField( gg_cam_Satyr_town_4a, CAMERA_FIELD_ROTATION, 160.0, 0.0 )
call CameraSetupSetField( gg_cam_Satyr_town_4a, CAMERA_FIELD_ANGLE_OF_ATTACK, 360.0, 0.0 )
call CameraSetupSetField( gg_cam_Satyr_town_4a, CAMERA_FIELD_TARGET_DISTANCE, 600.0, 0.0 )
call CameraSetupSetField( gg_cam_Satyr_town_4a, CAMERA_FIELD_ROLL, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Satyr_town_4a, CAMERA_FIELD_FIELD_OF_VIEW, 70.0, 0.0 )
call CameraSetupSetField( gg_cam_Satyr_town_4a, CAMERA_FIELD_FARZ, 5000.0, 0.0 )
call CameraSetupSetDestPosition( gg_cam_Satyr_town_4a, -2947.5, -15264.5, 0.0 )
set gg_cam_Satyr_Shop = CreateCameraSetup( )
call CameraSetupSetField( gg_cam_Satyr_Shop, CAMERA_FIELD_ZOFFSET, 70.0, 0.0 )
call CameraSetupSetField( gg_cam_Satyr_Shop, CAMERA_FIELD_ROTATION, 90.0, 0.0 )
call CameraSetupSetField( gg_cam_Satyr_Shop, CAMERA_FIELD_ANGLE_OF_ATTACK, 360.0, 0.0 )
call CameraSetupSetField( gg_cam_Satyr_Shop, CAMERA_FIELD_TARGET_DISTANCE, 150.0, 0.0 )
call CameraSetupSetField( gg_cam_Satyr_Shop, CAMERA_FIELD_ROLL, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Satyr_Shop, CAMERA_FIELD_FIELD_OF_VIEW, 70.0, 0.0 )
call CameraSetupSetField( gg_cam_Satyr_Shop, CAMERA_FIELD_FARZ, 5000.0, 0.0 )
call CameraSetupSetDestPosition( gg_cam_Satyr_Shop, -2865.2, -15204.5, 0.0 )
set gg_cam_Satyr_Prisoner = CreateCameraSetup( )
call CameraSetupSetField( gg_cam_Satyr_Prisoner, CAMERA_FIELD_ZOFFSET, 90.0, 0.0 )
call CameraSetupSetField( gg_cam_Satyr_Prisoner, CAMERA_FIELD_ROTATION, 355.0, 0.0 )
call CameraSetupSetField( gg_cam_Satyr_Prisoner, CAMERA_FIELD_ANGLE_OF_ATTACK, 310.0, 0.0 )
call CameraSetupSetField( gg_cam_Satyr_Prisoner, CAMERA_FIELD_TARGET_DISTANCE, 300.0, 0.0 )
call CameraSetupSetField( gg_cam_Satyr_Prisoner, CAMERA_FIELD_ROLL, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Satyr_Prisoner, CAMERA_FIELD_FIELD_OF_VIEW, 70.0, 0.0 )
call CameraSetupSetField( gg_cam_Satyr_Prisoner, CAMERA_FIELD_FARZ, 5000.0, 0.0 )
call CameraSetupSetDestPosition( gg_cam_Satyr_Prisoner, -3454.5, -15255.3, 0.0 )
set gg_cam_Satyr_Prisoner_Copy = CreateCameraSetup( )
call CameraSetupSetField( gg_cam_Satyr_Prisoner_Copy, CAMERA_FIELD_ZOFFSET, 90.0, 0.0 )
call CameraSetupSetField( gg_cam_Satyr_Prisoner_Copy, CAMERA_FIELD_ROTATION, 280.0, 0.0 )
call CameraSetupSetField( gg_cam_Satyr_Prisoner_Copy, CAMERA_FIELD_ANGLE_OF_ATTACK, 360.0, 0.0 )
call CameraSetupSetField( gg_cam_Satyr_Prisoner_Copy, CAMERA_FIELD_TARGET_DISTANCE, 100.0, 0.0 )
call CameraSetupSetField( gg_cam_Satyr_Prisoner_Copy, CAMERA_FIELD_ROLL, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Satyr_Prisoner_Copy, CAMERA_FIELD_FIELD_OF_VIEW, 70.0, 0.0 )
call CameraSetupSetField( gg_cam_Satyr_Prisoner_Copy, CAMERA_FIELD_FARZ, 5000.0, 0.0 )
call CameraSetupSetDestPosition( gg_cam_Satyr_Prisoner_Copy, -3436.9, -15262.7, 0.0 )
set gg_cam_Satyr_Guard = CreateCameraSetup( )
call CameraSetupSetField( gg_cam_Satyr_Guard, CAMERA_FIELD_ZOFFSET, 80.0, 0.0 )
call CameraSetupSetField( gg_cam_Satyr_Guard, CAMERA_FIELD_ROTATION, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Satyr_Guard, CAMERA_FIELD_ANGLE_OF_ATTACK, 360.0, 0.0 )
call CameraSetupSetField( gg_cam_Satyr_Guard, CAMERA_FIELD_TARGET_DISTANCE, 100.0, 0.0 )
call CameraSetupSetField( gg_cam_Satyr_Guard, CAMERA_FIELD_ROLL, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Satyr_Guard, CAMERA_FIELD_FIELD_OF_VIEW, 70.0, 0.0 )
call CameraSetupSetField( gg_cam_Satyr_Guard, CAMERA_FIELD_FARZ, 5000.0, 0.0 )
call CameraSetupSetDestPosition( gg_cam_Satyr_Guard, -4230.5, -14725.8, 0.0 )
set gg_cam_cid_talk = CreateCameraSetup( )
call CameraSetupSetField( gg_cam_cid_talk, CAMERA_FIELD_ZOFFSET, 250.0, 0.0 )
call CameraSetupSetField( gg_cam_cid_talk, CAMERA_FIELD_ROTATION, 310.0, 0.0 )
call CameraSetupSetField( gg_cam_cid_talk, CAMERA_FIELD_ANGLE_OF_ATTACK, 350.0, 0.0 )
call CameraSetupSetField( gg_cam_cid_talk, CAMERA_FIELD_TARGET_DISTANCE, 200.0, 0.0 )
call CameraSetupSetField( gg_cam_cid_talk, CAMERA_FIELD_ROLL, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_cid_talk, CAMERA_FIELD_FIELD_OF_VIEW, 70.0, 0.0 )
call CameraSetupSetField( gg_cam_cid_talk, CAMERA_FIELD_FARZ, 5000.0, 0.0 )
call CameraSetupSetDestPosition( gg_cam_cid_talk, 503.2, -1059.7, 0.0 )
endfunction
//***************************************************************************
//*
//* Triggers
//*
//***************************************************************************
//===========================================================================
// Trigger: Level Fire
//===========================================================================
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
//===========================================================================
// Trigger: Level Fira
//===========================================================================
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
//===========================================================================
// Trigger: Level Thunder
//===========================================================================
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
//===========================================================================
// Trigger: Level Thundara
//===========================================================================
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
//===========================================================================
// Trigger: Level Blizzard
//===========================================================================
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
//===========================================================================
// Trigger: Level Blizzara
//===========================================================================
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
//===========================================================================
// Trigger: Level Cure
//===========================================================================
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
//===========================================================================
// Trigger: Level Cura
//===========================================================================
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
//===========================================================================
// Trigger: Level Curaga
//===========================================================================
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
//===========================================================================
// Trigger: Level Aero
//===========================================================================
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
//===========================================================================
// Trigger: Level Tornado
//===========================================================================
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
//===========================================================================
// Trigger: Level Comet
//===========================================================================
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
//===========================================================================
// Trigger: Level Meteo
//===========================================================================
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
//===========================================================================
// Trigger: Level Slow
//===========================================================================
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
//===========================================================================
// Trigger: Level Slowga
//===========================================================================
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
//===========================================================================
// Trigger: Level Shell
//===========================================================================
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
//===========================================================================
// Trigger: Level Demi
//===========================================================================
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
//===========================================================================
// Trigger: Level Drain
//===========================================================================
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
//===========================================================================
// Trigger: Level Life
//===========================================================================
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
//===========================================================================
// Trigger: Level Dia
//===========================================================================
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
//===========================================================================
// Trigger: COTW
//===========================================================================
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
//===========================================================================
// Trigger: Credits
//===========================================================================
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
//===========================================================================
// Trigger: Select levels
//===========================================================================
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
//===========================================================================
// Trigger: Levels 1to50
//===========================================================================
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
//===========================================================================
// Trigger: Levels 50to120
//===========================================================================
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
//===========================================================================
// Trigger: Levels 120
//===========================================================================
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
//===========================================================================
// Trigger: Final Boss Kefka Pre
//===========================================================================
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
//===========================================================================
// Trigger: Final Boss Kefka Pre2
//===========================================================================
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
//===========================================================================
// Trigger: Battle Kefka Cutscene
//===========================================================================
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
//===========================================================================
// Trigger: Supernova
//===========================================================================
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
//===========================================================================
// Trigger: Shadow Flare
//===========================================================================
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
//===========================================================================
// Trigger: Select
//===========================================================================
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
//===========================================================================
// Trigger: Move
//===========================================================================
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
//===========================================================================
// Trigger: Attack
//===========================================================================
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
//===========================================================================
// Trigger: Animals
//===========================================================================
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
//===========================================================================
// Trigger: Animals Lose
//===========================================================================
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
//===========================================================================
// Trigger: Aim
//===========================================================================
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
//===========================================================================
// Trigger: Aim Lose
//===========================================================================
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
//===========================================================================
// Trigger: Xfight
//===========================================================================
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
//===========================================================================
// Trigger: Xfight Lose
//===========================================================================
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
//===========================================================================
// Trigger: Charm
//===========================================================================
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
//===========================================================================
// Trigger: Charm Lose
//===========================================================================
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
//===========================================================================
// Trigger: Berzerker lvl 2 Bonus
//===========================================================================
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
//===========================================================================
// Trigger: Berzerker lvl 2 Bonus Lose
//===========================================================================
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
//===========================================================================
// Trigger: Bash
//===========================================================================
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
//===========================================================================
// Trigger: Bash Lose
//===========================================================================
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
//===========================================================================
// Trigger: Black Belt Evasion
//===========================================================================
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
//===========================================================================
// Trigger: Black Belt Evasion lose
//===========================================================================
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
//===========================================================================
// Trigger: Black Belt Aura
//===========================================================================
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
//===========================================================================
// Trigger: Black Belt Aura Lose
//===========================================================================
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
//===========================================================================
// Trigger: Black Belt Battle Call
//===========================================================================
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
//===========================================================================
// Trigger: Black Belt Battle Call Lose
//===========================================================================
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
//===========================================================================
// Trigger: Black Mage Bonus
//===========================================================================
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
//===========================================================================
// Trigger: Black Mage Bonus Lose
//===========================================================================
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
//===========================================================================
// Trigger: Black Mage Death Aura
//===========================================================================
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
//===========================================================================
// Trigger: Black Mage Death Aura Lose
//===========================================================================
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
//===========================================================================
// Trigger: Create Potion
//===========================================================================
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
//===========================================================================
// Trigger: Create Potion Lose
//===========================================================================
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
//===========================================================================
// Trigger: Molotov Cocktail
//===========================================================================
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
//===========================================================================
// Trigger: Molotov Cocktail Lose
//===========================================================================
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
//===========================================================================
// Trigger: Shizer Geyser
//===========================================================================
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
//===========================================================================
// Trigger: Shizer Geyser Lose
//===========================================================================
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
//===========================================================================
// Trigger: Dark Wave
//===========================================================================
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
//===========================================================================
// Trigger: Dark Wave Lose
//===========================================================================
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
//===========================================================================
// Trigger: Jump
//===========================================================================
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
//===========================================================================
// Trigger: Jump Lose
//===========================================================================
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
//===========================================================================
// Trigger: Taunt
//===========================================================================
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
//===========================================================================
// Trigger: Taunt Lose
//===========================================================================
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
//===========================================================================
// Trigger: Protect
//===========================================================================
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
//===========================================================================
// Trigger: Protect Lose
//===========================================================================
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
//===========================================================================
// Trigger: Ensnare
//===========================================================================
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
//===========================================================================
// Trigger: Ensnare Lose
//===========================================================================
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
//===========================================================================
// Trigger: Smoke
//===========================================================================
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
//===========================================================================
// Trigger: Smoke Lose
//===========================================================================
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
//===========================================================================
// Trigger: Throw
//===========================================================================
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
//===========================================================================
// Trigger: Throw Lose
//===========================================================================
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
//===========================================================================
// Trigger: Spell Immunity
//===========================================================================
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
//===========================================================================
// Trigger: Spell Immunity Lose
//===========================================================================
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
//===========================================================================
// Trigger: Reflect
//===========================================================================
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
//===========================================================================
// Trigger: Reflect Lose
//===========================================================================
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
//===========================================================================
// Trigger: Divine Intervention
//===========================================================================
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
//===========================================================================
// Trigger: Divine Intervention Lose
//===========================================================================
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
//===========================================================================
// Trigger: Xmagic
//===========================================================================
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
//===========================================================================
// Trigger: Xmagic Lose
//===========================================================================
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
//===========================================================================
// Trigger: Evasion
//===========================================================================
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
//===========================================================================
// Trigger: Evasion Lose
//===========================================================================
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
//===========================================================================
// Trigger: Gil Toss
//===========================================================================
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
//===========================================================================
// Trigger: Gil Toss Lose
//===========================================================================
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
//===========================================================================
// Trigger: Slash
//===========================================================================
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
//===========================================================================
// Trigger: Slash Lose
//===========================================================================
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
//===========================================================================
// Trigger: Summoner Bonus
//===========================================================================
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
//===========================================================================
// Trigger: Summoner Bonus Lose
//===========================================================================
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
//===========================================================================
// Trigger: Dash
//===========================================================================
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
//===========================================================================
// Trigger: Dash Lose
//===========================================================================
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
//===========================================================================
// Trigger: Steal
//===========================================================================
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
//===========================================================================
// Trigger: Steal Lose
//===========================================================================
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
//===========================================================================
// Trigger: Footwork
//===========================================================================
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
//===========================================================================
// Trigger: Footwork Lose
//===========================================================================
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
//===========================================================================
// Trigger: Mug
//===========================================================================
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
//===========================================================================
// Trigger: Mug Lose
//===========================================================================
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
//===========================================================================
// Trigger: Time Phase
//===========================================================================
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
//===========================================================================
// Trigger: Time Phase Lose
//===========================================================================
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
//===========================================================================
// Trigger: Archer Levelup Abilities
//===========================================================================
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
//===========================================================================
// Trigger: Beastmaster Levelup Abilities
//===========================================================================
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
//===========================================================================
// Trigger: Berserker Levelup Abilities
//===========================================================================
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
//===========================================================================
// Trigger: Black Belt Levelup Abilities
//===========================================================================
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
//===========================================================================
// Trigger: Black Mage Levelup Abilities
//===========================================================================
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
//===========================================================================
// Trigger: Chemist Levelup Abilities
//===========================================================================
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
//===========================================================================
// Trigger: Dark Knight Levelup Abilities
//===========================================================================
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
//===========================================================================
// Trigger: Dragoon Levelup Abilities
//===========================================================================
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
//===========================================================================
// Trigger: Fighter Levelup Abilities
//===========================================================================
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
//===========================================================================
// Trigger: Hunter Levelup Abilities
//===========================================================================
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
//===========================================================================
// Trigger: Ninja Levelup Abilities
//===========================================================================
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
//===========================================================================
// Trigger: Paladin Levelup Abilities
//===========================================================================
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
//===========================================================================
// Trigger: Red Mage Levelup Abilities
//===========================================================================
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
//===========================================================================
// Trigger: Sage Levelup Abilities
//===========================================================================
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
//===========================================================================
// Trigger: Samurai Levelup Abilities
//===========================================================================
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
//===========================================================================
// Trigger: Summoner Levelup Abilities
//===========================================================================
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
//===========================================================================
// Trigger: Time Mage Levelup Abilities
//===========================================================================
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
//===========================================================================
// Trigger: Thief Levelup Abilities
//===========================================================================
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
//===========================================================================
// Trigger: White Mage Levelup Abilities
//===========================================================================
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
//===========================================================================
// Trigger: Archer
//===========================================================================
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
//===========================================================================
// Trigger: Berserker
//===========================================================================
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
//===========================================================================
// Trigger: Beastmaster
//===========================================================================
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
//===========================================================================
// Trigger: Black Belt
//===========================================================================
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
//===========================================================================
// Trigger: Black Mage
//===========================================================================
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
//===========================================================================
// Trigger: Chemist
//===========================================================================
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
//===========================================================================
// Trigger: Dark Knight
//===========================================================================
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
//===========================================================================
// Trigger: Dragoon
//===========================================================================
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
//===========================================================================
// Trigger: Hunter
//===========================================================================
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
//===========================================================================
// Trigger: Fighter
//===========================================================================
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
//===========================================================================
// Trigger: Ninja
//===========================================================================
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
//===========================================================================
// Trigger: Paladin
//===========================================================================
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
//===========================================================================
// Trigger: Red Mage
//===========================================================================
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
//===========================================================================
// Trigger: Sage
//===========================================================================
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
//===========================================================================
// Trigger: Samurai
//===========================================================================
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
//===========================================================================
// Trigger: Summoner
//===========================================================================
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
//===========================================================================
// Trigger: Thief
//===========================================================================
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
//===========================================================================
// Trigger: Time Mage
//===========================================================================
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
//===========================================================================
// Trigger: White Mage
//===========================================================================
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
//===========================================================================
// Trigger: Sephiroth
//===========================================================================
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
//===========================================================================
// Trigger: Use Heavy Armor Condition
//===========================================================================
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
//===========================================================================
// Trigger: Use Onion Armor
//===========================================================================
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
//===========================================================================
// Trigger: Full Onion Set
//===========================================================================
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
//===========================================================================
// Trigger: Use Sword Condition
//===========================================================================
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
//===========================================================================
// Trigger: Use Bow Condition
//===========================================================================
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
//===========================================================================
// Trigger: Use Spear Condition
//===========================================================================
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
//===========================================================================
// Trigger: Use Knife Condition
//===========================================================================
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
//===========================================================================
// Trigger: Use Axe
//===========================================================================
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
//===========================================================================
// Trigger: Use Staff
//===========================================================================
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
//===========================================================================
// Trigger: Use Robes
//===========================================================================
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
//===========================================================================
// Trigger: Use Black Magic Condition
//===========================================================================
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
//===========================================================================
// Trigger: Use Summon Magic Condition
//===========================================================================
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
//===========================================================================
// Trigger: Use White Magic Condition
//===========================================================================
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
//===========================================================================
// Trigger: Use Time Magic
//===========================================================================
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
//===========================================================================
// Trigger: Drop Armor Condition
//===========================================================================
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
//===========================================================================
// Trigger: Follow Move
//===========================================================================
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
//===========================================================================
// Trigger: Enforce Region
//===========================================================================
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
//===========================================================================
// Trigger: Pause Orb
//===========================================================================
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
//===========================================================================
// Trigger: Unpause Orb
//===========================================================================
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
//===========================================================================
// Trigger: Shiva Diamond Dust
//===========================================================================
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
//===========================================================================
// Trigger: Cleansing Fire
//===========================================================================
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
//===========================================================================
// Trigger: Remove Autolife
//===========================================================================
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
//===========================================================================
// Trigger: Break
//===========================================================================
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
//===========================================================================
// Trigger: Steel Cutting Sword
//===========================================================================
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
//===========================================================================
// Trigger: Pick Leonhart
//===========================================================================
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
//===========================================================================
// Trigger: Pick Quistis
//===========================================================================
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
//===========================================================================
// Trigger: Pick Amarant
//===========================================================================
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
//===========================================================================
// Trigger: Pick Kimari
//===========================================================================
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
//===========================================================================
// Trigger: Pick Butz
//===========================================================================
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
//===========================================================================
// Trigger: Pick Tellah
//===========================================================================
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
//===========================================================================
// Trigger: Pick Terra
//===========================================================================
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
//===========================================================================
// Trigger: Pick Sephiroth
//===========================================================================
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
//===========================================================================
// Trigger: Odin Summon Copy
//===========================================================================
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
//===========================================================================
// Trigger: Dark Wave Effect
//===========================================================================
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
//===========================================================================
// Trigger: Gil Toss Effect
//===========================================================================
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
//===========================================================================
// Trigger: Slash Effect
//===========================================================================
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
//===========================================================================
// Trigger: Jump Animation
//===========================================================================
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
//===========================================================================
// Trigger: Steal Effect
//===========================================================================
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
//===========================================================================
// Trigger: Mug Effect
//===========================================================================
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
//===========================================================================
// Trigger: Throw Effect
//===========================================================================
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
//===========================================================================
// Trigger: Throw Drop Shuriken
//===========================================================================
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
//===========================================================================
// Trigger: Chemist Mix
//===========================================================================
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
//===========================================================================
// Trigger: Clean Up Aero
//===========================================================================
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
//===========================================================================
// Trigger: Aero
//===========================================================================
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
//===========================================================================
// Trigger: Tornado
//===========================================================================
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
//===========================================================================
// Trigger: Maelstrom
//===========================================================================
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
//===========================================================================
// Trigger: Blizzard
//===========================================================================
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
//===========================================================================
// Trigger: Blizzara
//===========================================================================
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
//===========================================================================
// Trigger: Blizzaga
//===========================================================================
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
//===========================================================================
// Trigger: Bio
//===========================================================================
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
//===========================================================================
// Trigger: Slow
//===========================================================================
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
//===========================================================================
// Trigger: Slowga
//===========================================================================
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
//===========================================================================
// Trigger: Comet
//===========================================================================
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
//===========================================================================
// Trigger: Meteo
//===========================================================================
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
//===========================================================================
// Trigger: Meteor
//===========================================================================
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
//===========================================================================
// Trigger: Ultima
//===========================================================================
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
//===========================================================================
// Trigger: Demi
//===========================================================================
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
//===========================================================================
// Trigger: Quarter
//===========================================================================
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
//===========================================================================
// Trigger: FullLife Effect
//===========================================================================
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
//===========================================================================
// Trigger: FullLife p1
//===========================================================================
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
//===========================================================================
// Trigger: FullLife p2
//===========================================================================
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
//===========================================================================
// Trigger: FullLife p3
//===========================================================================
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
//===========================================================================
// Trigger: FullLife p4
//===========================================================================
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
//===========================================================================
// Trigger: FullLife p5
//===========================================================================
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
//===========================================================================
// Trigger: FullLife p6
//===========================================================================
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
//===========================================================================
// Trigger: FullLife p7
//===========================================================================
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
//===========================================================================
// Trigger: FullLife p8
//===========================================================================
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
//===========================================================================
// Trigger: FullLife p9
//===========================================================================
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
//===========================================================================
// Trigger: FullLife p10
//===========================================================================
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
//===========================================================================
// Trigger: FullLife p11
//===========================================================================
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
//===========================================================================
// Trigger: Haste Gained
//===========================================================================
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
//===========================================================================
// Trigger: Haste Lose
//===========================================================================
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
//===========================================================================
// Trigger: Flare Gained
//===========================================================================
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
//===========================================================================
// Trigger: Flare Lose
//===========================================================================
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
//===========================================================================
// Trigger: Holy Gained
//===========================================================================
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
//===========================================================================
// Trigger: Holy Lose
//===========================================================================
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
//===========================================================================
// Trigger: Initialize Help Quests
//===========================================================================
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
//===========================================================================
// Trigger: Initialize Quests
//===========================================================================
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
//===========================================================================
// Trigger: First Shop Cutscene
//===========================================================================
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
//===========================================================================
// Trigger: Gurgan 1
//===========================================================================
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
//===========================================================================
// Trigger: Gurgan 2
//===========================================================================
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
//===========================================================================
// Trigger: Gurgan 3
//===========================================================================
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
//===========================================================================
// Trigger: Gurgan 4
//===========================================================================
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
//===========================================================================
// Trigger: Gurgan 5
//===========================================================================
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
//===========================================================================
// Trigger: Gurgan 6
//===========================================================================
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
//===========================================================================
// Trigger: Gurgan 7
//===========================================================================
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
//===========================================================================
// Trigger: Gurgan 8
//===========================================================================
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
//===========================================================================
// Trigger: Gurgan 9 Letter Quest
//===========================================================================
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
//===========================================================================
// Trigger: Gurgan 10 Turtle Quest
//===========================================================================
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
//===========================================================================
// Trigger: Gurgan 10 Turtle Quest Complete
//===========================================================================
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
//===========================================================================
// Trigger: Gurgan 10 Turtle Quest Dead Turtle
//===========================================================================
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
//===========================================================================
// Trigger: Elf 1
//===========================================================================
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
//===========================================================================
// Trigger: Elf 2
//===========================================================================
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
//===========================================================================
// Trigger: Elf 3
//===========================================================================
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
//===========================================================================
// Trigger: Elf 4
//===========================================================================
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
//===========================================================================
// Trigger: Elf 5
//===========================================================================
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
//===========================================================================
// Trigger: Elf 6 Ale Quest
//===========================================================================
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
//===========================================================================
// Trigger: Elf 6 Ale Quest Complete
//===========================================================================
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
//===========================================================================
// Trigger: Elf 6 Ale Quest Reward Dialog
//===========================================================================
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
//===========================================================================
// Trigger: Elf 7 Letter Quest Complete
//===========================================================================
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
//===========================================================================
// Trigger: Elf 8 Cactuar Quest
//===========================================================================
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
//===========================================================================
// Trigger: Elf 8 Cactuar Quest Complete
//===========================================================================
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
//===========================================================================
// Trigger: Swamp Critter 1
//===========================================================================
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
//===========================================================================
// Trigger: Swamp Critter 2
//===========================================================================
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
//===========================================================================
// Trigger: Swamp Critter 3
//===========================================================================
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
//===========================================================================
// Trigger: Swamp Critter 4
//===========================================================================
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
//===========================================================================
// Trigger: Swamp Critter 5
//===========================================================================
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
//===========================================================================
// Trigger: Swamp Critter 6
//===========================================================================
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
//===========================================================================
// Trigger: Swamp Critter 7
//===========================================================================
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
//===========================================================================
// Trigger: Swamp Critter 8
//===========================================================================
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
//===========================================================================
// Trigger: Swamp Critter 9
//===========================================================================
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
//===========================================================================
// Trigger: Town Defense 1
//===========================================================================
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
//===========================================================================
// Trigger: Town Defense 1 Copy
//===========================================================================
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
//===========================================================================
// Trigger: Town Defense 1 Copy Copy
//===========================================================================
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
//===========================================================================
// Trigger: Town Defense 3
//===========================================================================
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
//===========================================================================
// Trigger: Town Defense 3 part 2
//===========================================================================
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
//===========================================================================
// Trigger: Town Defense 3 part 2 Copy
//===========================================================================
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
//===========================================================================
// Trigger: Town Defense 3 part 3
//===========================================================================
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
//===========================================================================
// Trigger: Vakor 1
//===========================================================================
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
//===========================================================================
// Trigger: Vakor 2
//===========================================================================
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
//===========================================================================
// Trigger: Vakor 3
//===========================================================================
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
//===========================================================================
// Trigger: Vakor 4
//===========================================================================
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
//===========================================================================
// Trigger: Vakor 4 Copy
//===========================================================================
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
//===========================================================================
// Trigger: Ultima Weapon Copy
//===========================================================================
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
//===========================================================================
// Trigger: Giant Lizard Copy
//===========================================================================
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
//===========================================================================
// Trigger: Ocean Serpent Copy
//===========================================================================
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
//===========================================================================
// Trigger: Adamontoise Copy
//===========================================================================
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
//===========================================================================
// Trigger: Forest Dragon Copy
//===========================================================================
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
//===========================================================================
// Trigger: Enter the City Copy
//===========================================================================
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
//===========================================================================
// Trigger: First Shop Cutscene Copy
//===========================================================================
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
//===========================================================================
// Trigger: Omega Weapon
//===========================================================================
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
//===========================================================================
// Trigger: Ultima Drop
//===========================================================================
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
//===========================================================================
// Trigger: Goblin
//===========================================================================
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
//===========================================================================
// Trigger: All sets
//===========================================================================
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
//===========================================================================
// Trigger: Antlion
//===========================================================================
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
//===========================================================================
// Trigger: Cactuar
//===========================================================================
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
//===========================================================================
// Trigger: Ghoul
//===========================================================================
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
//===========================================================================
// Trigger: Ghost
//===========================================================================
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
//===========================================================================
// Trigger: Adamontoise drop
//===========================================================================
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
//===========================================================================
// Trigger: Tremor Ram
//===========================================================================
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
//===========================================================================
// Trigger: Demon Commander
//===========================================================================
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
//===========================================================================
// Trigger: Yagudo
//===========================================================================
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
//===========================================================================
// Trigger: Kefka Stop
//===========================================================================
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
//===========================================================================
// Trigger: Ship Decoration
//===========================================================================
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
//===========================================================================
// Trigger: Ship Decoration 1
//===========================================================================
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
//===========================================================================
// Trigger: Ship Decoration 2
//===========================================================================
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
//===========================================================================
// Trigger: Ship Decoration 3
//===========================================================================
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
//===========================================================================
// Trigger: Ship Decoration 4
//===========================================================================
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
//===========================================================================
// Trigger: Ship Decoration 5
//===========================================================================
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
//===========================================================================
// Trigger: Elf Village
//===========================================================================
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
//===========================================================================
// Trigger: Gurgan Village Airship
//===========================================================================
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
//===========================================================================
// Trigger: Vakor Airship
//===========================================================================
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
//===========================================================================
// Trigger: Swamp Village Airship
//===========================================================================
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
//===========================================================================
// Trigger: Dead Unit Clean Up
//===========================================================================
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
//===========================================================================
// Trigger: Planes
//===========================================================================
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
//===========================================================================
// Trigger: Planes Clear
//===========================================================================
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
//===========================================================================
// Trigger: Enter Planes
//===========================================================================
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
//===========================================================================
// Trigger: Leave Planes
//===========================================================================
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
//===========================================================================
// Trigger: Enter Tropical Island
//===========================================================================
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
//===========================================================================
// Trigger: Leave Tropical Island
//===========================================================================
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
//===========================================================================
// Trigger: Tropical Island
//===========================================================================
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
//===========================================================================
// Trigger: Tropical Island Clear
//===========================================================================
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
//===========================================================================
// Trigger: Enter Marsh
//===========================================================================
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
//===========================================================================
// Trigger: Leave Marsh
//===========================================================================
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
//===========================================================================
// Trigger: Marsh
//===========================================================================
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
//===========================================================================
// Trigger: Marsh Clear
//===========================================================================
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
//===========================================================================
// Trigger: Enter Calm Lands
//===========================================================================
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
//===========================================================================
// Trigger: Leave Calm Lands
//===========================================================================
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
//===========================================================================
// Trigger: Calm Lands
//===========================================================================
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
//===========================================================================
// Trigger: Calm Lands Clear
//===========================================================================
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
//===========================================================================
// Trigger: Enter Cactaur Deserts
//===========================================================================
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
//===========================================================================
// Trigger: Leave Cactaur Deserts
//===========================================================================
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
//===========================================================================
// Trigger: Cactaur Deserts
//===========================================================================
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
//===========================================================================
// Trigger: Cactaur Deserts Clear
//===========================================================================
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
//===========================================================================
// Trigger: Enter Great Forest
//===========================================================================
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
//===========================================================================
// Trigger: Leave Great Forest
//===========================================================================
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
//===========================================================================
// Trigger: Great Forest
//===========================================================================
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
//===========================================================================
// Trigger: Great Forest Clear
//===========================================================================
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
//===========================================================================
// Trigger: Enter Mountains
//===========================================================================
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
//===========================================================================
// Trigger: Leave Mountains
//===========================================================================
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
//===========================================================================
// Trigger: Mountains
//===========================================================================
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
//===========================================================================
// Trigger: Mountains Clear
//===========================================================================
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
//===========================================================================
// Trigger: Enter Icecap
//===========================================================================
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
//===========================================================================
// Trigger: Enter The Beach
//===========================================================================
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
//===========================================================================
// Trigger: Leave The Beach
//===========================================================================
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
//===========================================================================
// Trigger: Beach
//===========================================================================
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
//===========================================================================
// Trigger: Beach Clear
//===========================================================================
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
//===========================================================================
// Trigger: Enter Southern Tundra
//===========================================================================
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
//===========================================================================
// Trigger: Leave Southern Tundra
//===========================================================================
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
//===========================================================================
// Trigger: Southern Tundra
//===========================================================================
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
//===========================================================================
// Trigger: Southern Tundra Clear
//===========================================================================
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
//===========================================================================
// Trigger: Enter Mushroom Forest
//===========================================================================
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
//===========================================================================
// Trigger: Leave Mushroom Forest
//===========================================================================
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
//===========================================================================
// Trigger: Mushroom Forest
//===========================================================================
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
//===========================================================================
// Trigger: Mushroom Forest Clear
//===========================================================================
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
//===========================================================================
// Trigger: Enter Southern Forest
//===========================================================================
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
//===========================================================================
// Trigger: Leave Southern Forest
//===========================================================================
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
//===========================================================================
// Trigger: Southern Forest
//===========================================================================
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
//===========================================================================
// Trigger: Southern Forest Clear
//===========================================================================
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
//===========================================================================
// Trigger: Enter Tropical Peninsula
//===========================================================================
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
//===========================================================================
// Trigger: Leave Tropical Peninsula
//===========================================================================
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
//===========================================================================
// Trigger: Tropical Peninsula
//===========================================================================
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
//===========================================================================
// Trigger: Tropical Peninsula Clear
//===========================================================================
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
//===========================================================================
// Trigger: Enter Ancient Forest
//===========================================================================
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
//===========================================================================
// Trigger: Leave Ancient Forest
//===========================================================================
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
//===========================================================================
// Trigger: Ancient Forest
//===========================================================================
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
//===========================================================================
// Trigger: Ancient Forest Clear
//===========================================================================
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
//===========================================================================
// Trigger: Enter Demon Highlands
//===========================================================================
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
//===========================================================================
// Trigger: Leave Demon Highlands
//===========================================================================
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
//===========================================================================
// Trigger: Demon Highlands
//===========================================================================
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
//===========================================================================
// Trigger: Demon Highlands Clear
//===========================================================================
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
//===========================================================================
// Trigger: Enter Kefka Outer Ruins
//===========================================================================
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
//===========================================================================
// Trigger: Leave Kefka Outer Ruins
//===========================================================================
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
//===========================================================================
// Trigger: Kefka Outer Ruins
//===========================================================================
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
//===========================================================================
// Trigger: Kefka Outer Ruins Clear
//===========================================================================
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
//===========================================================================
// Trigger: Human Players
//===========================================================================
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
//===========================================================================
// Trigger: Change music
//===========================================================================
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
//===========================================================================
// Trigger: Town Guard Dies to Player
//===========================================================================
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
//===========================================================================
// Trigger: Town Guard Attacked by Player
//===========================================================================
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
//===========================================================================
// Trigger: Create Starting Life
//===========================================================================
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
//===========================================================================
// Trigger: Create Starting Life Copy
//===========================================================================
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
//===========================================================================
// Trigger: Mountain Exception Entering
//===========================================================================
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
//===========================================================================
// Trigger: Mountain Exception Leaving
//===========================================================================
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
//===========================================================================
// Trigger: Initialization
//===========================================================================
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
//===========================================================================
// Trigger: Hostile bombs
//===========================================================================
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
//===========================================================================
// Trigger: Cid killer protect
//===========================================================================
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
//===========================================================================
// Trigger: Magic Orb Use Materia
//===========================================================================
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
//===========================================================================
// Trigger: Full Onion Set Remove
//===========================================================================
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
//===========================================================================
// Trigger: Init Variables
//===========================================================================
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
//===========================================================================
// Trigger: treasure drop
//===========================================================================
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
//===========================================================================
// Trigger: Poison Spider
//===========================================================================
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
//===========================================================================
// Trigger: Gray Goblin
//===========================================================================
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
//===========================================================================
// Trigger: Sand Worm
//===========================================================================
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
//===========================================================================
// Trigger: Assassin Drop
//===========================================================================
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
//===========================================================================
// Trigger: Flan Drop
//===========================================================================
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
//===========================================================================
// Trigger: Giant Crab
//===========================================================================
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
//===========================================================================
// Trigger: Drop commons
//===========================================================================
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
//===========================================================================
// Trigger: Drop uncommons
//===========================================================================
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
//===========================================================================
// Trigger: Uncommon Boss Drops
//===========================================================================
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
//===========================================================================
// Trigger: Green Dragon Drop
//===========================================================================
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
//===========================================================================
// Trigger: Giant Forest Dragon Drop
//===========================================================================
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
//===========================================================================
// Trigger: Archdemon Drop
//===========================================================================
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
//===========================================================================
// Trigger: Demon Overlord Drop
//===========================================================================
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
//===========================================================================
// Trigger: Kefkas Dragon
//===========================================================================
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
//===========================================================================
// Trigger: Kefka Guard Drop
//===========================================================================
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
//===========================================================================
// Trigger: Kefka Drop
//===========================================================================
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
//===========================================================================
// Trigger: Use Radagals
//===========================================================================
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
//===========================================================================
// Trigger: Drop Radagals Drop Condition
//===========================================================================
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
//===========================================================================
// Trigger: Use Galaliel
//===========================================================================
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
//===========================================================================
// Trigger: Drop Galaliel Drop Condition
//===========================================================================
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
//===========================================================================
// Trigger: Use Angelic Set Condition
//===========================================================================
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
//===========================================================================
// Trigger: Spear of Fear
//===========================================================================
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
//===========================================================================
// Trigger: Double Arrows Drop Condition
//===========================================================================
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
//===========================================================================
// Trigger: Drop Arrows Condition
//===========================================================================
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
//===========================================================================
// Trigger: Drop Boot Condition
//===========================================================================
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
//===========================================================================
// Trigger: Drop Glove Condition
//===========================================================================
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
//===========================================================================
// Trigger: Drop Bracers Condition
//===========================================================================
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
//===========================================================================
// Trigger: Drop Belt Condition
//===========================================================================
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
//===========================================================================
// Trigger: Drop Helm Condition
//===========================================================================
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
//===========================================================================
// Trigger: Drop Rashul Condition
//===========================================================================
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
//===========================================================================
// Trigger: Drop Sword Set Item Conditions
//===========================================================================
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
//===========================================================================
// Trigger: Dukati Assassin Set Conditions
//===========================================================================
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
//===========================================================================
// Trigger: Drop Angelic Staff Condition
//===========================================================================
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
//===========================================================================
// Trigger: Drop Bow Set Condition
//===========================================================================
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
//===========================================================================
// Trigger: Drop Ring Condition
//===========================================================================
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
//===========================================================================
// Trigger: Drop Weapon Condition Fixed
//===========================================================================
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
//===========================================================================
// Trigger: FullLife Protect
//===========================================================================
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
//===========================================================================
// Trigger: Create Starting Life Respawn
//===========================================================================
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
//===========================================================================
// Trigger: Satyr Quests Initialize
//===========================================================================
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
//===========================================================================
// Trigger: Satyr Prisoner
//===========================================================================
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
//===========================================================================
// Trigger: Satyr Prisoner Complete
//===========================================================================
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
//===========================================================================
// Trigger: Spawn Prisoner
//===========================================================================
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
//===========================================================================
// Trigger: Prisoner Protect
//===========================================================================
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
//===========================================================================
// Trigger: Satyr Prisoner Verify
//===========================================================================
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
//===========================================================================
// Trigger: Satyr Prisoner Pirate kill
//===========================================================================
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
//===========================================================================
// Trigger: Satyr Guard
//===========================================================================
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
//===========================================================================
// Trigger: Enter Satyr Village
//===========================================================================
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
//===========================================================================
// Trigger: Satyr Warrior Shop
//===========================================================================
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
//===========================================================================
// Trigger: Satyr Warrior Shop Complete
//===========================================================================
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
//===========================================================================
// Trigger: Satyr Warrior Shop Centaur death
//===========================================================================
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
//===========================================================================
// Trigger: Stamina Tonic
//===========================================================================
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
//===========================================================================
// Trigger: Mana Tonic
//===========================================================================
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
//===========================================================================
// Trigger: Chemist Geyser
//===========================================================================
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
//===========================================================================
// Trigger: Angel of death
//===========================================================================
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
//===========================================================================
// Trigger: Pirate Quests Initialize
//===========================================================================
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
//===========================================================================
// Trigger: Pirate Defense
//===========================================================================
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
//===========================================================================
// Trigger: Pirate Defense II
//===========================================================================
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
//===========================================================================
// Trigger: Pirate Defense III
//===========================================================================
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
//===========================================================================
// Trigger: Player 1 items
//===========================================================================
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
//===========================================================================
// Trigger: Player 2 items
//===========================================================================
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
//===========================================================================
// Trigger: Player 3 items
//===========================================================================
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
//===========================================================================
// Trigger: Player 4 items
//===========================================================================
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
//===========================================================================
// Trigger: Player 5 items
//===========================================================================
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
//===========================================================================
// Trigger: Player 6 items
//===========================================================================
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
//===========================================================================
// Trigger: Player 7 items
//===========================================================================
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
//===========================================================================
// Trigger: Player 8 items
//===========================================================================
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
//===========================================================================
// Trigger: Player 9 items
//===========================================================================
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
//===========================================================================
// Trigger: Player 10 items
//===========================================================================
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
//===========================================================================
// Trigger: Player 11 items
//===========================================================================
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
//===========================================================================
// Trigger: Angelic Set Acquired
//===========================================================================
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
//===========================================================================
// Trigger: Angelic Set Removed
//===========================================================================
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
//===========================================================================
// Trigger: Jursachian Set Acquired
//===========================================================================
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
//===========================================================================
// Trigger: Jursachian Set Removed
//===========================================================================
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
//===========================================================================
// Trigger: Dukati Assassin Set Acquired
//===========================================================================
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
//===========================================================================
// Trigger: Dukati Assassin Set Removed
//===========================================================================
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
//===========================================================================
// Trigger: Demon Slayer Warrior Set Acquired
//===========================================================================
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
//===========================================================================
// Trigger: Demon Slayer Warrior Set Removed
//===========================================================================
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
//===========================================================================
// Trigger: Demon Slayer Bow Set Acquired
//===========================================================================
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
//===========================================================================
// Trigger: Demon Slayer Bow Set Removed
//===========================================================================
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
//===========================================================================
// Trigger: Pirates Initial Issue Acquired
//===========================================================================
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
//===========================================================================
// Trigger: Pirates Initial Issue Removed
//===========================================================================
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
//===========================================================================
// Trigger: Wizard Ring Set Requirements
//===========================================================================
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
//===========================================================================
// Trigger: Wizard Ring Acquired
//===========================================================================
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
//===========================================================================
// Trigger: Wizard Ring Removed
//===========================================================================
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
//===========================================================================
// Trigger: Randomize Copy
//===========================================================================
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
//===========================================================================
// Trigger: Repick
//===========================================================================
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
//===========================================================================
// Trigger: Base10 to Base32
//===========================================================================
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
//===========================================================================
// Trigger: Base32 to Base10
//===========================================================================
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
//===========================================================================
// Trigger: Save Char Copy
//===========================================================================
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
//===========================================================================
// Trigger: Load Char Copy
//===========================================================================
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
//===========================================================================
// Trigger: Initialize Items
//===========================================================================
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
//===========================================================================
// Trigger: Disable Loading Warning
//===========================================================================
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
//===========================================================================
// Trigger: Save Morb
//===========================================================================
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
//===========================================================================
// Trigger: Disable Loading
//===========================================================================
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
//===========================================================================
// Trigger: Load Morb
//===========================================================================
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
//===========================================================================
// Trigger: DeprotectInfo
//===========================================================================
function Trig_DeprotectInfo_Actions takes nothing returns nothing
call DisplayTimedTextToForce( GetPlayersAll(), 30.00, "TRIGSTR_1700" )
endfunction
//===========================================================================
function InitTrig_DeprotectInfo takes nothing returns nothing
set gg_trg_DeprotectInfo = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_DeprotectInfo, 2.00 )
call TriggerAddAction( gg_trg_DeprotectInfo, function Trig_DeprotectInfo_Actions )
endfunction
//===========================================================================
// Trigger: Untitled Trigger 001
//===========================================================================
function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
call RemoveUnit( udg_MagicalOrb )
call CreateNUnitsAtLoc( 1, 'U00E', Player(0), GetRectCenter(gg_rct_Enter_the_World), bj_UNIT_FACING )
endfunction
//===========================================================================
function InitTrig_Untitled_Trigger_001 takes nothing returns nothing
set gg_trg_Untitled_Trigger_001 = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Untitled_Trigger_001, Player(0), "-set lord", true )
call TriggerAddAction( gg_trg_Untitled_Trigger_001, function Trig_Untitled_Trigger_001_Actions )
endfunction
//===========================================================================
// Trigger: Untitled Trigger 001 Copy 2
//===========================================================================
function Trig_Untitled_Trigger_001_Copy_2_Actions takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
call CreateNUnitsAtLoc( 1, 'U00E', Player(3), GetRectCenter(gg_rct_Enter_the_World), bj_UNIT_FACING )
endfunction
//===========================================================================
function InitTrig_Untitled_Trigger_001_Copy_2 takes nothing returns nothing
set gg_trg_Untitled_Trigger_001_Copy_2 = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Untitled_Trigger_001_Copy_2, Player(9), "-set lord", true )
call TriggerAddAction( gg_trg_Untitled_Trigger_001_Copy_2, function Trig_Untitled_Trigger_001_Copy_2_Actions )
endfunction
//===========================================================================
// Trigger: Untitled Trigger 001 Copy 2 Copy
//===========================================================================
function Trig_Untitled_Trigger_001_Copy_2_Copy_Actions takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
call CreateNUnitsAtLoc( 1, 'U00E', Player(3), GetRectCenter(gg_rct_Enter_the_World), bj_UNIT_FACING )
endfunction
//===========================================================================
function InitTrig_Untitled_Trigger_001_Copy_2_Copy takes nothing returns nothing
set gg_trg_Untitled_Trigger_001_Copy_2_Copy = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Untitled_Trigger_001_Copy_2_Copy, Player(10), "-set lord", true )
call TriggerAddAction( gg_trg_Untitled_Trigger_001_Copy_2_Copy, function Trig_Untitled_Trigger_001_Copy_2_Copy_Actions )
endfunction
//===========================================================================
// Trigger: Untitled Trigger 001 Copy
//===========================================================================
function Trig_Untitled_Trigger_001_Copy_Actions takes nothing returns nothing
call CreateItemLoc( 'I069', GetRectCenter(GetPlayableMapRect()) )
endfunction
//===========================================================================
function InitTrig_Untitled_Trigger_001_Copy takes nothing returns nothing
set gg_trg_Untitled_Trigger_001_Copy = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Untitled_Trigger_001_Copy, Player(0), "-set glove", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Untitled_Trigger_001_Copy, Player(9), "-set glove", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Untitled_Trigger_001_Copy, Player(10), "-set glove", true )
call TriggerAddAction( gg_trg_Untitled_Trigger_001_Copy, function Trig_Untitled_Trigger_001_Copy_Actions )
endfunction
//===========================================================================
// Trigger: Untitled Trigger 001 Copy Copy
//===========================================================================
function Trig_Untitled_Trigger_001_Copy_Copy_Actions takes nothing returns nothing
call CreateItemLoc( 'I06A', GetRectCenter(GetPlayableMapRect()) )
call CreateItemLoc( 'I06B', GetRectCenter(GetPlayableMapRect()) )
endfunction
//===========================================================================
function InitTrig_Untitled_Trigger_001_Copy_Copy takes nothing returns nothing
set gg_trg_Untitled_Trigger_001_Copy_Copy = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Untitled_Trigger_001_Copy_Copy, Player(0), "-set keyblade", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Untitled_Trigger_001_Copy_Copy, Player(8), "-set keyblade", true )
call TriggerAddAction( gg_trg_Untitled_Trigger_001_Copy_Copy, function Trig_Untitled_Trigger_001_Copy_Copy_Actions )
endfunction
//===========================================================================
// Trigger: Untitled Trigger 001 Copy 3
//===========================================================================
function Trig_Untitled_Trigger_001_Copy_3_Actions takes nothing returns nothing
call RemoveUnit( udg_MagicalOrb )
call CreateNUnitsAtLoc( 1, 'H02E', Player(0), GetRectCenter(gg_rct_Enter_the_World), bj_UNIT_FACING )
endfunction
//===========================================================================
function InitTrig_Untitled_Trigger_001_Copy_3 takes nothing returns nothing
set gg_trg_Untitled_Trigger_001_Copy_3 = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Untitled_Trigger_001_Copy_3, Player(0), "-set mac", true )
call TriggerAddAction( gg_trg_Untitled_Trigger_001_Copy_3, function Trig_Untitled_Trigger_001_Copy_3_Actions )
endfunction
//===========================================================================
// Trigger: Untitled Trigger 001 Copy 3 Copy
//===========================================================================
function Trig_Untitled_Trigger_001_Copy_3_Copy_Actions takes nothing returns nothing
call RemoveUnit( udg_MagicalOrb )
call CreateNUnitsAtLoc( 1, 'H02E', Player(0), GetRectCenter(gg_rct_Enter_the_World), bj_UNIT_FACING )
endfunction
//===========================================================================
function InitTrig_Untitled_Trigger_001_Copy_3_Copy takes nothing returns nothing
set gg_trg_Untitled_Trigger_001_Copy_3_Copy = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Untitled_Trigger_001_Copy_3_Copy, Player(8), "-set mac", true )
call TriggerAddAction( gg_trg_Untitled_Trigger_001_Copy_3_Copy, function Trig_Untitled_Trigger_001_Copy_3_Copy_Actions )
endfunction
//===========================================================================
// Trigger: Untitled Trigger 001 Copy 3 Copy 2
//===========================================================================
function Trig_Untitled_Trigger_001_Copy_3_Copy_2_Actions takes nothing returns nothing
call RemoveUnit( udg_MagicalOrb )
call CreateNUnitsAtLoc( 1, 'H02E', Player(0), GetRectCenter(gg_rct_Enter_the_World), bj_UNIT_FACING )
endfunction
//===========================================================================
function InitTrig_Untitled_Trigger_001_Copy_3_Copy_2 takes nothing returns nothing
set gg_trg_Untitled_Trigger_001_Copy_3_Copy_2 = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Untitled_Trigger_001_Copy_3_Copy_2, Player(9), "-set mac", true )
call TriggerAddAction( gg_trg_Untitled_Trigger_001_Copy_3_Copy_2, function Trig_Untitled_Trigger_001_Copy_3_Copy_2_Actions )
endfunction
//===========================================================================
function InitCustomTriggers takes nothing returns nothing
call InitTrig_Level_Fire( )
call InitTrig_Level_Fira( )
call InitTrig_Level_Thunder( )
call InitTrig_Level_Thundara( )
call InitTrig_Level_Blizzard( )
call InitTrig_Level_Blizzara( )
call InitTrig_Level_Cure( )
call InitTrig_Level_Cura( )
call InitTrig_Level_Curaga( )
call InitTrig_Level_Aero( )
call InitTrig_Level_Tornado( )
call InitTrig_Level_Comet( )
call InitTrig_Level_Meteo( )
call InitTrig_Level_Slow( )
call InitTrig_Level_Slowga( )
call InitTrig_Level_Shell( )
call InitTrig_Level_Demi( )
call InitTrig_Level_Drain( )
call InitTrig_Level_Life( )
call InitTrig_Level_Dia( )
call InitTrig_COTW( )
call InitTrig_Credits( )
call InitTrig_Select_levels( )
call InitTrig_Levels_1to50( )
call InitTrig_Levels_50to120( )
call InitTrig_Levels_120( )
call InitTrig_Final_Boss_Kefka_Pre( )
call InitTrig_Final_Boss_Kefka_Pre2( )
call InitTrig_Battle_Kefka_Cutscene( )
call InitTrig_Supernova( )
call InitTrig_Shadow_Flare( )
call InitTrig_Select( )
call InitTrig_Move( )
call InitTrig_Attack( )
call InitTrig_Animals( )
call InitTrig_Animals_Lose( )
call InitTrig_Aim( )
call InitTrig_Aim_Lose( )
call InitTrig_Xfight( )
call InitTrig_Xfight_Lose( )
call InitTrig_Charm( )
call InitTrig_Charm_Lose( )
call InitTrig_Berzerker_lvl_2_Bonus( )
call InitTrig_Berzerker_lvl_2_Bonus_Lose( )
call InitTrig_Bash( )
call InitTrig_Bash_Lose( )
call InitTrig_Black_Belt_Evasion( )
call InitTrig_Black_Belt_Evasion_lose( )
call InitTrig_Black_Belt_Aura( )
call InitTrig_Black_Belt_Aura_Lose( )
call InitTrig_Black_Belt_Battle_Call( )
call InitTrig_Black_Belt_Battle_Call_Lose( )
call InitTrig_Black_Mage_Bonus( )
call InitTrig_Black_Mage_Bonus_Lose( )
call InitTrig_Black_Mage_Death_Aura( )
call InitTrig_Black_Mage_Death_Aura_Lose( )
call InitTrig_Create_Potion( )
call InitTrig_Create_Potion_Lose( )
call InitTrig_Molotov_Cocktail( )
call InitTrig_Molotov_Cocktail_Lose( )
call InitTrig_Shizer_Geyser( )
call InitTrig_Shizer_Geyser_Lose( )
call InitTrig_Dark_Wave( )
call InitTrig_Dark_Wave_Lose( )
call InitTrig_Jump( )
call InitTrig_Jump_Lose( )
call InitTrig_Taunt( )
call InitTrig_Taunt_Lose( )
call InitTrig_Protect( )
call InitTrig_Protect_Lose( )
call InitTrig_Ensnare( )
call InitTrig_Ensnare_Lose( )
call InitTrig_Smoke( )
call InitTrig_Smoke_Lose( )
call InitTrig_Throw( )
call InitTrig_Throw_Lose( )
call InitTrig_Spell_Immunity( )
call InitTrig_Spell_Immunity_Lose( )
call InitTrig_Reflect( )
call InitTrig_Reflect_Lose( )
call InitTrig_Divine_Intervention( )
call InitTrig_Divine_Intervention_Lose( )
call InitTrig_Xmagic( )
call InitTrig_Xmagic_Lose( )
call InitTrig_Evasion( )
call InitTrig_Evasion_Lose( )
call InitTrig_Gil_Toss( )
call InitTrig_Gil_Toss_Lose( )
call InitTrig_Slash( )
call InitTrig_Slash_Lose( )
call InitTrig_Summoner_Bonus( )
call InitTrig_Summoner_Bonus_Lose( )
call InitTrig_Dash( )
call InitTrig_Dash_Lose( )
call InitTrig_Steal( )
call InitTrig_Steal_Lose( )
call InitTrig_Footwork( )
call InitTrig_Footwork_Lose( )
call InitTrig_Mug( )
call InitTrig_Mug_Lose( )
call InitTrig_Time_Phase( )
call InitTrig_Time_Phase_Lose( )
call InitTrig_Archer_Levelup_Abilities( )
call InitTrig_Beastmaster_Levelup_Abilities( )
call InitTrig_Berserker_Levelup_Abilities( )
call InitTrig_Black_Belt_Levelup_Abilities( )
call InitTrig_Black_Mage_Levelup_Abilities( )
call InitTrig_Chemist_Levelup_Abilities( )
call InitTrig_Dark_Knight_Levelup_Abilities( )
call InitTrig_Dragoon_Levelup_Abilities( )
call InitTrig_Fighter_Levelup_Abilities( )
call InitTrig_Hunter_Levelup_Abilities( )
call InitTrig_Ninja_Levelup_Abilities( )
call InitTrig_Paladin_Levelup_Abilities( )
call InitTrig_Red_Mage_Levelup_Abilities( )
call InitTrig_Sage_Levelup_Abilities( )
call InitTrig_Samurai_Levelup_Abilities( )
call InitTrig_Summoner_Levelup_Abilities( )
call InitTrig_Time_Mage_Levelup_Abilities( )
call InitTrig_Thief_Levelup_Abilities( )
call InitTrig_White_Mage_Levelup_Abilities( )
call InitTrig_Archer( )
call InitTrig_Berserker( )
call InitTrig_Beastmaster( )
call InitTrig_Black_Belt( )
call InitTrig_Black_Mage( )
call InitTrig_Chemist( )
call InitTrig_Dark_Knight( )
call InitTrig_Dragoon( )
call InitTrig_Hunter( )
call InitTrig_Fighter( )
call InitTrig_Ninja( )
call InitTrig_Paladin( )
call InitTrig_Red_Mage( )
call InitTrig_Sage( )
call InitTrig_Samurai( )
call InitTrig_Summoner( )
call InitTrig_Thief( )
call InitTrig_Time_Mage( )
call InitTrig_White_Mage( )
call InitTrig_Sephiroth( )
call InitTrig_Use_Heavy_Armor_Condition( )
call InitTrig_Use_Onion_Armor( )
call InitTrig_Full_Onion_Set( )
call InitTrig_Use_Sword_Condition( )
call InitTrig_Use_Bow_Condition( )
call InitTrig_Use_Spear_Condition( )
call InitTrig_Use_Knife_Condition( )
call InitTrig_Use_Axe( )
call InitTrig_Use_Staff( )
call InitTrig_Use_Robes( )
call InitTrig_Use_Black_Magic_Condition( )
call InitTrig_Use_Summon_Magic_Condition( )
call InitTrig_Use_White_Magic_Condition( )
call InitTrig_Use_Time_Magic( )
call InitTrig_Drop_Armor_Condition( )
call InitTrig_Follow_Move( )
call InitTrig_Enforce_Region( )
call InitTrig_Pause_Orb( )
call InitTrig_Unpause_Orb( )
call InitTrig_Shiva_Diamond_Dust( )
call InitTrig_Cleansing_Fire( )
call InitTrig_Remove_Autolife( )
call InitTrig_Break( )
call InitTrig_Steel_Cutting_Sword( )
call InitTrig_Pick_Leonhart( )
call InitTrig_Pick_Quistis( )
call InitTrig_Pick_Amarant( )
call InitTrig_Pick_Kimari( )
call InitTrig_Pick_Butz( )
call InitTrig_Pick_Tellah( )
call InitTrig_Pick_Terra( )
call InitTrig_Pick_Sephiroth( )
call InitTrig_Odin_Summon_Copy( )
call InitTrig_Dark_Wave_Effect( )
call InitTrig_Gil_Toss_Effect( )
call InitTrig_Slash_Effect( )
call InitTrig_Jump_Animation( )
call InitTrig_Steal_Effect( )
call InitTrig_Mug_Effect( )
call InitTrig_Throw_Effect( )
call InitTrig_Throw_Drop_Shuriken( )
call InitTrig_Chemist_Mix( )
call InitTrig_Clean_Up_Aero( )
call InitTrig_Aero( )
call InitTrig_Tornado( )
call InitTrig_Maelstrom( )
call InitTrig_Blizzard( )
call InitTrig_Blizzara( )
call InitTrig_Blizzaga( )
call InitTrig_Bio( )
call InitTrig_Slow( )
call InitTrig_Slowga( )
call InitTrig_Comet( )
call InitTrig_Meteo( )
call InitTrig_Meteor( )
call InitTrig_Ultima( )
call InitTrig_Demi( )
call InitTrig_Quarter( )
call InitTrig_FullLife_Effect( )
call InitTrig_FullLife_p1( )
call InitTrig_FullLife_p2( )
call InitTrig_FullLife_p3( )
call InitTrig_FullLife_p4( )
call InitTrig_FullLife_p5( )
call InitTrig_FullLife_p6( )
call InitTrig_FullLife_p7( )
call InitTrig_FullLife_p8( )
call InitTrig_FullLife_p9( )
call InitTrig_FullLife_p10( )
call InitTrig_FullLife_p11( )
call InitTrig_Haste_Gained( )
call InitTrig_Haste_Lose( )
call InitTrig_Flare_Gained( )
call InitTrig_Flare_Lose( )
call InitTrig_Holy_Gained( )
call InitTrig_Holy_Lose( )
call InitTrig_Initialize_Help_Quests( )
call InitTrig_Initialize_Quests( )
call InitTrig_First_Shop_Cutscene( )
call InitTrig_Gurgan_1( )
call InitTrig_Gurgan_2( )
call InitTrig_Gurgan_3( )
call InitTrig_Gurgan_4( )
call InitTrig_Gurgan_5( )
call InitTrig_Gurgan_6( )
call InitTrig_Gurgan_7( )
call InitTrig_Gurgan_8( )
call InitTrig_Gurgan_9_Letter_Quest( )
call InitTrig_Gurgan_10_Turtle_Quest( )
call InitTrig_Gurgan_10_Turtle_Quest_Complete( )
call InitTrig_Gurgan_10_Turtle_Quest_Dead_Turtle( )
call InitTrig_Elf_1( )
call InitTrig_Elf_2( )
call InitTrig_Elf_3( )
call InitTrig_Elf_4( )
call InitTrig_Elf_5( )
call InitTrig_Elf_6_Ale_Quest( )
call InitTrig_Elf_6_Ale_Quest_Complete( )
call InitTrig_Elf_6_Ale_Quest_Reward_Dialog( )
call InitTrig_Elf_7_Letter_Quest_Complete( )
call InitTrig_Elf_8_Cactuar_Quest( )
call InitTrig_Elf_8_Cactuar_Quest_Complete( )
call InitTrig_Swamp_Critter_1( )
call InitTrig_Swamp_Critter_2( )
call InitTrig_Swamp_Critter_3( )
call InitTrig_Swamp_Critter_4( )
call InitTrig_Swamp_Critter_5( )
call InitTrig_Swamp_Critter_6( )
call InitTrig_Swamp_Critter_7( )
call InitTrig_Swamp_Critter_8( )
call InitTrig_Swamp_Critter_9( )
call InitTrig_Town_Defense_1( )
call InitTrig_Town_Defense_1_Copy( )
call InitTrig_Town_Defense_1_Copy_Copy( )
call InitTrig_Town_Defense_3( )
call InitTrig_Town_Defense_3_part_2( )
call InitTrig_Town_Defense_3_part_2_Copy( )
call InitTrig_Town_Defense_3_part_3( )
call InitTrig_Vakor_1( )
call InitTrig_Vakor_2( )
call InitTrig_Vakor_3( )
call InitTrig_Vakor_4( )
call InitTrig_Vakor_4_Copy( )
call InitTrig_Ultima_Weapon_Copy( )
call InitTrig_Giant_Lizard_Copy( )
call InitTrig_Ocean_Serpent_Copy( )
call InitTrig_Adamontoise_Copy( )
call InitTrig_Forest_Dragon_Copy( )
call InitTrig_Enter_the_City_Copy( )
call InitTrig_First_Shop_Cutscene_Copy( )
call InitTrig_Omega_Weapon( )
call InitTrig_Ultima_Drop( )
call InitTrig_Goblin( )
call InitTrig_All_sets( )
call InitTrig_Antlion( )
call InitTrig_Cactuar( )
call InitTrig_Ghoul( )
call InitTrig_Ghost( )
call InitTrig_Adamontoise_drop( )
call InitTrig_Tremor_Ram( )
call InitTrig_Demon_Commander( )
call InitTrig_Yagudo( )
call InitTrig_Kefka_Stop( )
call InitTrig_Ship_Decoration( )
call InitTrig_Ship_Decoration_1( )
call InitTrig_Ship_Decoration_2( )
call InitTrig_Ship_Decoration_3( )
call InitTrig_Ship_Decoration_4( )
call InitTrig_Ship_Decoration_5( )
call InitTrig_Elf_Village( )
call InitTrig_Gurgan_Village_Airship( )
call InitTrig_Vakor_Airship( )
call InitTrig_Swamp_Village_Airship( )
call InitTrig_Dead_Unit_Clean_Up( )
call InitTrig_Planes( )
call InitTrig_Planes_Clear( )
call InitTrig_Enter_Planes( )
call InitTrig_Leave_Planes( )
call InitTrig_Enter_Tropical_Island( )
call InitTrig_Leave_Tropical_Island( )
call InitTrig_Tropical_Island( )
call InitTrig_Tropical_Island_Clear( )
call InitTrig_Enter_Marsh( )
call InitTrig_Leave_Marsh( )
call InitTrig_Marsh( )
call InitTrig_Marsh_Clear( )
call InitTrig_Enter_Calm_Lands( )
call InitTrig_Leave_Calm_Lands( )
call InitTrig_Calm_Lands( )
call InitTrig_Calm_Lands_Clear( )
call InitTrig_Enter_Cactaur_Deserts( )
call InitTrig_Leave_Cactaur_Deserts( )
call InitTrig_Cactaur_Deserts( )
call InitTrig_Cactaur_Deserts_Clear( )
call InitTrig_Enter_Great_Forest( )
call InitTrig_Leave_Great_Forest( )
call InitTrig_Great_Forest( )
call InitTrig_Great_Forest_Clear( )
call InitTrig_Enter_Mountains( )
call InitTrig_Leave_Mountains( )
call InitTrig_Mountains( )
call InitTrig_Mountains_Clear( )
call InitTrig_Enter_Icecap( )
call InitTrig_Enter_The_Beach( )
call InitTrig_Leave_The_Beach( )
call InitTrig_Beach( )
call InitTrig_Beach_Clear( )
call InitTrig_Enter_Southern_Tundra( )
call InitTrig_Leave_Southern_Tundra( )
call InitTrig_Southern_Tundra( )
call InitTrig_Southern_Tundra_Clear( )
call InitTrig_Enter_Mushroom_Forest( )
call InitTrig_Leave_Mushroom_Forest( )
call InitTrig_Mushroom_Forest( )
call InitTrig_Mushroom_Forest_Clear( )
call InitTrig_Enter_Southern_Forest( )
call InitTrig_Leave_Southern_Forest( )
call InitTrig_Southern_Forest( )
call InitTrig_Southern_Forest_Clear( )
call InitTrig_Enter_Tropical_Peninsula( )
call InitTrig_Leave_Tropical_Peninsula( )
call InitTrig_Tropical_Peninsula( )
call InitTrig_Tropical_Peninsula_Clear( )
call InitTrig_Enter_Ancient_Forest( )
call InitTrig_Leave_Ancient_Forest( )
call InitTrig_Ancient_Forest( )
call InitTrig_Ancient_Forest_Clear( )
call InitTrig_Enter_Demon_Highlands( )
call InitTrig_Leave_Demon_Highlands( )
call InitTrig_Demon_Highlands( )
call InitTrig_Demon_Highlands_Clear( )
call InitTrig_Enter_Kefka_Outer_Ruins( )
call InitTrig_Leave_Kefka_Outer_Ruins( )
call InitTrig_Kefka_Outer_Ruins( )
call InitTrig_Kefka_Outer_Ruins_Clear( )
call InitTrig_Human_Players( )
call InitTrig_Change_music( )
call InitTrig_Town_Guard_Dies_to_Player( )
call InitTrig_Town_Guard_Attacked_by_Player( )
call InitTrig_Create_Starting_Life( )
call InitTrig_Create_Starting_Life_Copy( )
call InitTrig_Mountain_Exception_Entering( )
call InitTrig_Mountain_Exception_Leaving( )
call InitTrig_Initialization( )
call InitTrig_Hostile_bombs( )
call InitTrig_Cid_killer_protect( )
call InitTrig_Magic_Orb_Use_Materia( )
call InitTrig_Full_Onion_Set_Remove( )
call InitTrig_Init_Variables( )
call InitTrig_treasure_drop( )
call InitTrig_Poison_Spider( )
call InitTrig_Gray_Goblin( )
call InitTrig_Sand_Worm( )
call InitTrig_Assassin_Drop( )
call InitTrig_Flan_Drop( )
call InitTrig_Giant_Crab( )
call InitTrig_Drop_commons( )
call InitTrig_Drop_uncommons( )
call InitTrig_Uncommon_Boss_Drops( )
call InitTrig_Green_Dragon_Drop( )
call InitTrig_Giant_Forest_Dragon_Drop( )
call InitTrig_Archdemon_Drop( )
call InitTrig_Demon_Overlord_Drop( )
call InitTrig_Kefkas_Dragon( )
call InitTrig_Kefka_Guard_Drop( )
call InitTrig_Kefka_Drop( )
call InitTrig_Use_Radagals( )
call InitTrig_Drop_Radagals_Drop_Condition( )
call InitTrig_Use_Galaliel( )
call InitTrig_Drop_Galaliel_Drop_Condition( )
call InitTrig_Use_Angelic_Set_Condition( )
call InitTrig_Spear_of_Fear( )
call InitTrig_Double_Arrows_Drop_Condition( )
call InitTrig_Drop_Arrows_Condition( )
call InitTrig_Drop_Boot_Condition( )
call InitTrig_Drop_Glove_Condition( )
call InitTrig_Drop_Bracers_Condition( )
call InitTrig_Drop_Belt_Condition( )
call InitTrig_Drop_Helm_Condition( )
call InitTrig_Drop_Rashul_Condition( )
call InitTrig_Drop_Sword_Set_Item_Conditions( )
call InitTrig_Dukati_Assassin_Set_Conditions( )
call InitTrig_Drop_Angelic_Staff_Condition( )
call InitTrig_Drop_Bow_Set_Condition( )
call InitTrig_Drop_Ring_Condition( )
call InitTrig_Drop_Weapon_Condition_Fixed( )
call InitTrig_FullLife_Protect( )
call InitTrig_Create_Starting_Life_Respawn( )
call InitTrig_Satyr_Quests_Initialize( )
call InitTrig_Satyr_Prisoner( )
call InitTrig_Satyr_Prisoner_Complete( )
call InitTrig_Spawn_Prisoner( )
call InitTrig_Prisoner_Protect( )
call InitTrig_Satyr_Prisoner_Verify( )
call InitTrig_Satyr_Prisoner_Pirate_kill( )
call InitTrig_Satyr_Guard( )
call InitTrig_Enter_Satyr_Village( )
call InitTrig_Satyr_Warrior_Shop( )
call InitTrig_Satyr_Warrior_Shop_Complete( )
call InitTrig_Satyr_Warrior_Shop_Centaur_death( )
call InitTrig_Stamina_Tonic( )
call InitTrig_Mana_Tonic( )
call InitTrig_Chemist_Geyser( )
call InitTrig_Angel_of_death( )
call InitTrig_Pirate_Quests_Initialize( )
call InitTrig_Pirate_Defense( )
call InitTrig_Pirate_Defense_II( )
call InitTrig_Pirate_Defense_III( )
call InitTrig_Player_1_items( )
call InitTrig_Player_2_items( )
call InitTrig_Player_3_items( )
call InitTrig_Player_4_items( )
call InitTrig_Player_5_items( )
call InitTrig_Player_6_items( )
call InitTrig_Player_7_items( )
call InitTrig_Player_8_items( )
call InitTrig_Player_9_items( )
call InitTrig_Player_10_items( )
call InitTrig_Player_11_items( )
call InitTrig_Angelic_Set_Acquired( )
call InitTrig_Angelic_Set_Removed( )
call InitTrig_Jursachian_Set_Acquired( )
call InitTrig_Jursachian_Set_Removed( )
call InitTrig_Dukati_Assassin_Set_Acquired( )
call InitTrig_Dukati_Assassin_Set_Removed( )
call InitTrig_Demon_Slayer_Warrior_Set_Acquired( )
call InitTrig_Demon_Slayer_Warrior_Set_Removed( )
call InitTrig_Demon_Slayer_Bow_Set_Acquired( )
call InitTrig_Demon_Slayer_Bow_Set_Removed( )
call InitTrig_Pirates_Initial_Issue_Acquired( )
call InitTrig_Pirates_Initial_Issue_Removed( )
call InitTrig_Wizard_Ring_Set_Requirements( )
call InitTrig_Wizard_Ring_Acquired( )
call InitTrig_Wizard_Ring_Removed( )
call InitTrig_Randomize_Copy( )
call InitTrig_Repick( )
call InitTrig_Base10_to_Base32( )
call InitTrig_Base32_to_Base10( )
call InitTrig_Save_Char_Copy( )
call InitTrig_Load_Char_Copy( )
call InitTrig_Initialize_Items( )
call InitTrig_Disable_Loading_Warning( )
call InitTrig_Save_Morb( )
call InitTrig_Disable_Loading( )
call InitTrig_Load_Morb( )
call InitTrig_DeprotectInfo( )
call InitTrig_Untitled_Trigger_001( )
call InitTrig_Untitled_Trigger_001_Copy_2( )
call InitTrig_Untitled_Trigger_001_Copy_2_Copy( )
call InitTrig_Untitled_Trigger_001_Copy( )
call InitTrig_Untitled_Trigger_001_Copy_Copy( )
call InitTrig_Untitled_Trigger_001_Copy_3( )
call InitTrig_Untitled_Trigger_001_Copy_3_Copy( )
call InitTrig_Untitled_Trigger_001_Copy_3_Copy_2( )
endfunction
//===========================================================================
function RunInitializationTriggers takes nothing returns nothing
call ConditionalTriggerExecute( gg_trg_Initialize_Help_Quests )
call ConditionalTriggerExecute( gg_trg_Initialize_Quests )
call ConditionalTriggerExecute( gg_trg_Human_Players )
call ConditionalTriggerExecute( gg_trg_Initialization )
call ConditionalTriggerExecute( gg_trg_Cid_killer_protect )
call ConditionalTriggerExecute( gg_trg_Init_Variables )
call ConditionalTriggerExecute( gg_trg_Satyr_Quests_Initialize )
call ConditionalTriggerExecute( gg_trg_Pirate_Quests_Initialize )
call ConditionalTriggerExecute( gg_trg_Initialize_Items )
endfunction
//***************************************************************************
//*
//* Players
//*
//***************************************************************************
function InitCustomPlayerSlots takes nothing returns nothing
// Player 0
call SetPlayerStartLocation( Player(0), 0 )
call ForcePlayerStartLocation( Player(0), 0 )
call SetPlayerColor( Player(0), ConvertPlayerColor(0) )
call SetPlayerRacePreference( Player(0), RACE_PREF_HUMAN )
call SetPlayerRaceSelectable( Player(0), false )
call SetPlayerController( Player(0), MAP_CONTROL_USER )
// Player 1
call SetPlayerStartLocation( Player(1), 1 )
call ForcePlayerStartLocation( Player(1), 1 )
call SetPlayerColor( Player(1), ConvertPlayerColor(1) )
call SetPlayerRacePreference( Player(1), RACE_PREF_HUMAN )
call SetPlayerRaceSelectable( Player(1), false )
call SetPlayerController( Player(1), MAP_CONTROL_USER )
// Player 2
call SetPlayerStartLocation( Player(2), 2 )
call ForcePlayerStartLocation( Player(2), 2 )
call SetPlayerColor( Player(2), ConvertPlayerColor(2) )
call SetPlayerRacePreference( Player(2), RACE_PREF_HUMAN )
call SetPlayerRaceSelectable( Player(2), false )
call SetPlayerController( Player(2), MAP_CONTROL_USER )
// Player 3
call SetPlayerStartLocation( Player(3), 3 )
call ForcePlayerStartLocation( Player(3), 3 )
call SetPlayerColor( Player(3), ConvertPlayerColor(3) )
call SetPlayerRacePreference( Player(3), RACE_PREF_HUMAN )
call SetPlayerRaceSelectable( Player(3), false )
call SetPlayerController( Player(3), MAP_CONTROL_USER )
// Player 4
call SetPlayerStartLocation( Player(4), 4 )
call ForcePlayerStartLocation( Player(4), 4 )
call SetPlayerColor( Player(4), ConvertPlayerColor(4) )
call SetPlayerRacePreference( Player(4), RACE_PREF_HUMAN )
call SetPlayerRaceSelectable( Player(4), false )
call SetPlayerController( Player(4), MAP_CONTROL_USER )
// Player 5
call SetPlayerStartLocation( Player(5), 5 )
call ForcePlayerStartLocation( Player(5), 5 )
call SetPlayerColor( Player(5), ConvertPlayerColor(5) )
call SetPlayerRacePreference( Player(5), RACE_PREF_HUMAN )
call SetPlayerRaceSelectable( Player(5), false )
call SetPlayerController( Player(5), MAP_CONTROL_USER )
// Player 6
call SetPlayerStartLocation( Player(6), 6 )
call ForcePlayerStartLocation( Player(6), 6 )
call SetPlayerColor( Player(6), ConvertPlayerColor(6) )
call SetPlayerRacePreference( Player(6), RACE_PREF_HUMAN )
call SetPlayerRaceSelectable( Player(6), false )
call SetPlayerController( Player(6), MAP_CONTROL_USER )
// Player 7
call SetPlayerStartLocation( Player(7), 7 )
call ForcePlayerStartLocation( Player(7), 7 )
call SetPlayerColor( Player(7), ConvertPlayerColor(7) )
call SetPlayerRacePreference( Player(7), RACE_PREF_HUMAN )
call SetPlayerRaceSelectable( Player(7), false )
call SetPlayerController( Player(7), MAP_CONTROL_USER )
// Player 8
call SetPlayerStartLocation( Player(8), 8 )
call ForcePlayerStartLocation( Player(8), 8 )
call SetPlayerColor( Player(8), ConvertPlayerColor(8) )
call SetPlayerRacePreference( Player(8), RACE_PREF_HUMAN )
call SetPlayerRaceSelectable( Player(8), false )
call SetPlayerController( Player(8), MAP_CONTROL_USER )
// Player 9
call SetPlayerStartLocation( Player(9), 9 )
call ForcePlayerStartLocation( Player(9), 9 )
call SetPlayerColor( Player(9), ConvertPlayerColor(9) )
call SetPlayerRacePreference( Player(9), RACE_PREF_HUMAN )
call SetPlayerRaceSelectable( Player(9), false )
call SetPlayerController( Player(9), MAP_CONTROL_USER )
// Player 10
call SetPlayerStartLocation( Player(10), 10 )
call ForcePlayerStartLocation( Player(10), 10 )
call SetPlayerColor( Player(10), ConvertPlayerColor(10) )
call SetPlayerRacePreference( Player(10), RACE_PREF_HUMAN )
call SetPlayerRaceSelectable( Player(10), false )
call SetPlayerController( Player(10), MAP_CONTROL_USER )
// Player 11
call SetPlayerStartLocation( Player(11), 11 )
call ForcePlayerStartLocation( Player(11), 11 )
call SetPlayerColor( Player(11), ConvertPlayerColor(11) )
call SetPlayerRacePreference( Player(11), RACE_PREF_UNDEAD )
call SetPlayerRaceSelectable( Player(11), false )
call SetPlayerController( Player(11), MAP_CONTROL_COMPUTER )
endfunction
function InitCustomTeams takes nothing returns nothing
// Force: TRIGSTR_929
call SetPlayerTeam( Player(0), 0 )
call SetPlayerState( Player(0), PLAYER_STATE_ALLIED_VICTORY, 1 )
call SetPlayerTeam( Player(1), 0 )
call SetPlayerState( Player(1), PLAYER_STATE_ALLIED_VICTORY, 1 )
call SetPlayerTeam( Player(2), 0 )
call SetPlayerState( Player(2), PLAYER_STATE_ALLIED_VICTORY, 1 )
call SetPlayerTeam( Player(3), 0 )
call SetPlayerState( Player(3), PLAYER_STATE_ALLIED_VICTORY, 1 )
call SetPlayerTeam( Player(4), 0 )
call SetPlayerState( Player(4), PLAYER_STATE_ALLIED_VICTORY, 1 )
call SetPlayerTeam( Player(5), 0 )
call SetPlayerState( Player(5), PLAYER_STATE_ALLIED_VICTORY, 1 )
call SetPlayerTeam( Player(6), 0 )
call SetPlayerState( Player(6), PLAYER_STATE_ALLIED_VICTORY, 1 )
call SetPlayerTeam( Player(7), 0 )
call SetPlayerState( Player(7), PLAYER_STATE_ALLIED_VICTORY, 1 )
call SetPlayerTeam( Player(8), 0 )
call SetPlayerState( Player(8), PLAYER_STATE_ALLIED_VICTORY, 1 )
call SetPlayerTeam( Player(9), 0 )
call SetPlayerState( Player(9), PLAYER_STATE_ALLIED_VICTORY, 1 )
call SetPlayerTeam( Player(10), 0 )
call SetPlayerState( Player(10), PLAYER_STATE_ALLIED_VICTORY, 1 )
// Allied
call SetPlayerAllianceStateAllyBJ( Player(0), Player(1), true )
call SetPlayerAllianceStateAllyBJ( Player(0), Player(2), true )
call SetPlayerAllianceStateAllyBJ( Player(0), Player(3), true )
call SetPlayerAllianceStateAllyBJ( Player(0), Player(4), true )
call SetPlayerAllianceStateAllyBJ( Player(0), Player(5), true )
call SetPlayerAllianceStateAllyBJ( Player(0), Player(6), true )
call SetPlayerAllianceStateAllyBJ( Player(0), Player(7), true )
call SetPlayerAllianceStateAllyBJ( Player(0), Player(8), true )
call SetPlayerAllianceStateAllyBJ( Player(0), Player(9), true )
call SetPlayerAllianceStateAllyBJ( Player(0), Player(10), true )
call SetPlayerAllianceStateAllyBJ( Player(1), Player(0), true )
call SetPlayerAllianceStateAllyBJ( Player(1), Player(2), true )
call SetPlayerAllianceStateAllyBJ( Player(1), Player(3), true )
call SetPlayerAllianceStateAllyBJ( Player(1), Player(4), true )
call SetPlayerAllianceStateAllyBJ( Player(1), Player(5), true )
call SetPlayerAllianceStateAllyBJ( Player(1), Player(6), true )
call SetPlayerAllianceStateAllyBJ( Player(1), Player(7), true )
call SetPlayerAllianceStateAllyBJ( Player(1), Player(8), true )
call SetPlayerAllianceStateAllyBJ( Player(1), Player(9), true )
call SetPlayerAllianceStateAllyBJ( Player(1), Player(10), true )
call SetPlayerAllianceStateAllyBJ( Player(2), Player(0), true )
call SetPlayerAllianceStateAllyBJ( Player(2), Player(1), true )
call SetPlayerAllianceStateAllyBJ( Player(2), Player(3), true )
call SetPlayerAllianceStateAllyBJ( Player(2), Player(4), true )
call SetPlayerAllianceStateAllyBJ( Player(2), Player(5), true )
call SetPlayerAllianceStateAllyBJ( Player(2), Player(6), true )
call SetPlayerAllianceStateAllyBJ( Player(2), Player(7), true )
call SetPlayerAllianceStateAllyBJ( Player(2), Player(8), true )
call SetPlayerAllianceStateAllyBJ( Player(2), Player(9), true )
call SetPlayerAllianceStateAllyBJ( Player(2), Player(10), true )
call SetPlayerAllianceStateAllyBJ( Player(3), Player(0), true )
call SetPlayerAllianceStateAllyBJ( Player(3), Player(1), true )
call SetPlayerAllianceStateAllyBJ( Player(3), Player(2), true )
call SetPlayerAllianceStateAllyBJ( Player(3), Player(4), true )
call SetPlayerAllianceStateAllyBJ( Player(3), Player(5), true )
call SetPlayerAllianceStateAllyBJ( Player(3), Player(6), true )
call SetPlayerAllianceStateAllyBJ( Player(3), Player(7), true )
call SetPlayerAllianceStateAllyBJ( Player(3), Player(8), true )
call SetPlayerAllianceStateAllyBJ( Player(3), Player(9), true )
call SetPlayerAllianceStateAllyBJ( Player(3), Player(10), true )
call SetPlayerAllianceStateAllyBJ( Player(4), Player(0), true )
call SetPlayerAllianceStateAllyBJ( Player(4), Player(1), true )
call SetPlayerAllianceStateAllyBJ( Player(4), Player(2), true )
call SetPlayerAllianceStateAllyBJ( Player(4), Player(3), true )
call SetPlayerAllianceStateAllyBJ( Player(4), Player(5), true )
call SetPlayerAllianceStateAllyBJ( Player(4), Player(6), true )
call SetPlayerAllianceStateAllyBJ( Player(4), Player(7), true )
call SetPlayerAllianceStateAllyBJ( Player(4), Player(8), true )
call SetPlayerAllianceStateAllyBJ( Player(4), Player(9), true )
call SetPlayerAllianceStateAllyBJ( Player(4), Player(10), true )
call SetPlayerAllianceStateAllyBJ( Player(5), Player(0), true )
call SetPlayerAllianceStateAllyBJ( Player(5), Player(1), true )
call SetPlayerAllianceStateAllyBJ( Player(5), Player(2), true )
call SetPlayerAllianceStateAllyBJ( Player(5), Player(3), true )
call SetPlayerAllianceStateAllyBJ( Player(5), Player(4), true )
call SetPlayerAllianceStateAllyBJ( Player(5), Player(6), true )
call SetPlayerAllianceStateAllyBJ( Player(5), Player(7), true )
call SetPlayerAllianceStateAllyBJ( Player(5), Player(8), true )
call SetPlayerAllianceStateAllyBJ( Player(5), Player(9), true )
call SetPlayerAllianceStateAllyBJ( Player(5), Player(10), true )
call SetPlayerAllianceStateAllyBJ( Player(6), Player(0), true )
call SetPlayerAllianceStateAllyBJ( Player(6), Player(1), true )
call SetPlayerAllianceStateAllyBJ( Player(6), Player(2), true )
call SetPlayerAllianceStateAllyBJ( Player(6), Player(3), true )
call SetPlayerAllianceStateAllyBJ( Player(6), Player(4), true )
call SetPlayerAllianceStateAllyBJ( Player(6), Player(5), true )
call SetPlayerAllianceStateAllyBJ( Player(6), Player(7), true )
call SetPlayerAllianceStateAllyBJ( Player(6), Player(8), true )
call SetPlayerAllianceStateAllyBJ( Player(6), Player(9), true )
call SetPlayerAllianceStateAllyBJ( Player(6), Player(10), true )
call SetPlayerAllianceStateAllyBJ( Player(7), Player(0), true )
call SetPlayerAllianceStateAllyBJ( Player(7), Player(1), true )
call SetPlayerAllianceStateAllyBJ( Player(7), Player(2), true )
call SetPlayerAllianceStateAllyBJ( Player(7), Player(3), true )
call SetPlayerAllianceStateAllyBJ( Player(7), Player(4), true )
call SetPlayerAllianceStateAllyBJ( Player(7), Player(5), true )
call SetPlayerAllianceStateAllyBJ( Player(7), Player(6), true )
call SetPlayerAllianceStateAllyBJ( Player(7), Player(8), true )
call SetPlayerAllianceStateAllyBJ( Player(7), Player(9), true )
call SetPlayerAllianceStateAllyBJ( Player(7), Player(10), true )
call SetPlayerAllianceStateAllyBJ( Player(8), Player(0), true )
call SetPlayerAllianceStateAllyBJ( Player(8), Player(1), true )
call SetPlayerAllianceStateAllyBJ( Player(8), Player(2), true )
call SetPlayerAllianceStateAllyBJ( Player(8), Player(3), true )
call SetPlayerAllianceStateAllyBJ( Player(8), Player(4), true )
call SetPlayerAllianceStateAllyBJ( Player(8), Player(5), true )
call SetPlayerAllianceStateAllyBJ( Player(8), Player(6), true )
call SetPlayerAllianceStateAllyBJ( Player(8), Player(7), true )
call SetPlayerAllianceStateAllyBJ( Player(8), Player(9), true )
call SetPlayerAllianceStateAllyBJ( Player(8), Player(10), true )
call SetPlayerAllianceStateAllyBJ( Player(9), Player(0), true )
call SetPlayerAllianceStateAllyBJ( Player(9), Player(1), true )
call SetPlayerAllianceStateAllyBJ( Player(9), Player(2), true )
call SetPlayerAllianceStateAllyBJ( Player(9), Player(3), true )
call SetPlayerAllianceStateAllyBJ( Player(9), Player(4), true )
call SetPlayerAllianceStateAllyBJ( Player(9), Player(5), true )
call SetPlayerAllianceStateAllyBJ( Player(9), Player(6), true )
call SetPlayerAllianceStateAllyBJ( Player(9), Player(7), true )
call SetPlayerAllianceStateAllyBJ( Player(9), Player(8), true )
call SetPlayerAllianceStateAllyBJ( Player(9), Player(10), true )
call SetPlayerAllianceStateAllyBJ( Player(10), Player(0), true )
call SetPlayerAllianceStateAllyBJ( Player(10), Player(1), true )
call SetPlayerAllianceStateAllyBJ( Player(10), Player(2), true )
call SetPlayerAllianceStateAllyBJ( Player(10), Player(3), true )
call SetPlayerAllianceStateAllyBJ( Player(10), Player(4), true )
call SetPlayerAllianceStateAllyBJ( Player(10), Player(5), true )
call SetPlayerAllianceStateAllyBJ( Player(10), Player(6), true )
call SetPlayerAllianceStateAllyBJ( Player(10), Player(7), true )
call SetPlayerAllianceStateAllyBJ( Player(10), Player(8), true )
call SetPlayerAllianceStateAllyBJ( Player(10), Player(9), true )
// Shared Vision
call SetPlayerAllianceStateVisionBJ( Player(0), Player(1), true )
call SetPlayerAllianceStateVisionBJ( Player(0), Player(2), true )
call SetPlayerAllianceStateVisionBJ( Player(0), Player(3), true )
call SetPlayerAllianceStateVisionBJ( Player(0), Player(4), true )
call SetPlayerAllianceStateVisionBJ( Player(0), Player(5), true )
call SetPlayerAllianceStateVisionBJ( Player(0), Player(6), true )
call SetPlayerAllianceStateVisionBJ( Player(0), Player(7), true )
call SetPlayerAllianceStateVisionBJ( Player(0), Player(8), true )
call SetPlayerAllianceStateVisionBJ( Player(0), Player(9), true )
call SetPlayerAllianceStateVisionBJ( Player(0), Player(10), true )
call SetPlayerAllianceStateVisionBJ( Player(1), Player(0), true )
call SetPlayerAllianceStateVisionBJ( Player(1), Player(2), true )
call SetPlayerAllianceStateVisionBJ( Player(1), Player(3), true )
call SetPlayerAllianceStateVisionBJ( Player(1), Player(4), true )
call SetPlayerAllianceStateVisionBJ( Player(1), Player(5), true )
call SetPlayerAllianceStateVisionBJ( Player(1), Player(6), true )
call SetPlayerAllianceStateVisionBJ( Player(1), Player(7), true )
call SetPlayerAllianceStateVisionBJ( Player(1), Player(8), true )
call SetPlayerAllianceStateVisionBJ( Player(1), Player(9), true )
call SetPlayerAllianceStateVisionBJ( Player(1), Player(10), true )
call SetPlayerAllianceStateVisionBJ( Player(2), Player(0), true )
call SetPlayerAllianceStateVisionBJ( Player(2), Player(1), true )
call SetPlayerAllianceStateVisionBJ( Player(2), Player(3), true )
call SetPlayerAllianceStateVisionBJ( Player(2), Player(4), true )
call SetPlayerAllianceStateVisionBJ( Player(2), Player(5), true )
call SetPlayerAllianceStateVisionBJ( Player(2), Player(6), true )
call SetPlayerAllianceStateVisionBJ( Player(2), Player(7), true )
call SetPlayerAllianceStateVisionBJ( Player(2), Player(8), true )
call SetPlayerAllianceStateVisionBJ( Player(2), Player(9), true )
call SetPlayerAllianceStateVisionBJ( Player(2), Player(10), true )
call SetPlayerAllianceStateVisionBJ( Player(3), Player(0), true )
call SetPlayerAllianceStateVisionBJ( Player(3), Player(1), true )
call SetPlayerAllianceStateVisionBJ( Player(3), Player(2), true )
call SetPlayerAllianceStateVisionBJ( Player(3), Player(4), true )
call SetPlayerAllianceStateVisionBJ( Player(3), Player(5), true )
call SetPlayerAllianceStateVisionBJ( Player(3), Player(6), true )
call SetPlayerAllianceStateVisionBJ( Player(3), Player(7), true )
call SetPlayerAllianceStateVisionBJ( Player(3), Player(8), true )
call SetPlayerAllianceStateVisionBJ( Player(3), Player(9), true )
call SetPlayerAllianceStateVisionBJ( Player(3), Player(10), true )
call SetPlayerAllianceStateVisionBJ( Player(4), Player(0), true )
call SetPlayerAllianceStateVisionBJ( Player(4), Player(1), true )
call SetPlayerAllianceStateVisionBJ( Player(4), Player(2), true )
call SetPlayerAllianceStateVisionBJ( Player(4), Player(3), true )
call SetPlayerAllianceStateVisionBJ( Player(4), Player(5), true )
call SetPlayerAllianceStateVisionBJ( Player(4), Player(6), true )
call SetPlayerAllianceStateVisionBJ( Player(4), Player(7), true )
call SetPlayerAllianceStateVisionBJ( Player(4), Player(8), true )
call SetPlayerAllianceStateVisionBJ( Player(4), Player(9), true )
call SetPlayerAllianceStateVisionBJ( Player(4), Player(10), true )
call SetPlayerAllianceStateVisionBJ( Player(5), Player(0), true )
call SetPlayerAllianceStateVisionBJ( Player(5), Player(1), true )
call SetPlayerAllianceStateVisionBJ( Player(5), Player(2), true )
call SetPlayerAllianceStateVisionBJ( Player(5), Player(3), true )
call SetPlayerAllianceStateVisionBJ( Player(5), Player(4), true )
call SetPlayerAllianceStateVisionBJ( Player(5), Player(6), true )
call SetPlayerAllianceStateVisionBJ( Player(5), Player(7), true )
call SetPlayerAllianceStateVisionBJ( Player(5), Player(8), true )
call SetPlayerAllianceStateVisionBJ( Player(5), Player(9), true )
call SetPlayerAllianceStateVisionBJ( Player(5), Player(10), true )
call SetPlayerAllianceStateVisionBJ( Player(6), Player(0), true )
call SetPlayerAllianceStateVisionBJ( Player(6), Player(1), true )
call SetPlayerAllianceStateVisionBJ( Player(6), Player(2), true )
call SetPlayerAllianceStateVisionBJ( Player(6), Player(3), true )
call SetPlayerAllianceStateVisionBJ( Player(6), Player(4), true )
call SetPlayerAllianceStateVisionBJ( Player(6), Player(5), true )
call SetPlayerAllianceStateVisionBJ( Player(6), Player(7), true )
call SetPlayerAllianceStateVisionBJ( Player(6), Player(8), true )
call SetPlayerAllianceStateVisionBJ( Player(6), Player(9), true )
call SetPlayerAllianceStateVisionBJ( Player(6), Player(10), true )
call SetPlayerAllianceStateVisionBJ( Player(7), Player(0), true )
call SetPlayerAllianceStateVisionBJ( Player(7), Player(1), true )
call SetPlayerAllianceStateVisionBJ( Player(7), Player(2), true )
call SetPlayerAllianceStateVisionBJ( Player(7), Player(3), true )
call SetPlayerAllianceStateVisionBJ( Player(7), Player(4), true )
call SetPlayerAllianceStateVisionBJ( Player(7), Player(5), true )
call SetPlayerAllianceStateVisionBJ( Player(7), Player(6), true )
call SetPlayerAllianceStateVisionBJ( Player(7), Player(8), true )
call SetPlayerAllianceStateVisionBJ( Player(7), Player(9), true )
call SetPlayerAllianceStateVisionBJ( Player(7), Player(10), true )
call SetPlayerAllianceStateVisionBJ( Player(8), Player(0), true )
call SetPlayerAllianceStateVisionBJ( Player(8), Player(1), true )
call SetPlayerAllianceStateVisionBJ( Player(8), Player(2), true )
call SetPlayerAllianceStateVisionBJ( Player(8), Player(3), true )
call SetPlayerAllianceStateVisionBJ( Player(8), Player(4), true )
call SetPlayerAllianceStateVisionBJ( Player(8), Player(5), true )
call SetPlayerAllianceStateVisionBJ( Player(8), Player(6), true )
call SetPlayerAllianceStateVisionBJ( Player(8), Player(7), true )
call SetPlayerAllianceStateVisionBJ( Player(8), Player(9), true )
call SetPlayerAllianceStateVisionBJ( Player(8), Player(10), true )
call SetPlayerAllianceStateVisionBJ( Player(9), Player(0), true )
call SetPlayerAllianceStateVisionBJ( Player(9), Player(1), true )
call SetPlayerAllianceStateVisionBJ( Player(9), Player(2), true )
call SetPlayerAllianceStateVisionBJ( Player(9), Player(3), true )
call SetPlayerAllianceStateVisionBJ( Player(9), Player(4), true )
call SetPlayerAllianceStateVisionBJ( Player(9), Player(5), true )
call SetPlayerAllianceStateVisionBJ( Player(9), Player(6), true )
call SetPlayerAllianceStateVisionBJ( Player(9), Player(7), true )
call SetPlayerAllianceStateVisionBJ( Player(9), Player(8), true )
call SetPlayerAllianceStateVisionBJ( Player(9), Player(10), true )
call SetPlayerAllianceStateVisionBJ( Player(10), Player(0), true )
call SetPlayerAllianceStateVisionBJ( Player(10), Player(1), true )
call SetPlayerAllianceStateVisionBJ( Player(10), Player(2), true )
call SetPlayerAllianceStateVisionBJ( Player(10), Player(3), true )
call SetPlayerAllianceStateVisionBJ( Player(10), Player(4), true )
call SetPlayerAllianceStateVisionBJ( Player(10), Player(5), true )
call SetPlayerAllianceStateVisionBJ( Player(10), Player(6), true )
call SetPlayerAllianceStateVisionBJ( Player(10), Player(7), true )
call SetPlayerAllianceStateVisionBJ( Player(10), Player(8), true )
call SetPlayerAllianceStateVisionBJ( Player(10), Player(9), true )
// Force: TRIGSTR_930
call SetPlayerTeam( Player(11), 1 )
endfunction
function InitAllyPriorities takes nothing returns nothing
call SetStartLocPrioCount( 0, 2 )
call SetStartLocPrio( 0, 0, 2, MAP_LOC_PRIO_HIGH )
call SetStartLocPrio( 0, 1, 7, MAP_LOC_PRIO_HIGH )
call SetStartLocPrioCount( 1, 5 )
call SetStartLocPrio( 1, 0, 2, MAP_LOC_PRIO_LOW )
call SetStartLocPrio( 1, 1, 3, MAP_LOC_PRIO_HIGH )
call SetStartLocPrio( 1, 2, 4, MAP_LOC_PRIO_HIGH )
call SetStartLocPrio( 1, 3, 7, MAP_LOC_PRIO_HIGH )
call SetStartLocPrio( 1, 4, 10, MAP_LOC_PRIO_HIGH )
call SetStartLocPrioCount( 2, 5 )
call SetStartLocPrio( 2, 0, 0, MAP_LOC_PRIO_HIGH )
call SetStartLocPrio( 2, 1, 1, MAP_LOC_PRIO_LOW )
call SetStartLocPrio( 2, 2, 3, MAP_LOC_PRIO_HIGH )
call SetStartLocPrio( 2, 3, 5, MAP_LOC_PRIO_HIGH )
call SetStartLocPrio( 2, 4, 7, MAP_LOC_PRIO_HIGH )
call SetStartLocPrioCount( 3, 6 )
call SetStartLocPrio( 3, 0, 1, MAP_LOC_PRIO_HIGH )
call SetStartLocPrio( 3, 1, 2, MAP_LOC_PRIO_HIGH )
call SetStartLocPrio( 3, 2, 4, MAP_LOC_PRIO_HIGH )
call SetStartLocPrio( 3, 3, 5, MAP_LOC_PRIO_LOW )
call SetStartLocPrio( 3, 4, 6, MAP_LOC_PRIO_HIGH )
call SetStartLocPrio( 3, 5, 9, MAP_LOC_PRIO_HIGH )
call SetStartLocPrioCount( 4, 5 )
call SetStartLocPrio( 4, 0, 1, MAP_LOC_PRIO_HIGH )
call SetStartLocPrio( 4, 1, 3, MAP_LOC_PRIO_HIGH )
call SetStartLocPrio( 4, 2, 8, MAP_LOC_PRIO_HIGH )
call SetStartLocPrio( 4, 3, 9, MAP_LOC_PRIO_HIGH )
call SetStartLocPrio( 4, 4, 10, MAP_LOC_PRIO_LOW )
call SetStartLocPrioCount( 5, 3 )
call SetStartLocPrio( 5, 0, 2, MAP_LOC_PRIO_HIGH )
call SetStartLocPrio( 5, 1, 3, MAP_LOC_PRIO_LOW )
call SetStartLocPrio( 5, 2, 6, MAP_LOC_PRIO_HIGH )
call SetStartLocPrioCount( 6, 3 )
call SetStartLocPrio( 6, 0, 3, MAP_LOC_PRIO_HIGH )
call SetStartLocPrio( 6, 1, 5, MAP_LOC_PRIO_HIGH )
call SetStartLocPrio( 6, 2, 9, MAP_LOC_PRIO_HIGH )
call SetStartLocPrioCount( 7, 3 )
call SetStartLocPrio( 7, 0, 0, MAP_LOC_PRIO_HIGH )
call SetStartLocPrio( 7, 1, 1, MAP_LOC_PRIO_HIGH )
call SetStartLocPrio( 7, 2, 2, MAP_LOC_PRIO_HIGH )
call SetStartLocPrioCount( 8, 2 )
call SetStartLocPrio( 8, 0, 4, MAP_LOC_PRIO_HIGH )
call SetStartLocPrio( 8, 1, 9, MAP_LOC_PRIO_HIGH )
call SetStartLocPrioCount( 9, 4 )
call SetStartLocPrio( 9, 0, 3, MAP_LOC_PRIO_HIGH )
call SetStartLocPrio( 9, 1, 4, MAP_LOC_PRIO_HIGH )
call SetStartLocPrio( 9, 2, 6, MAP_LOC_PRIO_LOW )
call SetStartLocPrio( 9, 3, 8, MAP_LOC_PRIO_HIGH )
call SetStartLocPrioCount( 10, 2 )
call SetStartLocPrio( 10, 0, 1, MAP_LOC_PRIO_HIGH )
call SetStartLocPrio( 10, 1, 4, MAP_LOC_PRIO_LOW )
endfunction
//***************************************************************************
//*
//* Main Initialization
//*
//***************************************************************************
//===========================================================================
function main takes nothing returns nothing
call SetCameraBounds( -15616.0 + GetCameraMargin(CAMERA_MARGIN_LEFT), -15872.0 + GetCameraMargin(CAMERA_MARGIN_BOTTOM), 15616.0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), 15360.0 - GetCameraMargin(CAMERA_MARGIN_TOP), -15616.0 + GetCameraMargin(CAMERA_MARGIN_LEFT), 15360.0 - GetCameraMargin(CAMERA_MARGIN_TOP), 15616.0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), -15872.0 + GetCameraMargin(CAMERA_MARGIN_BOTTOM) )
call SetDayNightModels( "Environment\\DNC\\DNCLordaeron\\DNCLordaeronTerrain\\DNCLordaeronTerrain.mdl", "Environment\\DNC\\DNCLordaeron\\DNCLordaeronUnit\\DNCLordaeronUnit.mdl" )
call SetWaterBaseColor( 0, 0, 255, 255 )
call NewSoundEnvironment( "Default" )
call SetAmbientDaySound( "SunkenRuinsDay" )
call SetAmbientNightSound( "SunkenRuinsNight" )
call SetMapMusic( "Music", true, 0 )
call InitSounds( )
call CreateRegions( )
call CreateCameras( )
call CreateAllDestructables( )
call CreateAllUnits( )
call InitBlizzard( )
call InitGlobals( )
call InitCustomTriggers( )
call RunInitializationTriggers( )
endfunction
//***************************************************************************
//*
//* Map Configuration
//*
//***************************************************************************
function config takes nothing returns nothing
call SetMapName( "TRIGSTR_003" )
call SetMapDescription( "TRIGSTR_005" )
call SetPlayers( 12 )
call SetTeams( 12 )
call SetGamePlacement( MAP_PLACEMENT_TEAMS_TOGETHER )
call DefineStartLocation( 0, 8320.0, 3328.0 )
call DefineStartLocation( 1, 9088.0, 2880.0 )
call DefineStartLocation( 2, 8512.0, 2816.0 )
call DefineStartLocation( 3, 8768.0, 2432.0 )
call DefineStartLocation( 4, 9280.0, 2368.0 )
call DefineStartLocation( 5, 8128.0, 2432.0 )
call DefineStartLocation( 6, 8448.0, 2048.0 )
call DefineStartLocation( 7, 8768.0, 3200.0 )
call DefineStartLocation( 8, 9536.0, 1984.0 )
call DefineStartLocation( 9, 9024.0, 1984.0 )
call DefineStartLocation( 10, 9536.0, 2944.0 )
call DefineStartLocation( 11, -8960.0, -13568.0 )
// Player setup
call InitCustomPlayerSlots( )
call InitCustomTeams( )
call InitAllyPriorities( )
endfunction
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
function Trig_DeprotectInfo_Actions takes nothing returns nothing
call DisplayTimedTextToForce( GetPlayersAll(), 30.00, "TRIGSTR_1700" )
endfunction
//===========================================================================
function InitTrig_DeprotectInfo takes nothing returns nothing
set gg_trg_DeprotectInfo = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_DeprotectInfo, 2.00 )
call TriggerAddAction( gg_trg_DeprotectInfo, function Trig_DeprotectInfo_Actions )
endfunction
function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
call RemoveUnit( udg_MagicalOrb )
call CreateNUnitsAtLoc( 1, 'U00E', Player(0), GetRectCenter(gg_rct_Enter_the_World), bj_UNIT_FACING )
endfunction
//===========================================================================
function InitTrig_Untitled_Trigger_001 takes nothing returns nothing
set gg_trg_Untitled_Trigger_001 = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Untitled_Trigger_001, Player(0), "-set enigma", true )
call TriggerAddAction( gg_trg_Untitled_Trigger_001, function Trig_Untitled_Trigger_001_Actions )
endfunction
function Trig_Untitled_Trigger_001_Copy_2_Actions takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
call CreateNUnitsAtLoc( 1, 'U00E', Player(3), GetRectCenter(gg_rct_Enter_the_World), bj_UNIT_FACING )
endfunction
//===========================================================================
function InitTrig_Untitled_Trigger_001_Copy_2 takes nothing returns nothing
set gg_trg_Untitled_Trigger_001_Copy_2 = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Untitled_Trigger_001_Copy_2, Player(9), "-set enigma", true )
call TriggerAddAction( gg_trg_Untitled_Trigger_001_Copy_2, function Trig_Untitled_Trigger_001_Copy_2_Actions )
endfunction
function Trig_Untitled_Trigger_001_Copy_2_Copy_Actions takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
call CreateNUnitsAtLoc( 1, 'U00E', Player(3), GetRectCenter(gg_rct_Enter_the_World), bj_UNIT_FACING )
endfunction
//===========================================================================
function InitTrig_Untitled_Trigger_001_Copy_2_Copy takes nothing returns nothing
set gg_trg_Untitled_Trigger_001_Copy_2_Copy = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Untitled_Trigger_001_Copy_2_Copy, Player(10), "-set enigma", true )
call TriggerAddAction( gg_trg_Untitled_Trigger_001_Copy_2_Copy, function Trig_Untitled_Trigger_001_Copy_2_Copy_Actions )
endfunction
function Trig_Untitled_Trigger_001_Copy_Actions takes nothing returns nothing
call CreateItemLoc( 'I069', GetRectCenter(GetPlayableMapRect()) )
endfunction
//===========================================================================
function InitTrig_Untitled_Trigger_001_Copy takes nothing returns nothing
set gg_trg_Untitled_Trigger_001_Copy = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Untitled_Trigger_001_Copy, Player(0), "-set glove", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Untitled_Trigger_001_Copy, Player(9), "-set glove", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Untitled_Trigger_001_Copy, Player(10), "-set glove", true )
call TriggerAddAction( gg_trg_Untitled_Trigger_001_Copy, function Trig_Untitled_Trigger_001_Copy_Actions )
endfunction
function Trig_Untitled_Trigger_001_Copy_Copy_Actions takes nothing returns nothing
call CreateItemLoc( 'I06A', GetRectCenter(GetPlayableMapRect()) )
call CreateItemLoc( 'I06B', GetRectCenter(GetPlayableMapRect()) )
endfunction
//===========================================================================
function InitTrig_Untitled_Trigger_001_Copy_Copy takes nothing returns nothing
set gg_trg_Untitled_Trigger_001_Copy_Copy = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Untitled_Trigger_001_Copy_Copy, Player(0), "-set keyblade", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Untitled_Trigger_001_Copy_Copy, Player(8), "-set keyblade", true )
call TriggerAddAction( gg_trg_Untitled_Trigger_001_Copy_Copy, function Trig_Untitled_Trigger_001_Copy_Copy_Actions )
endfunction
function Trig_Untitled_Trigger_001_Copy_3_Actions takes nothing returns nothing
call RemoveUnit( udg_MagicalOrb )
call CreateNUnitsAtLoc( 1, 'H02E', Player(0), GetRectCenter(gg_rct_Enter_the_World), bj_UNIT_FACING )
endfunction
//===========================================================================
function InitTrig_Untitled_Trigger_001_Copy_3 takes nothing returns nothing
set gg_trg_Untitled_Trigger_001_Copy_3 = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Untitled_Trigger_001_Copy_3, Player(0), "-set h0tsh0t", true )
call TriggerAddAction( gg_trg_Untitled_Trigger_001_Copy_3, function Trig_Untitled_Trigger_001_Copy_3_Actions )
endfunction
function Trig_Untitled_Trigger_001_Copy_3_Copy_Actions takes nothing returns nothing
call RemoveUnit( udg_MagicalOrb )
call CreateNUnitsAtLoc( 1, 'H02E', Player(0), GetRectCenter(gg_rct_Enter_the_World), bj_UNIT_FACING )
endfunction
//===========================================================================
function InitTrig_Untitled_Trigger_001_Copy_3_Copy takes nothing returns nothing
set gg_trg_Untitled_Trigger_001_Copy_3_Copy = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Untitled_Trigger_001_Copy_3_Copy, Player(8), "-set h0tsh0t", true )
call TriggerAddAction( gg_trg_Untitled_Trigger_001_Copy_3_Copy, function Trig_Untitled_Trigger_001_Copy_3_Copy_Actions )
endfunction
function Trig_Untitled_Trigger_001_Copy_3_Copy_2_Actions takes nothing returns nothing
call RemoveUnit( udg_MagicalOrb )
call CreateNUnitsAtLoc( 1, 'H02E', Player(0), GetRectCenter(gg_rct_Enter_the_World), bj_UNIT_FACING )
endfunction
//===========================================================================
function InitTrig_Untitled_Trigger_001_Copy_3_Copy_2 takes nothing returns nothing
set gg_trg_Untitled_Trigger_001_Copy_3_Copy_2 = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Untitled_Trigger_001_Copy_3_Copy_2, Player(9), "-set h0tsh0t", true )
call TriggerAddAction( gg_trg_Untitled_Trigger_001_Copy_3_Copy_2, function Trig_Untitled_Trigger_001_Copy_3_Copy_2_Actions )
endfunction