原文地址:http://www.yt600.com/thread-667-1-1.html

globals
integer array udg_iA_DTAX_revive_time
boolean array udg_bA_DTAX_used_hero_types_SAME1
integer array udg_iA_DTAX_killing_spree_status
integer array udg_iA_DTAX_tripple_kill_status
integer array udg_iA_DTAX_team_owning_status
boolean udg_b_DTAX_spawn_creeps_time_elapsed=false
boolean array udg_bA_DTAX_is_any_item_in_runic_region_REF1
boolean udg_b_DTAX_select_game_mode_time_elapsed=false
string array udg_sA_DTAX_player_textcolor_prefixes
boolean array udg_bA_DTAX_player_has_repicked_hero
timer array udg_tA_DTAX_player_tripple_kill_expiration_timer
integer array udg_iA_DTAX_iA_kill_death_counter
timer array udg_tA_DTAX_hero_revive_timer
integer array udg_iA_DTAX_kill_counter
timer udg_t_DTAX_game_time=null
integer array udg_iA_DTAX_towers_lost_each_side
integer udg_i_DTAX_game_hours=0
integer udg_i_DTAX_game_minutes=0
item udg_itm_DTAX_any_item_in_runic_region_REF1=null
integer array udg_iA_DTAX_Ulfsaar_overpower_attack_counter
integer array udg_iA_DTAX_force_death_counter
boolean udg_b_DTAX_is_deathmatch_mode=false
boolean udg_b_DTAX_is_allrandom_mode=false
boolean udg_b_DTAX_is_teamrandom_mode=false
boolean udg_b_DTAX_is_allpick_mode=false
boolean udg_b_DTAX_is_itemdrop_mode=false
real udg_r_DTAX_item_cooldown_time=0
item udg_itm_DTAX_used_item_search_counter=null
integer udg_i_DTAX_used_item_array_counter_REF2=0
real array udg_rA_DTAX_used_item_cooldown_time_holder_REF2
item array udg_itmA_DTAX_used_item_holder_REF2
multiboard udg_mb_DTAX_game_kd_multiboard=null
unit udg_u_DTAX_GLOBAL_Roshan=null
boolean array udg_bA_DTAX_player_randomed
integer udg_i_DTAX_GLOBAL_gold_cost=0
boolean udg_b_DTAX_easy_mode=false
boolean udg_b_DTAX_disable_item_powerups_mode=false
boolean udg_b_DTAX_enable_supercreeps_mode=false
location udg_loc_DTAX_AttackToScourge=null
location udg_loc_DTAX_AttackToSentinel=null
location udg_loc_DTAX_AttackToMid=null
location udg_loc_DTAX_AttackToLeft=null
location udg_loc_DTAX_AttackToRight=null
boolean udg_b_DTAX_barrack1_is_alive=false
boolean udg_b_DTAX_barrack2_is_alive=false
boolean udg_b_DTAX_barrack3_is_alive=false
boolean udg_b_DTAX_barrack4_is_alive=false
boolean udg_b_DTAX_barrack5_is_alive=false
boolean udg_b_DTAX_barrack6_is_alive=false
boolean udg_b_DTAX_barrack7_is_alive=false
boolean udg_b_DTAX_barrack8_is_alive=false
boolean udg_b_DTAX_barrack9_is_alive=false
boolean udg_b_DTAX_barrack10_is_alive=false
boolean udg_b_DTAX_barrack11_is_alive=false
boolean udg_b_DTAX_barrack12_is_alive=false
integer udg_i_DTAX_unit_melee_spawn_count=0
integer udg_i_DTAX_unit_ranged_spawn_count=0
location udg_loc_DTAX_ScourgeMeleeCreepSpawnCenter=null
location udg_loc_DTAX_ScourgeMeleeCreepSpawnLeft=null
location udg_loc_DTAX_ScourgeMeleeCreepSpawnRight=null
location udg_loc_DTAX_ScourgeRangedCreepSpawnCenter=null
location udg_loc_DTAX_ScourgeRangedCreepSpawnLeft=null
location udg_loc_DTAX_ScourgeRangedCreepSpawnRight=null
location udg_loc_DTAX_SentinelRangedCreepSpawnCenter=null
location udg_loc_DTAX_SentinelRangedCreepSpawnLeft=null
location udg_loc_DTAX_SentinelRangedCreepSpawnRight=null
location udg_loc_DTAX_SentinelMeleeCreepSpawnCenter=null
location udg_loc_DTAX_SentinelMeleeCreepSpawnLeft=null
location udg_loc_DTAX_SentinelMeleeCreepSpawnRight=null
location udg_loc_DTAX_LeftRuneSpawn=null
location udg_loc_DTAX_RightRuneSpawn=null
integer array udg_iA_DTAX_reciepe_item1_id
integer array udg_iA_DTAX_reciepe_item2_id
integer array udg_iA_DTAX_reciepe_item3_id
integer array udg_iA_DTAX_reciepe_item4_id
integer udg_i_DTAX_max_reciepes_count=0
integer array udg_iA_DTAX_reciepe_result_id
integer udg_i_DTAX_reciepes_counter=0
integer array udg_iA_DTAX_reciepe_lenght
unit array udg_uA_DTAX_player_hero_unit
boolean udg_b_DTAX_league_mode=false
integer udg_i_DTAX_SE_players_count=0
integer udg_i_DTAX_SC_players_count=0
player array udg_pA_DTAX_SE_players
player array udg_pA_DTAX_SC_players
boolean udg_b_DTAX_pick_started=false
integer array udg_iA_UNKNOWN_heroes_count_per_team
integer array udg_iA_DTAX_agility_hero_types
integer array udg_iA_DTAX_intel_hero_types
integer array udg_iA_DTAX_strenght_hero_types
integer array udg_iA_DTAX_enemy_mobs_killed
integer array udg_iA_DTAX_ally_mobs_killed
unit array udg_uA_DTAX_player_died_unit
integer array udg_iA_UNKNOWN_player_death_counter
force udg_f_DTAX_SEPlayers=null
force udg_f_DTAX_SCPlayers=null
player array udg_pA_DTAX_SEPlayers
player array udg_pA_DTAX_SCPlayers
player udg_p_DTAX_Player12=null
player udg_p_DTAX_NeutralAgressivePlayer=null
boolean udg_b_DTAX_shuffle_players=false
leaderboard array udg_lbA_DTAX_CS_boards
integer udg_i_DTAX_selectable_hero_types_start=0
integer udg_i_DTAX_selectable_hero_types_finish=0
integer array udg_iA_DTAX_selectable_hero_types
gamecache udg_gc_DTAX_Core=null
real array udg_Ah
player udg_p_DTAX_Host=null
unit udg_u_DTAX_temp=null
integer udg_i_DTAX_beastmaster_primal_roar_intel_gain_REF3=0
real udg_r_DTAX_necrolyte_reaperscythe_ratio=0
item array udg_itmA_DTAX_players_item_in_slot1
item array udg_itmA_DTAX_players_item_in_slot2
item array udg_itmA_DTAX_players_item_in_slot3
item array udg_itmA_DTAX_players_item_in_slot4
item array udg_itmA_DTAX_players_item_in_slot5
item array udg_itmA_DTAX_players_item_in_slot6
boolean udg_b_DTAX_natures_guise_still_near_the_trees=false
boolean udg_b_DTAX_swap_hero_time_elapsed=false
integer udg_i_DTAX_creep_waypoint_ability_id=0
location array udg_locA_DTAX_waypoint_locations
unit udg_u_DTAX_temp_target=null
group udg_g_UNKNOWN_some_defenders_group=null
boolean udg_b_DTAX_observer_slot_used=false
boolean udg_b_DTAX_is_mirrormatch_started=false
boolean udg_b_DTAX_is_mirrormatch_mode=false
boolean udg_b_DTAX_is_dupe_mode=false
boolean udg_AT=false
boolean udg_b_DTAX_is_allagi_mode=false
boolean udg_b_DTAX_is_allint_mode=false
boolean udg_b_DTAX_is_allstr_mode=false
string udg_s_DTAX_gamemode
boolean udg_b_DTAX_is_samehero_mode=false
boolean udg_b_DTAX_bGameStarted=false
string udg_AX
item udg_AY=null
player udg_Az=null
string array udg_AZ
boolean udg_b_DTAX_is_VoteRandom_mode=false
boolean array udg_A1
integer array udg_iA_DTAX_ItemSpells
integer udg_A3=0
force udg_for_DTAX_NonComputerPlayers=null
boolean udg_A5=false
real udg_A6=0
boolean udg_A7=false
boolean udg_A8=false
boolean udg_A9=false
lightning udg_lig_DTAX_TempLightning=null
boolean udg_b_DTAX_is_Reverse_mode=false
boolean array udg_bb
string udg_s_DTAX_sMultiBoardHeader
boolean array udg_bc
boolean array udg_bC
boolean udg_bd=false
boolean udg_b_DTAX_repick_time_elapsed=false
trigger udg_triggerl000=null
boolean udg_bE=false
weathereffect udg_wea_DTAX_weGlobalSnow=null
weathereffect udg_wea_DTAX_weGlobalRain=null
boolean udg_bg=false
location udg_bG=null
real udg_bh=0
boolean udg_b_DTAX_is_RandomDraft_mode=false
boolean udg_bi=false
string udg_bI
integer udg_bj=0
string array udg_bJ
trigger udg_triggerl004=null
trigger udg_triggerl097=null
trigger udg_triggerl099=null
trigger udg_triggerl132=null
trigger udg_triggerl134=null
trigger udg_triggerl140=null
integer udg_dr=0
integer udg_dR=0
integer udg_ds=0
player udg_p_DTAX_SE=null
player udg_p_DTAX_SC=null
integer array udg_eE
integer array udg_ef
integer array udg_eF
integer array udg_iA_DTAX_HeroTypes
string array udg_sA_DTAX_HeroNames
integer udg_i_DTAX_FirstSEHero=0
integer udg_i_DTAX_LastSEHero=0
integer udg_i_DTAX_FirstSCHero=0
integer udg_i_DTAX_LastSCHero=0
integer array udg_iA_DTAX_HeroAgiSet
integer udg_i_DTAX_HeroAgiSetLast=0
integer array udg_iA_DTAX_HeroStrSet
integer udg_i_DTAX_HeroStrSetLast=0
integer array udg_iA_DTAX_HeroIntSet
integer udg_i_DTAX_HeroIntSetLast=0
string array udg_sA_DTAX_HeroIcons
integer array udg_Stat_SomeHeroKillPoints
integer array udg_Stat_SomeChainKillsPoints
integer array udg_Stat_SomeStat1
integer array udg_Stat_SomeStat2
integer array udg_Stat_SomeStat3
integer array udg_Stat_SomeStat4
multiboarditem udg_eT=null
multiboarditem udg_eu=null
multiboard udg_Stat_Board=null
trigger udg_triggerl181=null
integer array udg_HeroesKilledAndTowersDestroyed
group udg_ew=null
string udg_s_DTAX_gamemode_name
unit udg_u_Draft_n01Y_0098=null
unit udg_u_Draft_n01Z_0099=null
unit udg_u_Draft_n01Y_0100=null
unit udg_u_Draft_n01Z_0101=null
integer array udg_ez
trigger udg_triggerl182=null
boolean array udg_IsShowDenySwitchedOn
rect gg_rct_ScourgeMeleeCreepSpawnRight=null
rect gg_rct_ScourgeMeleeCreepSpawnCenter=null
rect gg_rct_ScourgeMeleeCreepSpawnLeft=null
rect gg_rct_ScourgeHeroSpawn=null
rect gg_rct_SentinelMeleeCreepSpawnRight=null
rect gg_rct_SentinelMeleeCreepSpawnLeft=null
rect gg_rct_SentinelMeleeCreepSpawnCenter=null
rect gg_rct_ScourgeRangedCreepSpawnRight=null
rect gg_rct_ScourgeRangedCreepSpawnCenter=null
rect gg_rct_ScourgeRangedCreepSpawnLeft=null
rect gg_rct_SentinelHeroSpawn=null
rect gg_rct_SentinelRangedCreepSpawnRight=null
rect gg_rct_SentinelRangedCreepSpawnLeft=null
rect gg_rct_SentinelRangedCreepSpawnCenter=null
rect gg_rct_RightRuneSpawn=null
rect gg_rct_ScourgeTavernsRect=null
rect gg_rct_SentinelTavernsRect=null
rect gg_rct_LeftRuneSpawn=null
rect gg_rct_CreepSpawnSc6=null
rect gg_rct_CreepSpawnSe1=null
rect gg_rct_CreepSpawnSe4=null
rect gg_rct_CreepSpawnSc1=null
rect gg_rct_CreepSpawnSc3=null
rect gg_rct_CreepSpawnSe6=null
rect gg_rct_CreepSpawnSc2=null
rect gg_rct_CreepSpawnSe5=null
rect gg_rct_CreepSpawnSc5=null
rect gg_rct_CreepSpawnSe2=null
rect gg_rct_SentinelTavernsCenter=null
rect gg_rct_ScourgeTavernsCenter=null
rect gg_rct_TheWorldTreeRect=null
rect gg_rct_TheFrozenThroneRect=null
rect gg_rct_RoshanPlace=null
rect gg_rct_CreepSpawnSc6Rect=null
rect gg_rct_CreepSpawnSe1Rect=null
rect gg_rct_CreepSpawnSe4Rect=null
rect gg_rct_CreepSpawnSc1Rect=null
rect gg_rct_CreepSpawnSc3Rect=null
rect gg_rct_CreepSpawnSe6Rect=null
rect gg_rct_CreepSpawnSc2Rect=null
rect gg_rct_CreepSpawnSc5Rect=null
rect gg_rct_CreepSpawnSe5Rect=null
rect gg_rct_CreepSpawnSe2Rect=null
rect gg_rct_SentinelBase=null
rect gg_rct_ScourgeBase=null
rect gg_rct_CreepSpawnSc4Rect=null
rect gg_rct_CreepSpawnSc4=null
rect gg_rct_CreepSpawnSe3Rect=null
rect gg_rct_CreepSpawnSe3=null
rect gg_rct_MapCenter=null
rect gg_rct_RoshanRect=null
rect gg_rct_MapRightBottom=null
rect gg_rct_MapLeftTop=null
camerasetup gg_cam_MapCenterView=null
camerasetup gg_cam_MapCenterRiverPath=null
camerasetup gg_cam_SentinelTaverns=null
camerasetup gg_cam_ScourgeTaverns=null
sound gg_snd_Dominating=null
sound gg_snd_DoubleKill=null
sound gg_snd_FirstBlood=null
sound gg_snd_GodLike=null
sound gg_snd_KillingSpree=null
sound gg_snd_MegaKill=null
sound gg_snd_Ownage=null
sound gg_snd_TripleKill=null
sound gg_snd_Unstoppable=null
sound gg_snd_WhickedSick=null
sound gg_snd_MonsterKill=null
sound gg_snd_HolyShit=null
sound gg_snd_SleepBirth=null
sound gg_snd_Animality=null
trigger gg_trg_English=null
trigger gg_trg_Russian=null
trigger gg_trg_Core=null
trigger gg_trg_Shared=null
trigger gg_trg_ExecuteFunc_or_UNUSED=null
trigger gg_trg_Recreate_Initiate=null
trigger gg_trg_AttackSpeed=null
trigger gg_trg_Select_Game_Mode=null
trigger gg_trg_ProcessCMD=null
trigger gg_trg_Recreate=null
trigger gg_trg_Unstuck=null
trigger gg_trg_Leave=null
trigger gg_trg_ReviveHero=null
trigger gg_trg_NormalGoldIncome=null
trigger gg_trg_CreepKill=null
trigger gg_trg_HeroKill=null
trigger gg_trg_DenyHero=null
trigger gg_trg_StartSpawningCreeps=null
trigger gg_trg_SwapTimeElapsed=null
trigger gg_trg_RepickTimeElapsed=null
trigger gg_trg_Ancient_Protectors_Count=null
trigger gg_trg_Spirit_Towers_Count=null
trigger gg_trg_Sentienel_Won=null
trigger gg_trg_Scourge_Won=null
trigger gg_trg_WT_and_FT_Protection=null
trigger gg_trg_Restore_Destructables=null
trigger gg_trg_Dummy_Control=null
trigger gg_trg_Ancient_Protectors_System=null
trigger gg_trg_Spirit_Towers_System=null
trigger gg_trg_IncreaseRangedSpawn=null
trigger gg_trg_IncreaseMeleeSpawn=null
trigger gg_trg_SpawnCreeps=null
trigger gg_trg_Barrack1_Destroyed=null
trigger gg_trg_Barrack2_Destroyed=null
trigger gg_trg_Barrack3_Destroyed=null
trigger gg_trg_Barrack4_Destroyed=null
trigger gg_trg_Barrack5_Destroyed=null
trigger gg_trg_Barrack6_Destroyed=null
trigger gg_trg_Barrack7_Destroyed=null
trigger gg_trg_Barrack8_Destroyed=null
trigger gg_trg_Barrack9_Destroyed=null
trigger gg_trg_Barrack10_Destroyed=null
trigger gg_trg_Barrack11_Destroyed=null
trigger gg_trg_Barrack12_Destroyed=null
trigger gg_trg_Sentinel_MegaCreeps=null
trigger gg_trg_Scourge_MegaCreeps=null
trigger gg_trg_IncreaseCreepsLevel=null
trigger gg_trg_EnableNeutralCreepsSpawn=null
trigger gg_trg_SpawnNeutralCreeps=null
trigger gg_trg_SpawnSuperCreeps=null
trigger gg_trg_Observer_Support=null
trigger gg_trg_HeroAIManager=null
trigger gg_trg_True_Sights=null
trigger gg_trg_TowerAI=null
trigger gg_trg_Mechanical_Control=null
trigger gg_trg_Voting=null
trigger gg_trg_Single_Player=null
trigger gg_trg_Mirrormatch=null
trigger gg_trg_Deathmatch=null
trigger gg_trg_SameHero_Deny_Geomancer=null
trigger gg_trg_Easymode=null
trigger gg_trg_NormalModeDefaulted=null
trigger gg_trg_WTF_Mode=null
trigger gg_trg_Drafting=null
trigger gg_trg_Random_Hero=null
trigger gg_trg_Repick=null
trigger gg_trg_SwapHero=null
trigger gg_trg_InitHero=null
trigger gg_trg_SetUpReciepes=null
trigger gg_trg_Disassemble=null
trigger gg_trg_Mjollnir=null
trigger gg_trg_Crow_Morph=null
trigger gg_trg_Perseverance_Split=null
trigger gg_trg_Teleportation_Item=null
trigger gg_trg_Mekansm_Armor_Heal=null
trigger gg_trg_Rune_Capture=null
trigger gg_trg_Bottle_Control=null
trigger gg_trg_Aegis=null
trigger gg_trg_Charges_Connection=null
trigger gg_trg_Courier_Set_Droppable=null
trigger gg_trg_Courier_Set_UnDroppable=null
trigger gg_trg_Helm_of_the_Dominator=null
trigger gg_trg_Refresher_Orb=null
trigger gg_trg_Necronomicon=null
trigger gg_trg_Illusion_Rune=null
trigger gg_trg_Recreate_Rune=null
trigger gg_trg_Powerups_Replacements=null
trigger gg_trg_Try_Apply_Reciepe=null
trigger gg_trg_RM_Replace_and_Denies=null
trigger gg_trg_Aghanim_Scepter=null
trigger gg_trg_Specific_Reciepes=null
trigger gg_trg_Undroppable_Cooldowns=null
trigger gg_trg_Reset_Droppable_Status=null
trigger gg_trg_Double_Damage_Rune=null
trigger gg_trg_Double_Damage_End=null
trigger gg_trg_Keep_Units=null
trigger gg_trg_TripleKill_Dropdown1=null
trigger gg_trg_TripleKill_Dropdown2=null
trigger gg_trg_TripleKill_Dropdown3=null
trigger gg_trg_TripleKill_Dropdown4=null
trigger gg_trg_TripleKill_Dropdown5=null
trigger gg_trg_TripleKill_Dropdown7=null
trigger gg_trg_TripleKill_Dropdown8=null
trigger gg_trg_TripleKill_Dropdown9=null
trigger gg_trg_TripleKill_Dropdown10=null
trigger gg_trg_TripleKill_Dropdown11=null
trigger gg_trg_Roshan_Secret=null
trigger gg_trg_Roshan_Kill=null
trigger gg_trg_Roshan_Protection=null
trigger gg_trg_Roshan_Control=null
trigger gg_trg_Necronomicon_Warrior_1=null
trigger gg_trg_Necronomicon_Warrior_2=null
trigger gg_trg_Necronomicon_Warrior_3=null
trigger gg_trg_UniversalDeathPact=null
trigger gg_trg_FinalStatBoard=null
trigger gg_trg_KD_Show=null
trigger gg_trg_KD_Update=null
trigger gg_trg_KD_Refresh=null
trigger gg_trg_CS_Board=null
trigger gg_trg_FinalStatBoard_Refresh=null
trigger gg_trg_NeutralKillsCounter=null
trigger gg_trg_SelledItemsCounter=null
trigger gg_trg_Bottle_Recall=null
trigger gg_trg_Waypoint_Final=null
trigger gg_trg_Waypoint_MiddleSE=null
trigger gg_trg_Waypoint_MiddleSC=null
trigger gg_trg_Waypoint_LeftSE=null
trigger gg_trg_Waypoint_LeftSC=null
trigger gg_trg_Waypoint_RightSC=null
trigger gg_trg_Waypoint_RightSE=null
trigger gg_trg_Waypoint_Init=null
trigger gg_trg_Waypoint_Order=null
trigger gg_trg_Game_Start=null
trigger gg_trg_PlayersFoodCap=null
trigger gg_trg_Teams=null
trigger gg_trg_HeroDataBase=null
trigger gg_trg_ItemIconDataBase=null
trigger gg_trg_Quests=null
trigger gg_trg_InitSpellsForHero=null
trigger gg_trg_PreloadNeutralCreeps=null
trigger gg_trg_Alliances=null
trigger gg_trg_init=null
trigger gg_trg_Goblin_Greed=null
trigger gg_trg_Unstable_Concoction=null
trigger gg_trg_Acid_Spray=null
trigger gg_trg_Mana_Void=null
trigger gg_trg_Battle_Hunger_Dispell=null
trigger gg_trg_Counter_Helix=null
trigger gg_trg_Berserker_Call=null
trigger gg_trg_Culling_Blade=null
trigger gg_trg_Nightmare=null
trigger gg_trg_Fiend_Grip=null
trigger gg_trg_Brain_Sap=null
trigger gg_trg_Beast_Rage=null
trigger gg_trg_Wild_Axes=null
trigger gg_trg_Call_of_the_Wild=null
trigger gg_trg_Primal_Roar=null
trigger gg_trg_Strygwyr_Thirst=null
trigger gg_trg_Blood_Bath=null
trigger gg_trg_Rupture=null
trigger gg_trg_Searing_Arrows=null
trigger gg_trg_Track_Cast=null
trigger gg_trg_Track_Kill=null
trigger gg_trg_Warpath=null
trigger gg_trg_Viscous_Nasal_Goo=null
trigger gg_trg_Bristleback=null
trigger gg_trg_Quill_Spray=null
trigger gg_trg_Spin_Web_Functions=null
trigger gg_trg_Spin_Web=null
trigger gg_trg_Spin_Web_Learn=null
trigger gg_trg_Rot=null
trigger gg_trg_Flesh_Heap=null
trigger gg_trg_Meat_Hook=null
trigger gg_trg_Return=null
trigger gg_trg_Double_Edge=null
trigger gg_trg_Chaos_Bolt=null
trigger gg_trg_Freezing_Field=null
trigger gg_trg_LVL_Death=null
trigger gg_trg_Devour=null
trigger gg_trg_Scorched_Earth=null
trigger gg_trg_Dragon_Blood=null
trigger gg_trg_ScatterShot=null
trigger gg_trg_Assassinate=null
trigger gg_trg_Take_Aim=null
trigger gg_trg_Fissure=null
trigger gg_trg_Echo_Slam=null
trigger gg_trg_Aftershock=null
trigger gg_trg_Untouchable=null
trigger gg_trg_Enchant=null
trigger gg_trg_Nature_Attendants=null
trigger gg_trg_Impetus=null
trigger gg_trg_Black_Hole=null
trigger gg_trg_Malefice=null
trigger gg_trg_Midnight_Pulse=null
trigger gg_trg_Conversion=null
trigger gg_trg_Chronosphere=null
trigger gg_trg_Time_Walk=null
trigger gg_trg_Backtrack=null
trigger gg_trg_Poof=null
trigger gg_trg_Earthbind=null
trigger gg_trg_Duplicates_Periodic=null
trigger gg_trg_Divided_We_Stand=null
trigger gg_trg_Duplicates_Levelling=null
trigger gg_trg_Remote_Mines=null
trigger gg_trg_Remote_Mines_Detonate=null
trigger gg_trg_Goblin_Land_Mine_Counter=null
trigger gg_trg_Split_Shot=null
trigger gg_trg_Penitence=null
trigger gg_trg_Hand_of_God=null
trigger gg_trg_Holy_Persuasion=null
trigger gg_trg_Test_of_Faith=null
trigger gg_trg_Healing_Ward=null
trigger gg_trg_Blade_Fury=null
trigger gg_trg_Mana_Leak=null
trigger gg_trg_Mana_Leak_Effect=null
trigger gg_trg_Chakra_Magic=null
trigger gg_trg_Illuminate=null
trigger gg_trg_Chain_Frost=null
trigger gg_trg_Storm_Seeker=null
trigger gg_trg_Spirit_Bear_Cast=null
trigger gg_trg_Spirit_Bear_Learn=null
trigger gg_trg_Spirit_Bear_AutoReturn=null
trigger gg_trg_Spirit_Bear_Return=null
trigger gg_trg_Synergy=null
trigger gg_trg_Spirit_Bear_Death=null
trigger gg_trg_Spirit_KillBear=null
trigger gg_trg_Death_Coil=null
trigger gg_trg_Aphotic_Shield=null
trigger gg_trg_Borrowed_Time=null
trigger gg_trg_Frostmourne=null
trigger gg_trg_Static_Field=null
trigger gg_trg_Lightning_Bolt=null
trigger gg_trg_Thundergod_Wrath=null
trigger gg_trg_Reverse_Polarity=null
trigger gg_trg_Lucent_Beam=null
trigger gg_trg_Moon_Glaive=null
trigger gg_trg_VertexColorChanges=null
trigger gg_trg_Morph=null
trigger gg_trg_Adaptive_Strike=null
trigger gg_trg_Replicate=null
trigger gg_trg_Song_of_the_Siren=null
trigger gg_trg_Gravekeeper_Cloak=null
trigger gg_trg_Raise_Revenants=null
trigger gg_trg_Grave_Chill=null
trigger gg_trg_Soul_Assumption=null
trigger gg_trg_Reaper_Scythe=null
trigger gg_trg_Sadist=null
trigger gg_trg_Death_Pulse=null
trigger gg_trg_Shukuchi=null
trigger gg_trg_Time_Lapse_Cast=null
trigger gg_trg_Time_Lapse_Learn=null
trigger gg_trg_Corrosive_Skin=null
trigger gg_trg_Void=null
trigger gg_trg_Crippling_Fear=null
trigger gg_trg_Nether_Ward=null
trigger gg_trg_Astral_Imprisonment=null
trigger gg_trg_Arcane_Orb=null
trigger gg_trg_Essence_Aura=null
trigger gg_trg_Sanity_Eclipse=null
trigger gg_trg_Multi_Cast=null
trigger gg_trg_Bloodlust=null
trigger gg_trg_Fireblast=null
trigger gg_trg_Purification=null
trigger gg_trg_Blur=null
trigger gg_trg_Blink_Strike=null
trigger gg_trg_Doppelwalk_Illusion=null
trigger gg_trg_Doppelwalk=null
trigger gg_trg_Phantom_Edge=null
trigger gg_trg_Spirit_Lance=null
trigger gg_trg_Moonlight_Shadow=null
trigger gg_trg_Starfall=null
trigger gg_trg_Elune_Arrow=null
trigger gg_trg_Leap=null
trigger gg_trg_Sprout=null
trigger gg_trg_Teleportation=null
trigger gg_trg_Teleportation_Deny=null
trigger gg_trg_Burrowstrike=null
trigger gg_trg_Epicenter=null
trigger gg_trg_Sand_Storm_Start=null
trigger gg_trg_Sand_Storm_Finish=null
trigger gg_trg_Necromastery=null
trigger gg_trg_Shadowraze=null
trigger gg_trg_Skills_Learn=null
trigger gg_trg_Requiem_of_Souls_Cast=null
trigger gg_trg_Requiem_of_Souls_Effect=null
trigger gg_trg_Shadow_Wave=null
trigger gg_trg_Poison_Touch=null
trigger gg_trg_Weave=null
trigger gg_trg_Shallow_Grave=null
trigger gg_trg_Last_Word=null
trigger gg_trg_Curse_of_the_Silent=null
trigger gg_trg_Glaives_of_Wisdom_Learn=null
trigger gg_trg_Glaives_of_Wisdom_Kill=null
trigger gg_trg_Global_Silence=null
trigger gg_trg_Slithereen_Crush=null
trigger gg_trg_Conjure_Image=null
trigger gg_trg_Sunder=null
trigger gg_trg_Spectral_Dagger=null
trigger gg_trg_Desolate=null
trigger gg_trg_Dispersion=null
trigger gg_trg_Haunt=null
trigger gg_trg_Reality=null
trigger gg_trg_Charge_of_Darkness=null
trigger gg_trg_Empowering_Haste=null
trigger gg_trg_Greater_Bash=null
trigger gg_trg_Nether_Strike=null
trigger gg_trg_Greater_Bash_Functions=null
trigger gg_trg_Smoke_Screen=null
trigger gg_trg_Permanent_Invisibility=null
trigger gg_trg_Backstab=null
trigger gg_trg_Grow=null
trigger gg_trg_Avalanche=null
trigger gg_trg_Toss=null
trigger gg_trg_Craggy_Exterior=null
trigger gg_trg_Kraken_Shell=null
trigger gg_trg_Gush=null
trigger gg_trg_Ravage=null
trigger gg_trg_March_of_the_Machines=null
trigger gg_trg_Laser=null
trigger gg_trg_Rearm=null
trigger gg_trg_Diabolic_Edict=null
trigger gg_trg_Overgrowth=null
trigger gg_trg_Nature_Guise=null
trigger gg_trg_Berserker_Rage_Cast=null
trigger gg_trg_Berserker_Rage_Learn=null
trigger gg_trg_Ice_Path=null
trigger gg_trg_Macropyre=null
trigger gg_trg_Dual_Breath=null
trigger gg_trg_Auto_Fire=null
trigger gg_trg_Overpower_Counter=null
trigger gg_trg_Overpower=null
trigger gg_trg_Enrage=null
trigger gg_trg_Nether_Swap=null
trigger gg_trg_Poison_Nova=null
trigger gg_trg_Shadow_Word=null
trigger gg_trg_Upheaval=null
trigger gg_trg_Fatal_Bonds=null
trigger gg_trg_Maledict=null
trigger gg_trg_Paralyzing_Cask=null
trigger gg_trg_Voodoo_Restoration=null
unit gg_unit_nfoh_0000=null
unit gg_unit_hC95_0001=null
unit gg_unit_n01K_0002=null
unit gg_unit_nC38_0003=null
unit gg_unit_edos_0004=null
unit gg_unit_n00V_0005=null
unit gg_unit_n00W_0006=null
unit gg_unit_n002_0007=null
unit gg_unit_n00X_0008=null
unit gg_unit_n009_0009=null
unit gg_unit_etol_0010=null
unit gg_unit_e00R_0011=null
unit gg_unit_e00R_0012=null
unit gg_unit_e00R_0013=null
unit gg_unit_e011_0014=null
unit gg_unit_e011_0015=null
unit gg_unit_e011_0016=null
unit gg_unit_e00S_0017=null
unit gg_unit_e00S_0018=null
unit gg_unit_e00S_0019=null
unit gg_unit_e019_0020=null
unit gg_unit_e019_0021=null
unit gg_unit_eaom_0022=null
unit gg_unit_eaom_0023=null
unit gg_unit_eaom_0024=null
unit gg_unit_eaoe_0025=null
unit gg_unit_eaoe_0026=null
unit gg_unit_eaoe_0027=null
unit gg_unit_emow_0028=null
unit gg_unit_emow_0029=null
unit gg_unit_emow_0030=null
unit gg_unit_emow_0031=null
unit gg_unit_emow_0032=null
unit gg_unit_emow_0033=null
unit gg_unit_emow_0034=null
unit gg_unit_emow_0035=null
unit gg_unit_emow_0036=null
unit gg_unit_emow_0037=null
unit gg_unit_eaow_0038=null
unit gg_unit_edob_0039=null
unit gg_unit_ndfl_0040=null
unit gg_unit_nC35_0041=null
unit gg_unit_n01K_0042=null
unit gg_unit_nC38_0043=null
unit gg_unit_ugrv_0044=null
unit gg_unit_n00V_0045=null
unit gg_unit_n00W_0046=null
unit gg_unit_n002_0047=null
unit gg_unit_n00X_0048=null
unit gg_unit_n009_0049=null
unit gg_unit_unpl_0050=null
unit gg_unit_u00M_0051=null
unit gg_unit_u00M_0052=null
unit gg_unit_u00M_0053=null
unit gg_unit_u00D_0054=null
unit gg_unit_u00D_0055=null
unit gg_unit_u00D_0056=null
unit gg_unit_u00N_0057=null
unit gg_unit_u00N_0058=null
unit gg_unit_u00N_0059=null
unit gg_unit_u00T_0060=null
unit gg_unit_u00T_0061=null
unit gg_unit_usep_0062=null
unit gg_unit_usep_0063=null
unit gg_unit_usep_0064=null
unit gg_unit_utod_0065=null
unit gg_unit_utod_0066=null
unit gg_unit_utod_0067=null
unit gg_unit_uzig_0068=null
unit gg_unit_uzig_0069=null
unit gg_unit_uzig_0070=null
unit gg_unit_uzig_0071=null
unit gg_unit_uzig_0072=null
unit gg_unit_uzig_0073=null
unit gg_unit_uzig_0074=null
unit gg_unit_uzig_0075=null
unit gg_unit_uzig_0076=null
unit gg_unit_uzig_0077=null
unit gg_unit_usap_0078=null
unit gg_unit_uslh_0079=null
unit gg_unit_ncop_0080=null
unit gg_unit_ncop_0081=null
unit gg_unit_ncop_0082=null
unit gg_unit_ncop_0083=null
unit gg_unit_ncop_0084=null
unit gg_unit_ncop_0085=null
unit gg_unit_ncop_0086=null
unit gg_unit_ncop_0087=null
unit gg_unit_ncop_0088=null
unit gg_unit_ncop_0089=null
unit gg_unit_e00D_0102=null
unit gg_unit_e00B_0103=null
unit gg_unit_e00A_0104=null
unit gg_unit_e008_0105=null
unit gg_unit_e001_0106=null
unit gg_unit_n008_0090=null
unit gg_unit_n01D_0091=null
unit gg_unit_ntav_0092=null
unit gg_unit_n01N_0093=null
unit gg_unit_n005_0094=null
unit gg_unit_n01P_0095=null
unit gg_unit_n007_0096=null
unit gg_unit_n01B_0097=null
endglobals
function InitGlobals takes nothing returns nothing
local integer i=0
set i=0
loop
exitwhen(i>1)
set udg_iA_DTAX_revive_time=0
set i=i+1
endloop
set i=0
loop
exitwhen(i>1)
set udg_bA_DTAX_used_hero_types_SAME1=false
set i=i+1
endloop
set i=0
loop
exitwhen(i>1)
set udg_iA_DTAX_killing_spree_status=0
set i=i+1
endloop
set i=0
loop
exitwhen(i>1)
set udg_iA_DTAX_tripple_kill_status=0
set i=i+1
endloop
set i=0
loop
exitwhen(i>1)
set udg_iA_DTAX_team_owning_status=0
set i=i+1
endloop
set udg_b_DTAX_spawn_creeps_time_elapsed=false
set i=0
loop
exitwhen(i>1)
set udg_bA_DTAX_is_any_item_in_runic_region_REF1=false
set i=i+1
endloop
set udg_b_DTAX_select_game_mode_time_elapsed=false
set i=0
loop
exitwhen(i>1)
set udg_sA_DTAX_player_textcolor_prefixes=""
set i=i+1
endloop
set i=0
loop
exitwhen(i>1)
set udg_bA_DTAX_player_has_repicked_hero=false
set i=i+1
endloop
set i=0
loop
exitwhen(i>1)
set udg_tA_DTAX_player_tripple_kill_expiration_timer=CreateTimer()
set i=i+1
endloop
set i=0
loop
exitwhen(i>1)
set udg_iA_DTAX_iA_kill_death_counter=0
set i=i+1
endloop
set i=0
loop
exitwhen(i>1)
set udg_tA_DTAX_hero_revive_timer=CreateTimer()
set i=i+1
endloop
set i=0
loop
exitwhen(i>1)
set udg_iA_DTAX_kill_counter=0
set i=i+1
endloop
set udg_t_DTAX_game_time=CreateTimer()
set i=0
loop
exitwhen(i>1)
set udg_iA_DTAX_towers_lost_each_side=0
set i=i+1
endloop
set udg_i_DTAX_game_hours=0
set udg_i_DTAX_game_minutes=0
set i=0
loop
exitwhen(i>1)
set udg_iA_DTAX_Ulfsaar_overpower_attack_counter=0
set i=i+1
endloop
set i=0
loop
exitwhen(i>1)
set udg_iA_DTAX_force_death_counter=0
set i=i+1
endloop
set udg_b_DTAX_is_deathmatch_mode=false
set udg_b_DTAX_is_allrandom_mode=false
set udg_b_DTAX_is_teamrandom_mode=false
set udg_b_DTAX_is_allpick_mode=false
set udg_b_DTAX_is_itemdrop_mode=false
set udg_r_DTAX_item_cooldown_time=0
set udg_i_DTAX_used_item_array_counter_REF2=0
set i=0
loop
exitwhen(i>1)
set udg_rA_DTAX_used_item_cooldown_time_holder_REF2=0
set i=i+1
endloop
set i=0
loop
exitwhen(i>1)
set udg_bA_DTAX_player_randomed=false
set i=i+1
endloop
set udg_i_DTAX_GLOBAL_gold_cost=150
set udg_b_DTAX_easy_mode=false
set udg_b_DTAX_disable_item_powerups_mode=false
set udg_b_DTAX_enable_supercreeps_mode=false
set udg_b_DTAX_barrack1_is_alive=true
set udg_b_DTAX_barrack2_is_alive=true
set udg_b_DTAX_barrack3_is_alive=true
set udg_b_DTAX_barrack4_is_alive=true
set udg_b_DTAX_barrack5_is_alive=true
set udg_b_DTAX_barrack6_is_alive=true
set udg_b_DTAX_barrack7_is_alive=true
set udg_b_DTAX_barrack8_is_alive=true
set udg_b_DTAX_barrack9_is_alive=true
set udg_b_DTAX_barrack10_is_alive=true
set udg_b_DTAX_barrack11_is_alive=true
set udg_b_DTAX_barrack12_is_alive=true
set udg_i_DTAX_unit_melee_spawn_count=3
set udg_i_DTAX_unit_ranged_spawn_count=1
set i=0
loop
exitwhen(i>1)
set udg_iA_DTAX_reciepe_item1_id=0
set i=i+1
endloop
set i=0
loop
exitwhen(i>1)
set udg_iA_DTAX_reciepe_item2_id=0
set i=i+1
endloop
set i=0
loop
exitwhen(i>1)
set udg_iA_DTAX_reciepe_item3_id=0
set i=i+1
endloop
set i=0
loop
exitwhen(i>1)
set udg_iA_DTAX_reciepe_item4_id=0
set i=i+1
endloop
set udg_i_DTAX_max_reciepes_count=80
set i=0
loop
exitwhen(i>1)
set udg_iA_DTAX_reciepe_result_id=0
set i=i+1
endloop
set udg_i_DTAX_reciepes_counter=0
set i=0
loop
exitwhen(i>1)
set udg_iA_DTAX_reciepe_lenght=0
set i=i+1
endloop
set udg_b_DTAX_league_mode=false
set udg_i_DTAX_SE_players_count=0
set udg_i_DTAX_SC_players_count=0
set udg_b_DTAX_pick_started=false
set i=0
loop
exitwhen(i>1)
set udg_iA_UNKNOWN_heroes_count_per_team=0
set i=i+1
endloop
set i=0
loop
exitwhen(i>1)
set udg_iA_DTAX_agility_hero_types=0
set i=i+1
endloop
set i=0
loop
exitwhen(i>1)
set udg_iA_DTAX_intel_hero_types=0
set i=i+1
endloop
set i=0
loop
exitwhen(i>1)
set udg_iA_DTAX_strenght_hero_types=0
set i=i+1
endloop
set i=0
loop
exitwhen(i>1)
set udg_iA_DTAX_enemy_mobs_killed=0
set i=i+1
endloop
set i=0
loop
exitwhen(i>1)
set udg_iA_DTAX_ally_mobs_killed=0
set i=i+1
endloop
set i=0
loop
exitwhen(i>1)
set udg_iA_UNKNOWN_player_death_counter=0
set i=i+1
endloop
set udg_f_DTAX_SEPlayers=CreateForce()
set udg_f_DTAX_SCPlayers=CreateForce()
set udg_b_DTAX_shuffle_players=false
set udg_i_DTAX_selectable_hero_types_start=0
set udg_i_DTAX_selectable_hero_types_finish=0
set i=0
loop
exitwhen(i>1)
set udg_iA_DTAX_selectable_hero_types=0
set i=i+1
endloop
set i=0
loop
exitwhen(i>1)
set udg_Ah=0
set i=i+1
endloop
set udg_i_DTAX_beastmaster_primal_roar_intel_gain_REF3=0
set udg_r_DTAX_necrolyte_reaperscythe_ratio=0
set udg_b_DTAX_natures_guise_still_near_the_trees=false
set udg_b_DTAX_swap_hero_time_elapsed=false
set udg_i_DTAX_creep_waypoint_ability_id=0
set udg_g_UNKNOWN_some_defenders_group=CreateGroup()
set udg_b_DTAX_observer_slot_used=false
set udg_b_DTAX_is_mirrormatch_started=false
set udg_b_DTAX_is_mirrormatch_mode=false
set udg_b_DTAX_is_dupe_mode=false
set udg_AT=false
set udg_b_DTAX_is_allagi_mode=false
set udg_b_DTAX_is_allint_mode=false
set udg_b_DTAX_is_allstr_mode=false
set udg_s_DTAX_gamemode=""
set udg_b_DTAX_is_samehero_mode=false
set udg_b_DTAX_bGameStarted=false
set udg_AX=""
set i=0
loop
exitwhen(i>1)
set udg_AZ=""
set i=i+1
endloop
set udg_b_DTAX_is_VoteRandom_mode=false
set i=0
loop
exitwhen(i>1)
set udg_A1=false
set i=i+1
endloop
set i=0
loop
exitwhen(i>1)
set udg_iA_DTAX_ItemSpells=0
set i=i+1
endloop
set udg_A3=0
set udg_for_DTAX_NonComputerPlayers=CreateForce()
set udg_A5=false
set udg_A6=0
set udg_A7=false
set udg_A8=true
set udg_A9=true
set udg_b_DTAX_is_Reverse_mode=false
set i=0
loop
exitwhen(i>1)
set udg_bb=false
set i=i+1
endloop
set udg_s_DTAX_sMultiBoardHeader=""
set i=0
loop
exitwhen(i>1)
set udg_bc=false
set i=i+1
endloop
set i=0
loop
exitwhen(i>1)
set udg_bC=false
set i=i+1
endloop
set udg_bd=false
set udg_b_DTAX_repick_time_elapsed=false
set udg_bE=false
set udg_bg=false
set udg_bh=0
set udg_b_DTAX_is_RandomDraft_mode=false
set udg_bi=false
set udg_bI=""
set udg_bj=0
set i=0
loop
exitwhen(i>1)
set udg_bJ=""
set i=i+1
endloop
set udg_dr=1
set udg_dR=2
set udg_ds=3
set i=0
loop
exitwhen(i>1)
set udg_eE=0
set i=i+1
endloop
set i=0
loop
exitwhen(i>1)
set udg_ef=0
set i=i+1
endloop
set i=0
loop
exitwhen(i>1)
set udg_eF=0
set i=i+1
endloop
set i=0
loop
exitwhen(i>1)
set udg_iA_DTAX_HeroTypes=0
set i=i+1
endloop
set i=0
loop
exitwhen(i>1)
set udg_sA_DTAX_HeroNames=""
set i=i+1
endloop
set udg_i_DTAX_FirstSEHero=0
set udg_i_DTAX_LastSEHero=0
set udg_i_DTAX_FirstSCHero=0
set udg_i_DTAX_LastSCHero=0
set i=0
loop
exitwhen(i>1)
set udg_iA_DTAX_HeroAgiSet=0
set i=i+1
endloop
set udg_i_DTAX_HeroAgiSetLast=0
set i=0
loop
exitwhen(i>1)
set udg_iA_DTAX_HeroStrSet=0
set i=i+1
endloop
set udg_i_DTAX_HeroStrSetLast=0
set i=0
loop
exitwhen(i>1)
set udg_iA_DTAX_HeroIntSet=0
set i=i+1
endloop
set udg_i_DTAX_HeroIntSetLast=0
set i=0
loop
exitwhen(i>1)
set udg_sA_DTAX_HeroIcons=""
set i=i+1
endloop
set i=0
loop
exitwhen(i>1)
set udg_Stat_SomeHeroKillPoints=0
set i=i+1
endloop
set i=0
loop
exitwhen(i>1)
set udg_Stat_SomeChainKillsPoints=0
set i=i+1
endloop
set i=0
loop
exitwhen(i>1)
set udg_Stat_SomeStat1=0
set i=i+1
endloop
set i=0
loop
exitwhen(i>1)
set udg_Stat_SomeStat2=0
set i=i+1
endloop
set i=0
loop
exitwhen(i>1)
set udg_Stat_SomeStat3=0
set i=i+1
endloop
set i=0
loop
exitwhen(i>1)
set udg_Stat_SomeStat4=0
set i=i+1
endloop
set i=0
loop
exitwhen(i>1)
set udg_HeroesKilledAndTowersDestroyed=0
set i=i+1
endloop
set udg_ew=CreateGroup()
set udg_s_DTAX_gamemode_name="No Mode"
set i=0
loop
exitwhen(i>1)
set udg_ez=0
set i=i+1
endloop
set i=0
loop
exitwhen(i>1)
set udg_IsShowDenySwitchedOn=false
set i=i+1
endloop
endfunction
function InitSounds takes nothing returns nothing
set gg_snd_Dominating=CreateSound("Sounds\\Dominating.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(gg_snd_Dominating,1802)
call SetSoundChannel(gg_snd_Dominating,0)
call SetSoundVolume(gg_snd_Dominating,127)
call SetSoundPitch(gg_snd_Dominating,1.0)
set gg_snd_DoubleKill=CreateSound("Sounds\\Double_Kill.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(gg_snd_DoubleKill,2012)
call SetSoundChannel(gg_snd_DoubleKill,0)
call SetSoundVolume(gg_snd_DoubleKill,127)
call SetSoundPitch(gg_snd_DoubleKill,1.0)
set gg_snd_FirstBlood=CreateSound("Sounds\\firstblood.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(gg_snd_FirstBlood,1567)
call SetSoundChannel(gg_snd_FirstBlood,0)
call SetSoundVolume(gg_snd_FirstBlood,127)
call SetSoundPitch(gg_snd_FirstBlood,1.0)
set gg_snd_GodLike=CreateSound("Sounds\\GodLike.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(gg_snd_GodLike,1828)
call SetSoundChannel(gg_snd_GodLike,0)
call SetSoundVolume(gg_snd_GodLike,127)
call SetSoundPitch(gg_snd_GodLike,1.0)
set gg_snd_KillingSpree=CreateSound("Sounds\\Killing_Spree.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(gg_snd_KillingSpree,2377)
call SetSoundChannel(gg_snd_KillingSpree,0)
call SetSoundVolume(gg_snd_KillingSpree,127)
call SetSoundPitch(gg_snd_KillingSpree,1.0)
set gg_snd_MegaKill=CreateSound("Sounds\\MegaKill.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(gg_snd_MegaKill,2612)
call SetSoundChannel(gg_snd_MegaKill,0)
call SetSoundVolume(gg_snd_MegaKill,127)
call SetSoundPitch(gg_snd_MegaKill,1.0)
set gg_snd_Ownage=CreateSound("Sounds\\Ownage.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(gg_snd_Ownage,2586)
call SetSoundChannel(gg_snd_Ownage,0)
call SetSoundVolume(gg_snd_Ownage,127)
call SetSoundPitch(gg_snd_Ownage,1.0)
set gg_snd_TripleKill=CreateSound("Sounds\\triple_kill.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(gg_snd_TripleKill,1907)
call SetSoundChannel(gg_snd_TripleKill,0)
call SetSoundVolume(gg_snd_TripleKill,127)
call SetSoundPitch(gg_snd_TripleKill,1.0)
set gg_snd_Unstoppable=CreateSound("Sounds\\Unstoppable.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(gg_snd_Unstoppable,2038)
call SetSoundChannel(gg_snd_Unstoppable,0)
call SetSoundVolume(gg_snd_Unstoppable,127)
call SetSoundPitch(gg_snd_Unstoppable,1.0)
set gg_snd_WhickedSick=CreateSound("Sounds\\WhickedSick.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(gg_snd_WhickedSick,2612)
call SetSoundChannel(gg_snd_WhickedSick,0)
call SetSoundVolume(gg_snd_WhickedSick,127)
call SetSoundPitch(gg_snd_WhickedSick,1.0)
set gg_snd_MonsterKill=CreateSound("Sounds\\MonsterKill.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(gg_snd_MonsterKill,3344)
call SetSoundChannel(gg_snd_MonsterKill,0)
call SetSoundVolume(gg_snd_MonsterKill,127)
call SetSoundPitch(gg_snd_MonsterKill,1.0)
set gg_snd_HolyShit=CreateSound("Sounds\\HolyShit.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundDuration(gg_snd_HolyShit,2325)
call SetSoundChannel(gg_snd_HolyShit,0)
call SetSoundVolume(gg_snd_HolyShit,127)
call SetSoundPitch(gg_snd_HolyShit,1.0)
set gg_snd_SleepBirth=CreateSound("Abilities\\Spells\\Undead\\Sleep\\SleepBirth1.wav",false,true,true,10,10,"SpellsEAX")
call SetSoundParamsFromLabel(gg_snd_SleepBirth,"Sleep")
call SetSoundDuration(gg_snd_SleepBirth,3203)
call SetSoundPitch(gg_snd_SleepBirth,0.0)
call SetSoundDistances(gg_snd_SleepBirth,0.0,0.0)
call SetSoundDistanceCutoff(gg_snd_SleepBirth,0.0)
set gg_snd_Animality=CreateSound("Sounds\\Animality.mp3",false,false,false,10,10,"DefaultEAXON")
call SetSoundChannel(gg_snd_Animality,0)
call SetSoundVolume(gg_snd_Animality,127)
call SetSoundPitch(gg_snd_Animality,1.0)
endfunction
function CreateBuildingsForPlayer0 takes nothing returns nothing
local player p=Player(0)
local unit u
local integer unitID
local trigger t
local real life
set u=CreateUnit(p,'nfoh',-6720.0,-5920.0,270.000)
call SetUnitState(u,UNIT_STATE_MANA,0)
call SetUnitAcquireRange(u,0.0)
set u=CreateUnit(p,'edos',-6080.0,-5952.0,270.000)
call SetUnitState(u,UNIT_STATE_MANA,0)
call SetUnitAcquireRange(u,0.0)
set gg_unit_etol_0010=CreateUnit(p,'etol',-4800.0,-6912.0,270.000)
call SetUnitState(gg_unit_etol_0010,UNIT_STATE_MANA,0)
call SetUnitAcquireRange(gg_unit_etol_0010,0.0)
set gg_unit_eaom_0022=CreateUnit(p,'eaom',-6400.0,-4224.0,270.000)
call SetUnitState(gg_unit_eaom_0022,UNIT_STATE_MANA,0)
call SetUnitAcquireRange(gg_unit_eaom_0022,0.0)
set gg_unit_eaom_0023=CreateUnit(p,'eaom',-4288.0,-4992.0,270.000)
call SetUnitState(gg_unit_eaom_0023,UNIT_STATE_MANA,0)
call SetUnitAcquireRange(gg_unit_eaom_0023,0.0)
set gg_unit_eaom_0024=CreateUnit(p,'eaom',-3776.0,-6720.0,270.000)
call SetUnitState(gg_unit_eaom_0024,UNIT_STATE_MANA,0)
call SetUnitAcquireRange(gg_unit_eaom_0024,0.0)
set gg_unit_eaoe_0025=CreateUnit(p,'eaoe',-5952.0,-4160.0,270.000)
call SetUnitState(gg_unit_eaoe_0025,UNIT_STATE_MANA,0)
call SetUnitAcquireRange(gg_unit_eaoe_0025,0.0)
set gg_unit_eaoe_0026=CreateUnit(p,'eaoe',-4800.0,-4608.0,270.000)
call SetUnitState(gg_unit_eaoe_0026,UNIT_STATE_MANA,0)
call SetUnitAcquireRange(gg_unit_eaoe_0026,0.0)
set gg_unit_eaoe_0027=CreateUnit(p,'eaoe',-3776.0,-6272.0,270.000)
call SetUnitState(gg_unit_eaoe_0027,UNIT_STATE_MANA,0)
call SetUnitAcquireRange(gg_unit_eaoe_0027,0.0)
set gg_unit_emow_0028=CreateUnit(p,'emow',-5856.0,-4832.0,270.000)
call SetUnitState(gg_unit_emow_0028,UNIT_STATE_MANA,0)
call SetUnitAcquireRange(gg_unit_emow_0028,0.0)
set gg_unit_emow_0029=CreateUnit(p,'emow',-5280.0,-4192.0,270.000)
call SetUnitState(gg_unit_emow_0029,UNIT_STATE_MANA,0)
call SetUnitAcquireRange(gg_unit_emow_0029,0.0)
set gg_unit_emow_0030=CreateUnit(p,'emow',-5280.0,-5344.0,270.000)
call SetUnitState(gg_unit_emow_0030,UNIT_STATE_MANA,0)
call SetUnitAcquireRange(gg_unit_emow_0030,0.0)
set gg_unit_emow_0031=CreateUnit(p,'emow',-4896.0,-5728.0,270.000)
call SetUnitState(gg_unit_emow_0031,UNIT_STATE_MANA,0)
call SetUnitAcquireRange(gg_unit_emow_0031,0.0)
set gg_unit_emow_0032=CreateUnit(p,'emow',-4512.0,-6432.0,270.000)
call SetUnitState(gg_unit_emow_0032,UNIT_STATE_MANA,0)
call SetUnitAcquireRange(gg_unit_emow_0032,0.0)
set gg_unit_emow_0033=CreateUnit(p,'emow',-3744.0,-5536.0,270.000)
call SetUnitState(gg_unit_emow_0033,UNIT_STATE_MANA,0)
call SetUnitAcquireRange(gg_unit_emow_0033,0.0)
set gg_unit_emow_0034=CreateUnit(p,'emow',-3488.0,-5856.0,270.000)
call SetUnitState(gg_unit_emow_0034,UNIT_STATE_MANA,0)
call SetUnitAcquireRange(gg_unit_emow_0034,0.0)
set gg_unit_emow_0035=CreateUnit(p,'emow',-4256.0,-6944.0,270.000)
call SetUnitState(gg_unit_emow_0035,UNIT_STATE_MANA,0)
call SetUnitAcquireRange(gg_unit_emow_0035,0.0)
set gg_unit_emow_0036=CreateUnit(p,'emow',-3360.0,-7008.0,270.000)
call SetUnitState(gg_unit_emow_0036,UNIT_STATE_MANA,0)
call SetUnitAcquireRange(gg_unit_emow_0036,0.0)
set gg_unit_emow_0037=CreateUnit(p,'emow',-5664.0,-3872.0,270.000)
call SetUnitState(gg_unit_emow_0037,UNIT_STATE_MANA,0)
call SetUnitAcquireRange(gg_unit_emow_0037,0.0)
set gg_unit_eaow_0038=CreateUnit(p,'eaow',-5440.0,-4800.0,270.000)
call SetUnitState(gg_unit_eaow_0038,UNIT_STATE_MANA,0)
call SetUnitAcquireRange(gg_unit_eaow_0038,0.0)
set gg_unit_edob_0039=CreateUnit(p,'edob',-3840.0,-5184.0,270.000)
call SetUnitState(gg_unit_edob_0039,UNIT_STATE_MANA,0)
call SetUnitAcquireRange(gg_unit_edob_0039,0.0)
endfunction
function CreateUnitsForPlayer0 takes nothing returns nothing
local player p=Player(0)
local unit u
local integer unitID
local trigger t
local real life
set gg_unit_hC95_0001=CreateUnit(p,'hC95',-6400.0,-5952.0,270.000)
call SetUnitState(gg_unit_hC95_0001,UNIT_STATE_MANA,0)
call SetUnitColor(gg_unit_hC95_0001,ConvertPlayerColor(0))
call SetUnitAcquireRange(gg_unit_hC95_0001,0.0)
set gg_unit_n01K_0002=CreateUnit(p,'n01K',-6720.0,-5504.0,270.000)
call SetUnitState(gg_unit_n01K_0002,UNIT_STATE_MANA,0)
call SetUnitColor(gg_unit_n01K_0002,ConvertPlayerColor(0))
call SetUnitAcquireRange(gg_unit_n01K_0002,0.0)
set gg_unit_nC38_0003=CreateUnit(p,'nC38',-6720.0,-5696.0,270.000)
call SetUnitState(gg_unit_nC38_0003,UNIT_STATE_MANA,0)
call SetUnitColor(gg_unit_nC38_0003,ConvertPlayerColor(0))
call SetUnitAcquireRange(gg_unit_nC38_0003,0.0)
set gg_unit_n00V_0005=CreateUnit(p,'n00V',-6208.0,-5312.0,270.000)
call SetUnitState(gg_unit_n00V_0005,UNIT_STATE_MANA,0)
call SetUnitColor(gg_unit_n00V_0005,ConvertPlayerColor(0))
call SetUnitAcquireRange(gg_unit_n00V_0005,0.0)
set gg_unit_n00W_0006=CreateUnit(p,'n00W',-6336.0,-5248.0,270.000)
call SetUnitState(gg_unit_n00W_0006,UNIT_STATE_MANA,0)
call SetUnitColor(gg_unit_n00W_0006,ConvertPlayerColor(0))
call SetUnitAcquireRange(gg_unit_n00W_0006,0.0)
set gg_unit_n002_0007=CreateUnit(p,'n002',-6464.0,-5248.0,270.000)
call SetUnitState(gg_unit_n002_0007,UNIT_STATE_MANA,0)
call SetUnitColor(gg_unit_n002_0007,ConvertPlayerColor(0))
call SetUnitAcquireRange(gg_unit_n002_0007,0.0)
set gg_unit_n00X_0008=CreateUnit(p,'n00X',-6592.0,-5312.0,270.000)
call SetUnitState(gg_unit_n00X_0008,UNIT_STATE_MANA,0)
call SetUnitColor(gg_unit_n00X_0008,ConvertPlayerColor(0))
call SetUnitAcquireRange(gg_unit_n00X_0008,0.0)
set gg_unit_n009_0009=CreateUnit(p,'n009',-6720.0,-5184.0,270.000)
call SetUnitState(gg_unit_n009_0009,UNIT_STATE_MANA,0)
call SetUnitColor(gg_unit_n009_0009,ConvertPlayerColor(0))
call SetUnitAcquireRange(gg_unit_n009_0009,0.0)
set gg_unit_e00R_0011=CreateUnit(p,'e00R',-6112.0,1504.0,270.000)
call SetUnitState(gg_unit_e00R_0011,UNIT_STATE_MANA,0)
call SetUnitColor(gg_unit_e00R_0011,ConvertPlayerColor(0))
call SetUnitAcquireRange(gg_unit_e00R_0011,0.0)
set gg_unit_e00R_0012=CreateUnit(p,'e00R',-1504.0,-1824.0,270.000)
call SetUnitState(gg_unit_e00R_0012,UNIT_STATE_MANA,0)
call SetUnitColor(gg_unit_e00R_0012,ConvertPlayerColor(0))
call SetUnitAcquireRange(gg_unit_e00R_0012,0.0)
set gg_unit_e00R_0013=CreateUnit(p,'e00R',4960.0,-6752.0,270.000)
call SetUnitState(gg_unit_e00R_0013,UNIT_STATE_MANA,0)
call SetUnitColor(gg_unit_e00R_0013,ConvertPlayerColor(0))
call SetUnitAcquireRange(gg_unit_e00R_0013,0.0)
set gg_unit_e011_0014=CreateUnit(p,'e011',-6112.0,-1312.0,270.000)
call SetUnitState(gg_unit_e011_0014,UNIT_STATE_MANA,0)
call SetUnitColor(gg_unit_e011_0014,ConvertPlayerColor(0))
call SetUnitAcquireRange(gg_unit_e011_0014,0.0)
set gg_unit_e011_0015=CreateUnit(p,'e011',-3488.0,-3296.0,270.000)
call SetUnitState(gg_unit_e011_0015,UNIT_STATE_MANA,0)
call SetUnitColor(gg_unit_e011_0015,ConvertPlayerColor(0))
call SetUnitAcquireRange(gg_unit_e011_0015,0.0)
set gg_unit_e011_0016=CreateUnit(p,'e011',-544.0,-6688.0,270.000)
call SetUnitState(gg_unit_e011_0016,UNIT_STATE_MANA,0)
call SetUnitColor(gg_unit_e011_0016,ConvertPlayerColor(0))
call SetUnitAcquireRange(gg_unit_e011_0016,0.0)
set gg_unit_e00S_0017=CreateUnit(p,'e00S',-6240.0,-3808.0,270.000)
call SetUnitState(gg_unit_e00S_0017,UNIT_STATE_MANA,0)
call SetUnitColor(gg_unit_e00S_0017,ConvertPlayerColor(0))
call SetUnitAcquireRange(gg_unit_e00S_0017,0.0)
set gg_unit_e00S_0018=CreateUnit(p,'e00S',-4384.0,-4448.0,270.000)
call SetUnitState(gg_unit_e00S_0018,UNIT_STATE_MANA,0)
call SetUnitColor(gg_unit_e00S_0018,ConvertPlayerColor(0))
call SetUnitAcquireRange(gg_unit_e00S_0018,0.0)
set gg_unit_e00S_0019=CreateUnit(p,'e00S',-3424.0,-6560.0,270.000)
call SetUnitState(gg_unit_e00S_0019,UNIT_STATE_MANA,0)
call SetUnitColor(gg_unit_e00S_0019,ConvertPlayerColor(0))
call SetUnitAcquireRange(gg_unit_e00S_0019,0.0)
set gg_unit_e019_0020=CreateUnit(p,'e019',-4896.0,-6560.0,270.000)
call SetUnitState(gg_unit_e019_0020,UNIT_STATE_MANA,0)
call SetUnitColor(gg_unit_e019_0020,ConvertPlayerColor(0))
call SetUnitAcquireRange(gg_unit_e019_0020,0.0)
set gg_unit_e019_0021=CreateUnit(p,'e019',-4512.0,-6816.0,270.000)
call SetUnitState(gg_unit_e019_0021,UNIT_STATE_MANA,0)
call SetUnitColor(gg_unit_e019_0021,ConvertPlayerColor(0))
call SetUnitAcquireRange(gg_unit_e019_0021,0.0)
endfunction
function CreateBuildingsForPlayer1 takes nothing returns nothing
local player p=Player(1)
local unit u
local integer unitID
local trigger t
local real life
set gg_unit_ncop_0080=CreateUnit(p,'ncop',-6528.0,-6848.0,270.000)
call SetUnitState(gg_unit_ncop_0080,UNIT_STATE_MANA,0)
call SetUnitAcquireRange(gg_unit_ncop_0080,0.0)
endfunction
function CreateBuildingsForPlayer2 takes nothing returns nothing
local player p=Player(2)
local unit u
local integer unitID
local trigger t
local real life
set gg_unit_ncop_0081=CreateUnit(p,'ncop',-6400.0,-6848.0,270.000)
call SetUnitState(gg_unit_ncop_0081,UNIT_STATE_MANA,0)
call SetUnitAcquireRange(gg_unit_ncop_0081,0.0)
endfunction
function CreateBuildingsForPlayer3 takes nothing returns nothing
local player p=Player(3)
local unit u
local integer unitID
local trigger t
local real life
set gg_unit_ncop_0082=CreateUnit(p,'ncop',-6272.0,-6848.0,270.000)
call SetUnitState(gg_unit_ncop_0082,UNIT_STATE_MANA,0)
call SetUnitAcquireRange(gg_unit_ncop_0082,0.0)
endfunction
function CreateBuildingsForPlayer4 takes nothing returns nothing
local player p=Player(4)
local unit u
local integer unitID
local trigger t
local real life
set gg_unit_ncop_0083=CreateUnit(p,'ncop',-6144.0,-6848.0,270.000)
call SetUnitState(gg_unit_ncop_0083,UNIT_STATE_MANA,0)
call SetUnitAcquireRange(gg_unit_ncop_0083,0.0)
endfunction
function CreateBuildingsForPlayer5 takes nothing returns nothing
local player p=Player(5)
local unit u
local integer unitID
local trigger t
local real life
set gg_unit_ncop_0084=CreateUnit(p,'ncop',-6016.0,-6848.0,270.000)
call SetUnitState(gg_unit_ncop_0084,UNIT_STATE_MANA,0)
call SetUnitAcquireRange(gg_unit_ncop_0084,0.0)
endfunction
function CreateBuildingsForPlayer6 takes nothing returns nothing
local player p=Player(6)
local unit u
local integer unitID
local trigger t
local real life
set u=CreateUnit(p,'ndfl',6272.0,5504.0,270.000)
call SetUnitState(u,UNIT_STATE_MANA,0)
call SetUnitAcquireRange(u,0.0)
set u=CreateUnit(p,'ugrv',6464.0,4736.0,270.000)
call SetUnitState(u,UNIT_STATE_MANA,0)
call SetUnitAcquireRange(u,0.0)
set gg_unit_unpl_0050=CreateUnit(p,'unpl',4992.0,4544.0,270.000)
call SetUnitState(gg_unit_unpl_0050,UNIT_STATE_MANA,0)
call SetUnitAcquireRange(gg_unit_unpl_0050,0.0)
set gg_unit_usep_0062=CreateUnit(p,'usep',3776.0,5888.0,270.000)
call SetUnitState(gg_unit_usep_0062,UNIT_STATE_MANA,0)
call SetUnitAcquireRange(gg_unit_usep_0062,0.0)
set gg_unit_usep_0063=CreateUnit(p,'usep',4096.0,3392.0,270.000)
call SetUnitState(gg_unit_usep_0063,UNIT_STATE_MANA,0)
call SetUnitAcquireRange(gg_unit_usep_0063,0.0)
set gg_unit_usep_0064=CreateUnit(p,'usep',6208.0,3264.0,270.000)
call SetUnitState(gg_unit_usep_0064,UNIT_STATE_MANA,0)
call SetUnitAcquireRange(gg_unit_usep_0064,0.0)
set gg_unit_utod_0065=CreateUnit(p,'utod',3520.0,5376.0,270.000)
call SetUnitState(gg_unit_utod_0065,UNIT_STATE_MANA,0)
call SetUnitAcquireRange(gg_unit_utod_0065,0.0)
set gg_unit_utod_0066=CreateUnit(p,'utod',3776.0,3840.0,270.000)
call SetUnitState(gg_unit_utod_0066,UNIT_STATE_MANA,0)
call SetUnitAcquireRange(gg_unit_utod_0066,0.0)
set gg_unit_utod_0067=CreateUnit(p,'utod',5696.0,3264.0,270.000)
call SetUnitState(gg_unit_utod_0067,UNIT_STATE_MANA,0)
call SetUnitAcquireRange(gg_unit_utod_0067,0.0)
set gg_unit_uzig_0068=CreateUnit(p,'uzig',3168.0,4000.0,270.000)
call SetUnitState(gg_unit_uzig_0068,UNIT_STATE_MANA,0)
call SetUnitAcquireRange(gg_unit_uzig_0068,0.0)
set gg_unit_uzig_0069=CreateUnit(p,'uzig',4192.0,5536.0,270.000)
call SetUnitState(gg_unit_uzig_0069,UNIT_STATE_MANA,0)
call SetUnitAcquireRange(gg_unit_uzig_0069,0.0)
set gg_unit_uzig_0070=CreateUnit(p,'uzig',4128.0,4512.0,270.000)
call SetUnitState(gg_unit_uzig_0070,UNIT_STATE_MANA,0)
call SetUnitAcquireRange(gg_unit_uzig_0070,0.0)
set gg_unit_uzig_0071=CreateUnit(p,'uzig',4640.0,3680.0,270.000)
call SetUnitState(gg_unit_uzig_0071,UNIT_STATE_MANA,0)
call SetUnitAcquireRange(gg_unit_uzig_0071,0.0)
set gg_unit_uzig_0072=CreateUnit(p,'uzig',4832.0,3104.0,270.000)
call SetUnitState(gg_unit_uzig_0072,UNIT_STATE_MANA,0)
call SetUnitAcquireRange(gg_unit_uzig_0072,0.0)
set gg_unit_uzig_0073=CreateUnit(p,'uzig',5408.0,2592.0,270.000)
call SetUnitState(gg_unit_uzig_0073,UNIT_STATE_MANA,0)
call SetUnitAcquireRange(gg_unit_uzig_0073,0.0)
set gg_unit_uzig_0074=CreateUnit(p,'uzig',5408.0,3296.0,270.000)
call SetUnitState(gg_unit_uzig_0074,UNIT_STATE_MANA,0)
call SetUnitAcquireRange(gg_unit_uzig_0074,0.0)
set gg_unit_uzig_0075=CreateUnit(p,'uzig',6112.0,4000.0,270.000)
call SetUnitState(gg_unit_uzig_0075,UNIT_STATE_MANA,0)
call SetUnitAcquireRange(gg_unit_uzig_0075,0.0)
set gg_unit_uzig_0076=CreateUnit(p,'uzig',3040.0,5088.0,270.000)
call SetUnitState(gg_unit_uzig_0076,UNIT_STATE_MANA,0)
call SetUnitAcquireRange(gg_unit_uzig_0076,0.0)
set gg_unit_uzig_0077=CreateUnit(p,'uzig',6304.0,3744.0,270.000)
call SetUnitState(gg_unit_uzig_0077,UNIT_STATE_MANA,0)
call SetUnitAcquireRange(gg_unit_uzig_0077,0.0)
set gg_unit_usap_0078=CreateUnit(p,'usap',3520.0,4608.0,270.000)
call SetUnitState(gg_unit_usap_0078,UNIT_STATE_MANA,0)
call SetUnitAcquireRange(gg_unit_usap_0078,0.0)
set gg_unit_uslh_0079=CreateUnit(p,'uslh',4096.0,2624.0,270.000)
call SetUnitState(gg_unit_uslh_0079,UNIT_STATE_MANA,0)
call SetUnitAcquireRange(gg_unit_uslh_0079,0.0)
endfunction
function CreateUnitsForPlayer6 takes nothing returns nothing
local player p=Player(6)
local unit u
local integer unitID
local trigger t
local real life
set gg_unit_nC35_0041=CreateUnit(p,'nC35',6464.0,5120.0,270.000)
call SetUnitState(gg_unit_nC35_0041,UNIT_STATE_MANA,0)
call SetUnitColor(gg_unit_nC35_0041,ConvertPlayerColor(0))
call SetUnitAcquireRange(gg_unit_nC35_0041,0.0)
set gg_unit_n01K_0042=CreateUnit(p,'n01K',5952.0,5568.0,270.000)
call SetUnitState(gg_unit_n01K_0042,UNIT_STATE_MANA,0)
call SetUnitColor(gg_unit_n01K_0042,ConvertPlayerColor(0))
call SetUnitAcquireRange(gg_unit_n01K_0042,0.0)
set gg_unit_nC38_0043=CreateUnit(p,'nC38',6080.0,5568.0,270.000)
call SetUnitState(gg_unit_nC38_0043,UNIT_STATE_MANA,0)
call SetUnitColor(gg_unit_nC38_0043,ConvertPlayerColor(0))
call SetUnitAcquireRange(gg_unit_nC38_0043,0.0)
set gg_unit_n00V_0045=CreateUnit(p,'n00V',5696.0,5120.0,270.000)
call SetUnitState(gg_unit_n00V_0045,UNIT_STATE_MANA,0)
call SetUnitColor(gg_unit_n00V_0045,ConvertPlayerColor(0))
call SetUnitAcquireRange(gg_unit_n00V_0045,0.0)
set gg_unit_n00W_0046=CreateUnit(p,'n00W',5568.0,5248.0,270.000)
call SetUnitState(gg_unit_n00W_0046,UNIT_STATE_MANA,0)
call SetUnitColor(gg_unit_n00W_0046,ConvertPlayerColor(0))
call SetUnitAcquireRange(gg_unit_n00W_0046,0.0)
set gg_unit_n002_0047=CreateUnit(p,'n002',5568.0,5376.0,270.000)
call SetUnitState(gg_unit_n002_0047,UNIT_STATE_MANA,0)
call SetUnitColor(gg_unit_n002_0047,ConvertPlayerColor(0))
call SetUnitAcquireRange(gg_unit_n002_0047,0.0)
set gg_unit_n00X_0048=CreateUnit(p,'n00X',5696.0,5504.0,270.000)
call SetUnitState(gg_unit_n00X_0048,UNIT_STATE_MANA,0)
call SetUnitColor(gg_unit_n00X_0048,ConvertPlayerColor(0))
call SetUnitAcquireRange(gg_unit_n00X_0048,0.0)
set gg_unit_n009_0049=CreateUnit(p,'n009',5568.0,5696.0,270.000)
call SetUnitState(gg_unit_n009_0049,UNIT_STATE_MANA,0)
call SetUnitColor(gg_unit_n009_0049,ConvertPlayerColor(0))
call SetUnitAcquireRange(gg_unit_n009_0049,0.0)
set gg_unit_u00M_0051=CreateUnit(p,'u00M',-4704.0,5920.0,270.000)
call SetUnitState(gg_unit_u00M_0051,UNIT_STATE_MANA,0)
call SetUnitColor(gg_unit_u00M_0051,ConvertPlayerColor(0))
call SetUnitAcquireRange(gg_unit_u00M_0051,0.0)
set gg_unit_u00M_0052=CreateUnit(p,'u00M',1056.0,-160.0,270.000)
call SetUnitState(gg_unit_u00M_0052,UNIT_STATE_MANA,0)
call SetUnitColor(gg_unit_u00M_0052,ConvertPlayerColor(0))
call SetUnitAcquireRange(gg_unit_u00M_0052,0.0)
set gg_unit_u00M_0053=CreateUnit(p,'u00M',6048.0,-2080.0,270.000)
call SetUnitState(gg_unit_u00M_0053,UNIT_STATE_MANA,0)
call SetUnitColor(gg_unit_u00M_0053,ConvertPlayerColor(0))
call SetUnitAcquireRange(gg_unit_u00M_0053,0.0)
set gg_unit_u00D_0054=CreateUnit(p,'u00D',32.0,5856.0,270.000)
call SetUnitState(gg_unit_u00D_0054,UNIT_STATE_MANA,0)
call SetUnitColor(gg_unit_u00D_0054,ConvertPlayerColor(0))
call SetUnitAcquireRange(gg_unit_u00D_0054,0.0)
set gg_unit_u00D_0055=CreateUnit(p,'u00D',2400.0,1696.0,270.000)
call SetUnitState(gg_unit_u00D_0055,UNIT_STATE_MANA,0)
call SetUnitColor(gg_unit_u00D_0055,ConvertPlayerColor(0))
call SetUnitAcquireRange(gg_unit_u00D_0055,0.0)
set gg_unit_u00D_0056=CreateUnit(p,'u00D',6112.0,-96.0,270.000)
call SetUnitState(gg_unit_u00D_0056,UNIT_STATE_MANA,0)
call SetUnitColor(gg_unit_u00D_0056,ConvertPlayerColor(0))
call SetUnitAcquireRange(gg_unit_u00D_0056,0.0)
set gg_unit_u00N_0057=CreateUnit(p,'u00N',3168.0,5920.0,270.000)
call SetUnitState(gg_unit_u00N_0057,UNIT_STATE_MANA,0)
call SetUnitColor(gg_unit_u00N_0057,ConvertPlayerColor(0))
call SetUnitAcquireRange(gg_unit_u00N_0057,0.0)
set gg_unit_u00N_0058=CreateUnit(p,'u00N',3616.0,3296.0,270.000)
call SetUnitState(gg_unit_u00N_0058,UNIT_STATE_MANA,0)
call SetUnitColor(gg_unit_u00N_0058,ConvertPlayerColor(0))
call SetUnitAcquireRange(gg_unit_u00N_0058,0.0)
set gg_unit_u00N_0059=CreateUnit(p,'u00N',6048.0,2784.0,270.000)
call SetUnitState(gg_unit_u00N_0059,UNIT_STATE_MANA,0)
call SetUnitColor(gg_unit_u00N_0059,ConvertPlayerColor(0))
call SetUnitAcquireRange(gg_unit_u00N_0059,0.0)
set gg_unit_u00T_0060=CreateUnit(p,'u00T',4640.0,4576.0,270.000)
call SetUnitState(gg_unit_u00T_0060,UNIT_STATE_MANA,0)
call SetUnitColor(gg_unit_u00T_0060,ConvertPlayerColor(0))
call SetUnitAcquireRange(gg_unit_u00T_0060,0.0)
set gg_unit_u00T_0061=CreateUnit(p,'u00T',5088.0,4192.0,270.000)
call SetUnitState(gg_unit_u00T_0061,UNIT_STATE_MANA,0)
call SetUnitColor(gg_unit_u00T_0061,ConvertPlayerColor(0))
call SetUnitAcquireRange(gg_unit_u00T_0061,0.0)
endfunction
function CreateBuildingsForPlayer7 takes nothing returns nothing
local player p=Player(7)
local unit u
local integer unitID
local trigger t
local real life
set gg_unit_ncop_0085=CreateUnit(p,'ncop',5824.0,6464.0,270.000)
call SetUnitState(gg_unit_ncop_0085,UNIT_STATE_MANA,0)
call SetUnitAcquireRange(gg_unit_ncop_0085,0.0)
endfunction
function CreateBuildingsForPlayer8 takes nothing returns nothing
local player p=Player(8)
local unit u
local integer unitID
local trigger t
local real life
set gg_unit_ncop_0086=CreateUnit(p,'ncop',5952.0,6464.0,270.000)
call SetUnitState(gg_unit_ncop_0086,UNIT_STATE_MANA,0)
call SetUnitAcquireRange(gg_unit_ncop_0086,0.0)
endfunction
function CreateBuildingsForPlayer9 takes nothing returns nothing
local player p=Player(9)
local unit u
local integer unitID
local trigger t
local real life
set gg_unit_ncop_0087=CreateUnit(p,'ncop',6080.0,6464.0,270.000)
call SetUnitState(gg_unit_ncop_0087,UNIT_STATE_MANA,0)
call SetUnitAcquireRange(gg_unit_ncop_0087,0.0)
endfunction
function CreateBuildingsForPlayer10 takes nothing returns nothing
local player p=Player(10)
local unit u
local integer unitID
local trigger t
local real life
set gg_unit_ncop_0088=CreateUnit(p,'ncop',6208.0,6464.0,270.000)
call SetUnitState(gg_unit_ncop_0088,UNIT_STATE_MANA,0)
call SetUnitAcquireRange(gg_unit_ncop_0088,0.0)
endfunction
function CreateBuildingsForPlayer11 takes nothing returns nothing
local player p=Player(11)
local unit u
local integer unitID
local trigger t
local real life
set gg_unit_ncop_0089=CreateUnit(p,'ncop',6336.0,6464.0,270.000)
call SetUnitState(gg_unit_ncop_0089,UNIT_STATE_MANA,0)
call SetUnitAcquireRange(gg_unit_ncop_0089,0.0)
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 gg_unit_ntav_0092=CreateUnit(p,'ntav',-6464.0,-7104.0,270.000)
call SetUnitState(gg_unit_ntav_0092,UNIT_STATE_MANA,0)
call SetUnitColor(gg_unit_ntav_0092,ConvertPlayerColor(0))
call SetUnitAcquireRange(gg_unit_ntav_0092,0.0)
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_n008_0090=CreateUnit(p,'n008',-6464.0,-6592.0,270.000)
call SetUnitState(gg_unit_n008_0090,UNIT_STATE_MANA,0)
call SetUnitColor(gg_unit_n008_0090,ConvertPlayerColor(0))
call SetUnitAcquireRange(gg_unit_n008_0090,0.0)
set gg_unit_n01D_0091=CreateUnit(p,'n01D',-6080.0,-6592.0,270.000)
call SetUnitState(gg_unit_n01D_0091,UNIT_STATE_MANA,0)
call SetUnitColor(gg_unit_n01D_0091,ConvertPlayerColor(0))
call SetUnitAcquireRange(gg_unit_n01D_0091,0.0)
set gg_unit_n01N_0093=CreateUnit(p,'n01N',-6080.0,-7104.0,270.000)
call SetUnitState(gg_unit_n01N_0093,UNIT_STATE_MANA,0)
call SetUnitColor(gg_unit_n01N_0093,ConvertPlayerColor(0))
call SetUnitAcquireRange(gg_unit_n01N_0093,0.0)
set gg_unit_n005_0094=CreateUnit(p,'n005',5888.0,6208.0,270.000)
call SetUnitState(gg_unit_n005_0094,UNIT_STATE_MANA,0)
call SetUnitColor(gg_unit_n005_0094,ConvertPlayerColor(0))
call SetUnitAcquireRange(gg_unit_n005_0094,0.0)
set gg_unit_n01P_0095=CreateUnit(p,'n01P',6272.0,6208.0,270.000)
call SetUnitState(gg_unit_n01P_0095,UNIT_STATE_MANA,0)
call SetUnitColor(gg_unit_n01P_0095,ConvertPlayerColor(0))
call SetUnitAcquireRange(gg_unit_n01P_0095,0.0)
set gg_unit_n007_0096=CreateUnit(p,'n007',5888.0,6720.0,270.000)
call SetUnitState(gg_unit_n007_0096,UNIT_STATE_MANA,0)
call SetUnitColor(gg_unit_n007_0096,ConvertPlayerColor(0))
call SetUnitAcquireRange(gg_unit_n007_0096,0.0)
set gg_unit_n01B_0097=CreateUnit(p,'n01B',6272.0,6720.0,270.000)
call SetUnitState(gg_unit_n01B_0097,UNIT_STATE_MANA,0)
call SetUnitColor(gg_unit_n01B_0097,ConvertPlayerColor(0))
call SetUnitAcquireRange(gg_unit_n01B_0097,0.0)
set gg_unit_e00D_0102=CreateUnit(p,'e00D',-6043.9,5314.7,275.299)
call SetUnitState(gg_unit_e00D_0102,UNIT_STATE_MANA,0)
call SetUnitColor(gg_unit_e00D_0102,ConvertPlayerColor(0))
call SetUnitAcquireRange(gg_unit_e00D_0102,0.0)
set u=CreateUnit(p,'uC74',3008.0,0.0,270.000)
call SetUnitState(u,UNIT_STATE_MANA,0)
call SetUnitColor(u,ConvertPlayerColor(0))
call SetUnitAcquireRange(u,0.0)
set gg_unit_e00B_0103=CreateUnit(p,'e00B',-713.7,-515.7,295.506)
call SetUnitState(gg_unit_e00B_0103,UNIT_STATE_MANA,0)
call SetUnitColor(gg_unit_e00B_0103,ConvertPlayerColor(0))
call SetUnitAcquireRange(gg_unit_e00B_0103,0.0)
set gg_unit_e00A_0104=CreateUnit(p,'e00A',5853.5,-6214.9,64.000)
call SetUnitState(gg_unit_e00A_0104,UNIT_STATE_MANA,0)
call SetUnitColor(gg_unit_e00A_0104,ConvertPlayerColor(0))
call SetUnitAcquireRange(gg_unit_e00A_0104,0.0)
set u=CreateUnit(p,'uC74',-4608.0,1152.0,270.000)
call SetUnitState(u,UNIT_STATE_MANA,0)
call SetUnitColor(u,ConvertPlayerColor(0))
call SetUnitAcquireRange(u,0.0)
set gg_unit_e008_0105=CreateUnit(p,'e008',-4690.8,-6680.8,230.547)
call SetUnitState(gg_unit_e008_0105,UNIT_STATE_MANA,0)
call SetUnitColor(gg_unit_e008_0105,ConvertPlayerColor(0))
call SetUnitAcquireRange(gg_unit_e008_0105,0.0)
set gg_unit_e001_0106=CreateUnit(p,'e001',4836.0,4372.2,273.007)
call SetUnitState(gg_unit_e001_0106,UNIT_STATE_MANA,0)
call SetUnitColor(gg_unit_e001_0106,ConvertPlayerColor(0))
call SetUnitAcquireRange(gg_unit_e001_0106,0.0)
endfunction
function CreatePlayerBuildings takes nothing returns nothing
call CreateBuildingsForPlayer0()
call CreateBuildingsForPlayer1()
call CreateBuildingsForPlayer2()
call CreateBuildingsForPlayer3()
call CreateBuildingsForPlayer4()
call CreateBuildingsForPlayer5()
call CreateBuildingsForPlayer6()
call CreateBuildingsForPlayer7()
call CreateBuildingsForPlayer8()
call CreateBuildingsForPlayer9()
call CreateBuildingsForPlayer10()
call CreateBuildingsForPlayer11()
endfunction
function CreatePlayerUnits takes nothing returns nothing
call CreateUnitsForPlayer0()
call CreateUnitsForPlayer6()
endfunction
function CreateAllUnits takes nothing returns nothing
call CreateNeutralPassiveBuildings()
call CreatePlayerBuildings()
call CreateNeutralPassive()
call CreatePlayerUnits()
endfunction
function CreateRegions takes nothing returns nothing
local weathereffect we
set gg_rct_ScourgeMeleeCreepSpawnRight=Rect(5600.0,2848.0,5952.0,3168.0)
set gg_rct_ScourgeMeleeCreepSpawnCenter=Rect(3424.0,2816.0,3744.0,3104.0)
set gg_rct_ScourgeMeleeCreepSpawnLeft=Rect(2880.0,6016.0,3296.0,6464.0)
set gg_rct_ScourgeHeroSpawn=Rect(5824.0,5056.0,6272.0,5344.0)
set gg_rct_SentinelMeleeCreepSpawnRight=Rect(-3680.0,-6368.0,-3392.0,-6016.0)
set gg_rct_SentinelMeleeCreepSpawnLeft=Rect(-6272.0,-4480.0,-5920.0,-4096.0)
set gg_rct_SentinelMeleeCreepSpawnCenter=Rect(-4864.0,-5056.0,-4576.0,-4768.0)
set gg_rct_ScourgeRangedCreepSpawnRight=Rect(5568.0,3392.0,5920.0,3712.0)
set gg_rct_ScourgeRangedCreepSpawnCenter=Rect(3456.0,3424.0,3776.0,3744.0)
set gg_rct_ScourgeRangedCreepSpawnLeft=Rect(3168.0,5440.0,3520.0,5792.0)
set gg_rct_SentinelHeroSpawn=Rect(-6624.0,-5760.0,-6240.0,-5504.0)
set gg_rct_SentinelRangedCreepSpawnRight=Rect(-3392.0,-6816.0,-3072.0,-6496.0)
set gg_rct_SentinelRangedCreepSpawnLeft=Rect(-6656.0,-4224.0,-6240.0,-3808.0)
set gg_rct_SentinelRangedCreepSpawnCenter=Rect(-4544.0,-4832.0,-4224.0,-4512.0)
set gg_rct_RightRuneSpawn=Rect(2912.0,-2944.0,3104.0,-2720.0)
set gg_rct_ScourgeTavernsRect=Rect(5472.0,5888.0,6624.0,7008.0)
set gg_rct_SentinelTavernsRect=Rect(-6848.0,-7456.0,-5696.0,-6272.0)
set gg_rct_LeftRuneSpawn=Rect(-2464.0,1536.0,-2240.0,1760.0)
set gg_rct_CreepSpawnSc6=Rect(4032.0,-2688.0,4288.0,-2400.0)
set gg_rct_CreepSpawnSe1=Rect(-3328.0,-416.0,-3104.0,-96.0)
set gg_rct_CreepSpawnSe4=Rect(1440.0,-4096.0,1728.0,-3872.0)
set gg_rct_CreepSpawnSc1=Rect(-4512.0,3232.0,-4352.0,3424.0)
set gg_rct_CreepSpawnSc3=Rect(-608.0,3072.0,-384.0,3328.0)
set gg_rct_CreepSpawnSe6=Rect(2848.0,-5088.0,3072.0,-4928.0)
set gg_rct_CreepSpawnSc2=Rect(-1728.0,2208.0,-1376.0,2432.0)
set gg_rct_CreepSpawnSe5=Rect(3008.0,-3776.0,3136.0,-3648.0)
set gg_rct_CreepSpawnSc5=Rect(736.0,864.0,864.0,1024.0)
set gg_rct_CreepSpawnSe2=Rect(-416.0,-3456.0,-160.0,-3200.0)
set gg_rct_SentinelTavernsCenter=Rect(-6368.0,-6944.0,-6176.0,-6752.0)
set gg_rct_ScourgeTavernsCenter=Rect(5920.0,6272.0,6112.0,6464.0)
set gg_rct_TheWorldTreeRect=Rect(-5152.0,-7264.0,-4448.0,-6560.0)
set gg_rct_TheFrozenThroneRect=Rect(4672.0,4256.0,5376.0,4960.0)
set gg_rct_RoshanPlace=Rect(2240.0,-800.0,2688.0,-320.0)
set gg_rct_CreepSpawnSc6Rect=Rect(3264.0,-2784.0,4736.0,-1216.0)
set gg_rct_CreepSpawnSe1Rect=Rect(-3552.0,-768.0,-2208.0,320.0)
set gg_rct_CreepSpawnSe4Rect=Rect(1056.0,-5216.0,2368.0,-3744.0)
set gg_rct_CreepSpawnSc1Rect=Rect(-5280.0,3072.0,-3808.0,4384.0)
set gg_rct_CreepSpawnSc3Rect=Rect(-1248.0,2656.0,352.0,4800.0)
set gg_rct_CreepSpawnSe6Rect=Rect(2272.0,-6080.0,3776.0,-4928.0)
set gg_rct_CreepSpawnSc2Rect=Rect(-2432.0,2016.0,-864.0,3456.0)
set gg_rct_CreepSpawnSc5Rect=Rect(384.0,576.0,1120.0,1952.0)
set gg_rct_CreepSpawnSe5Rect=Rect(2592.0,-4800.0,3744.0,-3328.0)
set gg_rct_CreepSpawnSe2Rect=Rect(-960.0,-3712.0,416.0,-2304.0)
set gg_rct_SentinelBase=Rect(-6912.0,-6144.0,-5888.0,-5184.0)
set gg_rct_ScourgeBase=Rect(5504.0,4576.0,6624.0,5728.0)
set gg_rct_CreepSpawnSc4Rect=Rect(-512.0,992.0,352.0,2272.0)
set gg_rct_CreepSpawnSc4=Rect(-96.0,1248.0,96.0,1376.0)
set gg_rct_CreepSpawnSe3Rect=Rect(-1632.0,-5056.0,-768.0,-3904.0)
set gg_rct_CreepSpawnSe3=Rect(-1152.0,-4704.0,-960.0,-4480.0)
set gg_rct_MapCenter=Rect(-480.0,-800.0,-256.0,-512.0)
set gg_rct_RoshanRect=Rect(2048.0,-1216.0,3104.0,-160.0)
set gg_rct_MapRightBottom=Rect(7264.0,-5504.0,7488.0,-5280.0)
set gg_rct_MapLeftTop=Rect(-7520.0,6528.0,-7328.0,6720.0)
endfunction
function CreateCameras takes nothing returns nothing
set gg_cam_MapCenterView=CreateCameraSetup()
call CameraSetupSetField(gg_cam_MapCenterView,CAMERA_FIELD_ZOFFSET,0.0,0.0)
call CameraSetupSetField(gg_cam_MapCenterView,CAMERA_FIELD_ROTATION,90.0,0.0)
call CameraSetupSetField(gg_cam_MapCenterView,CAMERA_FIELD_ANGLE_OF_ATTACK,335.0,0.0)
call CameraSetupSetField(gg_cam_MapCenterView,CAMERA_FIELD_TARGET_DISTANCE,1200.0,0.0)
call CameraSetupSetField(gg_cam_MapCenterView,CAMERA_FIELD_ROLL,0.0,0.0)
call CameraSetupSetField(gg_cam_MapCenterView,CAMERA_FIELD_FIELD_OF_VIEW,70.0,0.0)
call CameraSetupSetField(gg_cam_MapCenterView,CAMERA_FIELD_FARZ,5000.0,0.0)
call CameraSetupSetDestPosition(gg_cam_MapCenterView,-1583.0,-1320.4,0.0)
set gg_cam_MapCenterRiverPath=CreateCameraSetup()
call CameraSetupSetField(gg_cam_MapCenterRiverPath,CAMERA_FIELD_ZOFFSET,0.0,0.0)
call CameraSetupSetField(gg_cam_MapCenterRiverPath,CAMERA_FIELD_ROTATION,121.0,0.0)
call CameraSetupSetField(gg_cam_MapCenterRiverPath,CAMERA_FIELD_ANGLE_OF_ATTACK,335.0,0.0)
call CameraSetupSetField(gg_cam_MapCenterRiverPath,CAMERA_FIELD_TARGET_DISTANCE,800.0,0.0)
call CameraSetupSetField(gg_cam_MapCenterRiverPath,CAMERA_FIELD_ROLL,0.0,0.0)
call CameraSetupSetField(gg_cam_MapCenterRiverPath,CAMERA_FIELD_FIELD_OF_VIEW,70.0,0.0)
call CameraSetupSetField(gg_cam_MapCenterRiverPath,CAMERA_FIELD_FARZ,5000.0,0.0)
call CameraSetupSetDestPosition(gg_cam_MapCenterRiverPath,-404.2,-643.0,0.0)
set gg_cam_SentinelTaverns=CreateCameraSetup()
call CameraSetupSetField(gg_cam_SentinelTaverns,CAMERA_FIELD_ZOFFSET,0.0,0.0)
call CameraSetupSetField(gg_cam_SentinelTaverns,CAMERA_FIELD_ROTATION,90.0,0.0)
call CameraSetupSetField(gg_cam_SentinelTaverns,CAMERA_FIELD_ANGLE_OF_ATTACK,304.0,0.0)
call CameraSetupSetField(gg_cam_SentinelTaverns,CAMERA_FIELD_TARGET_DISTANCE,1024.5,0.0)
call CameraSetupSetField(gg_cam_SentinelTaverns,CAMERA_FIELD_ROLL,0.0,0.0)
call CameraSetupSetField(gg_cam_SentinelTaverns,CAMERA_FIELD_FIELD_OF_VIEW,70.0,0.0)
call CameraSetupSetField(gg_cam_SentinelTaverns,CAMERA_FIELD_FARZ,5000.0,0.0)
call CameraSetupSetDestPosition(gg_cam_SentinelTaverns,-6220.8,-6784.0,0.0)
set gg_cam_ScourgeTaverns=CreateCameraSetup()
call CameraSetupSetField(gg_cam_ScourgeTaverns,CAMERA_FIELD_ZOFFSET,0.0,0.0)
call CameraSetupSetField(gg_cam_ScourgeTaverns,CAMERA_FIELD_ROTATION,90.0,0.0)
call CameraSetupSetField(gg_cam_ScourgeTaverns,CAMERA_FIELD_ANGLE_OF_ATTACK,304.0,0.0)
call CameraSetupSetField(gg_cam_ScourgeTaverns,CAMERA_FIELD_TARGET_DISTANCE,1024.5,0.0)
call CameraSetupSetField(gg_cam_ScourgeTaverns,CAMERA_FIELD_ROLL,0.0,0.0)
call CameraSetupSetField(gg_cam_ScourgeTaverns,CAMERA_FIELD_FIELD_OF_VIEW,70.0,0.0)
call CameraSetupSetField(gg_cam_ScourgeTaverns,CAMERA_FIELD_FARZ,5000.0,0.0)
call CameraSetupSetDestPosition(gg_cam_ScourgeTaverns,5570.6,6444.4,0.0)
endfunction
function H2Ix takes handle pTarg returns integer
return pTarg
return 0
endfunction
function H2Tx takes handle pTarg returns string
return I2S(H2Ix(pTarg))
endfunction
function FastFlush takes string pTable returns nothing
call FlushStoredMission(udg_gc_DTAX_Core,pTable)
endfunction
function SetHandle takes string pTable,string pKey,handle pData returns nothing
call StoreInteger(udg_gc_DTAX_Core,pTable,pKey,H2Ix(pData))
endfunction
function SetInteger takes string pTable,string pKey,integer pData returns nothing
call StoreInteger(udg_gc_DTAX_Core,pTable,pKey,pData)
endfunction
function SetReal takes string pTable,string pKey,real pData returns nothing
call StoreReal(udg_gc_DTAX_Core,pTable,pKey,pData)
endfunction
function SetBoolean takes string pTable,string pKey,boolean pData returns nothing
call StoreBoolean(udg_gc_DTAX_Core,pTable,pKey,pData)
endfunction
function GetUnit takes string pTable,string pKey returns unit
return GetStoredInteger(udg_gc_DTAX_Core,pTable,pKey)
return null
endfunction
function GetPlayer takes string pTable,string pKey returns player
return GetStoredInteger(udg_gc_DTAX_Core,pTable,pKey)
return null
endfunction
function GetTimer takes string pTable,string pKey returns timer
return GetStoredInteger(udg_gc_DTAX_Core,pTable,pKey)
return null
endfunction
function GetTrigger takes string pTable,string pKey returns trigger
return GetStoredInteger(udg_gc_DTAX_Core,pTable,pKey)
return null
endfunction
function GetGroup takes string pTable,string pKey returns group
return GetStoredInteger(udg_gc_DTAX_Core,pTable,pKey)
return null
endfunction
function GetFX takes string pTable,string pKey returns effect
return GetStoredInteger(udg_gc_DTAX_Core,pTable,pKey)
return null
endfunction
function GetLocation takes string pTable,string pKey returns location
return GetStoredInteger(udg_gc_DTAX_Core,pTable,pKey)
return null
endfunction
function GetInteger takes string pTable,string pKey returns integer
return GetStoredInteger(udg_gc_DTAX_Core,pTable,pKey)
endfunction
function GetReal takes string pTable,string pKey returns real
return GetStoredReal(udg_gc_DTAX_Core,pTable,pKey)
endfunction
function GetBoolean takes string pTable,string pKey returns boolean
return GetStoredBoolean(udg_gc_DTAX_Core,pTable,pKey)
endfunction
function PlayerIsSentinel takes player pWho returns boolean
if(pWho==udg_pA_DTAX_SEPlayers[0])then
return true
endif
if(pWho==udg_pA_DTAX_SEPlayers[1])then
return true
endif
if(pWho==udg_pA_DTAX_SEPlayers[2])then
return true
endif
if(pWho==udg_pA_DTAX_SEPlayers[3])then
return true
endif
if(pWho==udg_pA_DTAX_SEPlayers[4])then
return true
endif
if(pWho==udg_pA_DTAX_SEPlayers[5])then
return true
endif
return false
endfunction
function PlayerIsScourge takes player pWho returns boolean
if(pWho==udg_pA_DTAX_SCPlayers[0])then
return true
endif
if(pWho==udg_pA_DTAX_SCPlayers[1])then
return true
endif
if(pWho==udg_pA_DTAX_SCPlayers[2])then
return true
endif
if(pWho==udg_pA_DTAX_SCPlayers[3])then
return true
endif
if(pWho==udg_pA_DTAX_SCPlayers[4])then
return true
endif
if(pWho==udg_pA_DTAX_SCPlayers[5])then
return true
endif
return false
endfunction
function PlayerIsActive takes player pWho returns boolean
if(GetPlayerSlotState(pWho)==PLAYER_SLOT_STATE_PLAYING)then
if(GetPlayerController(pWho)==MAP_CONTROL_USER)then
return true
endif
endif
return false
endfunction
function ForceCountActivePlayers takes nothing returns nothing
if(PlayerIsActive(GetEnumPlayer()))then
set bj_forceCountPlayers=bj_forceCountPlayers+1
endif
endfunction
function ForceActivePlayers takes force pWhat returns integer
set bj_forceCountPlayers=0
call ForForce(pWhat,function ForceCountActivePlayers)
return bj_forceCountPlayers
endfunction
function HeroDenySingle takes integer pHero,player pWho returns nothing
call SetPlayerTechMaxAllowed(pWho,pHero,0)
set udg_bA_DTAX_used_hero_types_SAME1[GetUnitPointValueByType(pHero)]=true
endfunction
function HeroDenyAll takes integer pHero returns nothing
call HeroDenySingle(pHero,udg_pA_DTAX_SEPlayers[1])
call HeroDenySingle(pHero,udg_pA_DTAX_SEPlayers[2])
call HeroDenySingle(pHero,udg_pA_DTAX_SEPlayers[3])
call HeroDenySingle(pHero,udg_pA_DTAX_SEPlayers[4])
call HeroDenySingle(pHero,udg_pA_DTAX_SEPlayers[5])
call HeroDenySingle(pHero,udg_pA_DTAX_SCPlayers[1])
call HeroDenySingle(pHero,udg_pA_DTAX_SCPlayers[2])
call HeroDenySingle(pHero,udg_pA_DTAX_SCPlayers[3])
call HeroDenySingle(pHero,udg_pA_DTAX_SCPlayers[4])
call HeroDenySingle(pHero,udg_pA_DTAX_SCPlayers[5])
endfunction
function HeroDenyForPlayer takes player pWho returns nothing
local integer lInLoop=udg_i_DTAX_FirstSEHero
local integer lExitPoint=udg_i_DTAX_LastSEHero
loop
exitwhen lInLoop>lExitPoint
call SetPlayerTechMaxAllowed(pWho,udg_iA_DTAX_HeroTypes[lInLoop],0)
set lInLoop=lInLoop+1
endloop
set lInLoop=udg_i_DTAX_FirstSCHero
set lExitPoint=udg_i_DTAX_LastSCHero
loop
exitwhen lInLoop>lExitPoint
call SetPlayerTechMaxAllowed(pWho,udg_iA_DTAX_HeroTypes[lInLoop],0)
set lInLoop=lInLoop+1
endloop
call SetPlayerTechMaxAllowed(pWho,'E01L',0)
endfunction
function DenyHeroFully takes nothing returns nothing
call HeroDenyForPlayer(udg_pA_DTAX_SEPlayers[1])
call HeroDenyForPlayer(udg_pA_DTAX_SEPlayers[2])
call HeroDenyForPlayer(udg_pA_DTAX_SEPlayers[3])
call HeroDenyForPlayer(udg_pA_DTAX_SEPlayers[4])
call HeroDenyForPlayer(udg_pA_DTAX_SEPlayers[5])
call HeroDenyForPlayer(udg_pA_DTAX_SCPlayers[1])
call HeroDenyForPlayer(udg_pA_DTAX_SCPlayers[2])
call HeroDenyForPlayer(udg_pA_DTAX_SCPlayers[3])
call HeroDenyForPlayer(udg_pA_DTAX_SCPlayers[4])
call HeroDenyForPlayer(udg_pA_DTAX_SCPlayers[5])
endfunction
function DenyHeroRandomSpawn takes nothing returns nothing
call SetPlayerTechMaxAllowed(udg_pA_DTAX_SEPlayers[1],'E01L',0)
call SetPlayerTechMaxAllowed(udg_pA_DTAX_SEPlayers[2],'E01L',0)
call SetPlayerTechMaxAllowed(udg_pA_DTAX_SEPlayers[3],'E01L',0)
call SetPlayerTechMaxAllowed(udg_pA_DTAX_SEPlayers[4],'E01L',0)
call SetPlayerTechMaxAllowed(udg_pA_DTAX_SEPlayers[5],'E01L',0)
call SetPlayerTechMaxAllowed(udg_pA_DTAX_SCPlayers[1],'E01L',0)
call SetPlayerTechMaxAllowed(udg_pA_DTAX_SCPlayers[2],'E01L',0)
call SetPlayerTechMaxAllowed(udg_pA_DTAX_SCPlayers[3],'E01L',0)
call SetPlayerTechMaxAllowed(udg_pA_DTAX_SCPlayers[4],'E01L',0)
call SetPlayerTechMaxAllowed(udg_pA_DTAX_SCPlayers[5],'E01L',0)
endfunction
function ReturnHeroName takes unit pWho returns string
return udg_sA_DTAX_HeroNames[GetUnitPointValue(pWho)]
endfunction
function SimError takes player pfH,string pfi returns nothing
local sound lfI=CreateSoundFromLabel("InterfaceError",false,false,false,10,10)
if(GetLocalPlayer()==pfH)then
if(pfi!="")and(pfi!=null)then
call ClearTextMessages()
call DisplayTimedTextToPlayer(pfH,.5,-1.,2.,"|cffffcc00"+pfi+"|r")
endif
call StartSound(lfI)
endif
call KillSoundWhenDone(lfI)
endfunction
function DropOrder takes unit pfo returns nothing
call PauseUnit(pfo,true)
call IssueImmediateOrderById(pfo,OrderId("stop"))
call PauseUnit(pfo,false)
endfunction
function SafeX takes real pxx returns real
local real lfr=GetRectMinX(bj_mapInitialPlayableArea)+50
if(pxx<lfr)then
return lfr
endif
set lfr=GetRectMaxX(bj_mapInitialPlayableArea)-50
if(pxx>lfr)then
return lfr
endif
return pxx
endfunction
function SafeY takes real pyy returns real
local real lfr=GetRectMinY(bj_mapInitialPlayableArea)+50
if(pyy<lfr)then
return lfr
endif
set lfr=GetRectMaxY(bj_mapInitialPlayableArea)-50
if(pyy>lfr)then
return lfr
endif
return pyy
endfunction
function SpellPreload takes integer pfS returns nothing
local unit luu=CreateUnit(Player(15),'e01W',0,0,270)
call UnitAddAbility(luu,pfS)
call UnitRemoveAbility(luu,pfS)
call RemoveUnit(luu)
endfunction
function KillDestructableEnum takes nothing returns nothing
call KillDestructable(GetEnumDestructable())
endfunction
function DropUnit takes unit pfU returns nothing
call FastFlush(H2Tx(pfU))
call RemoveUnit(pfU)
endfunction
function InventoryItem takes unit pEU,integer pfX returns item
local integer lfy
local item lfY
set lfy=0
loop
exitwhen lfy>5
set lfY=UnitItemInSlot(pEU,lfy)
if(lfY!=null)and(GetItemTypeId(lfY)==pfX)then
return UnitItemInSlot(pEU,lfy)
endif
set lfy=lfy+1
endloop
return null
endfunction
function ReturnMin takes integer paa,integer pbb returns integer
if(paa<pbb)then
return paa
else
return pbb
endif
endfunction
function ReturnMax takes integer paa,integer pbb returns integer
if(paa<pbb)then
return pbb
else
return paa
endif
endfunction
function ReturnMaxReal takes real paa,real pbb returns real
if(paa<pbb)then
return pbb
else
return paa
endif
endfunction
function MultyEcho takes force pFF,real pfl,string pFg returns nothing
if(IsPlayerInForce(GetLocalPlayer(),pFF))then
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,udg_A6,pfl,pFg)
endif
endfunction
function DestroyTriggerEx takes trigger ptt returns nothing
call DestroyTrigger(ptt)
endfunction
function KillTimer takes timer ptt returns nothing
call PauseTimer(ptt)
call FastFlush(H2Tx(ptt))
call DestroyTimer(ptt)
endfunction
function gDgD takes unit pfU returns nothing
call UnitRemoveAbility(pfU,'A0AZ')
call UnitRemoveAbility(pfU,'A09J')
call UnitRemoveAbility(pfU,'A0KT')
call UnitRemoveAbility(pfU,'A0NW')
call UnitRemoveAbility(pfU,'A0NU')
call UnitRemoveAbility(pfU,'A0OW')
call UnitRemoveAbility(pfU,'A0OV')
call UnitRemoveAbility(pfU,'A0OX')
call UnitRemoveAbility(pfU,'A0OY')
call UnitRemoveAbility(pfU,'A0P0')
endfunction
function k8k8 takes unit pEU returns location
return udg_locA_DTAX_waypoint_locations[GetUnitAbilityLevel(pEU,udg_i_DTAX_creep_waypoint_ability_id)]
endfunction
function CVReturnUnit takes unit pEU returns unit
return GetUnitUserData(pEU)
return null
endfunction
function SwapDeclined takes nothing returns nothing
local player lMe=GetTriggerPlayer()
local player lmC=GetPlayer(H2Tx(GetTriggeringTrigger()),"ToSwapTo")
call DisplayTimedTextToPlayer(lmC,0,0,20,GetPlayerName(lMe)+" has declined your request to swap heroes.")
endfunction
function mBmB takes nothing returns nothing
if(GetUnitTypeId(GetEnumUnit())=='n004')then
call RemoveUnit(GetEnumUnit())
endif
if(GetUnitTypeId(GetEnumUnit())=='o003')then
call RemoveUnit(GetEnumUnit())
endif
endfunction
function HeroSwapMain takes nothing returns nothing
local player lMe=GetTriggerPlayer()
local player lmC=GetPlayer(H2Tx(GetTriggeringTrigger()),"ToSwapTo")
local unit lmD=udg_uA_DTAX_player_hero_unit[GetPlayerId(lMe)]
local unit lme=udg_uA_DTAX_player_hero_unit[GetPlayerId(lmC)]
local unit lmE=CreateUnit(lMe,'e01F',0,0,0)
local group lEw=GetUnitsInRectOfPlayer(GetWorldBounds(),lMe)
if lmD==null or lme==null then
call PolledWait(2)
set lmD=udg_uA_DTAX_player_hero_unit[GetPlayerId(lMe)]
set lme=udg_uA_DTAX_player_hero_unit[GetPlayerId(lmC)]
endif
call ForGroup(lEw,function mBmB)
call DestroyGroup(lEw)
set lEw=GetUnitsInRectOfPlayer(GetWorldBounds(),lmC)
call ForGroup(lEw,function mBmB)
call DestroyGroup(lEw)
call UnitAddItem(lmE,UnitItemInSlot(lme,0))
call UnitAddItem(lmE,UnitItemInSlot(lme,1))
call UnitAddItem(lmE,UnitItemInSlot(lme,2))
call UnitAddItem(lmE,UnitItemInSlot(lme,3))
call UnitAddItem(lmE,UnitItemInSlot(lme,4))
call UnitAddItem(lmE,UnitItemInSlot(lme,5))
call UnitAddItem(lme,UnitItemInSlot(lmD,0))
call UnitAddItem(lme,UnitItemInSlot(lmD,1))
call UnitAddItem(lme,UnitItemInSlot(lmD,2))
call UnitAddItem(lme,UnitItemInSlot(lmD,3))
call UnitAddItem(lme,UnitItemInSlot(lmD,4))
call UnitAddItem(lme,UnitItemInSlot(lmD,5))
call UnitAddItem(lmD,UnitItemInSlot(lmE,0))
call UnitAddItem(lmD,UnitItemInSlot(lmE,1))
call UnitAddItem(lmD,UnitItemInSlot(lmE,2))
call UnitAddItem(lmD,UnitItemInSlot(lmE,3))
call UnitAddItem(lmD,UnitItemInSlot(lmE,4))
call UnitAddItem(lmD,UnitItemInSlot(lmE,5))
call RemoveUnit(lmE)
call SetUnitOwner(lme,lMe,true)
call SetUnitOwner(lmD,lmC,true)
set udg_uA_DTAX_player_hero_unit[GetPlayerId(lMe)]=lme
set udg_uA_DTAX_player_hero_unit[GetPlayerId(lmC)]=lmD
call ClearSelectionForPlayer(lMe)
call SelectUnitAddForPlayer(lme,lMe)
call ClearSelectionForPlayer(lmC)
call SelectUnitAddForPlayer(lmD,lmC)
endfunction
function SwapDialogButtons takes nothing returns nothing
local player lEk=GetTriggerPlayer()
local string lf5=H2Tx(lEk)
local player lmF=GetPlayer(lf5,"SwapHeroWithPlayer")
local dialog lmg=DialogCreate()
local button lmG
local unit lfU=udg_uA_DTAX_player_hero_unit[GetPlayerId(lEk)]
local trigger lmh
local button lmH
local trigger lmi
call DialogSetMessage(lmg,"Swap with "+GetPlayerName(lEk)+" ("+ReturnHeroName(lfU)+")")
set lmH=DialogAddButton(lmg,"No",0)
set lmi=CreateTrigger()
call TriggerRegisterDialogButtonEvent(lmi,lmH)
call TriggerAddAction(lmi,function SwapDeclined)
call SetHandle(H2Tx(lmi),"ToSwapTo",lEk)
set lmG=DialogAddButton(lmg,"Yes",1)
set lmh=CreateTrigger()
call TriggerRegisterDialogButtonEvent(lmh,lmG)
call TriggerAddAction(lmh,function HeroSwapMain)
call SetHandle(H2Tx(lmh),"ToSwapTo",lEk)
call DialogDisplay(lmF,lmg,true)
call PolledWait(20)
call DialogDisplay(lmF,lmg,false)
call PolledWait(1)
call DialogDestroy(lmg)
endfunction
function InitTrig_Core takes nothing returns nothing
endfunction
function SetString takes string pTable,string pKey,string pData returns nothing
call StoreString(udg_gc_DTAX_Core,pTable,pKey,pData)
endfunction
function GetTrigAction takes string pTable,string pKey returns triggeraction
return GetStoredInteger(udg_gc_DTAX_Core,pTable,pKey)
return null
endfunction
function GetString takes string pTable,string pKey returns string
return GetStoredString(udg_gc_DTAX_Core,pTable,pKey)
endfunction
function PlayerDefeat takes player pWho returns nothing
local trigger ltt=CreateTrigger()
local dialog ldd=DialogCreate()
call RemovePlayer(pWho,PLAYER_GAME_RESULT_DEFEAT)
set bj_changeLevelShowScores=true
call DialogSetMessage(ldd,"Defeat!")
set ltt=CreateTrigger()
call TriggerRegisterDialogButtonEvent(ltt,DialogAddButton(ldd,"Quit Game",GetLocalizedHotkey("GAMEOVER_QUIT_MISSION")))
call TriggerAddAction(ltt,function CustomDefeatQuitBJ)
call DialogDisplay(pWho,ldd,true)
call VolumeGroupSetVolumeForPlayerBJ(pWho,SOUND_VOLUMEGROUP_UI,1.)
call StartSoundForPlayerBJ(pWho,bj_defeatDialogSound)
endfunction
function PlayerWin takes player pWho returns nothing
local trigger ltt=CreateTrigger()
local dialog ldd=DialogCreate()
call RemovePlayer(pWho,PLAYER_GAME_RESULT_VICTORY)
set bj_changeLevelShowScores=true
call DialogSetMessage(ldd,GetLocalizedString("GAMEOVER_VICTORY_MSG"))
set ltt=CreateTrigger()
call TriggerRegisterDialogButtonEvent(ltt,DialogAddButton(ldd,"Quit Game",GetLocalizedHotkey("GAMEOVER_QUIT_MISSION")))
call TriggerAddAction(ltt,function CustomVictoryQuitBJ)
call DialogDisplay(pWho,ldd,true)
call VolumeGroupSetVolumeForPlayerBJ(pWho,SOUND_VOLUMEGROUP_UI,1.)
call StartSoundForPlayerBJ(pWho,bj_victoryDialogSound)
endfunction
function AliveAllyCreep takes nothing returns boolean
return IsUnitAlly(GetFilterUnit(),GetOwningPlayer(udg_u_DTAX_temp))and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>0 and(GetOwningPlayer(GetFilterUnit())==udg_pA_DTAX_SEPlayers[0])or(GetOwningPlayer(GetFilterUnit())==udg_pA_DTAX_SCPlayers[0])
endfunction
function EuEu takes unit pEU,real pEv,real pEV returns boolean
local group lEw=CreateGroup()
local boolexpr lEW=Condition(function AliveAllyCreep)
local real lxx
local real lyy
if PlayerIsSentinel(GetOwningPlayer(pEU))then
set lxx=4575
set lyy=4375
else
set lxx=-5000
set lyy=-5500
endif
if(lxx-pEv)*(lxx-pEv)+(lyy-pEV)*(lyy-pEV)>9000000 then
return false
endif
set udg_u_DTAX_temp=pEU
call GroupEnumUnitsInRange(lEw,lxx,lyy,3000,lEW)
call DestroyBoolExpr(lEW)
if CountUnitsInGroup(lEw)>0 then
call DestroyGroup(lEw)
return false
endif
call DestroyGroup(lEw)
return true
endfunction
function EyEy takes nothing returns integer
local integer lEY=GetRandomInt(udg_i_DTAX_selectable_hero_types_start,udg_i_DTAX_selectable_hero_types_finish)
local integer lEz=udg_iA_DTAX_selectable_hero_types[lEY]
set lEz=udg_iA_DTAX_selectable_hero_types[lEY]
if(udg_i_DTAX_selectable_hero_types_start==udg_i_DTAX_selectable_hero_types_finish)then
set udg_iA_DTAX_selectable_hero_types[lEY]=0
return lEz
endif
if(lEY==udg_i_DTAX_selectable_hero_types_finish)then
set udg_i_DTAX_selectable_hero_types_finish=udg_i_DTAX_selectable_hero_types_finish-1
return lEz
endif
set udg_iA_DTAX_selectable_hero_types[lEY]=udg_iA_DTAX_selectable_hero_types[udg_i_DTAX_selectable_hero_types_finish]
set udg_i_DTAX_selectable_hero_types_finish=udg_i_DTAX_selectable_hero_types_finish-1
return lEz
endfunction
function HexChar2Digit takes string pChar returns integer
if pChar=="a"then
return 10
elseif pChar=="b"then
return 11
elseif pChar=="c"then
return 12
elseif pChar=="d"then
return 13
elseif pChar=="e"then
return 14
elseif pChar=="f"then
return 15
else
return S2I(pChar)
endif
endfunction
function HexString2Digit takes string pString returns integer
return HexChar2Digit(SubString(pString,0,1))*16+HexChar2Digit(SubString(pString,1,2))
endfunction
function E7E7 takes integer pE8 returns boolean
local integer lii=1
loop
exitwhen lii>udg_A3
if pE8==udg_iA_DTAX_ItemSpells[lii]then
return false
endif
set lii=lii+1
endloop
return true
endfunction
function SimBountyForPlayer takes player pWho,integer pMuch returns nothing
local texttag ltt=CreateTextTag()
call SetPlayerState(pWho,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(pWho,PLAYER_STATE_RESOURCE_GOLD)+pMuch)
call SetTextTagText(ltt,"+"+I2S(pMuch),.025)
call SetTextTagPosUnit(ltt,udg_uA_DTAX_player_hero_unit[GetPlayerId(pWho)],0)
call SetTextTagColor(ltt,255,220,0,255)
call SetTextTagVelocity(ltt,0,.03)
if GetLocalPlayer()==pWho then
call SetTextTagVisibility(ltt,true)
else
call SetTextTagVisibility(ltt,false)
endif
call SetTextTagFadepoint(ltt,2)
call SetTextTagLifespan(ltt,3)
call SetTextTagPermanent(ltt,false)
endfunction
function UnitAddTowerBountyTeam takes player pWho returns nothing
local integer lxx=1
if IsPlayerAlly(pWho,udg_pA_DTAX_SEPlayers[0])then
loop
exitwhen lxx>5
if udg_pA_DTAX_SEPlayers[lxx]!=pWho then
call SimBountyForPlayer(udg_pA_DTAX_SEPlayers[lxx],200)
endif
set lxx=lxx+1
endloop
endif
set lxx=1
if IsPlayerAlly(pWho,udg_pA_DTAX_SCPlayers[0])then
loop
exitwhen lxx>5
if udg_pA_DTAX_SCPlayers[lxx]!=pWho then
call SimBountyForPlayer(udg_pA_DTAX_SCPlayers[lxx],200)
endif
set lxx=lxx+1
endloop
endif
endfunction
function UnitAddTowerBounty takes unit pWho returns nothing
if IsUnitAlly(GetDyingUnit(),GetOwningPlayer(GetKillingUnit()))then
return
endif
if GetOwningPlayer(pWho)==udg_pA_DTAX_SEPlayers[0]then
call SimBountyForPlayer(udg_pA_DTAX_SEPlayers[1],200)
call SimBountyForPlayer(udg_pA_DTAX_SEPlayers[2],200)
call SimBountyForPlayer(udg_pA_DTAX_SEPlayers[3],200)
call SimBountyForPlayer(udg_pA_DTAX_SEPlayers[4],200)
call SimBountyForPlayer(udg_pA_DTAX_SEPlayers[5],200)
elseif IsUnitAlly(pWho,udg_pA_DTAX_SEPlayers[0])then
call UnitAddTowerBountyTeam(GetOwningPlayer(pWho))
endif
if GetOwningPlayer(pWho)==udg_pA_DTAX_SCPlayers[0]then
call SimBountyForPlayer(udg_pA_DTAX_SCPlayers[1],200)
call SimBountyForPlayer(udg_pA_DTAX_SCPlayers[2],200)
call SimBountyForPlayer(udg_pA_DTAX_SCPlayers[3],200)
call SimBountyForPlayer(udg_pA_DTAX_SCPlayers[4],200)
call SimBountyForPlayer(udg_pA_DTAX_SCPlayers[5],200)
elseif IsUnitAlly(pWho,udg_pA_DTAX_SCPlayers[0])then
call UnitAddTowerBountyTeam(GetOwningPlayer(pWho))
endif
endfunction
function HeroDenyAllNoFlag takes integer pHero returns nothing
call SetPlayerTechMaxAllowed(udg_pA_DTAX_SEPlayers[1],pHero,0)
call SetPlayerTechMaxAllowed(udg_pA_DTAX_SEPlayers[2],pHero,0)
call SetPlayerTechMaxAllowed(udg_pA_DTAX_SEPlayers[3],pHero,0)
call SetPlayerTechMaxAllowed(udg_pA_DTAX_SEPlayers[4],pHero,0)
call SetPlayerTechMaxAllowed(udg_pA_DTAX_SEPlayers[5],pHero,0)
call SetPlayerTechMaxAllowed(udg_pA_DTAX_SCPlayers[1],pHero,0)
call SetPlayerTechMaxAllowed(udg_pA_DTAX_SCPlayers[2],pHero,0)
call SetPlayerTechMaxAllowed(udg_pA_DTAX_SCPlayers[3],pHero,0)
call SetPlayerTechMaxAllowed(udg_pA_DTAX_SCPlayers[4],pHero,0)
call SetPlayerTechMaxAllowed(udg_pA_DTAX_SCPlayers[5],pHero,0)
endfunction
function fBfB takes player pEk returns nothing
local integer lfc
local integer lfC
local location lfd
local integer lEY
local boolean lGotHero=false
set udg_bA_DTAX_player_randomed[GetPlayerId(pEk)]=true
if PlayerIsSentinel(pEk)then
set lfc=udg_i_DTAX_FirstSEHero
set lfC=udg_i_DTAX_LastSEHero
set lfd=GetRectCenter(gg_rct_SentinelTavernsRect)
else
set lfc=udg_i_DTAX_FirstSCHero
set lfC=udg_i_DTAX_LastSCHero
set lfd=GetRectCenter(gg_rct_ScourgeTavernsRect)
endif
if udg_b_DTAX_is_allpick_mode then
if(GetRandomInt(1,2)==1)then
set lfc=udg_i_DTAX_FirstSEHero
set lfC=udg_i_DTAX_LastSEHero
else
set lfc=udg_i_DTAX_FirstSCHero
set lfC=udg_i_DTAX_LastSCHero
endif
endif
loop
set lEY=GetRandomInt(lfc,lfC)
exitwhen udg_bA_DTAX_used_hero_types_SAME1[lEY]==false
endloop
if udg_b_DTAX_is_dupe_mode==false then
call HeroDenyAllNoFlag(udg_iA_DTAX_HeroTypes[lEY])
set udg_bA_DTAX_used_hero_types_SAME1[lEY]=true
endif
call CreateUnitAtLoc(pEk,udg_iA_DTAX_HeroTypes[lEY],lfd,0)
call RemoveLocation(lfd)
endfunction
function IsDay takes nothing returns boolean
if(GetTimeOfDay()>6. and GetTimeOfDay()<18.)then
return true
else
return false
endif
endfunction
function ExecuteFuncEx takes string pFunc,boolean pIsTrue returns nothing
if pIsTrue then
call ExecuteFunc(pFunc)
endif
endfunction
function ReturnMinReal takes real paa,real pbb returns real
if(paa<pbb)then
return paa
else
return pbb
endif
endfunction
function DelayedDamageTimer takes nothing returns nothing
local string lf5=H2Tx(GetExpiredTimer())
local unit lEU=GetUnit(lf5,"Unit")
call SetUnitState(lEU,UNIT_STATE_LIFE,GetUnitState(lEU,UNIT_STATE_LIFE)+GetReal(lf5,"Damage"))
endfunction
function DelayedDamage takes unit pEU,real pf7 returns nothing
local timer ltt=CreateTimer()
local string lf5=H2Tx(ltt)
call SetReal(lf5,"Damage",pf7)
call SetHandle(lf5,"Unit",pEU)
call TimerStart(ltt,0,false,function DelayedDamageTimer)
endfunction
function DelayedDamageCheck takes unit pEU,real pf7 returns nothing
local real lf9=GetUnitState(pEU,UNIT_STATE_MAX_LIFE)
local real lFa=GetUnitState(pEU,UNIT_STATE_LIFE)
if pf7>(lf9-lFa)then
if pf7>=lFa then
call SetUnitState(pEU,UNIT_STATE_LIFE,lf9)
call DelayedDamage(pEU,pf7-(lf9-lFa))
else
call DelayedDamage(pEU,pf7)
endif
else
call SetUnitState(pEU,UNIT_STATE_LIFE,GetUnitState(pEU,UNIT_STATE_LIFE)+pf7)
endif
endfunction
function FDFD takes unit pFb,unit pFB returns real
local real lFC=GetUnitX(pFb)
local real lFd=GetUnitY(pFb)
local real lEv=GetUnitX(pFB)
local real lEV=GetUnitY(pFB)
if pFb==null or pFB==null then
return 0x540BE3FF
else
return SquareRoot((lFC-lEv)*(lFC-lEv)+(lFd-lEV)*(lFd-lEV))
endif
endfunction
function ReturnTrueRange takes unit pFb,location pFB returns real
local real lFC=GetUnitX(pFb)
local real lFd=GetUnitY(pFb)
local real lEv=GetLocationX(pFB)
local real lEV=GetLocationY(pFB)
if pFb==null then
return 0x540BE3FF
else
return SquareRoot((lFC-lEv)*(lFC-lEv)+(lFd-lEV)*(lFd-lEV))
endif
endfunction
function MaxMana takes unit pEU returns nothing
call SetUnitState(pEU,UNIT_STATE_MANA,GetUnitState(pEU,UNIT_STATE_MAX_MANA))
endfunction
function PauseAllUnitsMain takes nothing returns nothing
call PauseAllUnitsBJ(true)
endfunction
function PauseAllUnitsEx takes nothing returns nothing
local timer ltt=CreateTimer()
call TimerStart(ltt,1,true,function PauseAllUnitsMain)
endfunction
function TimedEffectClean takes nothing returns nothing
local trigger ltt=GetTriggeringTrigger()
local string lf5=H2Tx(ltt)
call DestroyEffect(GetFX(lf5,"fx"))
call FastFlush(lf5)
call DestroyTriggerEx(ltt)
endfunction
function TimedEffect takes string pFk,unit pEU,string pFK,integer pfl returns nothing
local effect lfx=AddSpecialEffectTarget(pFk,pEU,pFK)
local trigger ltt=CreateTrigger()
local string lf5=H2Tx(ltt)
call SetHandle(lf5,"fx",lfx)
call TriggerRegisterUnitEvent(ltt,pEU,EVENT_UNIT_DEATH)
call TriggerRegisterTimerEvent(ltt,pfl,false)
call TriggerAddAction(ltt,function TimedEffectClean)
endfunction
function ItemOfType takes unit pEU,integer pfX returns item
local integer lfy=0
local item lfY
loop
exitwhen lfy==6
set lfY=UnitItemInSlot(pEU,lfy)
if lfY!=null and GetItemTypeId(lfY)==pfX then
return lfY
endif
set lfy=lfy+1
endloop
return null
endfunction
function GetRange takes real px1,real py1,real px2,real py2 returns real
return SquareRoot((px1-px2)*(px1-px2)+(py1-py2)*(py1-py2))
endfunction
function AngleFromUnits takes unit paa,unit pbb returns real
return bj_RADTODEG*Atan2(GetUnitY(pbb)-GetUnitY(paa),GetUnitX(pbb)-GetUnitX(paa))
endfunction
function DamageWithTypeDB takes unit pFb,unit pFB,integer pFP,real pf7 returns nothing
if pFP==0 then
return
endif
if pFP==udg_dr then
call UnitDamageTarget(pFb,pFB,pf7,true,true,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_FIRE,WEAPON_TYPE_WHOKNOWS)
elseif pFP==udg_dR then
call UnitDamageTarget(pFb,pFB,pf7,true,true,ATTACK_TYPE_HERO,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
elseif pFP==udg_ds then
call UnitDamageTarget(pFb,pFB,pf7,true,true,ATTACK_TYPE_HERO,DAMAGE_TYPE_FIRE,WEAPON_TYPE_WHOKNOWS)
endif
endfunction
function FT takes nothing returns nothing
set udg_eE[GetPlayerId(udg_pA_DTAX_SEPlayers[1])]=0
set udg_ef[GetPlayerId(udg_pA_DTAX_SEPlayers[1])]=66
set udg_eF[GetPlayerId(udg_pA_DTAX_SEPlayers[1])]=255
set udg_eE[GetPlayerId(udg_pA_DTAX_SEPlayers[2])]=48
set udg_ef[GetPlayerId(udg_pA_DTAX_SEPlayers[2])]=230
set udg_eF[GetPlayerId(udg_pA_DTAX_SEPlayers[2])]=185
set udg_eE[GetPlayerId(udg_pA_DTAX_SEPlayers[3])]=50
set udg_ef[GetPlayerId(udg_pA_DTAX_SEPlayers[3])]=0
set udg_eF[GetPlayerId(udg_pA_DTAX_SEPlayers[3])]=129
set udg_eE[GetPlayerId(udg_pA_DTAX_SEPlayers[4])]=255
set udg_ef[GetPlayerId(udg_pA_DTAX_SEPlayers[4])]=252
set udg_eF[GetPlayerId(udg_pA_DTAX_SEPlayers[4])]=1
set udg_eE[GetPlayerId(udg_pA_DTAX_SEPlayers[5])]=255
set udg_ef[GetPlayerId(udg_pA_DTAX_SEPlayers[5])]=50
set udg_eF[GetPlayerId(udg_pA_DTAX_SEPlayers[5])]=0
set udg_eE[GetPlayerId(udg_pA_DTAX_SCPlayers[1])]=220
set udg_ef[GetPlayerId(udg_pA_DTAX_SCPlayers[1])]=50
set udg_eF[GetPlayerId(udg_pA_DTAX_SCPlayers[1])]=50
set udg_eE[GetPlayerId(udg_pA_DTAX_SCPlayers[2])]=50
set udg_ef[GetPlayerId(udg_pA_DTAX_SCPlayers[2])]=50
set udg_eF[GetPlayerId(udg_pA_DTAX_SCPlayers[2])]=50
set udg_eE[GetPlayerId(udg_pA_DTAX_SCPlayers[3])]=75
set udg_ef[GetPlayerId(udg_pA_DTAX_SCPlayers[3])]=150
set udg_eF[GetPlayerId(udg_pA_DTAX_SCPlayers[3])]=190
set udg_eE[GetPlayerId(udg_pA_DTAX_SCPlayers[4])]=16
set udg_ef[GetPlayerId(udg_pA_DTAX_SCPlayers[4])]=60
set udg_eF[GetPlayerId(udg_pA_DTAX_SCPlayers[4])]=18
set udg_eE[GetPlayerId(udg_pA_DTAX_SCPlayers[5])]=68
set udg_ef[GetPlayerId(udg_pA_DTAX_SCPlayers[5])]=42
set udg_eF[GetPlayerId(udg_pA_DTAX_SCPlayers[5])]=4
endfunction
function HostAlloc takes nothing returns nothing
local integer lEq=1
set udg_p_DTAX_Host=udg_pA_DTAX_SEPlayers[1]
loop
exitwhen PlayerIsActive(udg_p_DTAX_Host)or lEq>5
set lEq=lEq+1
set udg_p_DTAX_Host=udg_pA_DTAX_SEPlayers[lEq]
endloop
if not PlayerIsActive(udg_p_DTAX_Host)then
set udg_p_DTAX_Host=udg_pA_DTAX_SCPlayers[1]
set lEq=1
loop
exitwhen PlayerIsActive(udg_p_DTAX_Host)or lEq>5
set lEq=lEq+1
set udg_p_DTAX_Host=udg_pA_DTAX_SCPlayers[lEq]
endloop
endif
endfunction
function ColorDataBase takes nothing returns nothing
local integer lForLoop
local integer lExitPoint
set udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(udg_pA_DTAX_SEPlayers[0])]="|c00ff0303"
set udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(udg_pA_DTAX_SEPlayers[1])]="|c000042ff"
set udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(udg_pA_DTAX_SEPlayers[2])]="|c001ce6b9"
set udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(udg_pA_DTAX_SEPlayers[3])]="|c00540081"
set udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(udg_pA_DTAX_SEPlayers[4])]="|c00fffc01"
set udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(udg_pA_DTAX_SEPlayers[5])]="|c00ff8000"
set udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(udg_pA_DTAX_SCPlayers[0])]="|c0020c000"
set udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(udg_pA_DTAX_SCPlayers[1])]="|c00e55bb0"
set udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(udg_pA_DTAX_SCPlayers[2])]="|c00959697"
set udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(udg_pA_DTAX_SCPlayers[3])]="|c007ebff1"
set udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(udg_pA_DTAX_SCPlayers[4])]="|c00106246"
set udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(udg_pA_DTAX_SCPlayers[5])]="|c004e2a04"
call SetPlayerColor(udg_pA_DTAX_SEPlayers[0],PLAYER_COLOR_RED)
call SetPlayerColor(udg_pA_DTAX_SEPlayers[1],PLAYER_COLOR_BLUE)
call SetPlayerColor(udg_pA_DTAX_SEPlayers[2],PLAYER_COLOR_CYAN)
call SetPlayerColor(udg_pA_DTAX_SEPlayers[3],PLAYER_COLOR_PURPLE)
call SetPlayerColor(udg_pA_DTAX_SEPlayers[4],PLAYER_COLOR_YELLOW)
call SetPlayerColor(udg_pA_DTAX_SEPlayers[5],PLAYER_COLOR_ORANGE)
call SetPlayerColor(udg_pA_DTAX_SCPlayers[0],PLAYER_COLOR_GREEN)
call SetPlayerColor(udg_pA_DTAX_SCPlayers[1],PLAYER_COLOR_PINK)
call SetPlayerColor(udg_pA_DTAX_SCPlayers[2],PLAYER_COLOR_LIGHT_GRAY)
call SetPlayerColor(udg_pA_DTAX_SCPlayers[3],PLAYER_COLOR_LIGHT_BLUE)
call SetPlayerColor(udg_pA_DTAX_SCPlayers[4],PLAYER_COLOR_AQUA)
call SetPlayerColor(udg_pA_DTAX_SCPlayers[5],PLAYER_COLOR_BROWN)
set lForLoop=1
set lExitPoint=5
loop
if(PlayerIsActive(udg_pA_DTAX_SEPlayers[lForLoop])==false)then
call SetPlayerName(udg_pA_DTAX_SEPlayers[lForLoop],"Player "+I2S(lForLoop))
endif
if(PlayerIsActive(udg_pA_DTAX_SCPlayers[lForLoop])==false)then
call SetPlayerName(udg_pA_DTAX_SCPlayers[lForLoop],"Player "+I2S(5+lForLoop))
endif
set lForLoop=lForLoop+1
exitwhen lForLoop>lExitPoint
endloop
endfunction
function FxFx takes integer pID returns unit
if pID<=11 then
return gg_unit_n008_0090
elseif pID<=22 then
return gg_unit_n01D_0091
elseif pID<=33 then
return gg_unit_ntav_0092
elseif pID<=44 then
return gg_unit_n01N_0093
elseif pID<=59 then
return gg_unit_n005_0094
elseif pID<=70 then
return gg_unit_n01P_0095
elseif pID<=81 then
return gg_unit_n007_0096
elseif pID<=92 then
return gg_unit_n01B_0097
endif
return null
endfunction
function ItemIconDataBaseGet takes item pF0 returns string
if pF0==null then
return"UI\\Widgets\\Console\\Undead\\undead-inventory-slotfiller.blp"
endif
if GetItemType(pF0)==ITEM_TYPE_POWERUP then
return"ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp"
endif
return GetString("ItemIcon",I2S(GetItemTypeId(pF0)))
endfunction
function gege takes unit pgE returns boolean
return GetUnitTypeId(pgE)=='H00I'or GetUnitTypeId(pgE)=='H00J'
endfunction
function HsHs takes unit pgE,location pHS returns nothing
local string lf5=H2Tx(GetOwningPlayer(pgE))
local unit lgg=GetUnit(lf5,"Kobold0")
local unit lgG=GetUnit(lf5,"Kobold1")
local unit lgh=GetUnit(lf5,"Kobold2")
local unit lgH=GetUnit(lf5,"Kobold3")
if lgg!=null then
call ReviveHeroLoc(lgg,pHS,true)
call gDgD(lgg)
endif
if lgG!=null then
call ReviveHeroLoc(lgG,pHS,true)
call gDgD(lgG)
endif
if lgh!=null then
call ReviveHeroLoc(lgh,pHS,true)
call gDgD(lgh)
endif
if lgH!=null then
call ReviveHeroLoc(lgH,pHS,true)
call gDgD(lgH)
endif
endfunction
function BountyOverUnitForPlayer takes player pHT,integer pHu,unit pgE returns nothing
local texttag ltt=CreateTextTag()
local string lss
call SetPlayerState(pHT,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(pHT,PLAYER_STATE_RESOURCE_GOLD)+pHu)
call SetTextTagText(ltt,"+"+I2S(pHu),.025)
call SetTextTagPosUnit(ltt,pgE,0)
call SetTextTagColor(ltt,255,220,0,255)
call SetTextTagVelocity(ltt,0,.03)
if GetLocalPlayer()==pHT then
call SetTextTagVisibility(ltt,true)
set lss="UI\\Feedback\\GoldCredit\\GoldCredit.mdl"
else
call SetTextTagVisibility(ltt,false)
set lss=""
endif
if GetUnitState(pgE,UNIT_STATE_LIFE)>.5 then
call DestroyEffect(AddSpecialEffectTarget(lss,pgE,"overhead"))
endif
call SetTextTagFadepoint(ltt,2)
call SetTextTagLifespan(ltt,3)
call SetTextTagPermanent(ltt,false)
endfunction
function I8I8 takes player ppp returns integer
return udg_iA_DTAX_iA_kill_death_counter[GetPlayerId(ppp)]
endfunction
function I9I9 takes player ppp returns integer
return udg_iA_DTAX_kill_counter[GetPlayerId(ppp)]
endfunction
function jaja takes player ppp returns integer
return udg_iA_DTAX_enemy_mobs_killed[GetPlayerId(ppp)]
endfunction
function jAjA takes player ppp returns integer
return udg_iA_DTAX_ally_mobs_killed[GetPlayerId(ppp)]
endfunction
function jbjb takes nothing returns nothing
local gamecache ljB
local integer lii
local player lpp
local string lid
call HostAlloc()
call FlushGameCache(InitGameCache("dr.x"))
set ljB=InitGameCache("dr.x")
set lii=1
loop
exitwhen lii>5
set lpp=udg_pA_DTAX_SEPlayers[lii]
set lid=I2S(GetPlayerId(lpp))
call StoreInteger(ljB,lid,"1",I8I8(lpp))
call StoreInteger(ljB,lid,"2",I9I9(lpp))
call StoreInteger(ljB,lid,"3",jaja(lpp))
call StoreInteger(ljB,lid,"4",jAjA(lpp))
set lpp=udg_pA_DTAX_SCPlayers[lii]
set lid=I2S(GetPlayerId(lpp))
call StoreInteger(ljB,lid,"1",I8I8(lpp))
call StoreInteger(ljB,lid,"2",I9I9(lpp))
call StoreInteger(ljB,lid,"3",jaja(lpp))
call StoreInteger(ljB,lid,"4",jAjA(lpp))
if GetLocalPlayer()==udg_p_DTAX_Host then
call SyncStoredInteger(ljB,I2S(GetPlayerId(udg_pA_DTAX_SEPlayers[lii])),"1")
call SyncStoredInteger(ljB,I2S(GetPlayerId(udg_pA_DTAX_SEPlayers[lii])),"2")
call SyncStoredInteger(ljB,I2S(GetPlayerId(udg_pA_DTAX_SEPlayers[lii])),"3")
call SyncStoredInteger(ljB,I2S(GetPlayerId(udg_pA_DTAX_SEPlayers[lii])),"4")
call SyncStoredInteger(ljB,I2S(GetPlayerId(udg_pA_DTAX_SCPlayers[lii])),"1")
call SyncStoredInteger(ljB,I2S(GetPlayerId(udg_pA_DTAX_SCPlayers[lii])),"2")
call SyncStoredInteger(ljB,I2S(GetPlayerId(udg_pA_DTAX_SCPlayers[lii])),"3")
call SyncStoredInteger(ljB,I2S(GetPlayerId(udg_pA_DTAX_SCPlayers[lii])),"4")
endif
set lii=lii+1
endloop
endfunction
function JBJB takes group pJc,integer pJC returns nothing
local unit luu
loop
set luu=FirstOfGroup(pJc)
exitwhen(luu==null)
call GroupRemoveUnit(pJc,luu)
call SetUnitAbilityLevel(luu,udg_i_DTAX_creep_waypoint_ability_id,pJC)
endloop
endfunction
function ItemIsRune takes integer pJ9 returns boolean
return pJ9=='pres'or pJ9=='pomn'or pJ9=='pnvu'or pJ9=='fgrd'or pJ9=='I007'or pJ9=='I00D'
endfunction
function k9k9 takes unit pEU returns boolean
return(GetOwningPlayer(pEU)==udg_pA_DTAX_SEPlayers[0])or(GetOwningPlayer(pEU)==udg_pA_DTAX_SCPlayers[0])
endfunction
function KbKb takes unit pEU returns nothing
call SetUnitUserData(pEU,0)
call IssuePointOrderByIdLoc(pEU,OrderId("attack"),k8k8(pEU))
endfunction
function KBKB takes nothing returns nothing
call KbKb(GetEnumUnit())
endfunction
function KcKc takes group pJc returns nothing
call ForGroup(pJc,function KBKB)
call GroupClear(pJc)
endfunction
function KFKF takes unit pfU,unit pKg returns boolean
local unit lKG
if IsUnitEnemy(pKg,GetOwningPlayer(pfU))then
set lKG=GetUnit(H2Tx(pfU),"Attacker")
if lKG==null or lKG==pKg or not IsUnitAliveBJ(lKG)then
return true
endif
endif
return false
endfunction
function KdKd takes nothing returns nothing
local unit luu=GetEnumUnit()
if GetUnitCurrentOrder(luu)==0 or not IsUnitInRange(luu,udg_u_DTAX_temp,GetUnitAcquireRange(luu))then
call GroupRemoveUnit(udg_g_UNKNOWN_some_defenders_group,luu)
call SetUnitUserData(luu,0)
call IssuePointOrderByIdLoc(luu,OrderId("attack"),k8k8(luu))
endif
endfunction
function KDKD takes unit pEU,unit pKe returns boolean
if GetUnitTypeId(pEU)=='ebal'or GetUnitTypeId(pEU)=='umtw'then
return false
endif
if IsUnitEnemy(pEU,GetOwningPlayer(pKe))then
if GetOwningPlayer(pEU)==udg_pA_DTAX_SEPlayers[0]or GetOwningPlayer(pEU)==udg_pA_DTAX_SCPlayers[0]then
if(GetUnitUserData(pEU)==0)then
return true
endif
endif
endif
return false
endfunction
function KEKE takes nothing returns boolean
return KDKD(GetFilterUnit(),udg_u_DTAX_temp)
endfunction
function KCKC takes nothing returns nothing
call IssueTargetOrderById(GetEnumUnit(),OrderId("attack"),udg_u_DTAX_temp)
call GroupAddUnit(udg_g_UNKNOWN_some_defenders_group,GetEnumUnit())
call SetUnitUserData(GetEnumUnit(),H2Ix(udg_u_DTAX_temp))
endfunction
function KfKf takes nothing returns nothing
local unit lfU=GetUnit(H2Tx(GetExpiredTimer()),"Hero")
local string lf5=H2Tx(lfU)
call SetHandle(lf5,"Attacker",null)
call KcKc(GetGroup(lf5,"Defenders"))
endfunction
function KhKh takes unit pfU,unit pKg returns nothing
local string lf5=H2Tx(pfU)
local group lKH=GetGroup(lf5,"Defenders")
local unit lKG=GetUnit(lf5,"Attacker")
local boolexpr lbb
local group lgg
if(lKG!=pKg)and(lKG!=null)then
call KcKc(lKH)
endif
call SetHandle(lf5,"Attacker",pKg)
set udg_g_UNKNOWN_some_defenders_group=lKH
set udg_u_DTAX_temp=pKg
call ForGroup(lKH,function KdKd)
set lbb=Filter(function KEKE)
set lgg=CreateGroup()
call GroupEnumUnitsInRange(lgg,GetUnitX(pKg),GetUnitY(pKg),500,lbb)
call ForGroup(lgg,function KCKC)
call DestroyGroup(lgg)
call DestroyBoolExpr(lbb)
call TimerStart(GetTimer(lf5,"DefendTimer"),2,false,function KfKf)
endfunction
function KsKs takes unit pEU returns nothing
local integer lii=0
loop
exitwhen(lii==16)
if IsUnitAlly(pEU,Player(lii))then
call UnitShareVision(pEU,Player(lii),true)
endif
set lii=lii+1
endloop
endfunction
function L7L7 takes nothing returns boolean
if udg_A8==false then
return false
endif
if udg_bA_DTAX_player_randomed[GetPlayerId(udg_Az)] then
return false
endif
if udg_b_DTAX_select_game_mode_time_elapsed==false then
return false
endif
if udg_uA_DTAX_player_hero_unit[GetPlayerId(udg_Az)]!=null and udg_b_DTAX_is_Reverse_mode==false then
return false
endif
if udg_bA_DTAX_player_has_repicked_hero[GetPlayerId(udg_Az)] then
return false
endif
if udg_bb[GetPlayerId(udg_Az)]and udg_b_DTAX_is_Reverse_mode==false then
return false
endif
if udg_b_DTAX_is_Reverse_mode and udg_bc[GetPlayerId(udg_Az)]then
return false
endif
return true
endfunction
function Poof_IsGeomancer takes unit pEU returns boolean
return(GetUnitTypeId(pEU)=='H00I'or GetUnitTypeId(pEU)=='H00J')and GetUnitState(pEU,UNIT_STATE_LIFE)>.5 and GetOwningPlayer(pEU)==GetOwningPlayer(GetTriggerUnit())
endfunction
function Divided_We_Stand_IsGeomancer takes unit pEU returns boolean
return GetUnitTypeId(pEU)=='H00I'or GetUnitTypeId(pEU)=='H00J'
endfunction
function Divided_We_Stand_CloneSkillBySkill takes unit pSc,integer pSd returns nothing
local string lsQ=H2Tx(GetOwningPlayer(pSc))
local unit lgg=GetUnit(lsQ,"Kobold0")
local unit lgG=GetUnit(lsQ,"Kobold1")
local unit lgh=GetUnit(lsQ,"Kobold2")
local unit lgH=GetUnit(lsQ,"Kobold3")
if lgg!=null and lgg!=pSc then
call SelectHeroSkill(lgg,pSd)
endif
if lgG!=null and lgG!=pSc then
call SelectHeroSkill(lgG,pSd)
endif
if lgh!=null and lgh!=pSc then
call SelectHeroSkill(lgh,pSd)
endif
if lgH!=null and lgH!=pSc then
call SelectHeroSkill(lgH,pSd)
endif
endfunction
function Spectral_Dagger_TrailSafe takes nothing returns nothing
local timer ltt=GetExpiredTimer()
local string lf5=H2Tx(ltt)
local unit lfo=GetUnit(lf5,"UnitVar")
local unit le3=GetUnit(lf5,"Owner")
local unit lJV
local real lOZ=GetReal(lf5,"Duration")
local integer lmZ=GetUnitAbilityLevel(le3,'A0HW')
local real lT7=GetReal(lf5,"x")
local real lT8=GetReal(lf5,"y")
local real lpC=GetUnitX(lfo)
local real lpd=GetUnitY(lfo)
if(lpC-lT7)*(lpC-lT7)+(lpd-lT8)*(lpd-lT8)>900 then
set lJV=CreateUnit(GetOwningPlayer(le3),'h002',GetUnitX(lfo),GetUnitY(lfo),0)
call SetUnitAbilityLevel(lJV,'A0I2',lmZ)
call SetUnitAbilityLevel(lJV,'A0HY',lmZ)
call UnitApplyTimedLife(lJV,'BTLF',7)
call SetReal(lf5,"x",lpC)
call SetReal(lf5,"y",lpd)
endif
set lOZ=lOZ+.2
call SetReal(lf5,"Duration",lOZ)
if lOZ>7 or GetUnitState(lfo,UNIT_STATE_LIFE)<1 then
call PauseTimer(ltt)
call FastFlush(lf5)
endif
endfunction
function Spectral_Dagger_Damage takes nothing returns nothing
local unit lFB=GetEnumUnit()
local sound lfG
local timer ltt
local string lf5
call UnitDamageTarget(udg_u_DTAX_temp,lFB,udg_r_DTAX_necrolyte_reaperscythe_ratio,true,true,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)
call GroupAddUnit(udg_g_UNKNOWN_some_defenders_group,lFB)
if IsUnitType(lFB,UNIT_TYPE_HERO)then
set ltt=CreateTimer()
set lf5=H2Tx(ltt)
set lfG=CreateSound("Sounds\\Spectral Dagger.mp3",false,true,true,10,10,"DefaultEAXON")
call SetSoundPosition(lfG,GetUnitX(lFB),GetUnitY(lFB),0)
call SetSoundDistanceCutoff(lfG,700)
call StartSound(lfG)
call KillSoundWhenDone(lfG)
call SetHandle(lf5,"UnitVar",lFB)
call SetHandle(lf5,"Owner",udg_u_DTAX_temp)
call SetReal(lf5,"x",GetUnitX(lFB))
call SetReal(lf5,"y",GetUnitY(lFB))
call TimerStart(ltt,.2,true,function Spectral_Dagger_TrailSafe)
endif
endfunction
function Spectral_Dagger_Filter takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(udg_u_DTAX_temp))and IsUnitInGroup(GetFilterUnit(),udg_g_UNKNOWN_some_defenders_group)==false and GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>1 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false
endfunction
function Reality_ImageFilter takes nothing returns boolean
return GetUnitAbilityLevel(GetFilterUnit(),'B06L')>0
endfunction
function Reality_NearestImage takes nothing returns nothing
local unit lfo
local real lFc=ReturnTrueRange(GetEnumUnit(),GetSpellTargetLoc())
if lFc<udg_r_DTAX_necrolyte_reaperscythe_ratio then
set udg_u_DTAX_temp=GetEnumUnit()
set udg_r_DTAX_necrolyte_reaperscythe_ratio=lFc
endif
endfunction
function Reality_GetImage takes nothing returns unit
local group lEw=CreateGroup()
local boolexpr lEW=Condition(function Reality_ImageFilter)
set udg_u_DTAX_temp=null
set udg_r_DTAX_necrolyte_reaperscythe_ratio=9999999
call GroupEnumUnitsOfPlayer(lEw,GetOwningPlayer(GetTriggerUnit()),lEW)
call ForGroup(lEw,function Reality_NearestImage)
call DestroyBoolExpr(lEW)
call DestroyGroup(lEw)
return udg_u_DTAX_temp
endfunction
function Poison_Touch_Slow takes unit pFb,unit pFB,integer pmZ returns nothing
local unit lJV=CreateUnit(GetOwningPlayer(pFb),'e00E',GetUnitX(pFB),GetUnitY(pFB),0)
call UnitAddAbility(lJV,'A0NJ')
call SetUnitAbilityLevel(lJV,'A0NJ',pmZ)
call IssueTargetOrderById(lJV,OrderId("slow"),pFB)
endfunction
function InitTrig_Shared takes nothing returns nothing
endfunction
function EndGameTrue takes nothing returns nothing
call EndGame(true)
endfunction
function Tavern_RemoveAllHeroes takes nothing returns nothing
local integer i=udg_i_DTAX_FirstSEHero
loop
exitwhen i>udg_i_DTAX_LastSEHero
call RemoveUnitFromStock(FxFx(i),udg_iA_DTAX_HeroTypes)
set i=i+1
endloop
set i=udg_i_DTAX_FirstSCHero
loop
exitwhen i>udg_i_DTAX_LastSCHero
call RemoveUnitFromStock(FxFx(i),udg_iA_DTAX_HeroTypes)
set i=i+1
endloop
endfunction
function Tavern_AddAllHeroes takes nothing returns nothing
local integer i=udg_i_DTAX_FirstSEHero
loop
exitwhen i>udg_i_DTAX_LastSEHero
call AddUnitToStock(FxFx(i),udg_iA_DTAX_HeroTypes,0,1)
set i=i+1
endloop
set i=udg_i_DTAX_FirstSCHero
loop
exitwhen i>udg_i_DTAX_LastSCHero
call AddUnitToStock(FxFx(i),udg_iA_DTAX_HeroTypes,0,1)
set i=i+1
endloop
endfunction
function HzHz takes nothing returns nothing
endfunction
function Roshan_Secret_Lightning takes nothing returns nothing
call DestroyEffect(AddSpecialEffect("Doodads\\Cinematic\\Lightningbolt\\Lightningbolt.mdl",2407,-496))
endfunction
function lNlN takes nothing returns nothing
local location llS=GetRectCenter(gg_rct_SentinelTavernsCenter)
local location llt=GetRectCenter(gg_rct_ScourgeTavernsCenter)
local integer lxx=1
set udg_b_DTAX_is_allpick_mode=true
loop
exitwhen lxx>5
if PlayerIsActive(udg_pA_DTAX_SEPlayers[lxx])then
call CreateUnitAtLoc(udg_pA_DTAX_SEPlayers[lxx],'n00C',llt,bj_UNIT_FACING)
endif
if PlayerIsActive(udg_pA_DTAX_SCPlayers[lxx])then
call CreateUnitAtLoc(udg_pA_DTAX_SCPlayers[lxx],'n00C',llS,bj_UNIT_FACING)
endif
set lxx=lxx+1
endloop
call RemoveLocation(llS)
call RemoveLocation(llt)
endfunction
function lMlM takes nothing returns nothing
local location llS=GetRectCenter(gg_rct_SentinelTavernsRect)
local location llt=GetRectCenter(gg_rct_ScourgeTavernsRect)
local location llY=GetRectCenter(gg_rct_SentinelHeroSpawn)
local location llz=GetRectCenter(gg_rct_ScourgeHeroSpawn)
local integer lEq=1
local integer lEQ=5
local integer lEY
set udg_b_DTAX_is_allrandom_mode=true
set udg_A8=false
call DenyHeroRandomSpawn()
if not udg_b_DTAX_is_dupe_mode then
call DenyHeroFully()
endif
set udg_i_DTAX_GLOBAL_gold_cost=400
call PanCameraToTimedLocForPlayer(udg_pA_DTAX_SEPlayers[1],llY,0)
call PanCameraToTimedLocForPlayer(udg_pA_DTAX_SEPlayers[2],llY,0)
call PanCameraToTimedLocForPlayer(udg_pA_DTAX_SEPlayers[3],llY,0)
call PanCameraToTimedLocForPlayer(udg_pA_DTAX_SEPlayers[4],llY,0)
call PanCameraToTimedLocForPlayer(udg_pA_DTAX_SEPlayers[5],llY,0)
call PanCameraToTimedLocForPlayer(udg_pA_DTAX_SCPlayers[1],llz,0)
call PanCameraToTimedLocForPlayer(udg_pA_DTAX_SCPlayers[2],llz,0)
call PanCameraToTimedLocForPlayer(udg_pA_DTAX_SCPlayers[3],llz,0)
call PanCameraToTimedLocForPlayer(udg_pA_DTAX_SCPlayers[4],llz,0)
call PanCameraToTimedLocForPlayer(udg_pA_DTAX_SCPlayers[5],llz,0)
if udg_b_DTAX_is_samehero_mode then
call SetPlayerStateBJ(udg_p_DTAX_Host,PLAYER_STATE_RESOURCE_FOOD_CAP,6)
loop
set lEY=EyEy()
exitwhen udg_bA_DTAX_used_hero_types_SAME1[lEY]==false
endloop
if PlayerIsSentinel(udg_p_DTAX_Host)then
set udg_uA_DTAX_player_hero_unit[GetPlayerId(udg_p_DTAX_Host)]=CreateUnit(udg_p_DTAX_Host,udg_iA_DTAX_HeroTypes[lEY],GetLocationX(llS),GetLocationY(llS),270)
else
set udg_uA_DTAX_player_hero_unit[GetPlayerId(udg_p_DTAX_Host)]=CreateUnit(udg_p_DTAX_Host,udg_iA_DTAX_HeroTypes[lEY],GetLocationX(llt),GetLocationY(llt),270)
endif
call RemoveLocation(llS)
call RemoveLocation(llt)
call RemoveLocation(llY)
call RemoveLocation(llz)
return
endif
set udg_A9=false
loop
exitwhen lEq>lEQ
set udg_uA_DTAX_player_hero_unit[GetPlayerId(udg_pA_DTAX_SEPlayers[lEq])]=null
if(PlayerIsActive(udg_pA_DTAX_SEPlayers[lEq]))then
loop
set lEY=EyEy()
if(udg_bA_DTAX_used_hero_types_SAME1[lEY]==false)then
if not udg_b_DTAX_is_dupe_mode then
set udg_bA_DTAX_used_hero_types_SAME1[lEY]=true
endif
call SetPlayerStateBJ(udg_pA_DTAX_SEPlayers[lEq],PLAYER_STATE_RESOURCE_FOOD_CAP,6)
call PolledWait(.01)
set udg_uA_DTAX_player_hero_unit[GetPlayerId(udg_pA_DTAX_SEPlayers[lEq])]=CreateUnitAtLoc(udg_pA_DTAX_SEPlayers[lEq],udg_iA_DTAX_HeroTypes[lEY],llS,bj_UNIT_FACING)
endif
exitwhen(udg_uA_DTAX_player_hero_unit[GetPlayerId(udg_pA_DTAX_SEPlayers[lEq])]!=null)
endloop
endif
set lEq=lEq+1
endloop
set lEq=1
set lEQ=5
loop
exitwhen lEq>lEQ
set udg_uA_DTAX_player_hero_unit[GetPlayerId(udg_pA_DTAX_SCPlayers[lEq])]=null
if(PlayerIsActive(udg_pA_DTAX_SCPlayers[lEq]))then
loop
set lEY=EyEy()
if(udg_bA_DTAX_used_hero_types_SAME1[lEY]==false)then
if not udg_b_DTAX_is_dupe_mode then
set udg_bA_DTAX_used_hero_types_SAME1[lEY]=true
endif
call SetPlayerStateBJ(udg_pA_DTAX_SCPlayers[lEq],PLAYER_STATE_RESOURCE_FOOD_CAP,6)
call PolledWait(.01)
set udg_uA_DTAX_player_hero_unit[GetPlayerId(udg_pA_DTAX_SCPlayers[lEq])]=CreateUnitAtLoc(udg_pA_DTAX_SCPlayers[lEq],udg_iA_DTAX_HeroTypes[lEY],llt,bj_UNIT_FACING)
endif
exitwhen(udg_uA_DTAX_player_hero_unit[GetPlayerId(udg_pA_DTAX_SCPlayers[lEq])]!=null)
endloop
endif
set lEq=lEq+1
endloop
if(udg_b_DTAX_is_deathmatch_mode==false)then
set udg_A9=true
endif
call RemoveLocation(llS)
call RemoveLocation(llt)
call RemoveLocation(llY)
call RemoveLocation(llz)
endfunction
function lplp takes nothing returns nothing
local integer array lLf
local player llx
local player llX
local boolean lly=false
set udg_b_DTAX_league_mode=true
set udg_A9=false
set udg_A8=false
call DenyHeroRandomSpawn()
call HeroDenyAll('N01I')
call HeroDenyAll('E01C')
call HeroDenyAll('N01V')
call HeroDenyAll('H00I')
call HeroDenyAll('N01W')
call DisableTrigger(gg_trg_NormalGoldIncome)
set lLf[GetPlayerId(udg_pA_DTAX_SEPlayers[1])]=GetPlayerState(udg_pA_DTAX_SEPlayers[1],PLAYER_STATE_RESOURCE_GOLD)
set lLf[GetPlayerId(udg_pA_DTAX_SEPlayers[2])]=GetPlayerState(udg_pA_DTAX_SEPlayers[2],PLAYER_STATE_RESOURCE_GOLD)
set lLf[GetPlayerId(udg_pA_DTAX_SEPlayers[3])]=GetPlayerState(udg_pA_DTAX_SEPlayers[3],PLAYER_STATE_RESOURCE_GOLD)
set lLf[GetPlayerId(udg_pA_DTAX_SEPlayers[4])]=GetPlayerState(udg_pA_DTAX_SEPlayers[4],PLAYER_STATE_RESOURCE_GOLD)
set lLf[GetPlayerId(udg_pA_DTAX_SEPlayers[5])]=GetPlayerState(udg_pA_DTAX_SEPlayers[5],PLAYER_STATE_RESOURCE_GOLD)
set lLf[GetPlayerId(udg_pA_DTAX_SCPlayers[1])]=GetPlayerState(udg_pA_DTAX_SCPlayers[1],PLAYER_STATE_RESOURCE_GOLD)
set lLf[GetPlayerId(udg_pA_DTAX_SCPlayers[2])]=GetPlayerState(udg_pA_DTAX_SCPlayers[2],PLAYER_STATE_RESOURCE_GOLD)
set lLf[GetPlayerId(udg_pA_DTAX_SCPlayers[3])]=GetPlayerState(udg_pA_DTAX_SCPlayers[3],PLAYER_STATE_RESOURCE_GOLD)
set lLf[GetPlayerId(udg_pA_DTAX_SCPlayers[4])]=GetPlayerState(udg_pA_DTAX_SCPlayers[4],PLAYER_STATE_RESOURCE_GOLD)
set lLf[GetPlayerId(udg_pA_DTAX_SCPlayers[5])]=GetPlayerState(udg_pA_DTAX_SCPlayers[5],PLAYER_STATE_RESOURCE_GOLD)
call SetPlayerState(udg_pA_DTAX_SEPlayers[1],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(udg_pA_DTAX_SEPlayers[2],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(udg_pA_DTAX_SEPlayers[3],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(udg_pA_DTAX_SEPlayers[4],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(udg_pA_DTAX_SEPlayers[5],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(udg_pA_DTAX_SCPlayers[1],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(udg_pA_DTAX_SCPlayers[2],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(udg_pA_DTAX_SCPlayers[3],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(udg_pA_DTAX_SCPlayers[4],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(udg_pA_DTAX_SCPlayers[5],PLAYER_STATE_RESOURCE_GOLD,0)
call PolledWait(15.-TimerGetElapsed(udg_t_DTAX_game_time))
call SuspendTimeOfDay(true)
if GetRandomInt(1,2)==1 then
set lly=true
endif
if lly then
set llx=udg_pA_DTAX_SEPlayers[1]
else
set llx=udg_pA_DTAX_SCPlayers[1]
endif
call MultyEcho(bj_FORCE_ALL_PLAYERS,15.,udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(llx)]+GetPlayerName(llx)+"|r"+" has 20 seconds to pick a hero.")
call SetPlayerState(llx,PLAYER_STATE_RESOURCE_GOLD,lLf[GetPlayerId(llx)])
call PolledWait(20.)
call HeroDenyForPlayer(llx)
if lly then
set llx=udg_pA_DTAX_SCPlayers[1]
set llX=udg_pA_DTAX_SCPlayers[2]
else
set llx=udg_pA_DTAX_SEPlayers[1]
set llX=udg_pA_DTAX_SEPlayers[2]
endif
call MultyEcho(bj_FORCE_ALL_PLAYERS,15.,udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(llx)]+GetPlayerName(llx)+"|r"+" has 20 seconds to pick a hero.")
call MultyEcho(bj_FORCE_ALL_PLAYERS,15.,udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(llX)]+GetPlayerName(llX)+"|r"+" has 20 seconds to pick a hero.")
call SetPlayerState(llx,PLAYER_STATE_RESOURCE_GOLD,lLf[GetPlayerId(llx)])
call SetPlayerState(llX,PLAYER_STATE_RESOURCE_GOLD,lLf[GetPlayerId(llX)])
call PolledWait(20.)
call HeroDenyForPlayer(llx)
call HeroDenyForPlayer(llX)
if lly then
set llx=udg_pA_DTAX_SEPlayers[2]
set llX=udg_pA_DTAX_SEPlayers[3]
else
set llx=udg_pA_DTAX_SCPlayers[2]
set llX=udg_pA_DTAX_SCPlayers[3]
endif
call MultyEcho(bj_FORCE_ALL_PLAYERS,15.,udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(llx)]+GetPlayerName(llx)+"|r"+" has 20 seconds to pick a hero.")
call MultyEcho(bj_FORCE_ALL_PLAYERS,15.,udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(llX)]+GetPlayerName(llX)+"|r"+" has 20 seconds to pick a hero.")
call SetPlayerState(llx,PLAYER_STATE_RESOURCE_GOLD,lLf[GetPlayerId(llx)])
call SetPlayerState(llX,PLAYER_STATE_RESOURCE_GOLD,lLf[GetPlayerId(llX)])
call PolledWait(20.)
call HeroDenyForPlayer(llx)
call HeroDenyForPlayer(llX)
if lly then
set llx=udg_pA_DTAX_SCPlayers[3]
set llX=udg_pA_DTAX_SCPlayers[4]
else
set llx=udg_pA_DTAX_SEPlayers[3]
set llX=udg_pA_DTAX_SEPlayers[4]
endif
call MultyEcho(bj_FORCE_ALL_PLAYERS,15.,udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(llx)]+GetPlayerName(llx)+"|r"+" has 20 seconds to pick a hero.")
call MultyEcho(bj_FORCE_ALL_PLAYERS,15.,udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(llX)]+GetPlayerName(llX)+"|r"+" has 20 seconds to pick a hero.")
call SetPlayerState(llx,PLAYER_STATE_RESOURCE_GOLD,lLf[GetPlayerId(llx)])
call SetPlayerState(llX,PLAYER_STATE_RESOURCE_GOLD,lLf[GetPlayerId(llX)])
call PolledWait(20.)
call HeroDenyForPlayer(llx)
call HeroDenyForPlayer(llX)
if lly then
set llx=udg_pA_DTAX_SEPlayers[4]
set llX=udg_pA_DTAX_SEPlayers[5]
else
set llx=udg_pA_DTAX_SCPlayers[4]
set llX=udg_pA_DTAX_SCPlayers[5]
endif
call MultyEcho(bj_FORCE_ALL_PLAYERS,15.,udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(llx)]+GetPlayerName(llx)+"|r"+" has 20 seconds to pick a hero.")
call MultyEcho(bj_FORCE_ALL_PLAYERS,15.,udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(llX)]+GetPlayerName(llX)+"|r"+" has 20 seconds to pick a hero.")
call SetPlayerState(llx,PLAYER_STATE_RESOURCE_GOLD,lLf[GetPlayerId(llx)])
call SetPlayerState(llX,PLAYER_STATE_RESOURCE_GOLD,lLf[GetPlayerId(llX)])
call PolledWait(20.)
call HeroDenyForPlayer(llx)
call HeroDenyForPlayer(llX)
if lly then
set llx=udg_pA_DTAX_SCPlayers[5]
else
set llx=udg_pA_DTAX_SEPlayers[5]
endif
call MultyEcho(bj_FORCE_ALL_PLAYERS,15.,udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(llx)]+GetPlayerName(llx)+"|r"+" has 20 seconds to pick a hero.")
call SetPlayerState(llx,PLAYER_STATE_RESOURCE_GOLD,lLf[GetPlayerId(llx)])
call PolledWait(20.)
call HeroDenyForPlayer(llx)
call EnableTrigger(gg_trg_NormalGoldIncome)
call SuspendTimeOfDay(false)
call PolledWait(30.)
set udg_b_DTAX_pick_started=true
endfunction
function lolo takes nothing returns nothing
local location llS=GetRectCenter(gg_rct_SentinelTavernsRect)
local location llt=GetRectCenter(gg_rct_ScourgeTavernsRect)
local location llY=GetRectCenter(gg_rct_SentinelHeroSpawn)
local location llz=GetRectCenter(gg_rct_ScourgeHeroSpawn)
local integer lEq
local integer lEQ
local integer lEY
if not udg_b_DTAX_is_dupe_mode then
call DenyHeroFully()
endif
set udg_b_DTAX_is_teamrandom_mode=true
set udg_i_DTAX_GLOBAL_gold_cost=400
set udg_A8=false
call DenyHeroRandomSpawn()
call PanCameraToTimedLocForPlayer(udg_pA_DTAX_SEPlayers[1],llY,0)
call PanCameraToTimedLocForPlayer(udg_pA_DTAX_SEPlayers[2],llY,0)
call PanCameraToTimedLocForPlayer(udg_pA_DTAX_SEPlayers[3],llY,0)
call PanCameraToTimedLocForPlayer(udg_pA_DTAX_SEPlayers[4],llY,0)
call PanCameraToTimedLocForPlayer(udg_pA_DTAX_SEPlayers[5],llY,0)
call PanCameraToTimedLocForPlayer(udg_pA_DTAX_SCPlayers[1],llz,0)
call PanCameraToTimedLocForPlayer(udg_pA_DTAX_SCPlayers[2],llz,0)
call PanCameraToTimedLocForPlayer(udg_pA_DTAX_SCPlayers[3],llz,0)
call PanCameraToTimedLocForPlayer(udg_pA_DTAX_SCPlayers[4],llz,0)
call PanCameraToTimedLocForPlayer(udg_pA_DTAX_SCPlayers[5],llz,0)
if udg_b_DTAX_is_samehero_mode then
call SetPlayerStateBJ(udg_p_DTAX_Host,PLAYER_STATE_RESOURCE_FOOD_CAP,6)
if PlayerIsSentinel(udg_p_DTAX_Host)then
loop
set lEY=GetRandomInt(udg_i_DTAX_FirstSEHero,udg_i_DTAX_LastSEHero)
exitwhen udg_bA_DTAX_used_hero_types_SAME1[lEY]==false
endloop
set udg_uA_DTAX_player_hero_unit[GetPlayerId(udg_p_DTAX_Host)]=CreateUnit(udg_p_DTAX_Host,udg_iA_DTAX_HeroTypes[lEY],GetLocationX(llS),GetLocationY(llS),270)
else
loop
set lEY=GetRandomInt(udg_i_DTAX_FirstSCHero,udg_i_DTAX_LastSCHero)
exitwhen udg_bA_DTAX_used_hero_types_SAME1[lEY]==false
endloop
set udg_uA_DTAX_player_hero_unit[GetPlayerId(udg_p_DTAX_Host)]=CreateUnit(udg_p_DTAX_Host,udg_iA_DTAX_HeroTypes[lEY],GetLocationX(llt),GetLocationY(llt),270)
endif
call RemoveLocation(llS)
call RemoveLocation(llt)
call RemoveLocation(llY)
call RemoveLocation(llz)
return
endif
set udg_A9=false
set lEq=1
set lEQ=5
loop
exitwhen lEq>lEQ
set udg_uA_DTAX_player_hero_unit[GetPlayerId(udg_pA_DTAX_SEPlayers[lEq])]=null
if(PlayerIsActive(udg_pA_DTAX_SEPlayers[lEq]))then
loop
set lEY=GetRandomInt(udg_i_DTAX_FirstSEHero,udg_i_DTAX_LastSEHero)
if(udg_bA_DTAX_used_hero_types_SAME1[lEY]==false)then
if not udg_b_DTAX_is_dupe_mode then
set udg_bA_DTAX_used_hero_types_SAME1[lEY]=true
endif
call SetPlayerStateBJ(udg_pA_DTAX_SEPlayers[lEq],PLAYER_STATE_RESOURCE_FOOD_CAP,6)
call PolledWait(.01)
set udg_uA_DTAX_player_hero_unit[GetPlayerId(udg_pA_DTAX_SEPlayers[lEq])]=CreateUnitAtLoc(udg_pA_DTAX_SEPlayers[lEq],udg_iA_DTAX_HeroTypes[lEY],llS,bj_UNIT_FACING)
endif
exitwhen(udg_uA_DTAX_player_hero_unit[GetPlayerId(udg_pA_DTAX_SEPlayers[lEq])]!=null)
endloop
endif
set lEq=lEq+1
endloop
set lEq=1
set lEQ=5
loop
exitwhen lEq>lEQ
set udg_uA_DTAX_player_hero_unit[GetPlayerId(udg_pA_DTAX_SCPlayers[lEq])]=null
if(PlayerIsActive(udg_pA_DTAX_SCPlayers[lEq]))then
loop
set lEY=GetRandomInt(udg_i_DTAX_FirstSCHero,udg_i_DTAX_LastSCHero)
if(udg_bA_DTAX_used_hero_types_SAME1[lEY]==false)then
if not udg_b_DTAX_is_dupe_mode then
set udg_bA_DTAX_used_hero_types_SAME1[lEY]=true
endif
call SetPlayerStateBJ(udg_pA_DTAX_SCPlayers[lEq],PLAYER_STATE_RESOURCE_FOOD_CAP,6)
call PolledWait(.01)
set udg_uA_DTAX_player_hero_unit[GetPlayerId(udg_pA_DTAX_SCPlayers[lEq])]=CreateUnitAtLoc(udg_pA_DTAX_SCPlayers[lEq],udg_iA_DTAX_HeroTypes[lEY],llt,bj_UNIT_FACING)
endif
exitwhen(udg_uA_DTAX_player_hero_unit[GetPlayerId(udg_pA_DTAX_SCPlayers[lEq])]!=null)
endloop
endif
set lEq=lEq+1
endloop
set udg_A9=true
call RemoveLocation(llS)
call RemoveLocation(llt)
call RemoveLocation(llY)
call RemoveLocation(llz)
endfunction
function lqlq takes nothing returns nothing
local integer lLr=GetRandomInt(1,4)
set udg_AT=true
if(lLr==1)then
call MultyEcho(bj_FORCE_ALL_PLAYERS,20.,"AP has been randomly selected as your mode!")
call MultyEcho(bj_FORCE_ALL_PLAYERS,20.," ")
call ExecuteFunc("lNlN")
endif
if(lLr==2)then
call MultyEcho(bj_FORCE_ALL_PLAYERS,20.,"AR has been randomly selected as your mode!")
call MultyEcho(bj_FORCE_ALL_PLAYERS,20.," ")
call ExecuteFunc("lMlM")
endif
if(lLr==3)then
call MultyEcho(bj_FORCE_ALL_PLAYERS,20.,"TR has been randomly selected as your mode!")
call MultyEcho(bj_FORCE_ALL_PLAYERS,20.," ")
call ExecuteFunc("lolo")
endif
if(lLr==4)then
call MultyEcho(bj_FORCE_ALL_PLAYERS,20.,"Normal has been randomly selected as your mode!")
call MultyEcho(bj_FORCE_ALL_PLAYERS,20.," ")
endif
endfunction
function lmlm takes nothing returns nothing
set udg_b_DTAX_is_dupe_mode=true
call HeroDenyAll('H00I')
endfunction
function lIlI takes nothing returns nothing
local integer lFw=ForceActivePlayers(udg_f_DTAX_SEPlayers)
local integer lFV=ForceActivePlayers(udg_f_DTAX_SCPlayers)
local integer lf9=lFw+lFV
local integer lEq
local integer lLR
local integer lxx
local integer lyy
local integer lzz
local player array lLs
local player array lLS
local integer lww
local integer lLt
local integer lLT
local location llY=GetRectCenter(gg_rct_SentinelHeroSpawn)
local location llz=GetRectCenter(gg_rct_ScourgeHeroSpawn)
set udg_b_DTAX_shuffle_players=true
set lLt=GetPlayerState(udg_pA_DTAX_SEPlayers[1],PLAYER_STATE_RESOURCE_GOLD)+GetPlayerState(udg_pA_DTAX_SEPlayers[2],PLAYER_STATE_RESOURCE_GOLD)+GetPlayerState(udg_pA_DTAX_SEPlayers[3],PLAYER_STATE_RESOURCE_GOLD)+GetPlayerState(udg_pA_DTAX_SEPlayers[4],PLAYER_STATE_RESOURCE_GOLD)+GetPlayerState(udg_pA_DTAX_SEPlayers[5],PLAYER_STATE_RESOURCE_GOLD)
set lLT=GetPlayerState(udg_pA_DTAX_SCPlayers[1],PLAYER_STATE_RESOURCE_GOLD)+GetPlayerState(udg_pA_DTAX_SCPlayers[2],PLAYER_STATE_RESOURCE_GOLD)+GetPlayerState(udg_pA_DTAX_SCPlayers[3],PLAYER_STATE_RESOURCE_GOLD)+GetPlayerState(udg_pA_DTAX_SCPlayers[4],PLAYER_STATE_RESOURCE_GOLD)+GetPlayerState(udg_pA_DTAX_SCPlayers[5],PLAYER_STATE_RESOURCE_GOLD)
set lLs[1]=null
set lLs[2]=null
set lLs[3]=null
set lLs[4]=null
set lLs[5]=null
set lLs[6]=null
set lLs[7]=null
set lLs[8]=null
set lLs[9]=null
set lLs[10]=null
set lzz=1
set lww=1
set lEq=1
loop
exitwhen lEq>5
if(PlayerIsActive(udg_pA_DTAX_SEPlayers[lEq]))then
set lLs[lww]=udg_pA_DTAX_SEPlayers[lEq]
set lww=lww+1
else
set lLS[lzz]=udg_pA_DTAX_SEPlayers[lEq]
set lzz=lzz+1
endif
set lEq=lEq+1
endloop
set lEq=1
loop
exitwhen lEq>5
if(PlayerIsActive(udg_pA_DTAX_SCPlayers[lEq]))then
set lLs[lww]=udg_pA_DTAX_SCPlayers[lEq]
set lww=lww+1
else
set lLS[lzz]=udg_pA_DTAX_SCPlayers[lEq]
set lzz=lzz+1
endif
set lEq=lEq+1
endloop
set udg_pA_DTAX_SEPlayers[1]=null
set udg_pA_DTAX_SEPlayers[2]=null
set udg_pA_DTAX_SEPlayers[3]=null
set udg_pA_DTAX_SEPlayers[4]=null
set udg_pA_DTAX_SEPlayers[5]=null
set udg_pA_DTAX_SCPlayers[1]=null
set udg_pA_DTAX_SCPlayers[2]=null
set udg_pA_DTAX_SCPlayers[3]=null
set udg_pA_DTAX_SCPlayers[4]=null
set udg_pA_DTAX_SCPlayers[5]=null
set lEq=1
loop
exitwhen lEq>(lf9/2)
set lLR=GetRandomInt(1,lf9)
if(lLs[lLR]!=null)then
set udg_pA_DTAX_SEPlayers[lEq]=lLs[lLR]
set lLs[lLR]=null
set lEq=lEq+1
endif
endloop
set lxx=lEq
set lEq=1
loop
exitwhen lEq>lf9-lxx+1
set lLR=GetRandomInt(1,lf9)
if(lLs[lLR]!=null)then
set udg_pA_DTAX_SCPlayers[lEq]=lLs[lLR]
set lLs[lLR]=null
set lEq=lEq+1
endif
endloop
set lzz=lEq
set lEq=lxx
set lyy=1
loop
exitwhen lEq>5
set udg_pA_DTAX_SEPlayers[lEq]=lLS[lyy]
set lyy=lyy+1
set lEq=lEq+1
endloop
set lEq=lzz
loop
exitwhen lEq>5
set udg_pA_DTAX_SCPlayers[lEq]=lLS[lyy]
set lyy=lyy+1
set lEq=lEq+1
endloop
set lEq=0
loop
exitwhen lEq>5
set lEq=lEq+1
endloop
call SetPlayerTeam(udg_pA_DTAX_SEPlayers[0],0)
call SetPlayerTeam(udg_pA_DTAX_SEPlayers[1],0)
call SetPlayerTeam(udg_pA_DTAX_SEPlayers[2],0)
call SetPlayerTeam(udg_pA_DTAX_SEPlayers[3],0)
call SetPlayerTeam(udg_pA_DTAX_SEPlayers[4],0)
call SetPlayerTeam(udg_pA_DTAX_SEPlayers[5],0)
call SetPlayerTeam(udg_pA_DTAX_SCPlayers[0],1)
call SetPlayerTeam(udg_pA_DTAX_SCPlayers[1],1)
call SetPlayerTeam(udg_pA_DTAX_SCPlayers[2],1)
call SetPlayerTeam(udg_pA_DTAX_SCPlayers[3],1)
call SetPlayerTeam(udg_pA_DTAX_SCPlayers[4],1)
call SetPlayerTeam(udg_pA_DTAX_SCPlayers[5],1)
call ColorDataBase()
set lxx=0
set lyy=0
loop
exitwhen lxx>5
loop
exitwhen lyy>5
call SetPlayerAllianceStateBJ(udg_pA_DTAX_SEPlayers[lxx],udg_pA_DTAX_SEPlayers[lyy],3)
call SetPlayerAllianceStateBJ(udg_pA_DTAX_SCPlayers[lxx],udg_pA_DTAX_SCPlayers[lyy],3)
call SetPlayerAllianceStateBJ(udg_pA_DTAX_SEPlayers[lxx],udg_pA_DTAX_SCPlayers[lyy],0)
call SetPlayerAllianceStateBJ(udg_pA_DTAX_SCPlayers[lxx],udg_pA_DTAX_SEPlayers[lyy],0)
set lyy=lyy+1
endloop
set lyy=0
set lxx=lxx+1
endloop
call ForceClear(udg_f_DTAX_SEPlayers)
call ForceClear(udg_f_DTAX_SCPlayers)
call ForceAddPlayer(udg_f_DTAX_SEPlayers,udg_pA_DTAX_SEPlayers[0])
call ForceAddPlayer(udg_f_DTAX_SEPlayers,udg_pA_DTAX_SEPlayers[1])
call ForceAddPlayer(udg_f_DTAX_SEPlayers,udg_pA_DTAX_SEPlayers[2])
call ForceAddPlayer(udg_f_DTAX_SEPlayers,udg_pA_DTAX_SEPlayers[3])
call ForceAddPlayer(udg_f_DTAX_SEPlayers,udg_pA_DTAX_SEPlayers[4])
call ForceAddPlayer(udg_f_DTAX_SEPlayers,udg_pA_DTAX_SEPlayers[5])
call ForceAddPlayer(udg_f_DTAX_SCPlayers,udg_pA_DTAX_SCPlayers[0])
call ForceAddPlayer(udg_f_DTAX_SCPlayers,udg_pA_DTAX_SCPlayers[1])
call ForceAddPlayer(udg_f_DTAX_SCPlayers,udg_pA_DTAX_SCPlayers[2])
call ForceAddPlayer(udg_f_DTAX_SCPlayers,udg_pA_DTAX_SCPlayers[3])
call ForceAddPlayer(udg_f_DTAX_SCPlayers,udg_pA_DTAX_SCPlayers[4])
call ForceAddPlayer(udg_f_DTAX_SCPlayers,udg_pA_DTAX_SCPlayers[5])
call ExecuteFunc("SetMarkersOwns")
call MultiboardClear(udg_mb_DTAX_game_kd_multiboard)
call TriggerExecute(gg_trg_KD_Show)
set lFw=ForceActivePlayers(udg_f_DTAX_SEPlayers)
set lFV=ForceActivePlayers(udg_f_DTAX_SCPlayers)
set lEq=1
loop
exitwhen lEq>5
if(PlayerIsActive(udg_pA_DTAX_SEPlayers[lEq]))then
call SetPlayerStateBJ(udg_pA_DTAX_SEPlayers[lEq],PLAYER_STATE_RESOURCE_GOLD,(3500/lFw))
call SetPlayerStateBJ(udg_pA_DTAX_SEPlayers[lEq],PLAYER_STATE_RESOURCE_LUMBER,0)
call SetPlayerStateBJ(udg_pA_DTAX_SEPlayers[lEq],PLAYER_STATE_RESOURCE_FOOD_CAP,5)
endif
if(PlayerIsActive(udg_pA_DTAX_SCPlayers[lEq]))then
call SetPlayerStateBJ(udg_pA_DTAX_SCPlayers[lEq],PLAYER_STATE_RESOURCE_GOLD,(3500/lFV))
call SetPlayerStateBJ(udg_pA_DTAX_SCPlayers[lEq],PLAYER_STATE_RESOURCE_LUMBER,0)
call SetPlayerStateBJ(udg_pA_DTAX_SCPlayers[lEq],PLAYER_STATE_RESOURCE_FOOD_CAP,5)
endif
set lEq=lEq+1
endloop
call PanCameraToTimedLocForPlayer(udg_pA_DTAX_SEPlayers[1],llY,0)
call PanCameraToTimedLocForPlayer(udg_pA_DTAX_SEPlayers[2],llY,0)
call PanCameraToTimedLocForPlayer(udg_pA_DTAX_SEPlayers[3],llY,0)
call PanCameraToTimedLocForPlayer(udg_pA_DTAX_SEPlayers[4],llY,0)
call PanCameraToTimedLocForPlayer(udg_pA_DTAX_SEPlayers[5],llY,0)
call PanCameraToTimedLocForPlayer(udg_pA_DTAX_SCPlayers[1],llz,0)
call PanCameraToTimedLocForPlayer(udg_pA_DTAX_SCPlayers[2],llz,0)
call PanCameraToTimedLocForPlayer(udg_pA_DTAX_SCPlayers[3],llz,0)
call PanCameraToTimedLocForPlayer(udg_pA_DTAX_SCPlayers[4],llz,0)
call PanCameraToTimedLocForPlayer(udg_pA_DTAX_SCPlayers[5],llz,0)
call DestroyFogModifier(CreateFogModifierRectBJ(true,udg_pA_DTAX_SEPlayers[1],FOG_OF_WAR_MASKED,bj_mapInitialPlayableArea))
call DestroyFogModifier(CreateFogModifierRectBJ(true,udg_pA_DTAX_SEPlayers[2],FOG_OF_WAR_MASKED,bj_mapInitialPlayableArea))
call DestroyFogModifier(CreateFogModifierRectBJ(true,udg_pA_DTAX_SEPlayers[3],FOG_OF_WAR_MASKED,bj_mapInitialPlayableArea))
call DestroyFogModifier(CreateFogModifierRectBJ(true,udg_pA_DTAX_SEPlayers[4],FOG_OF_WAR_MASKED,bj_mapInitialPlayableArea))
call DestroyFogModifier(CreateFogModifierRectBJ(true,udg_pA_DTAX_SEPlayers[5],FOG_OF_WAR_MASKED,bj_mapInitialPlayableArea))
call DestroyFogModifier(CreateFogModifierRectBJ(true,udg_pA_DTAX_SCPlayers[1],FOG_OF_WAR_MASKED,bj_mapInitialPlayableArea))
call DestroyFogModifier(CreateFogModifierRectBJ(true,udg_pA_DTAX_SCPlayers[2],FOG_OF_WAR_MASKED,bj_mapInitialPlayableArea))
call DestroyFogModifier(CreateFogModifierRectBJ(true,udg_pA_DTAX_SCPlayers[3],FOG_OF_WAR_MASKED,bj_mapInitialPlayableArea))
call DestroyFogModifier(CreateFogModifierRectBJ(true,udg_pA_DTAX_SCPlayers[4],FOG_OF_WAR_MASKED,bj_mapInitialPlayableArea))
call DestroyFogModifier(CreateFogModifierRectBJ(true,udg_pA_DTAX_SCPlayers[5],FOG_OF_WAR_MASKED,bj_mapInitialPlayableArea))
if udg_b_DTAX_observer_slot_used then
set lxx=0
loop
exitwhen lxx>5
call SetPlayerAlliance(Player(0),udg_pA_DTAX_SEPlayers[lxx],ConvertAllianceType(0),true)
call SetPlayerAlliance(Player(0),udg_pA_DTAX_SEPlayers[lxx],ConvertAllianceType(4),true)
call SetPlayerAlliance(Player(0),udg_pA_DTAX_SCPlayers[lxx],ConvertAllianceType(0),false)
call SetPlayerAlliance(Player(0),udg_pA_DTAX_SCPlayers[lxx],ConvertAllianceType(4),false)
set lxx=lxx+1
endloop
endif
call FT()
endfunction
function DenyNonAgi takes nothing returns nothing
local integer lEq
local integer lEQ
set udg_b_DTAX_is_allagi_mode=true
set lEq=1
set lEQ=udg_i_DTAX_HeroIntSetLast
loop
exitwhen lEq>lEQ
call HeroDenyAll(udg_iA_DTAX_HeroIntSet[lEq])
set lEq=lEq+1
endloop
set lEq=1
set lEQ=udg_i_DTAX_HeroStrSetLast
loop
exitwhen lEq>lEQ
call HeroDenyAll(udg_iA_DTAX_HeroStrSet[lEq])
set lEq=lEq+1
endloop
endfunction
function DenyNonStr takes nothing returns nothing
local integer lEq
local integer lEQ
set udg_b_DTAX_is_allstr_mode=true
set lEq=1
set lEQ=udg_i_DTAX_HeroIntSetLast
loop
exitwhen lEq>lEQ
call HeroDenyAll(udg_iA_DTAX_HeroIntSet[lEq])
set lEq=lEq+1
endloop
set lEq=1
set lEQ=udg_i_DTAX_HeroAgiSetLast
loop
exitwhen lEq>lEQ
call HeroDenyAll(udg_iA_DTAX_HeroAgiSet[lEq])
set lEq=lEq+1
endloop
endfunction
function DenyNonInt takes nothing returns nothing
local integer lEq
local integer lEQ
set udg_b_DTAX_is_allint_mode=true
set lEq=1
set lEQ=udg_i_DTAX_HeroAgiSetLast
loop
exitwhen lEq>lEQ
call HeroDenyAll(udg_iA_DTAX_HeroAgiSet[lEq])
set lEq=lEq+1
endloop
set lEq=1
set lEQ=udg_i_DTAX_HeroStrSetLast
loop
exitwhen lEq>lEQ
call HeroDenyAll(udg_iA_DTAX_HeroStrSet[lEq])
set lEq=lEq+1
endloop
endfunction
function lQlQ takes nothing returns nothing
set udg_b_DTAX_is_itemdrop_mode=true
endfunction
function lrlr takes nothing returns nothing
set udg_b_DTAX_disable_item_powerups_mode=true
call DisableTrigger(gg_trg_Recreate_Rune)
endfunction
function lRlR takes nothing returns nothing
set udg_b_DTAX_enable_supercreeps_mode=true
call EnableTrigger(gg_trg_SpawnSuperCreeps)
endfunction
function l0l0 takes nothing returns nothing
local player lEk=GetTriggerPlayer()
set udg_Az=lEk
if L7L7()and udg_bC[GetPlayerId(lEk)]==false then
set udg_bC[GetPlayerId(lEk)]=true
call HeroDenyForPlayer(lEk)
call DisplayTimedTextToPlayer(lEk,0,udg_A6,10,"You will be given a random hero soon.")
call PolledWait(6)
set udg_Az=lEk
if L7L7()then
set udg_bA_DTAX_player_randomed[GetPlayerId(lEk)]=true
call fBfB(lEk)
else
call DisplayTimedTextToPlayer(lEk,0,udg_A6,10,"You cannot be assigned a random hero.")
endif
endif
endfunction
function LWLW takes nothing returns nothing
local player lEk=GetTriggerPlayer()
local string lmb="|c006699CC"
if udg_b_DTAX_league_mode then
call DisplayTimedTextToPlayer(lEk,0,udg_A6,20,lmb+"League Mode"+"|r:      Both Sides will take turns picking heroes.")
endif
if udg_b_DTAX_is_deathmatch_mode then
call DisplayTimedTextToPlayer(lEk,0,udg_A6,20,lmb+"Death Match"+"|r:        When you die, you must pick a new hero.")
call DisplayTimedTextToPlayer(lEk,0,udg_A6,20,"                              You will lose when your team uses up all "+I2S(ReturnMin(udg_i_DTAX_LastSEHero,udg_i_DTAX_LastSCHero-udg_i_DTAX_FirstSCHero+1))+" heroes.")
endif
if udg_b_DTAX_is_mirrormatch_mode then
call DisplayTimedTextToPlayer(lEk,0,udg_A6,20,lmb+"Mirror Match"+"|r:       After one minute, each team will have the same heroes.")
endif
if udg_b_DTAX_is_allpick_mode then
call DisplayTimedTextToPlayer(lEk,0,udg_A6,20,lmb+"All Pick"+"|r:                 You may pick a hero from any tavern.")
endif
if udg_b_DTAX_is_RandomDraft_mode then
call DisplayTimedTextToPlayer(lEk,0,udg_A6,20,lmb+"Random Draft"+"|r:                 You may pick a hero draft style from the heroes available.")
endif
if udg_b_DTAX_is_allrandom_mode then
call DisplayTimedTextToPlayer(lEk,0,udg_A6,20,lmb+"All Random"+"|r:          You will be given a random hero from any tavern.")
endif
if udg_b_DTAX_is_VoteRandom_mode then
call DisplayTimedTextToPlayer(lEk,0,udg_A6,20,lmb+"Vote Random"+"|r:         You will be given a random hero from the voted groupset.")
endif
if udg_b_DTAX_is_teamrandom_mode then
call DisplayTimedTextToPlayer(lEk,0,udg_A6,20,lmb+"Team Random"+"|r:     You will be given a random hero from your taverns.")
endif
if udg_b_DTAX_is_Reverse_mode then
call DisplayTimedTextToPlayer(lEk,0,udg_A6,20,lmb+"Reverse"+"|r:                 You pick a hero for your opponent.")
endif
if udg_b_DTAX_shuffle_players then
call DisplayTimedTextToPlayer(lEk,0,udg_A6,20,lmb+"Shuffle Players"+"|r:     All players will be shuffled across both sides.")
endif
if udg_b_DTAX_is_allagi_mode then
call DisplayTimedTextToPlayer(lEk,0,udg_A6,20,lmb+"All Agility"+"|r:             Only Agility heroes will be allowed.")
endif
if udg_b_DTAX_is_allstr_mode then
call DisplayTimedTextToPlayer(lEk,0,udg_A6,20,lmb+"All Strength"+"|r:         Only Strength heroes will be allowed.")
endif
if udg_b_DTAX_is_allint_mode then
call DisplayTimedTextToPlayer(lEk,0,udg_A6,20,lmb+"All Intelligence"+"|r:    Only Intellgence heroes will be allowed.")
endif
if udg_b_DTAX_is_dupe_mode then
call DisplayTimedTextToPlayer(lEk,0,udg_A6,20,lmb+"Duplicate Mode"+"|r:   The same heroes may be picked or randomed multiple times.")
endif
if udg_b_DTAX_is_itemdrop_mode then
call DisplayTimedTextToPlayer(lEk,0,udg_A6,20,lmb+"Item Drop"+"|r:             When you die, a random inventory slot will drop an item.")
endif
if udg_b_DTAX_disable_item_powerups_mode then
call DisplayTimedTextToPlayer(lEk,0,udg_A6,20,lmb+"No Powerups"+"|r:        Powerups are disabled.")
endif
if udg_b_DTAX_enable_supercreeps_mode then
call DisplayTimedTextToPlayer(lEk,0,udg_A6,20,lmb+"Super Creeps"+"|r:        Siege Golems, Scary Fish, and Ancient Hydras")
call DisplayTimedTextToPlayer(lEk,0,udg_A6,20,"                             can spawn randomly with creep spawns.")
endif
if udg_b_DTAX_easy_mode then
call DisplayTimedTextToPlayer(lEk,0,udg_A6,20,lmb+"Easy Mode"+"|r:           Towers are weaker. Heroes gain more xp and gold.")
endif
if udg_b_DTAX_is_samehero_mode then
call DisplayTimedTextToPlayer(lEk,0,udg_A6,20,lmb+"Same Hero"+"|r:           All players will be given the same hero that "+GetPlayerName(udg_p_DTAX_Host)+"|r"+" has.")
endif
endfunction
function LyLy takes nothing returns nothing
local unit lfU=udg_uA_DTAX_player_hero_unit[GetPlayerId(GetTriggerPlayer())]
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,udg_A6,30.,"You are using unstuck. You will be sent to your base in 60 seconds.")
call UnitAddAbility(lfU,'A0AT')
call IssueImmediateOrderById(lfU,OrderId("militia"))
endfunction
function LYLY takes nothing returns nothing
local integer lEq=1
local integer lEQ=5
local integer lfy
if(PlayerIsScourge(GetTriggerPlayer()))then
loop
exitwhen lEq>lEQ
set lfy=GetPlayerId(udg_pA_DTAX_SEPlayers[lEq])
if(udg_uA_DTAX_player_hero_unit[lfy]!=null)then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,udg_A6,20,udg_sA_DTAX_player_textcolor_prefixes[lfy]+GetPlayerName(udg_pA_DTAX_SEPlayers[lEq])+"|r controls "+GetUnitName(udg_uA_DTAX_player_hero_unit[lfy])+" (Level "+I2S(GetUnitLevel(udg_uA_DTAX_player_hero_unit[lfy]))+")")
endif
set lEq=lEq+1
endloop
else
loop
exitwhen lEq>lEQ
set lfy=GetPlayerId(udg_pA_DTAX_SCPlayers[lEq])
if(udg_uA_DTAX_player_hero_unit[lfy]!=null)then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,udg_A6,20,udg_sA_DTAX_player_textcolor_prefixes[lfy]+GetPlayerName(udg_pA_DTAX_SCPlayers[lEq])+"|r controls "+GetUnitName(udg_uA_DTAX_player_hero_unit[lfy])+" (Level "+I2S(GetUnitLevel(udg_uA_DTAX_player_hero_unit[lfy]))+")")
endif
set lEq=lEq+1
endloop
endif
endfunction
function LzLz takes nothing returns nothing
if(udg_uA_DTAX_player_hero_unit[GetPlayerId(GetTriggerPlayer())]==null)then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,udg_A6,10.,"No Hero is selected")
else
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,udg_A6,10.,GetUnitName(udg_uA_DTAX_player_hero_unit[GetPlayerId(GetTriggerPlayer())])+" movespeed is "+I2S(R2I(GetUnitMoveSpeed(udg_uA_DTAX_player_hero_unit[GetPlayerId(GetTriggerPlayer())]))))
endif
endfunction
function LZLZ takes nothing returns nothing
call SetBoolean(H2Tx(GetTriggerPlayer()),"L6",true)
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,udg_A6,10,"Disallowing help from certain abilities.")
endfunction
function L0L0 takes nothing returns nothing
call SetBoolean(H2Tx(GetTriggerPlayer()),"L6",false)
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,udg_A6,10,"Allowing help from certain abilities.")
endfunction
function L1L1 takes nothing returns nothing
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,udg_A6,10.,"   Creeps Killed: "+I2S(udg_iA_DTAX_enemy_mobs_killed[GetPlayerId(GetTriggerPlayer())])+" Creeps Denied: "+I2S(udg_iA_DTAX_ally_mobs_killed[GetPlayerId(GetTriggerPlayer())]))
endfunction
function L2L2 takes nothing returns nothing
if(GetEventPlayerChatString()=="-cson")then
call LeaderboardDisplay(udg_lbA_DTAX_CS_boards[GetPlayerId(GetTriggerPlayer())],true)
else
call LeaderboardDisplay(udg_lbA_DTAX_CS_boards[GetPlayerId(GetTriggerPlayer())],false)
endif
endfunction
function L6L6 takes nothing returns nothing
if(GetEventPlayerChatString()=="-showdeny")then
set udg_IsShowDenySwitchedOn[GetPlayerId(GetTriggerPlayer())]=true
else
set udg_IsShowDenySwitchedOn[GetPlayerId(GetTriggerPlayer())]=false
endif
endfunction
function mc takes nothing returns nothing
set udg_IsShowDenySwitchedOn[GetPlayerId(GetTriggerPlayer())]=true
call LeaderboardDisplay(udg_lbA_DTAX_CS_boards[GetPlayerId(GetTriggerPlayer())],true)
endfunction
function L3L3 takes nothing returns nothing
call ForceRemovePlayer(udg_for_DTAX_NonComputerPlayers,GetTriggerPlayer())
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,udg_A6,10,"You are now hiding messages.")
endfunction
function L4L4 takes nothing returns nothing
call ForceAddPlayer(udg_for_DTAX_NonComputerPlayers,GetTriggerPlayer())
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,udg_A6,10,"You are now showing messages.")
endfunction
function L5L5 takes nothing returns nothing
local string llg=StringCase(GetEventPlayerChatString(),false)
if udg_bE then
return
endif
if GetTriggerPlayer()==udg_p_DTAX_Host and llg=="-weather snow"then
call EnableWeatherEffect(udg_wea_DTAX_weGlobalSnow,true)
call EnableWeatherEffect(udg_wea_DTAX_weGlobalRain,false)
endif
if GetTriggerPlayer()==udg_p_DTAX_Host and llg=="-weather rain"then
call EnableWeatherEffect(udg_wea_DTAX_weGlobalSnow,false)
call EnableWeatherEffect(udg_wea_DTAX_weGlobalRain,true)
endif
if llg=="-weather off"then
call EnableWeatherEffect(udg_wea_DTAX_weGlobalSnow,false)
call EnableWeatherEffect(udg_wea_DTAX_weGlobalRain,false)
set udg_bE=true
endif
endfunction
function BurrowTime_Off takes nothing returns nothing
local string lf5=H2Tx(GetTriggeringTrigger())
local timer lOZ=CreateTimer()
call StartTimerBJ(lOZ,false,45)
loop
exitwhen TimerGetRemaining(lOZ)<=.0
call PolledWait(.5)
endloop
call SetBoolean(lf5,"BTOn",false)
call PauseTimer(lOZ)
call PolledWait(1)
call DestroyTimer(lOZ)
endfunction
function EndDuration3 takes nothing returns nothing
local string f8=H2Tx(GetTriggeringTrigger())
call PolledWait(3)
call SetBoolean(f8,"BTDuration",false)
call DestroyEffect(GetFX(f8,"BTFX"))
endfunction
function EndDuration4 takes nothing returns nothing
local string f8=H2Tx(GetTriggeringTrigger())
call PolledWait(4)
call SetBoolean(f8,"BTDuration",false)
call DestroyEffect(GetFX(f8,"BTFX"))
endfunction
function EndDuration5 takes nothing returns nothing
local string f8=H2Tx(GetTriggeringTrigger())
call PolledWait(5)
call SetBoolean(f8,"BTDuration",false)
call DestroyEffect(GetFX(f8,"BTFX"))
endfunction
function Nightmare_CheckHelp takes nothing returns nothing
if GetUnitTypeId(GetTriggerUnit())!='e00C'and GetSpellAbilityId()=='A04Y'and GetBoolean(H2Tx(GetOwningPlayer(GetSpellTargetUnit())),"L6")and GetSpellTargetUnit()!=GetTriggerUnit()then
call DropOrder(GetTriggerUnit())
call SimError(GetOwningPlayer(GetTriggerUnit()),"This target has disablehelp on")
endif
endfunction
function Astral_Imprisonment_AddInt takes nothing returns nothing
local unit lFB=udg_u_DTAX_temp
local integer lRT=udg_i_DTAX_beastmaster_primal_roar_intel_gain_REF3
loop
if GetUnitState(lFB,UNIT_STATE_LIFE)>1 then
call SetHeroInt(lFB,GetHeroInt(lFB,false)+lRT,true)
exitwhen true
else
call PolledWait(5)
endif
endloop
endfunction
function Astral_Imprisonment_RemoveInt takes nothing returns nothing
local unit lfo=udg_u_DTAX_temp
local integer lRT=udg_i_DTAX_beastmaster_primal_roar_intel_gain_REF3
loop
if GetUnitState(lfo,UNIT_STATE_LIFE)>1 then
call SetHeroInt(lfo,GetHeroInt(lfo,false)-lRT,true)
exitwhen true
else
call PolledWait(5)
endif
endloop
endfunction
function Divided_We_Stand_ShareExpEnum takes nothing returns nothing
call AddHeroXP(GetEnumUnit(),udg_i_DTAX_beastmaster_primal_roar_intel_gain_REF3,true)
endfunction
function StormEndHide takes nothing returns nothing
call UnitRemoveAbility(GetEnumUnit(),'B04R')
endfunction
function Reality_CheckValid takes nothing returns nothing
local unit fw=GetTriggerUnit()
local unit Fd=Reality_GetImage()
if Fd==null then
call DropOrder(fw)
call SimError(GetOwningPlayer(fw),"Cannot find any of your Haunting illusions")
endif
endfunction
function ShallowGrave_ReturnDamage takes nothing returns nothing
local unit lgE=udg_u_DTAX_temp
local unit lFB=udg_u_DTAX_temp_target
local unit lFb=GetUnit(H2Tx(lgE),"ShallowGraveSource")
local real lLq=AngleFromUnits(lgE,lFB)
local unit lJV=CreateUnit(GetOwningPlayer(lFb),'h00L',GetUnitX(lFb),GetUnitY(lgE),lLq)
call UnitAddAbility(lJV,'Amrf')
call UnitRemoveAbility(lJV,'Amrf')
call SetUnitFlyHeight(lJV,-100,0)
call UnitApplyTimedLife(lJV,'BTLF',4)
call PolledWait(1.4)
call DamageWithTypeDB(lFb,lFB,udg_dR,150*GetUnitAbilityLevel(lFb,'A0OS'))
endfunction
function QuickRevive_Expire takes nothing returns nothing
call UnitRemoveAbility(GetUnit(H2Tx(GetTriggeringTrigger()),"Unit"),'A0OV')
call DisableTrigger(GetTriggeringTrigger())
endfunction
function TempLightningClean takes nothing returns nothing
local lightning lFO=udg_lig_DTAX_TempLightning
call TriggerSleepAction(0)
call DestroyLightning(lFO)
endfunction
function InitTrig_ExecuteFunc_or_UNUSED takes nothing returns nothing
endfunction
function mumu takes nothing returns boolean
local integer lLU=GetUnitTypeId(udg_uA_DTAX_player_hero_unit[GetPlayerId(GetTriggerPlayer())])
return(lLU=='U008'or lLU=='U007'or lLU=='Hlgr'or lLU=='Eevi'or lLU=='Ekee')and(RectContainsUnit(gg_rct_SentinelBase,udg_uA_DTAX_player_hero_unit[GetPlayerId(GetTriggerPlayer())])or RectContainsUnit(gg_rct_ScourgeBase,udg_uA_DTAX_player_hero_unit[GetPlayerId(GetTriggerPlayer())]))
endfunction
function mUmU takes nothing returns nothing
local unit lfU=udg_uA_DTAX_player_hero_unit[GetPlayerId(GetTriggerPlayer())]
call UnitAddAbility(lfU,'A0FI')
call IssueImmediateOrderById(lfU,OrderId("chemicalrage"))
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,udg_A6,120.,"|c00ff0303"+"Recreate is being performed on "+ReturnHeroName(GetEnumUnit())+". Please wait about 2 minutes"+"|r")
endfunction
function LXLX takes nothing returns nothing
if mumu()then
call mUmU()
endif
endfunction
function InitTrig_Recreate_Initiate takes nothing returns nothing
endfunction
function mwmw takes unit pfU returns real
return .0
endfunction
function mWmW takes integer pID returns real
if pID=='Edem'then
return 1.45
endif
if pID=='Hvwd'then
return 1.77
endif
if pID=='Eevi'then
return 1.5
endif
if pID=='Eevm'then
return 1.6
endif
if pID=='N01H'then
return 1.45
endif
if pID=='N01T'then
return 1.35
endif
if pID=='N01J'then
return 1.25
endif
if pID=='N014'or pID=='N013'or pID=='N015'then
return 1.6
endif
if pID=='N017'then
return 1.55
endif
return 1.7
endfunction
function Attackspeed takes nothing returns nothing
local real m3
local real m4
local real AS
local unit fw=udg_uA_DTAX_player_hero_unit[GetPlayerId(GetTriggerPlayer())]
if fw==null then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,udg_A6,10.,"No Hero is selected")
return
endif
set m4=mWmW(GetUnitTypeId(fw))
set m3=GetHeroAgi(fw,true)+mwmw(fw)
set AS=(1+m3)/m4
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,udg_A6,10.,ReturnHeroName(fw)+" attackspeed is "+R2S(AS)+" attacks per second ("+R2S(1/AS)+" seconds per attack)")
endfunction
function InitTrig_AttackSpeed takes nothing returns nothing
endfunction
function lDlD takes string plc returns string
local integer lle=StringLength(plc)
local string llE
local string llf=""
local integer lii=0
loop
exitwhen(lii==lle)
set llE=StringCase(SubString(plc,lii,lii+1),false)
if not(llE==StringCase(llE,true))then
set llf=llf+llE
endif
set lii=lii+1
endloop
return llf
endfunction
function lBlB takes string plc,integer plC,integer pld returns string
return SubString(plc,0,plC)+SubString(plc,pld,StringLength(plc))
endfunction
function lAlA takes string plb returns nothing
if udg_s_DTAX_gamemode==""then
set udg_s_DTAX_gamemode="|c006699CC"+plb+"|r"
else
set udg_s_DTAX_gamemode=udg_s_DTAX_gamemode+"/"+"|c006699CC"+plb+"|r"
endif
endfunction
function Trig_Select_Game_Mode_Actions takes nothing returns nothing
local string llg=lDlD(GetEventPlayerChatString())
local string array llG
local string array llh
local boolean array llH
local integer lli
local integer lle=StringLength(llg)
local integer lxx=0
local integer lyy=0
local integer lzz=0
local boolean lAP
local boolean lAR
local boolean lLM
local boolean lMM
local boolean lTR
local boolean lDM
local boolean lMR
local boolean lSP
local boolean lAA
local boolean lAI
local boolean lAS
local boolean lID
local boolean lNP
local boolean lSC
local boolean lEM
local boolean lDU
local boolean lSH
local boolean lVoodooInit
local boolean lRV
local boolean lRD
set llG[1]="allpick"
set llh[1]="ap"
set llG[2]="allrandom"
set llh[2]="ar"
set llG[3]="leaguemode"
set llh[3]="lm"
set llG[4]="mirrormatch"
set llh[4]="mm"
set llG[5]="teamrandom"
set llh[5]="tr"
set llG[6]="deathmatch"
set llh[6]="dm"
set llG[7]="moderandom"
set llh[7]="mr"
set llG[8]="shuffleplayers"
set llh[8]="sp"
set llG[9]="allagility"
set llh[9]="aa"
set llG[10]="allintelligence"
set llh[10]="ai"
set llG[11]="allstrength"
set llh[11]="as"
set llG[12]="itemdrop"
set llh[12]="id"
set llG[13]="nopowerups"
set llh[13]="np"
set llG[14]="supercreeps"
set llh[14]="sc"
set llG[15]="easymode"
set llh[15]="em"
set llG[16]="duplicatemode"
set llh[16]="du"
set llG[17]="samehero"
set llh[17]="sh"
set llG[18]="voterandom"
set llh[18]="vr"
set llG[19]="reverse"
set llh[19]="rv"
set llG[20]="randomdraft"
set llh[20]="rd"
set lli=20
set lxx=-1
loop
exitwhen lxx==lle-1
set lxx=lxx+1
set lyy=lxx
loop
exitwhen lyy==lle
set lyy=lyy+1
set lzz=1
loop
exitwhen lzz>lli
if llG[lzz]==SubString(llg,lxx,lyy)then
set llH[lzz]=true
set lzz=lli+1
set llg=lBlB(llg,lxx,lyy)
set lxx=-1
set lle=StringLength(llg)
set lyy=lle
else
set lzz=lzz+1
endif
endloop
endloop
endloop
set lxx=-1
loop
exitwhen lxx==lle-1
set lxx=lxx+1
set lyy=lxx
loop
exitwhen lyy==lle
set lyy=lyy+1
set lzz=1
loop
exitwhen lzz>lli
if llh[lzz]==SubString(llg,lxx,lyy)then
set llH[lzz]=true
set lzz=lli+1
set llg=lBlB(llg,lxx,lyy)
set lxx=-1
set lle=StringLength(llg)
set lyy=lle
else
set lzz=lzz+1
endif
endloop
endloop
endloop
set lAP=llH[1]
set lAR=llH[2]
set lLM=llH[3]
set lMM=llH[4]
set lTR=llH[5]
set lDM=llH[6]
set lMR=llH[7]
set lSP=llH[8]
set lAA=llH[9]
set lAI=llH[10]
set lAS=llH[11]
set lID=llH[12]
set lNP=llH[13]
set lSC=llH[14]
set lEM=llH[15]
set lDU=llH[16]
set lSH=llH[17]
set lVoodooInit=llH[18]
set lRV=llH[19]
set lRD=llH[20]
if llg!=""then
if llg!="wtf"then
call SimError(udg_p_DTAX_Host,"Invalid Game Mode!")
endif
return
endif
if(lAR and(lAP or lTR or lLM or lMR or lRV or lRD))or(lAP and(lTR or lMR))or(lTR and(lLM or lMR))or(lLM and lMR)or(lMM and lSH)then
call SimError(udg_p_DTAX_Host,"Invalid Game Mode Combination!")
return
endif
if(lAA and(lAI or lAS or lDM))or(lAS and(lAI or lDM))or(lAI and lDM)then
call SimError(udg_p_DTAX_Host,"Invalid Game Mode Combination!")
return
endif
if lRV and(lAR or lTR or lMR or lLM or lDM or lSH)then
call SimError(udg_p_DTAX_Host,"Invalid Game Mode Combination!")
return
endif
if(lDM and(lTR or lLM or lMR or lSH or lRV or lRD))or(lMM and lDM)or(lSH and lDM)then
call SimError(udg_p_DTAX_Host,"Deathmatch is not compatible with these modes!")
return
endif
if lLM and(lAP or lRD or lAR or lMM or lTR or lDM or lMR or lAA or lAI or lAS or lID or lNP or lSC or lEM or lDU or lSH or lRV)then
call SimError(udg_p_DTAX_Host,"League Mode is not compatible with these modes!")
return
endif
if lRD and(lAP or lLM or lAR or lMM or lTR or lDM or lMR or lAA or lAI or lAS or lSH or lRV)then
call SimError(udg_p_DTAX_Host,"League Mode is not compatible with these modes!")
return
endif
if lVoodooInit and(lLM or lRD or lAR or lMM or lTR or lDM or lMR or lAA or lAI or lAS or lSH or lRV)then
call SimError(udg_p_DTAX_Host,"VoteRandom is not compatible with these modes!")
return
endif
if lMM and ForceActivePlayers(udg_f_DTAX_SEPlayers)!=ForceActivePlayers(udg_f_DTAX_SCPlayers)then
call SimError(udg_p_DTAX_Host,"The game must have an even number of players to activate Mirror Mode")
return
endif
if lVoodooInit and ForceActivePlayers(udg_f_DTAX_SEPlayers)!=ForceActivePlayers(udg_f_DTAX_SCPlayers)then
call SimError(udg_p_DTAX_Host,"The game must have an even number of players to activate Vote Random Mode")
return
endif
if lRV and ForceActivePlayers(udg_f_DTAX_SEPlayers)!=ForceActivePlayers(udg_f_DTAX_SCPlayers)then
call SimError(udg_p_DTAX_Host,"The game must have an even number of players to activate Reverse Mode")
return
endif
if lLM and not(PlayerIsActive(udg_pA_DTAX_SEPlayers[1])and PlayerIsActive(udg_pA_DTAX_SEPlayers[2])and PlayerIsActive(udg_pA_DTAX_SEPlayers[3])and PlayerIsActive(udg_pA_DTAX_SEPlayers[4])and PlayerIsActive(udg_pA_DTAX_SEPlayers[5])and PlayerIsActive(udg_pA_DTAX_SCPlayers[1])and PlayerIsActive(udg_pA_DTAX_SCPlayers[2])and PlayerIsActive(udg_pA_DTAX_SCPlayers[3])and PlayerIsActive(udg_pA_DTAX_SCPlayers[4])and PlayerIsActive(udg_pA_DTAX_SCPlayers[5]))then
call SimError(udg_p_DTAX_Host,"The game must have 10 players in order to use league mode")
return
endif
if lAP or lAR or lLM or lMM or lTR or lDM or lMR or lSP or lAA or lAI or lAS or lID or lNP or lSC or lDU or lEM or lSH or lVoodooInit or lRV or lRD then
call DisableTrigger(GetTriggeringTrigger())
else
call SimError(udg_p_DTAX_Host,"Invalid Game Mode!")
return
endif
set udg_s_DTAX_gamemode_name=lDlD(GetEventPlayerChatString())
set udg_b_DTAX_bGameStarted=false
call ExecuteFuncEx("lIlI",lSP)
call ExecuteFuncEx("ljlj",lDM)
call ExecuteFuncEx("lJlJ",lMM)
call ExecuteFuncEx("lklk",lSH)
call ExecuteFuncEx("DenyNonAgi",lAA)
call ExecuteFuncEx("DenyNonInt",lAI)
call ExecuteFuncEx("DenyNonStr",lAS)
call ExecuteFuncEx("lmlm",lDU)
call ExecuteFuncEx("lMlM",lAR)
call ExecuteFuncEx("lnln",lVoodooInit)
call ExecuteFuncEx("lNlN",lAP)
call ExecuteFuncEx("lolo",lTR)
call ExecuteFuncEx("lOlO",lRV)
call ExecuteFuncEx("lplp",lLM)
call ExecuteFuncEx("lPlP",lRD)
call ExecuteFuncEx("lqlq",lMR)
call ExecuteFuncEx("lQlQ",lID)
call ExecuteFuncEx("lrlr",lNP)
call ExecuteFuncEx("lRlR",lSC)
call ExecuteFuncEx("lsls",lEM)
if lLM then
set udg_s_DTAX_sMultiBoardHeader="Leaguemode"
elseif lRD then
set udg_s_DTAX_sMultiBoardHeader="RandomDraft"
elseif lMM then
set udg_s_DTAX_sMultiBoardHeader="Mirrormatch"
elseif lDM then
set udg_s_DTAX_sMultiBoardHeader="Deathmatch"
elseif lRV then
set udg_s_DTAX_sMultiBoardHeader="Reverse"
elseif lAP then
set udg_s_DTAX_sMultiBoardHeader="Allpick"
elseif lAR then
set udg_s_DTAX_sMultiBoardHeader="Allrandom"
elseif lTR then
set udg_s_DTAX_sMultiBoardHeader="Teamrandom"
elseif lMR then
set udg_s_DTAX_sMultiBoardHeader="Moderandom"
elseif lVoodooInit then
set udg_s_DTAX_sMultiBoardHeader="Voterandom"
endif
call MultiboardSetTitleText(udg_mb_DTAX_game_kd_multiboard,udg_s_DTAX_sMultiBoardHeader)
if udg_b_DTAX_league_mode then
call lAlA("League Mode")
endif
if udg_b_DTAX_is_RandomDraft_mode then
call lAlA("Random Draft")
endif
if udg_b_DTAX_is_deathmatch_mode then
call lAlA("Death Match")
endif
if udg_b_DTAX_is_mirrormatch_mode then
call lAlA("Mirror Match")
endif
if udg_b_DTAX_is_allpick_mode then
call lAlA("All Pick")
endif
if udg_b_DTAX_is_allrandom_mode then
call lAlA("All Random")
endif
if udg_b_DTAX_is_VoteRandom_mode then
call lAlA("Vote Random")
endif
if udg_b_DTAX_is_teamrandom_mode then
call lAlA("Team Random")
endif
if udg_b_DTAX_shuffle_players then
call lAlA("Shuffle Players")
endif
if udg_b_DTAX_is_allagi_mode then
call lAlA("All Agility")
endif
if udg_b_DTAX_is_allstr_mode then
call lAlA("All Strength")
endif
if udg_b_DTAX_is_allint_mode then
call lAlA("All Intelligence")
endif
if udg_b_DTAX_is_dupe_mode then
call lAlA("Duplicate Mode")
endif
if udg_b_DTAX_is_itemdrop_mode then
call lAlA("Item Drop")
endif
if udg_b_DTAX_disable_item_powerups_mode then
call lAlA("No Powerups")
endif
if udg_b_DTAX_enable_supercreeps_mode then
call lAlA("Super Creeps")
endif
if udg_b_DTAX_easy_mode then
call lAlA("Easy Mode")
endif
if udg_b_DTAX_is_samehero_mode then
call lAlA("Same Hero")
endif
if udg_b_DTAX_is_Reverse_mode then
call lAlA("Reverse")
endif
call MultyEcho(bj_FORCE_ALL_PLAYERS,20.,udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(udg_p_DTAX_Host)]+GetPlayerName(udg_p_DTAX_Host)+"|r"+" has selected "+udg_s_DTAX_gamemode)
call MultyEcho(bj_FORCE_ALL_PLAYERS,20.,"For more information about the game modes use -gameinfo.")
call MultyEcho(bj_FORCE_ALL_PLAYERS,20.," ")
endfunction
function Trig_Select_Game_Mode_Conditions takes nothing returns boolean
return not udg_b_DTAX_select_game_mode_time_elapsed
endfunction
function StartTrigger_Select_Game_Mode takes nothing returns nothing
set gg_trg_Select_Game_Mode=CreateTrigger()
call TriggerRegisterPlayerChatEvent(gg_trg_Select_Game_Mode,udg_p_DTAX_Host,"-",false)
call TriggerAddAction(gg_trg_Select_Game_Mode,function Trig_Select_Game_Mode_Actions)
call TriggerAddCondition(gg_trg_Select_Game_Mode,Condition(function Trig_Select_Game_Mode_Conditions))
endfunction
function InitTrig_Select_Game_Mode takes nothing returns nothing
endfunction
function Trig_ProcessCMD_Actions takes nothing returns nothing
local string llg=StringCase(GetEventPlayerChatString(),false)
local boolean ll0=llg=="-random"
local boolean lLw=llg=="-repick"
local boolean lLW=llg=="-gameinfo"
local boolean lLx=llg=="-swaphero"
local boolean lLX=llg=="-recreate"
local boolean lLy=llg=="-unstuck"
local boolean lLY=llg=="-matchup"or llg=="-ma"
local boolean lLz=llg=="-movespeed"or llg=="-ms"
local boolean lAttackspeed=llg=="-attackspeed"or llg=="-as"
local boolean lLZ=llg=="-disablehelp"
local boolean lL0=llg=="-enablehelp"
local boolean lL1=llg=="-creepstats"or llg=="-cs"
local boolean lL2=llg=="-cson"or llg=="-csoff"
local boolean lL3=llg=="-hidemsg"
local boolean lL4=llg=="-showmsg"
local boolean lL5=llg=="-weather snow"or llg=="-weather rain"or llg=="-weather off"
local boolean lL6=llg=="-showdeny"or llg=="-hidedeny"
local boolean lDI=llg=="-denyinfo"or llg=="-di"
call ExecuteFuncEx("l0l0",ll0)
call ExecuteFuncEx("LwLw",lLw)
call ExecuteFuncEx("LWLW",lLW)
call ExecuteFuncEx("LxLx",lLx)
call ExecuteFuncEx("LXLX",lLX)
call ExecuteFuncEx("LyLy",lLy)
call ExecuteFuncEx("LYLY",lLY)
call ExecuteFuncEx("LzLz",lLz)
call ExecuteFuncEx("LZLZ",lLZ)
call ExecuteFuncEx("L0L0",lL0)
call ExecuteFuncEx("L1L1",lL1)
call ExecuteFuncEx("L2L2",lL2)
call ExecuteFuncEx("L3L3",lL3)
call ExecuteFuncEx("L4L4",lL4)
call ExecuteFuncEx("L5L5",lL5)
call ExecuteFuncEx("L6L6",lL6)
call ExecuteFuncEx("mc",lDI)
endfunction
function StartTrigger_ProcessCMD takes nothing returns nothing
set gg_trg_ProcessCMD=CreateTrigger()
call TriggerRegisterPlayerChatEvent(gg_trg_ProcessCMD,udg_pA_DTAX_SEPlayers[1],"-",false)
call TriggerRegisterPlayerChatEvent(gg_trg_ProcessCMD,udg_pA_DTAX_SEPlayers[2],"-",false)
call TriggerRegisterPlayerChatEvent(gg_trg_ProcessCMD,udg_pA_DTAX_SEPlayers[3],"-",false)
call TriggerRegisterPlayerChatEvent(gg_trg_ProcessCMD,udg_pA_DTAX_SEPlayers[4],"-",false)
call TriggerRegisterPlayerChatEvent(gg_trg_ProcessCMD,udg_pA_DTAX_SEPlayers[5],"-",false)
call TriggerRegisterPlayerChatEvent(gg_trg_ProcessCMD,udg_pA_DTAX_SCPlayers[1],"-",false)
call TriggerRegisterPlayerChatEvent(gg_trg_ProcessCMD,udg_pA_DTAX_SCPlayers[2],"-",false)
call TriggerRegisterPlayerChatEvent(gg_trg_ProcessCMD,udg_pA_DTAX_SCPlayers[3],"-",false)
call TriggerRegisterPlayerChatEvent(gg_trg_ProcessCMD,udg_pA_DTAX_SCPlayers[4],"-",false)
call TriggerRegisterPlayerChatEvent(gg_trg_ProcessCMD,udg_pA_DTAX_SCPlayers[5],"-",false)
call TriggerAddAction(gg_trg_ProcessCMD,function Trig_ProcessCMD_Actions)
endfunction
function InitTrig_ProcessCMD takes nothing returns nothing
endfunction
function Trig_Recreate_Conditions takes nothing returns boolean
return GetSpellAbilityId()=='A0FI'
endfunction
function mrmr takes integer pmR,unit pms,unit pmS returns nothing
local integer lEq=1
local integer lEQ=GetUnitAbilityLevel(pms,pmR)
loop
exitwhen lEq>lEQ
call SelectHeroSkill(pmS,pmR)
set lEq=lEq+1
endloop
endfunction
function Trig_Recreate_Actions takes nothing returns nothing
local integer lEq
local integer lEQ
local unit lmT
local location liD=GetUnitLoc(GetTriggerUnit())
set lmT=CreateUnitAtLoc(GetOwningPlayer(GetTriggerUnit()),GetUnitTypeId(GetTriggerUnit()),liD,bj_UNIT_FACING)
call SetHeroXP(lmT,GetHeroXP(GetTriggerUnit()),false)
set lEq=1
set lEQ=GetUnitAbilityLevel(GetTriggerUnit(),'Aamk')
loop
exitwhen lEq>lEQ
call SelectHeroSkill(bj_lastCreatedUnit,'Aamk')
set lEq=lEq+1
endloop
set lEq=0
set lEQ=5
loop
exitwhen lEq>lEQ
call UnitAddItem(lmT,UnitItemInSlot(GetTriggerUnit(),lEq))
set lEq=lEq+1
endloop
if(GetUnitTypeId(GetTriggerUnit())=='Eevi')then
call mrmr('A04L',GetTriggerUnit(),lmT)
call mrmr('A0H4',GetTriggerUnit(),lmT)
call mrmr('AEvi',GetTriggerUnit(),lmT)
call mrmr('A07Q',GetTriggerUnit(),lmT)
endif
if(GetUnitTypeId(GetTriggerUnit())=='U008')then
call mrmr('A03D',GetTriggerUnit(),lmT)
call mrmr('A02G',GetTriggerUnit(),lmT)
call mrmr('A03E',GetTriggerUnit(),lmT)
call mrmr('A093',GetTriggerUnit(),lmT)
endif
if(GetUnitTypeId(GetTriggerUnit())=='U007')then
call mrmr('A0F9',GetTriggerUnit(),lmT)
call mrmr('A06Y',GetTriggerUnit(),lmT)
call mrmr('A01E',GetTriggerUnit(),lmT)
call mrmr('A028',GetTriggerUnit(),lmT)
endif
if(GetUnitTypeId(GetTriggerUnit())=='Hlgr')then
call mrmr('A03G',GetTriggerUnit(),lmT)
call mrmr('A03F',GetTriggerUnit(),lmT)
call mrmr('A0O3',GetTriggerUnit(),lmT)
call mrmr('AEim',GetTriggerUnit(),lmT)
endif
if(GetUnitTypeId(GetTriggerUnit())=='Ekee')then
call mrmr('A035',GetTriggerUnit(),lmT)
call mrmr('A06W',GetTriggerUnit(),lmT)
call mrmr('A06V',GetTriggerUnit(),lmT)
call mrmr('A06X',GetTriggerUnit(),lmT)
endif
call DropUnit(GetTriggerUnit())
call RemoveLocation(liD)
set udg_uA_DTAX_player_hero_unit[GetPlayerId(GetOwningPlayer(lmT))]=lmT
endfunction
function StartTrigger_Recreate takes nothing returns nothing
set gg_trg_Recreate=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Recreate,EVENT_PLAYER_UNIT_SPELL_FINISH)
call TriggerAddCondition(gg_trg_Recreate,Condition(function Trig_Recreate_Conditions))
call TriggerAddAction(gg_trg_Recreate,function Trig_Recreate_Actions)
endfunction
function InitTrig_Recreate takes nothing returns nothing
endfunction
function Trig_Unstuck_Conditions takes nothing returns boolean
return GetSpellAbilityId()=='A0AT'
endfunction
function Trig_Unstuck_Actions takes nothing returns nothing
local location liD
if(PlayerIsSentinel(GetOwningPlayer(GetTriggerUnit())))then
set liD=GetRectCenter(gg_rct_SentinelHeroSpawn)
else
set liD=GetRectCenter(gg_rct_ScourgeHeroSpawn)
endif
call SetUnitPositionLoc(GetTriggerUnit(),liD)
call RemoveLocation(liD)
endfunction
function StartTrigger_Unstuck takes nothing returns nothing
set gg_trg_Unstuck=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Unstuck,EVENT_PLAYER_UNIT_SPELL_FINISH)
call TriggerAddCondition(gg_trg_Unstuck,Condition(function Trig_Unstuck_Conditions))
call TriggerAddAction(gg_trg_Unstuck,function Trig_Unstuck_Actions)
endfunction
function InitTrig_Unstuck takes nothing returns nothing
endfunction
function ShareLeaversGold takes nothing returns nothing
local player lgb=GetPlayer(H2Tx(GetExpiredTimer()),"Leaver")
local integer lEq=1
local integer lgB
local integer lfa=GetPlayerState(lgb,PLAYER_STATE_RESOURCE_GOLD)
call SetPlayerState(lgb,PLAYER_STATE_RESOURCE_GOLD,0)
if PlayerIsSentinel(lgb)then
set lgB=ForceActivePlayers(udg_f_DTAX_SEPlayers)
else
set lgB=ForceActivePlayers(udg_f_DTAX_SCPlayers)
endif
if PlayerIsSentinel(lgb)then
loop
exitwhen lEq>5
if PlayerIsActive(udg_pA_DTAX_SEPlayers[lEq])then
call SetPlayerState(udg_pA_DTAX_SEPlayers[lEq],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(udg_pA_DTAX_SEPlayers[lEq],PLAYER_STATE_RESOURCE_GOLD)+lfa/lgB)
endif
set lEq=lEq+1
endloop
else
loop
exitwhen lEq>5
if PlayerIsActive(udg_pA_DTAX_SCPlayers[lEq])then
call SetPlayerState(udg_pA_DTAX_SCPlayers[lEq],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(udg_pA_DTAX_SCPlayers[lEq],PLAYER_STATE_RESOURCE_GOLD)+lfa/lgB)
endif
set lEq=lEq+1
endloop
endif
endfunction
function InitGoldShare takes player pgb returns nothing
local timer ltt=CreateTimer()
local string lf5=H2Tx(ltt)
call SetHandle(lf5,"Leaver",pgb)
call TimerStart(ltt,2,true,function ShareLeaversGold)
endfunction
function Trig_Leave_Actions takes nothing returns nothing
local integer lFw=ForceActivePlayers(udg_f_DTAX_SEPlayers)
local integer lFV=ForceActivePlayers(udg_f_DTAX_SCPlayers)
local integer lEq
local integer lEQ
local string lgd
if(udg_i_DTAX_game_minutes<10)then
set lgd=I2S(udg_i_DTAX_game_hours)+":0"+I2S(udg_i_DTAX_game_minutes)
else
set lgd=I2S(udg_i_DTAX_game_hours)+":"+I2S(udg_i_DTAX_game_minutes)
endif
set udg_bJ[GetPlayerId(GetTriggerPlayer())]=lgd
call MultyEcho(bj_FORCE_ALL_PLAYERS,25.,udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(GetTriggerPlayer())]+GetPlayerName(GetTriggerPlayer())+"|r"+"|c00ff0303 has left the game.|r")
if(PlayerIsSentinel(GetTriggerPlayer()))then
set lEq=1
set lEQ=5
loop
exitwhen lEq>lEQ
if(udg_pA_DTAX_SEPlayers[lEq]!=GetTriggerPlayer())then
if(PlayerIsActive(udg_pA_DTAX_SEPlayers[lEq]))then
call SetPlayerAllianceStateBJ(GetTriggerPlayer(),udg_pA_DTAX_SEPlayers[lEq],4)
endif
endif
set lEq=lEq+1
endloop
else
set lEq=1
set lEQ=5
loop
exitwhen lEq>lEQ
if(udg_pA_DTAX_SCPlayers[lEq]!=GetTriggerPlayer())then
if(PlayerIsActive(udg_pA_DTAX_SCPlayers[lEq]))then
call SetPlayerAllianceStateBJ(GetTriggerPlayer(),udg_pA_DTAX_SCPlayers[lEq],4)
endif
endif
set lEq=lEq+1
endloop
endif
call InitGoldShare(GetTriggerPlayer())
endfunction
function StartTrigger_Leave takes nothing returns nothing
set gg_trg_Leave=CreateTrigger()
call TriggerRegisterPlayerEventLeave(gg_trg_Leave,udg_pA_DTAX_SEPlayers[1])
call TriggerRegisterPlayerEventLeave(gg_trg_Leave,udg_pA_DTAX_SEPlayers[2])
call TriggerRegisterPlayerEventLeave(gg_trg_Leave,udg_pA_DTAX_SEPlayers[3])
call TriggerRegisterPlayerEventLeave(gg_trg_Leave,udg_pA_DTAX_SEPlayers[4])
call TriggerRegisterPlayerEventLeave(gg_trg_Leave,udg_pA_DTAX_SEPlayers[5])
call TriggerRegisterPlayerEventLeave(gg_trg_Leave,udg_pA_DTAX_SCPlayers[1])
call TriggerRegisterPlayerEventLeave(gg_trg_Leave,udg_pA_DTAX_SCPlayers[2])
call TriggerRegisterPlayerEventLeave(gg_trg_Leave,udg_pA_DTAX_SCPlayers[3])
call TriggerRegisterPlayerEventLeave(gg_trg_Leave,udg_pA_DTAX_SCPlayers[4])
call TriggerRegisterPlayerEventLeave(gg_trg_Leave,udg_pA_DTAX_SCPlayers[5])
call TriggerAddAction(gg_trg_Leave,function Trig_Leave_Actions)
call SetHandle("Global","Trig|Leave",gg_trg_Leave)
endfunction
function InitTrig_Leave takes nothing returns nothing
endfunction
function gIgI takes unit pgj,real pxx,real pyy returns nothing
local string lf5=H2Tx(GetOwningPlayer(pgj))
local unit lgg=GetUnit(lf5,"Kobold0")
local unit lgG=GetUnit(lf5,"Kobold1")
local unit lgh=GetUnit(lf5,"Kobold2")
local unit lgH=GetUnit(lf5,"Kobold3")
local unit lgi
set lgi=lgg
if lgi!=null and pgj!=lgi then
call ReviveHero(lgi,pxx,pyy,false)
call SetUnitX(lgi,pxx)
call SetUnitY(lgi,pyy)
call gDgD(lgi)
call SetUnitPathing(lgi,true)
endif
set lgi=lgG
if lgi!=null and pgj!=lgi then
call ReviveHero(lgi,pxx,pyy,false)
call SetUnitX(lgi,pxx)
call SetUnitY(lgi,pyy)
call gDgD(lgi)
call SetUnitPathing(lgi,true)
endif
set lgi=lgh
if lgi!=null and pgj!=lgi then
call ReviveHero(lgi,pxx,pyy,false)
call SetUnitX(lgi,pxx)
call SetUnitY(lgi,pyy)
call gDgD(lgi)
call SetUnitPathing(lgi,true)
endif
set lgi=lgH
if lgi!=null and pgj!=lgi then
call ReviveHero(lgi,pxx,pyy,false)
call SetUnitX(lgi,pxx)
call SetUnitY(lgi,pyy)
call gDgD(lgi)
call SetUnitPathing(lgi,true)
endif
endfunction
function Trig_ReviveHero_Actions takes nothing returns nothing
local unit lfo=GetTriggerUnit()
local player lEk=GetOwningPlayer(lfo)
local real lxx
local real lyy
if PlayerIsSentinel(GetOwningPlayer(lfo))then
set lxx=GetRectCenterX(gg_rct_SentinelHeroSpawn)
set lyy=GetRectCenterY(gg_rct_SentinelHeroSpawn)
else
set lxx=GetRectCenterX(gg_rct_ScourgeHeroSpawn)
set lyy=GetRectCenterY(gg_rct_ScourgeHeroSpawn)
endif
call PanCameraToTimedForPlayer(lEk,lxx,lyy,0)
call ClearSelectionForPlayer(lEk)
call SelectUnitAddForPlayer(lfo,lEk)
set udg_iA_DTAX_revive_time[GetPlayerId(lEk)]=0
if gege(lfo)then
call gIgI(lfo,lxx,lyy)
endif
call SetUnitX(lfo,lxx)
call SetUnitY(lfo,lyy)
call gDgD(lfo)
call SetUnitPathing(lfo,true)
endfunction
function StartTrigger_ReviveHero takes nothing returns nothing
set gg_trg_ReviveHero=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_ReviveHero,EVENT_PLAYER_HERO_REVIVE_FINISH)
call TriggerAddAction(gg_trg_ReviveHero,function Trig_ReviveHero_Actions)
endfunction
function InitTrig_ReviveHero takes nothing returns nothing
endfunction
function Trig_NormalGoldIncome_Actions takes nothing returns nothing
call SetPlayerState(udg_pA_DTAX_SEPlayers[1],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(udg_pA_DTAX_SEPlayers[1],PLAYER_STATE_RESOURCE_GOLD)+8)
call SetPlayerState(udg_pA_DTAX_SEPlayers[2],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(udg_pA_DTAX_SEPlayers[2],PLAYER_STATE_RESOURCE_GOLD)+8)
call SetPlayerState(udg_pA_DTAX_SEPlayers[3],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(udg_pA_DTAX_SEPlayers[3],PLAYER_STATE_RESOURCE_GOLD)+8)
call SetPlayerState(udg_pA_DTAX_SEPlayers[4],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(udg_pA_DTAX_SEPlayers[4],PLAYER_STATE_RESOURCE_GOLD)+8)
call SetPlayerState(udg_pA_DTAX_SEPlayers[5],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(udg_pA_DTAX_SEPlayers[5],PLAYER_STATE_RESOURCE_GOLD)+8)
call SetPlayerState(udg_pA_DTAX_SCPlayers[1],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(udg_pA_DTAX_SCPlayers[1],PLAYER_STATE_RESOURCE_GOLD)+8)
call SetPlayerState(udg_pA_DTAX_SCPlayers[2],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(udg_pA_DTAX_SCPlayers[2],PLAYER_STATE_RESOURCE_GOLD)+8)
call SetPlayerState(udg_pA_DTAX_SCPlayers[3],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(udg_pA_DTAX_SCPlayers[3],PLAYER_STATE_RESOURCE_GOLD)+8)
call SetPlayerState(udg_pA_DTAX_SCPlayers[4],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(udg_pA_DTAX_SCPlayers[4],PLAYER_STATE_RESOURCE_GOLD)+8)
call SetPlayerState(udg_pA_DTAX_SCPlayers[5],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(udg_pA_DTAX_SCPlayers[5],PLAYER_STATE_RESOURCE_GOLD)+8)
endfunction
function StartTrigger_NormalGoldIncome takes nothing returns nothing
set gg_trg_NormalGoldIncome=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(gg_trg_NormalGoldIncome,7.)
call TriggerAddAction(gg_trg_NormalGoldIncome,function Trig_NormalGoldIncome_Actions)
endfunction
function InitTrig_NormalGoldIncome takes nothing returns nothing
endfunction
function Trig_CreepKill_Actions takes nothing returns nothing
if(GetUnitTypeId(GetTriggerUnit())=='ugho')then
if(IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit())))then
set udg_iA_DTAX_ally_mobs_killed[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=udg_iA_DTAX_ally_mobs_killed[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
else
set udg_iA_DTAX_enemy_mobs_killed[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=udg_iA_DTAX_enemy_mobs_killed[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
endif
endif
if(GetUnitTypeId(GetTriggerUnit())=='u001')then
if(IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit())))then
set udg_iA_DTAX_ally_mobs_killed[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=udg_iA_DTAX_ally_mobs_killed[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
else
set udg_iA_DTAX_enemy_mobs_killed[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=udg_iA_DTAX_enemy_mobs_killed[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
endif
endif
if(GetUnitTypeId(GetTriggerUnit())=='unec')then
if(IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit())))then
set udg_iA_DTAX_ally_mobs_killed[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=udg_iA_DTAX_ally_mobs_killed[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
else
set udg_iA_DTAX_enemy_mobs_killed[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=udg_iA_DTAX_enemy_mobs_killed[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
endif
endif
if(GetUnitTypeId(GetTriggerUnit())=='u002')then
if(IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit())))then
set udg_iA_DTAX_ally_mobs_killed[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=udg_iA_DTAX_ally_mobs_killed[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
else
set udg_iA_DTAX_enemy_mobs_killed[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=udg_iA_DTAX_enemy_mobs_killed[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
endif
endif
if(GetUnitTypeId(GetTriggerUnit())=='esen')then
if(IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit())))then
set udg_iA_DTAX_ally_mobs_killed[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=udg_iA_DTAX_ally_mobs_killed[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
else
set udg_iA_DTAX_enemy_mobs_killed[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=udg_iA_DTAX_enemy_mobs_killed[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
endif
endif
if(GetUnitTypeId(GetTriggerUnit())=='e00V')then
if(IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit())))then
set udg_iA_DTAX_ally_mobs_killed[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=udg_iA_DTAX_ally_mobs_killed[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
else
set udg_iA_DTAX_enemy_mobs_killed[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=udg_iA_DTAX_enemy_mobs_killed[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
endif
endif
if(GetUnitTypeId(GetTriggerUnit())=='edry')then
if(IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit())))then
set udg_iA_DTAX_ally_mobs_killed[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=udg_iA_DTAX_ally_mobs_killed[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
else
set udg_iA_DTAX_enemy_mobs_killed[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=udg_iA_DTAX_enemy_mobs_killed[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
endif
endif
if(GetUnitTypeId(GetTriggerUnit())=='e00W')then
if(IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit())))then
set udg_iA_DTAX_ally_mobs_killed[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=udg_iA_DTAX_ally_mobs_killed[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
else
set udg_iA_DTAX_enemy_mobs_killed[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=udg_iA_DTAX_enemy_mobs_killed[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
endif
endif
call LeaderboardSetLabelBJ(udg_lbA_DTAX_CS_boards[GetPlayerId(GetOwningPlayer(GetKillingUnit()))],"Creep Kills: "+I2S(udg_iA_DTAX_enemy_mobs_killed[GetPlayerId(GetOwningPlayer(GetKillingUnit()))])+"  Denies: "+I2S(udg_iA_DTAX_ally_mobs_killed[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]))
endfunction
function StartTrigger_CreepKill takes nothing returns nothing
set gg_trg_CreepKill=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_CreepKill,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddAction(gg_trg_CreepKill,function Trig_CreepKill_Actions)
endfunction
function InitTrig_CreepKill takes nothing returns nothing
endfunction
function Trig_HeroKill_Conditions takes nothing returns boolean
if(IsUnitType(GetDyingUnit(),UNIT_TYPE_HERO)==false)then
return false
endif
if(GetPlayerController(GetOwningPlayer(GetKillingUnit()))!=MAP_CONTROL_USER)then
return false
endif
if(GetDyingUnit()==GetKillingUnit())then
return false
endif
if(GetOwningPlayer(GetKillingUnit())==null)then
return false
endif
if(PlayerIsSentinel(GetOwningPlayer(GetKillingUnit())))then
if(PlayerIsSentinel(GetOwningPlayer(GetDyingUnit())))then
return false
endif
endif
if(PlayerIsScourge(GetOwningPlayer(GetKillingUnit())))then
if(PlayerIsScourge(GetOwningPlayer(GetDyingUnit())))then
return false
endif
endif
return true
endfunction
function Trig_HeroKill_Actions takes nothing returns nothing
call DisableTrigger(gg_trg_HeroKill)
call MultyEcho(udg_for_DTAX_NonComputerPlayers,10.,(udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+(GetPlayerName(GetOwningPlayer(GetKillingUnit()))+("|r just drew "+(udg_sA_DTAX_player_textcolor_prefixes[0]+"first blood!|r (+200 gold)")))))
call AdjustPlayerStateBJ(200,GetOwningPlayer(GetKillingUnit()),PLAYER_STATE_RESOURCE_GOLD)
call PlaySoundBJ(gg_snd_FirstBlood)
endfunction
function StartTrigger_HeroKill takes nothing returns nothing
set gg_trg_HeroKill=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_HeroKill,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(gg_trg_HeroKill,Condition(function Trig_HeroKill_Conditions))
call TriggerAddAction(gg_trg_HeroKill,function Trig_HeroKill_Actions)
endfunction
function InitTrig_HeroKill takes nothing returns nothing
endfunction
function iiii takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO) and IsUnitIllusion(GetFilterUnit())==false and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetDyingUnit()))
endfunction
function iGiG takes unit pih,player piH returns nothing
local texttag ltt=CreateTextTagUnitBJ("!",pih,64,13,udg_eE[GetPlayerId(piH)],udg_ef[GetPlayerId(piH)],udg_eF[GetPlayerId(piH)],15)
call SetTextTagVelocityBJ(ltt,64,90)
call SetTextTagVisibility(ltt,false)
if udg_IsShowDenySwitchedOn[GetPlayerId(GetLocalPlayer())] then
call SetTextTagVisibility(ltt,true)
endif
call PolledWait(1.)
call DestroyTextTag(ltt)
endfunction
function Trig_DenyHero_Actions takes nothing returns nothing
local boolexpr lEW=Condition(function iiii)
local group lEw=CreateGroup()
local integer lXP
local integer lij
local integer lEq=1
local unit lgl
local integer liJ=18
local integer lik=liJ*2
call GroupEnumUnitsInRange(lEw,GetUnitX(GetDyingUnit()),GetUnitY(GetDyingUnit()),1000,lEW)
set lij=CountUnitsInGroup(lEw)
loop
exitwhen lEq>lij
set lgl=FirstOfGroup(lEw)
if IsUnitType(lgl,UNIT_TYPE_MELEE_ATTACKER)then
call AddHeroXP(lgl,lik/lij,true)
else
call AddHeroXP(lgl,liJ/lij,true)
endif
call GroupRemoveUnit(lEw,lgl)
set lEq=lEq+1
endloop
call DestroyGroup(lEw)
call DestroyBoolExpr(lEW)
call iGiG(GetDyingUnit(),GetOwningPlayer(GetKillingUnit()))
endfunction
function Trig_DenyHero_Conditions takes nothing returns boolean
return IsUnitAlly(GetKillingUnit(),GetOwningPlayer(GetDyingUnit()))
endfunction
function StartTrigger_DenyHero takes nothing returns nothing
set gg_trg_DenyHero=CreateTrigger()
call TriggerRegisterPlayerUnitEvent(gg_trg_DenyHero,udg_pA_DTAX_SEPlayers[0],EVENT_PLAYER_UNIT_DEATH,null)
call TriggerRegisterPlayerUnitEvent(gg_trg_DenyHero,udg_pA_DTAX_SCPlayers[0],EVENT_PLAYER_UNIT_DEATH,null)
call TriggerAddAction(gg_trg_DenyHero,function Trig_DenyHero_Actions)
call TriggerAddCondition(gg_trg_DenyHero,Condition(function Trig_DenyHero_Conditions))
endfunction
function InitTrig_DenyHero takes nothing returns nothing
endfunction
function Trig_StartSpawningCreeps_Actions takes nothing returns nothing
set udg_b_DTAX_spawn_creeps_time_elapsed=true
endfunction
function StartTrigger_StartSpawningCreeps takes nothing returns nothing
set gg_trg_StartSpawningCreeps=CreateTrigger()
call TriggerRegisterTimerEventSingle(gg_trg_StartSpawningCreeps,65.)
call TriggerAddAction(gg_trg_StartSpawningCreeps,function Trig_StartSpawningCreeps_Actions)
endfunction
function InitTrig_StartSpawningCreeps takes nothing returns nothing
endfunction
function Trig_SwapTimeElapsed_Actions takes nothing returns nothing
set udg_b_DTAX_swap_hero_time_elapsed=true
endfunction
function StartTrigger_SwapTimeElapsed takes nothing returns nothing
set gg_trg_SwapTimeElapsed=CreateTrigger()
call TriggerRegisterTimerEventSingle(gg_trg_SwapTimeElapsed,90.)
call TriggerAddAction(gg_trg_SwapTimeElapsed,function Trig_SwapTimeElapsed_Actions)
endfunction
function InitTrig_SwapTimeElapsed takes nothing returns nothing
endfunction
function Trig_RepickTimeElapsed_Actions takes nothing returns nothing
set udg_b_DTAX_repick_time_elapsed=true
endfunction
function StartTrigger_RepickTimeElapsed takes nothing returns nothing
set gg_trg_RepickTimeElapsed=CreateTrigger()
call TriggerRegisterTimerEventSingle(gg_trg_RepickTimeElapsed,120.)
call TriggerAddAction(gg_trg_RepickTimeElapsed,function Trig_RepickTimeElapsed_Actions)
endfunction
function InitTrig_RepickTimeElapsed takes nothing returns nothing
endfunction
function Trig_Ancient_Protectors_Count_Conditions takes nothing returns boolean
if(GetUnitTypeId(GetTriggerUnit())=='e00R')then
return true
endif
if(GetUnitTypeId(GetTriggerUnit())=='e011')then
return true
endif
if(GetUnitTypeId(GetTriggerUnit())=='e00S')then
return true
endif
if(GetUnitTypeId(GetTriggerUnit())=='e019')then
return true
endif
return false
endfunction
function Trig_Ancient_Protectors_Count_Actions takes nothing returns nothing
set udg_iA_DTAX_towers_lost_each_side[1]=(udg_iA_DTAX_towers_lost_each_side[1]+1)
endfunction
function StartTrigger_Ancient_Protectors_Count takes nothing returns nothing
set gg_trg_Ancient_Protectors_Count=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Ancient_Protectors_Count,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(gg_trg_Ancient_Protectors_Count,Condition(function Trig_Ancient_Protectors_Count_Conditions))
call TriggerAddAction(gg_trg_Ancient_Protectors_Count,function Trig_Ancient_Protectors_Count_Actions)
endfunction
function InitTrig_Ancient_Protectors_Count takes nothing returns nothing
endfunction
function Trig_Spirit_Towers_Count_Conditions takes nothing returns boolean
if(GetUnitTypeId(GetTriggerUnit())=='u00M')then
return true
endif
if(GetUnitTypeId(GetTriggerUnit())=='u00D')then
return true
endif
if(GetUnitTypeId(GetTriggerUnit())=='u00N')then
return true
endif
if(GetUnitTypeId(GetTriggerUnit())=='u00T')then
return true
endif
return false
endfunction
function Trig_Spirit_Towers_Count_Actions takes nothing returns nothing
set udg_iA_DTAX_towers_lost_each_side[2]=(udg_iA_DTAX_towers_lost_each_side[2]+1)
endfunction
function StartTrigger_Spirit_Towers_Count takes nothing returns nothing
set gg_trg_Spirit_Towers_Count=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Spirit_Towers_Count,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(gg_trg_Spirit_Towers_Count,Condition(function Trig_Spirit_Towers_Count_Conditions))
call TriggerAddAction(gg_trg_Spirit_Towers_Count,function Trig_Spirit_Towers_Count_Actions)
endfunction
function InitTrig_Spirit_Towers_Count takes nothing returns nothing
endfunction
function SEWONEndGame takes nothing returns nothing
call PlayerDefeat(udg_pA_DTAX_SCPlayers[1])
call PlayerDefeat(udg_pA_DTAX_SCPlayers[2])
call PlayerDefeat(udg_pA_DTAX_SCPlayers[3])
call PlayerDefeat(udg_pA_DTAX_SCPlayers[4])
call PlayerDefeat(udg_pA_DTAX_SCPlayers[5])
call PlayerWin(udg_pA_DTAX_SEPlayers[1])
call PlayerWin(udg_pA_DTAX_SEPlayers[2])
call PlayerWin(udg_pA_DTAX_SEPlayers[3])
call PlayerWin(udg_pA_DTAX_SEPlayers[4])
call PlayerWin(udg_pA_DTAX_SEPlayers[5])
call FlushGameCache(udg_gc_DTAX_Core)
endfunction
function Trig_Sentienel_Won_Actions takes nothing returns nothing
local timer ltt=CreateTimer()
set udg_bI="|c00ff0303The Sentinel|r"
call ExecuteFunc("FinalBoardShow")
if udg_b_DTAX_observer_slot_used then
call TriggerExecute(udg_triggerl181)
call DisableTrigger(udg_triggerl181)
endif
call ClearTextMessages()
call MultyEcho(bj_FORCE_ALL_PLAYERS,45,"The Sentinel has won!  Get the latest version from http://www.getdota.com/.")
set udg_A5=true
call TimerStart(ltt,'x',false,function SEWONEndGame)
call DisableTrigger(gg_trg_Sentienel_Won)
call DisableTrigger(gg_trg_Scourge_Won)
call PauseAllUnitsEx()
call DisableTrigger(GetTrigger("Global","Trig|Leave"))
call DisableTrigger(gg_trg_SpawnCreeps)
call DisableTrigger(gg_trg_KD_Refresh)
call DisableTrigger(gg_trg_NormalGoldIncome)
if udg_b_DTAX_easy_mode then
call DisableTrigger(udg_triggerl182)
endif
call jbjb()
endfunction
function StartTrigger_Sentienel_Won takes nothing returns nothing
set gg_trg_Sentienel_Won=CreateTrigger()
call TriggerRegisterUnitEvent(gg_trg_Sentienel_Won,gg_unit_unpl_0050,EVENT_UNIT_DEATH)
call TriggerAddAction(gg_trg_Sentienel_Won,function Trig_Sentienel_Won_Actions)
endfunction
function InitTrig_Sentienel_Won takes nothing returns nothing
endfunction
function jdjd takes nothing returns nothing
call PlayerDefeat(udg_pA_DTAX_SEPlayers[1])
call PlayerDefeat(udg_pA_DTAX_SEPlayers[2])
call PlayerDefeat(udg_pA_DTAX_SEPlayers[3])
call PlayerDefeat(udg_pA_DTAX_SEPlayers[4])
call PlayerDefeat(udg_pA_DTAX_SEPlayers[5])
call PlayerWin(udg_pA_DTAX_SCPlayers[1])
call PlayerWin(udg_pA_DTAX_SCPlayers[2])
call PlayerWin(udg_pA_DTAX_SCPlayers[3])
call PlayerWin(udg_pA_DTAX_SCPlayers[4])
call PlayerWin(udg_pA_DTAX_SCPlayers[5])
call FlushGameCache(udg_gc_DTAX_Core)
endfunction
function Trig_Scourge_Won_Actions takes nothing returns nothing
local timer ltt=CreateTimer()
set udg_bI="|c0020c000The Scourge|r"
call ExecuteFunc("FinalBoardShow")
if udg_b_DTAX_observer_slot_used then
call TriggerExecute(udg_triggerl181)
call DisableTrigger(udg_triggerl181)
endif
call ClearTextMessages()
call MultyEcho(bj_FORCE_ALL_PLAYERS,45,"The Scourge has won!  Get the latest version from http://www.getdota.com/.")
set udg_A5=true
call TimerStart(ltt,'x',false,function jdjd)
call DisableTrigger(gg_trg_Sentienel_Won)
call DisableTrigger(gg_trg_Scourge_Won)
call PauseAllUnitsEx()
call DisableTrigger(GetTrigger("Global","Trig|Leave"))
call DisableTrigger(gg_trg_SpawnCreeps)
call DisableTrigger(gg_trg_KD_Refresh)
call DisableTrigger(gg_trg_NormalGoldIncome)
if udg_b_DTAX_easy_mode then
call DisableTrigger(udg_triggerl182)
endif
call jbjb()
endfunction
function StartTrigger_Scourge_Won takes nothing returns nothing
set gg_trg_Scourge_Won=CreateTrigger()
call TriggerRegisterUnitEvent(gg_trg_Scourge_Won,gg_unit_etol_0010,EVENT_UNIT_DEATH)
call TriggerAddAction(gg_trg_Scourge_Won,function Trig_Scourge_Won_Actions)
endfunction
function InitTrig_Scourge_Won takes nothing returns nothing
endfunction
function Trig_WT_and_FT_Protection_Conditions takes nothing returns boolean
return IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetAttacker()))
endfunction
function IsMainUnit takes nothing returns boolean
if(GetUnitTypeId(GetTriggerUnit())=='etol')then
return true
endif
if(GetUnitTypeId(GetTriggerUnit())=='unpl')then
return true
endif
return false
endfunction
function IsHeroDot takes nothing returns boolean
if(IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)==false)then
return false
endif
if(UnitHasBuffBJ(GetTriggerUnit(),'BNdo'))then
return false
endif
if(UnitHasBuffBJ(GetTriggerUnit(),'BEsh'))then
return false
endif
return true
endfunction
function IsHalfHpCreep takes nothing returns boolean
if(IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO))then
return false
endif
if(IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE))then
return false
endif
if(GetUnitLifePercent(GetTriggerUnit())<50.)then
return false
endif
return true
endfunction
function LowHpTower takes nothing returns boolean
if(IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false)then
return false
endif
if(GetUnitLifePercent(GetTriggerUnit())<10)then
return false
endif
return true
endfunction
function Trig_WT_and_FT_Protection_Actions takes nothing returns nothing
if(IsMainUnit()or IsHeroDot()or IsHalfHpCreep()or LowHpTower())then
call IssueImmediateOrderById(GetAttacker(),OrderId("stop"))
endif
endfunction
function StartTrigger_WT_and_FT_Protection takes nothing returns nothing
set gg_trg_WT_and_FT_Protection=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_WT_and_FT_Protection,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(gg_trg_WT_and_FT_Protection,Condition(function Trig_WT_and_FT_Protection_Conditions))
call TriggerAddAction(gg_trg_WT_and_FT_Protection,function Trig_WT_and_FT_Protection_Actions)
endfunction
function InitTrig_WT_and_FT_Protection takes nothing returns nothing
endfunction
function RestoreEveryTree takes nothing returns nothing
call DestructableRestoreLife(GetEnumDestructable(),GetDestructableMaxLife(GetEnumDestructable()),false)
endfunction
function Trig_Restore_Destructables_Actions takes nothing returns nothing
call EnumDestructablesInRectAll(bj_mapInitialPlayableArea,function RestoreEveryTree)
endfunction
function StartTrigger_Restore_Destructables takes nothing returns nothing
set gg_trg_Restore_Destructables=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(gg_trg_Restore_Destructables,300.)
call TriggerAddAction(gg_trg_Restore_Destructables,function Trig_Restore_Destructables_Actions)
endfunction
function InitTrig_Restore_Destructables takes nothing returns nothing
endfunction
function Trig_Dummy_Control_Conditions takes nothing returns boolean
return GetUnitTypeId(GetEnteringUnit())=='e00E'
endfunction
function Trig_Dummy_Control_Actions takes nothing returns nothing
call ShowUnitHide(GetEnteringUnit())
call SetUnitPathing(GetEnteringUnit(),false)
call SetUnitInvulnerable(GetEnteringUnit(),true)
call UnitApplyTimedLifeBJ(20.,'BTLF',GetEnteringUnit())
endfunction
function StartTrigger_Dummy_Control takes nothing returns nothing
set gg_trg_Dummy_Control=CreateTrigger()
call TriggerRegisterEnterRectSimple(gg_trg_Dummy_Control,bj_mapInitialPlayableArea)
call TriggerAddCondition(gg_trg_Dummy_Control,Condition(function Trig_Dummy_Control_Conditions))
call TriggerAddAction(gg_trg_Dummy_Control,function Trig_Dummy_Control_Actions)
endfunction
function InitTrig_Dummy_Control takes nothing returns nothing
endfunction
function Trig_Ancient_Protectors_System_Conditions takes nothing returns boolean
if(GetUnitTypeId(GetDyingUnit())=='e00R')then
return true
endif
if(GetUnitTypeId(GetDyingUnit())=='e011')then
return true
endif
if(GetUnitTypeId(GetDyingUnit())=='e00S')then
return true
endif
if(GetUnitTypeId(GetDyingUnit())=='e019')then
return true
endif
return false
endfunction
function TreeDefenders takes nothing returns boolean
if(not(GetDyingUnit()==gg_unit_e019_0020))then
return false
endif
if(not(IsUnitDeadBJ(gg_unit_e019_0021)))then
return false
endif
return true
endfunction
function TreeDefendersII takes nothing returns boolean
if(not(GetDyingUnit()==gg_unit_e019_0021))then
return false
endif
if(not(IsUnitDeadBJ(gg_unit_e019_0020)))then
return false
endif
return true
endfunction
function Trig_Ancient_Protectors_System_Actions takes nothing returns nothing
if IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit()))then
set udg_HeroesKilledAndTowersDestroyed[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=udg_HeroesKilledAndTowersDestroyed[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
endif
if(GetDyingUnit()==gg_unit_e00R_0011)then
call SetUnitInvulnerable(gg_unit_e011_0014,false)
call UnitAddTowerBounty(GetKillingUnit())
endif
if(GetDyingUnit()==gg_unit_e00R_0012)then
call SetUnitInvulnerable(gg_unit_e011_0015,false)
call UnitAddTowerBounty(GetKillingUnit())
endif
if(GetDyingUnit()==gg_unit_e00R_0013)then
call SetUnitInvulnerable(gg_unit_e011_0016,false)
call UnitAddTowerBounty(GetKillingUnit())
endif
if(GetDyingUnit()==gg_unit_e011_0014)then
call SetUnitInvulnerable(gg_unit_e00S_0017,false)
call UnitAddTowerBounty(GetKillingUnit())
endif
if(GetDyingUnit()==gg_unit_e011_0015)then
call SetUnitInvulnerable(gg_unit_e00S_0018,false)
call UnitAddTowerBounty(GetKillingUnit())
endif
if(GetDyingUnit()==gg_unit_e011_0016)then
call SetUnitInvulnerable(gg_unit_e00S_0019,false)
call UnitAddTowerBounty(GetKillingUnit())
endif
if(GetDyingUnit()==gg_unit_e00S_0017)then
call UnitAddTowerBounty(GetKillingUnit())
call SetUnitInvulnerable(gg_unit_eaom_0022,false)
call SetUnitInvulnerable(gg_unit_eaoe_0025,false)
call SetUnitInvulnerable(gg_unit_e019_0020,false)
call SetUnitInvulnerable(gg_unit_e019_0021,false)
call SetUnitInvulnerable(gg_unit_eaow_0038,false)
call SetUnitInvulnerable(gg_unit_edob_0039,false)
call SetUnitInvulnerable(gg_unit_emow_0028,false)
call SetUnitInvulnerable(gg_unit_emow_0029,false)
call SetUnitInvulnerable(gg_unit_emow_0030,false)
call SetUnitInvulnerable(gg_unit_emow_0031,false)
call SetUnitInvulnerable(gg_unit_emow_0032,false)
call SetUnitInvulnerable(gg_unit_emow_0033,false)
call SetUnitInvulnerable(gg_unit_emow_0034,false)
call SetUnitInvulnerable(gg_unit_emow_0035,false)
call SetUnitInvulnerable(gg_unit_emow_0036,false)
call SetUnitInvulnerable(gg_unit_emow_0037,false)
endif
if(GetDyingUnit()==gg_unit_e00S_0018)then
call UnitAddTowerBounty(GetKillingUnit())
call SetUnitInvulnerable(gg_unit_eaom_0023,false)
call SetUnitInvulnerable(gg_unit_eaoe_0026,false)
call SetUnitInvulnerable(gg_unit_e019_0020,false)
call SetUnitInvulnerable(gg_unit_e019_0021,false)
call SetUnitInvulnerable(gg_unit_eaow_0038,false)
call SetUnitInvulnerable(gg_unit_edob_0039,false)
call SetUnitInvulnerable(gg_unit_emow_0028,false)
call SetUnitInvulnerable(gg_unit_emow_0029,false)
call SetUnitInvulnerable(gg_unit_emow_0030,false)
call SetUnitInvulnerable(gg_unit_emow_0031,false)
call SetUnitInvulnerable(gg_unit_emow_0032,false)
call SetUnitInvulnerable(gg_unit_emow_0033,false)
call SetUnitInvulnerable(gg_unit_emow_0034,false)
call SetUnitInvulnerable(gg_unit_emow_0035,false)
call SetUnitInvulnerable(gg_unit_emow_0036,false)
call SetUnitInvulnerable(gg_unit_emow_0037,false)
endif
if(GetDyingUnit()==gg_unit_e00S_0019)then
call UnitAddTowerBounty(GetKillingUnit())
call SetUnitInvulnerable(gg_unit_eaom_0024,false)
call SetUnitInvulnerable(gg_unit_eaoe_0027,false)
call SetUnitInvulnerable(gg_unit_e019_0020,false)
call SetUnitInvulnerable(gg_unit_e019_0021,false)
call SetUnitInvulnerable(gg_unit_eaow_0038,false)
call SetUnitInvulnerable(gg_unit_edob_0039,false)
call SetUnitInvulnerable(gg_unit_emow_0028,false)
call SetUnitInvulnerable(gg_unit_emow_0029,false)
call SetUnitInvulnerable(gg_unit_emow_0030,false)
call SetUnitInvulnerable(gg_unit_emow_0031,false)
call SetUnitInvulnerable(gg_unit_emow_0032,false)
call SetUnitInvulnerable(gg_unit_emow_0033,false)
call SetUnitInvulnerable(gg_unit_emow_0034,false)
call SetUnitInvulnerable(gg_unit_emow_0035,false)
call SetUnitInvulnerable(gg_unit_emow_0036,false)
call SetUnitInvulnerable(gg_unit_emow_0037,false)
endif
if(TreeDefenders())then
call UnitAddTowerBounty(GetKillingUnit())
call SetUnitInvulnerable(gg_unit_etol_0010,false)
endif
if(TreeDefendersII())then
call UnitAddTowerBounty(GetKillingUnit())
call SetUnitInvulnerable(gg_unit_etol_0010,false)
endif
endfunction
function StartTrigger_Ancient_Protectors_System takes nothing returns nothing
set gg_trg_Ancient_Protectors_System=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Ancient_Protectors_System,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(gg_trg_Ancient_Protectors_System,Condition(function Trig_Ancient_Protectors_System_Conditions))
call TriggerAddAction(gg_trg_Ancient_Protectors_System,function Trig_Ancient_Protectors_System_Actions)
endfunction
function InitTrig_Ancient_Protectors_System takes nothing returns nothing
endfunction
function Trig_Spirit_Towers_System_Conditions takes nothing returns boolean
if(GetUnitTypeId(GetDyingUnit())=='u00M')then
return true
endif
if(GetUnitTypeId(GetDyingUnit())=='u00D')then
return true
endif
if(GetUnitTypeId(GetDyingUnit())=='u00N')then
return true
endif
if(GetUnitTypeId(GetDyingUnit())=='u00T')then
return true
endif
return false
endfunction
function jojo takes nothing returns boolean
if(not(GetDyingUnit()==gg_unit_u00T_0060))then
return false
endif
if(not(IsUnitDeadBJ(gg_unit_u00T_0061)))then
return false
endif
return true
endfunction
function jOjO takes nothing returns boolean
if(not(GetDyingUnit()==gg_unit_u00T_0061))then
return false
endif
if(not(IsUnitDeadBJ(gg_unit_u00T_0060)))then
return false
endif
return true
endfunction
function Trig_Spirit_Towers_System_Actions takes nothing returns nothing
if IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit()))then
set udg_HeroesKilledAndTowersDestroyed[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]=udg_HeroesKilledAndTowersDestroyed[GetPlayerId(GetOwningPlayer(GetKillingUnit()))]+1
endif
if(GetDyingUnit()==gg_unit_u00M_0051)then
call SetUnitInvulnerable(gg_unit_u00D_0054,false)
call UnitAddTowerBounty(GetKillingUnit())
endif
if(GetDyingUnit()==gg_unit_u00M_0052)then
call SetUnitInvulnerable(gg_unit_u00D_0055,false)
call UnitAddTowerBounty(GetKillingUnit())
endif
if(GetDyingUnit()==gg_unit_u00M_0053)then
call SetUnitInvulnerable(gg_unit_u00D_0056,false)
call UnitAddTowerBounty(GetKillingUnit())
endif
if(GetDyingUnit()==gg_unit_u00D_0054)then
call SetUnitInvulnerable(gg_unit_u00N_0057,false)
call UnitAddTowerBounty(GetKillingUnit())
endif
if(GetDyingUnit()==gg_unit_u00D_0055)then
call SetUnitInvulnerable(gg_unit_u00N_0058,false)
call UnitAddTowerBounty(GetKillingUnit())
endif
if(GetDyingUnit()==gg_unit_u00D_0056)then
call SetUnitInvulnerable(gg_unit_u00N_0059,false)
call UnitAddTowerBounty(GetKillingUnit())
endif
if(GetDyingUnit()==gg_unit_u00N_0057)then
call UnitAddTowerBounty(GetKillingUnit())
call SetUnitInvulnerable(gg_unit_usep_0062,false)
call SetUnitInvulnerable(gg_unit_utod_0065,false)
call SetUnitInvulnerable(gg_unit_u00T_0060,false)
call SetUnitInvulnerable(gg_unit_u00T_0061,false)
call SetUnitInvulnerable(gg_unit_usap_0078,false)
call SetUnitInvulnerable(gg_unit_uslh_0079,false)
call SetUnitInvulnerable(gg_unit_uzig_0068,false)
call SetUnitInvulnerable(gg_unit_uzig_0069,false)
call SetUnitInvulnerable(gg_unit_uzig_0070,false)
call SetUnitInvulnerable(gg_unit_uzig_0071,false)
call SetUnitInvulnerable(gg_unit_uzig_0072,false)
call SetUnitInvulnerable(gg_unit_uzig_0073,false)
call SetUnitInvulnerable(gg_unit_uzig_0074,false)
call SetUnitInvulnerable(gg_unit_uzig_0075,false)
call SetUnitInvulnerable(gg_unit_uzig_0076,false)
call SetUnitInvulnerable(gg_unit_uzig_0077,false)
endif
if(GetDyingUnit()==gg_unit_u00N_0058)then
call UnitAddTowerBounty(GetKillingUnit())
call SetUnitInvulnerable(gg_unit_usep_0063,false)
call SetUnitInvulnerable(gg_unit_utod_0066,false)
call SetUnitInvulnerable(gg_unit_u00T_0060,false)
call SetUnitInvulnerable(gg_unit_u00T_0061,false)
call SetUnitInvulnerable(gg_unit_usap_0078,false)
call SetUnitInvulnerable(gg_unit_uslh_0079,false)
call SetUnitInvulnerable(gg_unit_uzig_0068,false)
call SetUnitInvulnerable(gg_unit_uzig_0069,false)
call SetUnitInvulnerable(gg_unit_uzig_0070,false)
call SetUnitInvulnerable(gg_unit_uzig_0071,false)
call SetUnitInvulnerable(gg_unit_uzig_0072,false)
call SetUnitInvulnerable(gg_unit_uzig_0073,false)
call SetUnitInvulnerable(gg_unit_uzig_0074,false)
call SetUnitInvulnerable(gg_unit_uzig_0075,false)
call SetUnitInvulnerable(gg_unit_uzig_0076,false)
call SetUnitInvulnerable(gg_unit_uzig_0077,false)
endif
if(GetDyingUnit()==gg_unit_u00N_0059)then
call UnitAddTowerBounty(GetKillingUnit())
call SetUnitInvulnerable(gg_unit_usep_0064,false)
call SetUnitInvulnerable(gg_unit_utod_0067,false)
call SetUnitInvulnerable(gg_unit_u00T_0060,false)
call SetUnitInvulnerable(gg_unit_u00T_0061,false)
call SetUnitInvulnerable(gg_unit_usap_0078,false)
call SetUnitInvulnerable(gg_unit_uslh_0079,false)
call SetUnitInvulnerable(gg_unit_uzig_0068,false)
call SetUnitInvulnerable(gg_unit_uzig_0069,false)
call SetUnitInvulnerable(gg_unit_uzig_0070,false)
call SetUnitInvulnerable(gg_unit_uzig_0071,false)
call SetUnitInvulnerable(gg_unit_uzig_0072,false)
call SetUnitInvulnerable(gg_unit_uzig_0073,false)
call SetUnitInvulnerable(gg_unit_uzig_0074,false)
call SetUnitInvulnerable(gg_unit_uzig_0075,false)
call SetUnitInvulnerable(gg_unit_uzig_0076,false)
call SetUnitInvulnerable(gg_unit_uzig_0077,false)
endif
if(jojo())then
call UnitAddTowerBounty(GetKillingUnit())
call SetUnitInvulnerable(gg_unit_unpl_0050,false)
endif
if(jOjO())then
call UnitAddTowerBounty(GetKillingUnit())
call SetUnitInvulnerable(gg_unit_unpl_0050,false)
endif
endfunction
function StartTrigger_Spirit_Towers_System takes nothing returns nothing
set gg_trg_Spirit_Towers_System=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Spirit_Towers_System,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(gg_trg_Spirit_Towers_System,Condition(function Trig_Spirit_Towers_System_Conditions))
call TriggerAddAction(gg_trg_Spirit_Towers_System,function Trig_Spirit_Towers_System_Actions)
endfunction
function InitTrig_Spirit_Towers_System takes nothing returns nothing
endfunction
function Trig_IncreaseRangedSpawn_Actions takes nothing returns nothing
set udg_i_DTAX_unit_ranged_spawn_count=udg_i_DTAX_unit_ranged_spawn_count+1
endfunction
function StartTrigger_IncreaseRangedSpawn takes nothing returns nothing
set gg_trg_IncreaseRangedSpawn=CreateTrigger()
call TriggerRegisterTimerEventSingle(gg_trg_IncreaseRangedSpawn,3599.)
call TriggerAddAction(gg_trg_IncreaseRangedSpawn,function Trig_IncreaseRangedSpawn_Actions)
endfunction
function InitTrig_IncreaseRangedSpawn takes nothing returns nothing
endfunction
function Trig_IncreaseMeleeSpawn_Actions takes nothing returns nothing
set udg_i_DTAX_unit_melee_spawn_count=udg_i_DTAX_unit_melee_spawn_count+1
endfunction
function StartTrigger_IncreaseMeleeSpawn takes nothing returns nothing
set gg_trg_IncreaseMeleeSpawn=CreateTrigger()
call TriggerRegisterTimerEventSingle(gg_trg_IncreaseMeleeSpawn,1199.)
call TriggerRegisterTimerEventSingle(gg_trg_IncreaseMeleeSpawn,2398.)
call TriggerRegisterTimerEventSingle(gg_trg_IncreaseMeleeSpawn,3597.)
call TriggerAddAction(gg_trg_IncreaseMeleeSpawn,function Trig_IncreaseMeleeSpawn_Actions)
endfunction
function InitTrig_IncreaseMeleeSpawn takes nothing returns nothing
endfunction
function Trig_SpawnCreeps_Conditions takes nothing returns boolean
if(udg_b_DTAX_league_mode)then
return udg_b_DTAX_pick_started
endif
if(udg_b_DTAX_is_mirrormatch_mode)then
return udg_b_DTAX_is_mirrormatch_started
endif
if udg_b_DTAX_is_RandomDraft_mode then
return udg_bi
endif
if(udg_b_DTAX_is_VoteRandom_mode)then
return udg_A7
endif
return udg_b_DTAX_spawn_creeps_time_elapsed
endfunction
function Trig_SpawnCreeps_Actions takes nothing returns nothing
local boolean lJD=ModuloInteger(GetTriggerExecCount(gg_trg_SpawnCreeps),7)==0
if GetTriggerExecCount(gg_trg_SpawnCreeps)==1 then
call SetUnitInvulnerable(gg_unit_e00R_0011,false)
call SetUnitInvulnerable(gg_unit_e00R_0012,false)
call SetUnitInvulnerable(gg_unit_e00R_0013,false)
call SetUnitInvulnerable(gg_unit_u00M_0051,false)
call SetUnitInvulnerable(gg_unit_u00M_0052,false)
call SetUnitInvulnerable(gg_unit_u00M_0053,false)
endif
if(udg_b_DTAX_barrack4_is_alive)then
call CreateNUnitsAtLoc(udg_i_DTAX_unit_melee_spawn_count,'ugho',udg_pA_DTAX_SCPlayers[0],udg_loc_DTAX_ScourgeMeleeCreepSpawnLeft,bj_UNIT_FACING)
else
call CreateNUnitsAtLoc(udg_i_DTAX_unit_melee_spawn_count,'u001',udg_pA_DTAX_SCPlayers[0],udg_loc_DTAX_ScourgeMeleeCreepSpawnLeft,bj_UNIT_FACING)
endif
call JBJB(bj_lastCreatedGroup,2)
if(udg_b_DTAX_barrack5_is_alive)then
call CreateNUnitsAtLoc(udg_i_DTAX_unit_melee_spawn_count,'ugho',udg_pA_DTAX_SCPlayers[0],udg_loc_DTAX_ScourgeMeleeCreepSpawnCenter,bj_UNIT_FACING)
else
call CreateNUnitsAtLoc(udg_i_DTAX_unit_melee_spawn_count,'u001',udg_pA_DTAX_SCPlayers[0],udg_loc_DTAX_ScourgeMeleeCreepSpawnCenter,bj_UNIT_FACING)
endif
call JBJB(bj_lastCreatedGroup,3)
if(udg_b_DTAX_barrack6_is_alive)then
call CreateNUnitsAtLoc(udg_i_DTAX_unit_melee_spawn_count,'ugho',udg_pA_DTAX_SCPlayers[0],udg_loc_DTAX_ScourgeMeleeCreepSpawnRight,bj_UNIT_FACING)
else
call CreateNUnitsAtLoc(udg_i_DTAX_unit_melee_spawn_count,'u001',udg_pA_DTAX_SCPlayers[0],udg_loc_DTAX_ScourgeMeleeCreepSpawnRight,bj_UNIT_FACING)
endif
call JBJB(bj_lastCreatedGroup,4)
if(udg_b_DTAX_barrack1_is_alive)then
call CreateNUnitsAtLoc(udg_i_DTAX_unit_ranged_spawn_count,'unec',udg_pA_DTAX_SCPlayers[0],udg_loc_DTAX_ScourgeRangedCreepSpawnRight,bj_UNIT_FACING)
else
call CreateNUnitsAtLoc(udg_i_DTAX_unit_ranged_spawn_count,'u002',udg_pA_DTAX_SCPlayers[0],udg_loc_DTAX_ScourgeRangedCreepSpawnRight,bj_UNIT_FACING)
endif
call JBJB(bj_lastCreatedGroup,2)
if(udg_b_DTAX_barrack2_is_alive)then
call CreateNUnitsAtLoc(udg_i_DTAX_unit_ranged_spawn_count,'unec',udg_pA_DTAX_SCPlayers[0],udg_loc_DTAX_ScourgeRangedCreepSpawnCenter,bj_UNIT_FACING)
else
call CreateNUnitsAtLoc(udg_i_DTAX_unit_ranged_spawn_count,'u002',udg_pA_DTAX_SCPlayers[0],udg_loc_DTAX_ScourgeRangedCreepSpawnCenter,bj_UNIT_FACING)
endif
call JBJB(bj_lastCreatedGroup,3)
if(udg_b_DTAX_barrack3_is_alive)then
call CreateNUnitsAtLoc(udg_i_DTAX_unit_ranged_spawn_count,'unec',udg_pA_DTAX_SCPlayers[0],udg_loc_DTAX_ScourgeRangedCreepSpawnLeft,bj_UNIT_FACING)
else
call CreateNUnitsAtLoc(udg_i_DTAX_unit_ranged_spawn_count,'u002',udg_pA_DTAX_SCPlayers[0],udg_loc_DTAX_ScourgeRangedCreepSpawnLeft,bj_UNIT_FACING)
endif
call JBJB(bj_lastCreatedGroup,4)
if lJD then
call CreateNUnitsAtLoc(1,'umtw',udg_pA_DTAX_SCPlayers[0],udg_loc_DTAX_ScourgeRangedCreepSpawnRight,bj_UNIT_FACING)
call JBJB(bj_lastCreatedGroup,2)
call CreateNUnitsAtLoc(1,'umtw',udg_pA_DTAX_SCPlayers[0],udg_loc_DTAX_ScourgeRangedCreepSpawnCenter,bj_UNIT_FACING)
call JBJB(bj_lastCreatedGroup,3)
call CreateNUnitsAtLoc(1,'umtw',udg_pA_DTAX_SCPlayers[0],udg_loc_DTAX_ScourgeRangedCreepSpawnLeft,bj_UNIT_FACING)
call JBJB(bj_lastCreatedGroup,4)
endif
if(udg_b_DTAX_barrack10_is_alive)then
call CreateNUnitsAtLoc(udg_i_DTAX_unit_melee_spawn_count,'esen',udg_pA_DTAX_SEPlayers[0],udg_loc_DTAX_SentinelRangedCreepSpawnRight,bj_UNIT_FACING)
else
call CreateNUnitsAtLoc(udg_i_DTAX_unit_melee_spawn_count,'e00V',udg_pA_DTAX_SEPlayers[0],udg_loc_DTAX_SentinelRangedCreepSpawnRight,bj_UNIT_FACING)
endif
call JBJB(bj_lastCreatedGroup,2)
if(udg_b_DTAX_barrack11_is_alive)then
call CreateNUnitsAtLoc(udg_i_DTAX_unit_melee_spawn_count,'esen',udg_pA_DTAX_SEPlayers[0],udg_loc_DTAX_SentinelRangedCreepSpawnCenter,bj_UNIT_FACING)
else
call CreateNUnitsAtLoc(udg_i_DTAX_unit_melee_spawn_count,'e00V',udg_pA_DTAX_SEPlayers[0],udg_loc_DTAX_SentinelRangedCreepSpawnCenter,bj_UNIT_FACING)
endif
call JBJB(bj_lastCreatedGroup,3)
if(udg_b_DTAX_barrack12_is_alive)then
call CreateNUnitsAtLoc(udg_i_DTAX_unit_melee_spawn_count,'esen',udg_pA_DTAX_SEPlayers[0],udg_loc_DTAX_SentinelRangedCreepSpawnLeft,bj_UNIT_FACING)
else
call CreateNUnitsAtLoc(udg_i_DTAX_unit_melee_spawn_count,'e00V',udg_pA_DTAX_SEPlayers[0],udg_loc_DTAX_SentinelRangedCreepSpawnLeft,bj_UNIT_FACING)
endif
call JBJB(bj_lastCreatedGroup,4)
if(udg_b_DTAX_barrack7_is_alive)then
call CreateNUnitsAtLoc(udg_i_DTAX_unit_ranged_spawn_count,'edry',udg_pA_DTAX_SEPlayers[0],udg_loc_DTAX_SentinelMeleeCreepSpawnRight,bj_UNIT_FACING)
else
call CreateNUnitsAtLoc(udg_i_DTAX_unit_ranged_spawn_count,'e00W',udg_pA_DTAX_SEPlayers[0],udg_loc_DTAX_SentinelMeleeCreepSpawnRight,bj_UNIT_FACING)
endif
call JBJB(bj_lastCreatedGroup,2)
if(udg_b_DTAX_barrack8_is_alive)then
call CreateNUnitsAtLoc(udg_i_DTAX_unit_ranged_spawn_count,'edry',udg_pA_DTAX_SEPlayers[0],udg_loc_DTAX_SentinelMeleeCreepSpawnCenter,bj_UNIT_FACING)
else
call CreateNUnitsAtLoc(udg_i_DTAX_unit_ranged_spawn_count,'e00W',udg_pA_DTAX_SEPlayers[0],udg_loc_DTAX_SentinelMeleeCreepSpawnCenter,bj_UNIT_FACING)
endif
call JBJB(bj_lastCreatedGroup,3)
if(udg_b_DTAX_barrack9_is_alive)then
call CreateNUnitsAtLoc(udg_i_DTAX_unit_ranged_spawn_count,'edry',udg_pA_DTAX_SEPlayers[0],udg_loc_DTAX_SentinelMeleeCreepSpawnLeft,bj_UNIT_FACING)
else
call CreateNUnitsAtLoc(udg_i_DTAX_unit_ranged_spawn_count,'e00W',udg_pA_DTAX_SEPlayers[0],udg_loc_DTAX_SentinelMeleeCreepSpawnLeft,bj_UNIT_FACING)
endif
call JBJB(bj_lastCreatedGroup,4)
if lJD then
call CreateNUnitsAtLoc(1,'ebal',udg_pA_DTAX_SEPlayers[0],udg_loc_DTAX_SentinelMeleeCreepSpawnRight,bj_UNIT_FACING)
call JBJB(bj_lastCreatedGroup,2)
call CreateNUnitsAtLoc(1,'ebal',udg_pA_DTAX_SEPlayers[0],udg_loc_DTAX_SentinelMeleeCreepSpawnCenter,bj_UNIT_FACING)
call JBJB(bj_lastCreatedGroup,3)
call CreateNUnitsAtLoc(1,'ebal',udg_pA_DTAX_SEPlayers[0],udg_loc_DTAX_SentinelMeleeCreepSpawnLeft,bj_UNIT_FACING)
call JBJB(bj_lastCreatedGroup,4)
endif
endfunction
function StartTrigger_SpawnCreeps takes nothing returns nothing
set gg_trg_SpawnCreeps=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(gg_trg_SpawnCreeps,30.)
call TriggerAddCondition(gg_trg_SpawnCreeps,Condition(function Trig_SpawnCreeps_Conditions))
call TriggerAddAction(gg_trg_SpawnCreeps,function Trig_SpawnCreeps_Actions)
endfunction
function InitTrig_SpawnCreeps takes nothing returns nothing
endfunction
function Trig_Barrack1_Destroyed_Actions takes nothing returns nothing
set udg_b_DTAX_barrack1_is_alive=false
call DisableTrigger(gg_trg_Barrack1_Destroyed)
endfunction
function StartTrigger_Barrack1_Destroyed takes nothing returns nothing
set gg_trg_Barrack1_Destroyed=CreateTrigger()
call TriggerRegisterUnitEvent(gg_trg_Barrack1_Destroyed,gg_unit_eaoe_0025,EVENT_UNIT_DEATH)
call TriggerAddAction(gg_trg_Barrack1_Destroyed,function Trig_Barrack1_Destroyed_Actions)
endfunction
function InitTrig_Barrack1_Destroyed takes nothing returns nothing
endfunction
function Trig_Barrack2_Destroyed_Actions takes nothing returns nothing
set udg_b_DTAX_barrack2_is_alive=false
call DisableTrigger(gg_trg_Barrack2_Destroyed)
endfunction
function StartTrigger_Barrack2_Destroyed takes nothing returns nothing
set gg_trg_Barrack2_Destroyed=CreateTrigger()
call TriggerRegisterUnitEvent(gg_trg_Barrack2_Destroyed,gg_unit_eaoe_0026,EVENT_UNIT_DEATH)
call TriggerAddAction(gg_trg_Barrack2_Destroyed,function Trig_Barrack2_Destroyed_Actions)
endfunction
function InitTrig_Barrack2_Destroyed takes nothing returns nothing
endfunction
function Trig_Barrack3_Destroyed_Actions takes nothing returns nothing
set udg_b_DTAX_barrack3_is_alive=false
call DisableTrigger(gg_trg_Barrack3_Destroyed)
endfunction
function StartTrigger_Barrack3_Destroyed takes nothing returns nothing
set gg_trg_Barrack3_Destroyed=CreateTrigger()
call TriggerRegisterUnitEvent(gg_trg_Barrack3_Destroyed,gg_unit_eaoe_0027,EVENT_UNIT_DEATH)
call TriggerAddAction(gg_trg_Barrack3_Destroyed,function Trig_Barrack3_Destroyed_Actions)
endfunction
function InitTrig_Barrack3_Destroyed takes nothing returns nothing
endfunction
function Trig_Barrack4_Destroyed_Actions takes nothing returns nothing
set udg_b_DTAX_barrack4_is_alive=false
call DisableTrigger(gg_trg_Barrack4_Destroyed)
endfunction
function StartTrigger_Barrack4_Destroyed takes nothing returns nothing
set gg_trg_Barrack4_Destroyed=CreateTrigger()
call TriggerRegisterUnitEvent(gg_trg_Barrack4_Destroyed,gg_unit_eaom_0022,EVENT_UNIT_DEATH)
call TriggerAddAction(gg_trg_Barrack4_Destroyed,function Trig_Barrack4_Destroyed_Actions)
endfunction
function InitTrig_Barrack4_Destroyed takes nothing returns nothing
endfunction
function Trig_Barrack5_Destroyed_Actions takes nothing returns nothing
set udg_b_DTAX_barrack5_is_alive=false
call DisableTrigger(gg_trg_Barrack5_Destroyed)
endfunction
function StartTrigger_Barrack5_Destroyed takes nothing returns nothing
set gg_trg_Barrack5_Destroyed=CreateTrigger()
call TriggerRegisterUnitEvent(gg_trg_Barrack5_Destroyed,gg_unit_eaom_0023,EVENT_UNIT_DEATH)
call TriggerAddAction(gg_trg_Barrack5_Destroyed,function Trig_Barrack5_Destroyed_Actions)
endfunction
function InitTrig_Barrack5_Destroyed takes nothing returns nothing
endfunction
function Trig_Barrack6_Destroyed_Actions takes nothing returns nothing
set udg_b_DTAX_barrack6_is_alive=false
call DisableTrigger(gg_trg_Barrack6_Destroyed)
endfunction
function StartTrigger_Barrack6_Destroyed takes nothing returns nothing
set gg_trg_Barrack6_Destroyed=CreateTrigger()
call TriggerRegisterUnitEvent(gg_trg_Barrack6_Destroyed,gg_unit_eaom_0024,EVENT_UNIT_DEATH)
call TriggerAddAction(gg_trg_Barrack6_Destroyed,function Trig_Barrack6_Destroyed_Actions)
endfunction
function InitTrig_Barrack6_Destroyed takes nothing returns nothing
endfunction
function Trig_Barrack7_Destroyed_Actions takes nothing returns nothing
set udg_b_DTAX_barrack7_is_alive=false
call DisableTrigger(gg_trg_Barrack7_Destroyed)
endfunction
function StartTrigger_Barrack7_Destroyed takes nothing returns nothing
set gg_trg_Barrack7_Destroyed=CreateTrigger()
call TriggerRegisterUnitEvent(gg_trg_Barrack7_Destroyed,gg_unit_utod_0065,EVENT_UNIT_DEATH)
call TriggerAddAction(gg_trg_Barrack7_Destroyed,function Trig_Barrack7_Destroyed_Actions)
endfunction
function InitTrig_Barrack7_Destroyed takes nothing returns nothing
endfunction
function Trig_Barrack8_Destroyed_Actions takes nothing returns nothing
set udg_b_DTAX_barrack8_is_alive=false
call DisableTrigger(gg_trg_Barrack8_Destroyed)
endfunction
function StartTrigger_Barrack8_Destroyed takes nothing returns nothing
set gg_trg_Barrack8_Destroyed=CreateTrigger()
call TriggerRegisterUnitEvent(gg_trg_Barrack8_Destroyed,gg_unit_utod_0066,EVENT_UNIT_DEATH)
call TriggerAddAction(gg_trg_Barrack8_Destroyed,function Trig_Barrack8_Destroyed_Actions)
endfunction
function InitTrig_Barrack8_Destroyed takes nothing returns nothing
endfunction
function Trig_Barrack9_Destroyed_Actions takes nothing returns nothing
set udg_b_DTAX_barrack9_is_alive=false
call DisableTrigger(gg_trg_Barrack9_Destroyed)
endfunction
function StartTrigger_Barrack9_Destroyed takes nothing returns nothing
set gg_trg_Barrack9_Destroyed=CreateTrigger()
call TriggerRegisterUnitEvent(gg_trg_Barrack9_Destroyed,gg_unit_utod_0067,EVENT_UNIT_DEATH)
call TriggerAddAction(gg_trg_Barrack9_Destroyed,function Trig_Barrack9_Destroyed_Actions)
endfunction
function InitTrig_Barrack9_Destroyed takes nothing returns nothing
endfunction
function Trig_Barrack10_Destroyed_Actions takes nothing returns nothing
set udg_b_DTAX_barrack10_is_alive=false
call DisableTrigger(gg_trg_Barrack10_Destroyed)
endfunction
function StartTrigger_Barrack10_Destroyed takes nothing returns nothing
set gg_trg_Barrack10_Destroyed=CreateTrigger()
call TriggerRegisterUnitEvent(gg_trg_Barrack10_Destroyed,gg_unit_usep_0062,EVENT_UNIT_DEATH)
call TriggerAddAction(gg_trg_Barrack10_Destroyed,function Trig_Barrack10_Destroyed_Actions)
endfunction
function InitTrig_Barrack10_Destroyed takes nothing returns nothing
endfunction
function Trig_Barrack11_Destroyed_Actions takes nothing returns nothing
set udg_b_DTAX_barrack11_is_alive=false
call DisableTrigger(gg_trg_Barrack11_Destroyed)
endfunction
function StartTrigger_Barrack11_Destroyed takes nothing returns nothing
set gg_trg_Barrack11_Destroyed=CreateTrigger()
call TriggerRegisterUnitEvent(gg_trg_Barrack11_Destroyed,gg_unit_usep_0063,EVENT_UNIT_DEATH)
call TriggerAddAction(gg_trg_Barrack11_Destroyed,function Trig_Barrack11_Destroyed_Actions)
endfunction
function InitTrig_Barrack11_Destroyed takes nothing returns nothing
endfunction
function Trig_Barrack12_Destroyed_Actions takes nothing returns nothing
set udg_b_DTAX_barrack12_is_alive=false
call DisableTrigger(gg_trg_Barrack12_Destroyed)
endfunction
function StartTrigger_Barrack12_Destroyed takes nothing returns nothing
set gg_trg_Barrack12_Destroyed=CreateTrigger()
call TriggerRegisterUnitEvent(gg_trg_Barrack12_Destroyed,gg_unit_usep_0064,EVENT_UNIT_DEATH)
call TriggerAddAction(gg_trg_Barrack12_Destroyed,function Trig_Barrack12_Destroyed_Actions)
endfunction
function InitTrig_Barrack12_Destroyed takes nothing returns nothing
endfunction
function Trig_Sentinel_MegaCreeps_Conditions takes nothing returns boolean
if(udg_b_DTAX_barrack10_is_alive or udg_b_DTAX_barrack11_is_alive or udg_b_DTAX_barrack12_is_alive or udg_b_DTAX_barrack7_is_alive or udg_b_DTAX_barrack8_is_alive or udg_b_DTAX_barrack9_is_alive)then
return false
endif
return true
endfunction
function Trig_Sentinel_MegaCreeps_Actions takes nothing returns nothing
call MultyEcho(bj_FORCE_ALL_PLAYERS,20.,"The Sentinel has destroyed all of the Scourge's unit producing structures. The Sentinel now has Mega Creeps.")
call SetPlayerTechResearchedSwap('R00D',(GetPlayerTechCountSimple('R00D',udg_pA_DTAX_SEPlayers[0])+30),udg_pA_DTAX_SEPlayers[0])
call SetPlayerTechResearchedSwap('R00C',(GetPlayerTechCountSimple('R00C',udg_pA_DTAX_SEPlayers[0])+30),udg_pA_DTAX_SEPlayers[0])
call DisableTrigger(gg_trg_Sentinel_MegaCreeps)
endfunction
function StartTrigger_Sentinel_MegaCreeps takes nothing returns nothing
set gg_trg_Sentinel_MegaCreeps=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Sentinel_MegaCreeps,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(gg_trg_Sentinel_MegaCreeps,Condition(function Trig_Sentinel_MegaCreeps_Conditions))
call TriggerAddAction(gg_trg_Sentinel_MegaCreeps,function Trig_Sentinel_MegaCreeps_Actions)
endfunction
function InitTrig_Sentinel_MegaCreeps takes nothing returns nothing
endfunction
function Trig_Scourge_MegaCreeps_Conditions takes nothing returns boolean
if(udg_b_DTAX_barrack4_is_alive or udg_b_DTAX_barrack5_is_alive or udg_b_DTAX_barrack6_is_alive or udg_b_DTAX_barrack1_is_alive or udg_b_DTAX_barrack2_is_alive or udg_b_DTAX_barrack3_is_alive)then
return false
endif
return true
endfunction
function Trig_Scourge_MegaCreeps_Actions takes nothing returns nothing
call MultyEcho(bj_FORCE_ALL_PLAYERS,20.,"The Scourge has destroyed all of the Sentinel's unit producing structures. The Scourge now has Mega Creeps.")
call SetPlayerTechResearchedSwap('R009',(GetPlayerTechCountSimple('R009',udg_pA_DTAX_SCPlayers[0])+30),udg_pA_DTAX_SCPlayers[0])
call SetPlayerTechResearchedSwap('R00B',(GetPlayerTechCountSimple('R00B',udg_pA_DTAX_SCPlayers[0])+30),udg_pA_DTAX_SCPlayers[0])
call DisableTrigger(gg_trg_Scourge_MegaCreeps)
endfunction
function StartTrigger_Scourge_MegaCreeps takes nothing returns nothing
set gg_trg_Scourge_MegaCreeps=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Scourge_MegaCreeps,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(gg_trg_Scourge_MegaCreeps,Condition(function Trig_Scourge_MegaCreeps_Conditions))
call TriggerAddAction(gg_trg_Scourge_MegaCreeps,function Trig_Scourge_MegaCreeps_Actions)
endfunction
function InitTrig_Scourge_MegaCreeps takes nothing returns nothing
endfunction
function Trig_IncreaseCreepsLevel_Actions takes nothing returns nothing
call SetPlayerTechResearchedSwap('R007',(GetPlayerTechCountSimple('R007',udg_pA_DTAX_SEPlayers[0])+1),udg_pA_DTAX_SEPlayers[0])
call SetPlayerTechResearchedSwap('R00C',(GetPlayerTechCountSimple('R00C',udg_pA_DTAX_SEPlayers[0])+1),udg_pA_DTAX_SEPlayers[0])
call SetPlayerTechResearchedSwap('R008',(GetPlayerTechCountSimple('R008',udg_pA_DTAX_SEPlayers[0])+1),udg_pA_DTAX_SEPlayers[0])
call SetPlayerTechResearchedSwap('R00D',(GetPlayerTechCountSimple('R00D',udg_pA_DTAX_SEPlayers[0])+1),udg_pA_DTAX_SEPlayers[0])
call SetPlayerTechResearchedSwap('R009',(GetPlayerTechCountSimple('R009',udg_pA_DTAX_SCPlayers[0])+1),udg_pA_DTAX_SCPlayers[0])
call SetPlayerTechResearchedSwap('R003',(GetPlayerTechCountSimple('R003',udg_pA_DTAX_SCPlayers[0])+1),udg_pA_DTAX_SCPlayers[0])
call SetPlayerTechResearchedSwap('R00A',(GetPlayerTechCountSimple('R00A',udg_pA_DTAX_SCPlayers[0])+1),udg_pA_DTAX_SCPlayers[0])
call SetPlayerTechResearchedSwap('R00B',(GetPlayerTechCountSimple('R00B',udg_pA_DTAX_SCPlayers[0])+1),udg_pA_DTAX_SCPlayers[0])
endfunction
function StartTrigger_IncreaseCreepsLevel takes nothing returns nothing
set gg_trg_IncreaseCreepsLevel=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(gg_trg_IncreaseCreepsLevel,450.)
call TriggerAddAction(gg_trg_IncreaseCreepsLevel,function Trig_IncreaseCreepsLevel_Actions)
endfunction
function InitTrig_IncreaseCreepsLevel takes nothing returns nothing
endfunction
function Trig_EnableNeutralCreepsSpawn_Actions takes nothing returns nothing
if(udg_b_DTAX_league_mode or udg_b_DTAX_is_VoteRandom_mode or udg_b_DTAX_is_mirrormatch_mode)then
call PolledWait(100)
endif
if udg_b_DTAX_is_RandomDraft_mode then
call PolledWait(200)
endif
call EnableTrigger(gg_trg_SpawnNeutralCreeps)
call DisableTrigger(gg_trg_EnableNeutralCreepsSpawn)
endfunction
function StartTrigger_EnableNeutralCreepsSpawn takes nothing returns nothing
set gg_trg_EnableNeutralCreepsSpawn=CreateTrigger()
call TriggerRegisterTimerEventSingle(gg_trg_EnableNeutralCreepsSpawn,90.)
call TriggerAddAction(gg_trg_EnableNeutralCreepsSpawn,function Trig_EnableNeutralCreepsSpawn_Actions)
endfunction
function InitTrig_EnableNeutralCreepsSpawn takes nothing returns nothing
endfunction
function JNJN takes nothing returns nothing
if GetUnitAbilityLevel(GetEnumUnit(),'A0P4')!=0 then
call GroupRemoveUnit(udg_g_UNKNOWN_some_defenders_group,GetEnumUnit())
endif
if GetUnitTypeId(GetEnumUnit())=='o003'then
call GroupRemoveUnit(udg_g_UNKNOWN_some_defenders_group,GetEnumUnit())
endif
endfunction
function JoJo takes group pEw returns boolean
set udg_g_UNKNOWN_some_defenders_group=pEw
call ForGroup(pEw,function JNJN)
return FirstOfGroup(pEw)==null
endfunction
function Trig_SpawnNeutralCreeps_Actions takes nothing returns nothing
local integer lJp
local group lEw
local location liD
set lEw=GetUnitsInRectAll(gg_rct_CreepSpawnSc6Rect)
set liD=GetRectCenter(gg_rct_CreepSpawnSc6)
if JoJo(lEw)then
set lJp=GetRandomInt(1,3)
if(lJp==1)then
call CreateNUnitsAtLoc(2,'nbdo',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,'nbds',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
endif
if(lJp==2)then
call CreateNUnitsAtLoc(2,'ngst',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,'nggr',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
endif
if(lJp==3)then
call CreateNUnitsAtLoc(2,'nbdk',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,'nbwm',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
endif
endif
call DestroyGroup(lEw)
call RemoveLocation(liD)
set lEw=GetUnitsInRectAll(gg_rct_CreepSpawnSe1Rect)
set liD=GetRectCenter(gg_rct_CreepSpawnSe1)
if JoJo(lEw)then
set lJp=GetRandomInt(1,3)
if(lJp==1)then
call CreateNUnitsAtLoc(2,'nbdo',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,'nbds',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
endif
if(lJp==2)then
call CreateNUnitsAtLoc(2,'ngst',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,'nggr',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
endif
if(lJp==3)then
call CreateNUnitsAtLoc(2,'nbdk',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,'nbwm',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
endif
endif
call DestroyGroup(lEw)
call RemoveLocation(liD)
set lEw=GetUnitsInRectAll(gg_rct_CreepSpawnSe4Rect)
set liD=GetRectCenter(gg_rct_CreepSpawnSe4)
if JoJo(lEw)then
set lJp=GetRandomInt(1,3)
if(lJp==1)then
call CreateNUnitsAtLoc(2,'nogm',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,'nomg',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
endif
if(lJp==2)then
call CreateNUnitsAtLoc(1,'nfpc',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,'nfpu',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
endif
if(lJp==3)then
call CreateNUnitsAtLoc(1,'nsth',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,'nstl',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,'nsat',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
endif
endif
call DestroyGroup(lEw)
call RemoveLocation(liD)
set lEw=GetUnitsInRectAll(gg_rct_CreepSpawnSc1Rect)
set liD=GetRectCenter(gg_rct_CreepSpawnSc1)
if JoJo(lEw)then
set lJp=GetRandomInt(1,3)
if(lJp==1)then
call CreateNUnitsAtLoc(2,'nogm',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,'nomg',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
endif
if(lJp==2)then
call CreateNUnitsAtLoc(1,'nfpc',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,'nfpu',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
endif
if(lJp==3)then
call CreateNUnitsAtLoc(1,'nsth',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,'nstl',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,'nsat',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
endif
endif
call DestroyGroup(lEw)
call RemoveLocation(liD)
set lEw=GetUnitsInRectAll(gg_rct_CreepSpawnSc3Rect)
set liD=GetRectCenter(gg_rct_CreepSpawnSc3)
if JoJo(lEw)then
set lJp=GetRandomInt(1,6)
if(lJp==1)then
call CreateNUnitsAtLoc(3,'nwlg',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
endif
if(lJp==2)then
call CreateNUnitsAtLoc(2,'nstl',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
call CreateNUnitsAtLoc(2,'nsat',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
endif
if(lJp==3)then
call CreateNUnitsAtLoc(2,'ngst',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
endif
if(lJp==4)then
call CreateNUnitsAtLoc(1,'nkol',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
call CreateNUnitsAtLoc(3,'nkob',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,'nkot',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
endif
if(lJp==5)then
call CreateNUnitsAtLoc(2,'nftb',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,'nfsh',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
endif
if(lJp==6)then
call CreateNUnitsAtLoc(1,'ncnk',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,'ncen',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
endif
endif
call DestroyGroup(lEw)
call RemoveLocation(liD)
set lEw=GetUnitsInRectAll(gg_rct_CreepSpawnSe6Rect)
set liD=GetRectCenter(gg_rct_CreepSpawnSe6)
if JoJo(lEw)then
set lJp=GetRandomInt(1,6)
if(lJp==1)then
call CreateNUnitsAtLoc(3,'nwlg',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
endif
if(lJp==2)then
call CreateNUnitsAtLoc(2,'nstl',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
call CreateNUnitsAtLoc(2,'nsat',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
endif
if(lJp==3)then
call CreateNUnitsAtLoc(2,'ngst',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
endif
if(lJp==4)then
call CreateNUnitsAtLoc(1,'nkol',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
call CreateNUnitsAtLoc(3,'nkob',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,'nkot',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
endif
if(lJp==5)then
call CreateNUnitsAtLoc(2,'nftb',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,'nfsh',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
endif
if(lJp==6)then
call CreateNUnitsAtLoc(1,'ncnk',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,'ncen',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
endif
endif
call DestroyGroup(lEw)
call RemoveLocation(liD)
set lEw=GetUnitsInRectAll(gg_rct_CreepSpawnSc2Rect)
set liD=GetRectCenter(gg_rct_CreepSpawnSc2)
if JoJo(lEw)then
set lJp=GetRandomInt(1,6)
if(lJp==1)then
call CreateNUnitsAtLoc(3,'nwlg',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
endif
if(lJp==2)then
call CreateNUnitsAtLoc(2,'nstl',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
call CreateNUnitsAtLoc(2,'nsat',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
endif
if(lJp==3)then
call CreateNUnitsAtLoc(2,'ngst',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
endif
if(lJp==4)then
call CreateNUnitsAtLoc(1,'nkol',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
call CreateNUnitsAtLoc(3,'nkob',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,'nkot',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
endif
if(lJp==5)then
call CreateNUnitsAtLoc(2,'nftb',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,'nfsh',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
endif
if(lJp==6)then
call CreateNUnitsAtLoc(1,'ncnk',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,'ncen',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
endif
endif
call DestroyGroup(lEw)
call RemoveLocation(liD)
set lEw=GetUnitsInRectAll(gg_rct_CreepSpawnSe5Rect)
set liD=GetRectCenter(gg_rct_CreepSpawnSe5)
if JoJo(lEw)then
set lJp=GetRandomInt(1,6)
if(lJp==1)then
call CreateNUnitsAtLoc(3,'nwlg',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
endif
if(lJp==2)then
call CreateNUnitsAtLoc(2,'nstl',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
call CreateNUnitsAtLoc(2,'nsat',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
endif
if(lJp==3)then
call CreateNUnitsAtLoc(2,'ngst',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
endif
if(lJp==4)then
call CreateNUnitsAtLoc(1,'nkol',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
call CreateNUnitsAtLoc(3,'nkob',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,'nkot',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
endif
if(lJp==5)then
call CreateNUnitsAtLoc(2,'nftb',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,'nfsh',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
endif
if(lJp==6)then
call CreateNUnitsAtLoc(1,'ncnk',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,'ncen',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
endif
endif
call DestroyGroup(lEw)
call RemoveLocation(liD)
set lEw=GetUnitsInRectAll(gg_rct_CreepSpawnSc5Rect)
set liD=GetRectCenter(gg_rct_CreepSpawnSc5)
if JoJo(lEw)then
call CreateNUnitsAtLoc(3,'ngns',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
endif
call DestroyGroup(lEw)
call RemoveLocation(liD)
set lEw=GetUnitsInRectAll(gg_rct_CreepSpawnSe2Rect)
set liD=GetRectCenter(gg_rct_CreepSpawnSe2)
if JoJo(lEw)then
call CreateNUnitsAtLoc(2,'nftb',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,'nkol',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
endif
call DestroyGroup(lEw)
call RemoveLocation(liD)
set lEw=GetUnitsInRectAll(gg_rct_CreepSpawnSc4Rect)
set liD=GetRectCenter(gg_rct_CreepSpawnSc4)
if JoJo(lEw)then
set lJp=GetRandomInt(1,6)
if(lJp==1)then
call CreateNUnitsAtLoc(3,'nwlg',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
endif
if(lJp==2)then
call CreateNUnitsAtLoc(2,'nstl',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
call CreateNUnitsAtLoc(2,'nsat',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
endif
if(lJp==3)then
call CreateNUnitsAtLoc(2,'ngst',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
endif
if(lJp==4)then
call CreateNUnitsAtLoc(1,'nkol',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
call CreateNUnitsAtLoc(3,'nkob',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,'nkot',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
endif
if(lJp==5)then
call CreateNUnitsAtLoc(2,'nftb',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,'nfsh',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
endif
if(lJp==6)then
call CreateNUnitsAtLoc(1,'ncnk',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,'ncen',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
endif
endif
call DestroyGroup(lEw)
call RemoveLocation(liD)
set lEw=GetUnitsInRectAll(gg_rct_CreepSpawnSe3Rect)
set liD=GetRectCenter(gg_rct_CreepSpawnSe3)
if JoJo(lEw)then
set lJp=GetRandomInt(1,6)
if(lJp==1)then
call CreateNUnitsAtLoc(3,'nwlg',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
endif
if(lJp==2)then
call CreateNUnitsAtLoc(2,'nstl',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
call CreateNUnitsAtLoc(2,'nsat',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
endif
if(lJp==3)then
call CreateNUnitsAtLoc(2,'ngst',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
endif
if(lJp==4)then
call CreateNUnitsAtLoc(1,'nkol',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
call CreateNUnitsAtLoc(3,'nkob',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,'nkot',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
endif
if(lJp==5)then
call CreateNUnitsAtLoc(2,'nftb',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,'nfsh',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
endif
if(lJp==6)then
call CreateNUnitsAtLoc(1,'ncnk',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,'ncen',udg_p_DTAX_Player12,liD,bj_UNIT_FACING)
endif
endif
call DestroyGroup(lEw)
call RemoveLocation(liD)
endfunction
function StartTrigger_SpawnNeutralCreeps takes nothing returns nothing
set gg_trg_SpawnNeutralCreeps=CreateTrigger()
call DisableTrigger(gg_trg_SpawnNeutralCreeps)
call TriggerRegisterTimerEventPeriodic(gg_trg_SpawnNeutralCreeps,60.)
call TriggerAddAction(gg_trg_SpawnNeutralCreeps,function Trig_SpawnNeutralCreeps_Actions)
endfunction
function InitTrig_SpawnNeutralCreeps takes nothing returns nothing
endfunction
function Trig_SpawnSuperCreeps_Actions takes nothing returns nothing
local integer lEY=GetRandomInt(1,9)
if(lEY==1)then
call CreateNUnitsAtLoc(1,'n00F',udg_pA_DTAX_SEPlayers[0],udg_loc_DTAX_SentinelMeleeCreepSpawnLeft,bj_UNIT_FACING)
call MultyEcho(bj_FORCE_ALL_PLAYERS,10.,"A |c000000ffSiege Golem|r has spawned for the |c00ff0000Sentinel|r and is taking the east path!")
call JBJB(bj_lastCreatedGroup,4)
endif
if(lEY==2)then
call CreateNUnitsAtLoc(1,'n00F',udg_pA_DTAX_SEPlayers[0],udg_loc_DTAX_SentinelMeleeCreepSpawnRight,bj_UNIT_FACING)
call MultyEcho(bj_FORCE_ALL_PLAYERS,10.,"A |c000000ffSiege Golem|r has spawned for the |c00ff0000Sentinel|r and is taking the west path!")
call JBJB(bj_lastCreatedGroup,2)
endif
if(lEY==3)then
call CreateNUnitsAtLoc(1,'n00F',udg_pA_DTAX_SEPlayers[0],udg_loc_DTAX_SentinelMeleeCreepSpawnCenter,bj_UNIT_FACING)
call MultyEcho(bj_FORCE_ALL_PLAYERS,10.,"A |c000000ffSiege Golem|r has spawned for the |c00ff0000Sentinel|r and is taking the middle path!")
call JBJB(bj_lastCreatedGroup,3)
endif
if(lEY==4)then
call CreateNUnitsAtLoc(1,'n00E',udg_pA_DTAX_SEPlayers[0],udg_loc_DTAX_SentinelMeleeCreepSpawnLeft,bj_UNIT_FACING)
call MultyEcho(bj_FORCE_ALL_PLAYERS,10.,"A |c000000ffScary Fish|r has spawned for the |c00ff0000Sentinel|r and is taking the east path!")
call JBJB(bj_lastCreatedGroup,4)
endif
if(lEY==5)then
call CreateNUnitsAtLoc(1,'n00E',udg_pA_DTAX_SEPlayers[0],udg_loc_DTAX_SentinelMeleeCreepSpawnRight,bj_UNIT_FACING)
call MultyEcho(bj_FORCE_ALL_PLAYERS,10.,"A |c000000ffScary Fish|r has spawned for the |c00ff0000Sentinel|r and is taking the west path!")
call JBJB(bj_lastCreatedGroup,2)
endif
if(lEY==6)then
call CreateNUnitsAtLoc(1,'n00E',udg_pA_DTAX_SEPlayers[0],udg_loc_DTAX_SentinelMeleeCreepSpawnCenter,bj_UNIT_FACING)
call MultyEcho(bj_FORCE_ALL_PLAYERS,10.,"A |c000000ffScary Fish|r has spawned for the |c00ff0000Sentinel|r and is taking the middle path!")
call JBJB(bj_lastCreatedGroup,3)
endif
if(lEY==7)then
call CreateNUnitsAtLoc(1,'n00D',udg_pA_DTAX_SEPlayers[0],udg_loc_DTAX_SentinelMeleeCreepSpawnLeft,bj_UNIT_FACING)
call MultyEcho(bj_FORCE_ALL_PLAYERS,10.,"An |c000000ffAncient Hydra|r has spawned for the |c00ff0000Sentinel|r and is taking the east path!")
call JBJB(bj_lastCreatedGroup,4)
endif
if(lEY==8)then
call CreateNUnitsAtLoc(1,'n00D',udg_pA_DTAX_SEPlayers[0],udg_loc_DTAX_SentinelMeleeCreepSpawnRight,bj_UNIT_FACING)
call MultyEcho(bj_FORCE_ALL_PLAYERS,10.,"An |c000000ffAncient Hydra|r has spawned for the |c00ff0000Sentinel|r and is taking the west path!")
call JBJB(bj_lastCreatedGroup,2)
endif
if(lEY==9)then
call CreateNUnitsAtLoc(1,'n00D',udg_pA_DTAX_SEPlayers[0],udg_loc_DTAX_SentinelMeleeCreepSpawnCenter,bj_UNIT_FACING)
call MultyEcho(bj_FORCE_ALL_PLAYERS,10.,"An |c000000ffAncient Hydra|r has spawned for the |c00ff0000Sentinel|r and is taking the middle path!")
call JBJB(bj_lastCreatedGroup,3)
endif
set lEY=GetRandomInt(1,9)
if(lEY==1)then
call CreateNUnitsAtLoc(1,'n00F',udg_pA_DTAX_SCPlayers[0],udg_loc_DTAX_ScourgeRangedCreepSpawnLeft,bj_UNIT_FACING)
call MultyEcho(bj_FORCE_ALL_PLAYERS,10.,"A |c000000ffSiege Golem|r has spawned for the |c00004000Scourge|r and is taking the east path!")
call JBJB(bj_lastCreatedGroup,4)
endif
if(lEY==2)then
call CreateNUnitsAtLoc(1,'n00F',udg_pA_DTAX_SCPlayers[0],udg_loc_DTAX_ScourgeRangedCreepSpawnRight,bj_UNIT_FACING)
call MultyEcho(bj_FORCE_ALL_PLAYERS,10.,"A |c000000ffSiege Golem|r has spawned for the |c00004000Scourge|r and is taking the west path!")
call JBJB(bj_lastCreatedGroup,2)
endif
if(lEY==3)then
call CreateNUnitsAtLoc(1,'n00F',udg_pA_DTAX_SCPlayers[0],udg_loc_DTAX_ScourgeRangedCreepSpawnCenter,bj_UNIT_FACING)
call MultyEcho(bj_FORCE_ALL_PLAYERS,10.,"A |c000000ffSiege Golem|r has spawned for the |c00004000Scourge|r and is taking the middle path!")
call JBJB(bj_lastCreatedGroup,3)
endif
if(lEY==4)then
call CreateNUnitsAtLoc(1,'n00E',udg_pA_DTAX_SCPlayers[0],udg_loc_DTAX_ScourgeRangedCreepSpawnLeft,bj_UNIT_FACING)
call MultyEcho(bj_FORCE_ALL_PLAYERS,10.,"A |c000000ffScary Fish|r has spawned for the |c00004000Scourge|r and is taking the east path!")
call JBJB(bj_lastCreatedGroup,4)
endif
if(lEY==5)then
call CreateNUnitsAtLoc(1,'n00E',udg_pA_DTAX_SCPlayers[0],udg_loc_DTAX_ScourgeRangedCreepSpawnRight,bj_UNIT_FACING)
call MultyEcho(bj_FORCE_ALL_PLAYERS,10.,"A |c000000ffScary Fish|r has spawned for the |c00004000Scourge|r and is taking the west path!")
call JBJB(bj_lastCreatedGroup,2)
endif
if(lEY==6)then
call CreateNUnitsAtLoc(1,'n00E',udg_pA_DTAX_SCPlayers[0],udg_loc_DTAX_ScourgeRangedCreepSpawnCenter,bj_UNIT_FACING)
call MultyEcho(bj_FORCE_ALL_PLAYERS,10.,"A |c000000ffScary Fish|r has spawned for the |c00004000Scourge|r and is taking the middle path!")
call JBJB(bj_lastCreatedGroup,3)
endif
if(lEY==7)then
call CreateNUnitsAtLoc(1,'n00D',udg_pA_DTAX_SCPlayers[0],udg_loc_DTAX_ScourgeRangedCreepSpawnLeft,bj_UNIT_FACING)
call MultyEcho(bj_FORCE_ALL_PLAYERS,10.,"An |c000000ffAncient Hydra|r has spawned for the |c00004000Scourge|r and is taking the east path!")
call JBJB(bj_lastCreatedGroup,4)
endif
if(lEY==8)then
call CreateNUnitsAtLoc(1,'n00D',udg_pA_DTAX_SCPlayers[0],udg_loc_DTAX_ScourgeRangedCreepSpawnRight,bj_UNIT_FACING)
call MultyEcho(bj_FORCE_ALL_PLAYERS,10.,"An |c000000ffAncient Hydra|r has spawned for the |c00004000Scourge|r and is taking the west path!")
call JBJB(bj_lastCreatedGroup,2)
endif
if(lEY==9)then
call CreateNUnitsAtLoc(1,'n00D',udg_pA_DTAX_SCPlayers[0],udg_loc_DTAX_ScourgeRangedCreepSpawnCenter,bj_UNIT_FACING)
call MultyEcho(bj_FORCE_ALL_PLAYERS,10.,"An |c000000ffAncient Hydra|r has spawned for the |c00004000Scourge|r and is taking the middle path!")
call JBJB(bj_lastCreatedGroup,3)
endif
endfunction
function StartTrigger_SpawnSuperCreeps takes nothing returns nothing
set gg_trg_SpawnSuperCreeps=CreateTrigger()
call DisableTrigger(gg_trg_SpawnSuperCreeps)
call TriggerRegisterTimerEventPeriodic(gg_trg_SpawnSuperCreeps,780.)
call TriggerAddAction(gg_trg_SpawnSuperCreeps,function Trig_SpawnSuperCreeps_Actions)
endfunction
function InitTrig_SpawnSuperCreeps takes nothing returns nothing
endfunction
function IsMoveOrder takes nothing returns boolean
return GetIssuedOrderId()==OrderId("move")
endfunction
function KNKN takes nothing returns nothing
local unit lKo=GetTriggerUnit()
local unit lFB=CVReturnUnit(lKo)
call SetUnitPosition(lKo,GetUnitX(lKo),GetUnitY(lKo))
if lFB==null or not IsUnitVisible(lFB,GetOwningPlayer(lFB))then
call DisableTrigger(GetTriggeringTrigger())
call IssuePointOrderByIdLoc(lKo,OrderId("attack"),k8k8(lKo))
call EnableTrigger(GetTriggeringTrigger())
else
call IssueTargetOrderById(lKo,OrderId("attack"),CVReturnUnit(lKo))
endif
endfunction
function KOKO takes nothing returns boolean
return k9k9(GetTriggerUnit())
endfunction
function KpKp takes nothing returns nothing
local unit lKo=GetTriggerUnit()
local unit lFB=CVReturnUnit(lKo)
call SetUnitPosition(lKo,GetUnitX(lKo),GetUnitY(lKo))
if lFB==null or not IsUnitVisible(lFB,GetOwningPlayer(lFB))then
call DisableTrigger(GetTriggeringTrigger())
call IssuePointOrderByIdLoc(lKo,OrderId("attack"),k8k8(lKo))
call EnableTrigger(GetTriggeringTrigger())
else
call IssueTargetOrderById(lKo,OrderId("attack"),CVReturnUnit(lKo))
endif
endfunction
function IsUnitFoggedToAnyTeam takes nothing returns boolean
return IsUnitFogged(GetAttacker(),udg_pA_DTAX_SEPlayers[1])or IsUnitFogged(GetAttacker(),udg_pA_DTAX_SCPlayers[1])
endfunction
function KLKL takes nothing returns nothing
local unit lKm=GetAttacker()
local fogmodifier lKM
local boolean lbb=false
if GetOwningPlayer(GetTriggerUnit())==udg_pA_DTAX_SEPlayers[0]then
set lKM=CreateFogModifierRadius(udg_pA_DTAX_SEPlayers[1],FOG_OF_WAR_VISIBLE,GetUnitX(lKm),GetUnitY(lKm),128,true,false)
elseif GetOwningPlayer(GetTriggerUnit())==udg_pA_DTAX_SCPlayers[0]then
set lKM=CreateFogModifierRadius(udg_pA_DTAX_SCPlayers[1],FOG_OF_WAR_VISIBLE,GetUnitX(lKm),GetUnitY(lKm),128,true,false)
endif
call FogModifierStart(lKM)
call PolledWait(1)
call FogModifierStop(lKM)
call DestroyFogModifier(lKM)
endfunction
function Trig_Observer_Support_Actions takes nothing returns nothing
local trigger ltt
local group lgg
local unit luu
call PolledWait(.01)
if udg_b_DTAX_observer_slot_used then
set ltt=CreateTrigger()
call TriggerRegisterPlayerUnitEvent(ltt,udg_pA_DTAX_SEPlayers[0],EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER,null)
call TriggerRegisterPlayerUnitEvent(ltt,udg_pA_DTAX_SCPlayers[0],EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER,null)
call TriggerAddCondition(ltt,Condition(function IsMoveOrder))
call TriggerAddAction(ltt,function KNKN)
set ltt=CreateTrigger()
set lgg=CreateGroup()
call GroupEnumUnitsOfPlayer(lgg,udg_pA_DTAX_SEPlayers[0],null)
loop
set luu=FirstOfGroup(lgg)
exitwhen luu==null
call GroupRemoveUnit(lgg,luu)
if GetUnitAcquireRange(luu)!=0 then
call TriggerRegisterUnitInRange(ltt,luu,600,null)
endif
endloop
call DestroyGroup(lgg)
set lgg=CreateGroup()
call GroupEnumUnitsOfPlayer(lgg,udg_pA_DTAX_SCPlayers[0],null)
loop
set luu=FirstOfGroup(lgg)
exitwhen luu==null
call GroupRemoveUnit(lgg,luu)
if GetUnitAcquireRange(luu)!=0 and IsUnitType(luu,UNIT_TYPE_STRUCTURE)then
call TriggerRegisterUnitInRange(ltt,luu,600,null)
endif
endloop
call DestroyGroup(lgg)
call TriggerAddCondition(ltt,Condition(function KOKO))
call TriggerAddAction(ltt,function KpKp)
set ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(ltt,Condition(function IsUnitFoggedToAnyTeam))
call TriggerAddAction(ltt,function KLKL)
endif
endfunction
function StartTrigger_Observer_Support takes nothing returns nothing
set gg_trg_Observer_Support=CreateTrigger()
call TriggerRegisterTimerEvent(gg_trg_Observer_Support,1,false)
call TriggerAddAction(gg_trg_Observer_Support,function Trig_Observer_Support_Actions)
endfunction
function InitTrig_Observer_Support takes nothing returns nothing
endfunction
function KkKk takes unit pfU returns boolean
return GetBoolean(H2Tx(pfU),"HeroAIManager")
endfunction
function Trig_HeroAIManager_Conditions takes nothing returns boolean
if IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)and not IsUnitIllusion(GetTriggerUnit())then
if not KkKk(GetTriggerUnit())then
return true
endif
endif
return false
endfunction
function KjKj takes nothing returns boolean
if IsUnitType(GetOrderTargetUnit(),UNIT_TYPE_HERO)and not IsUnitIllusion(GetOrderTargetUnit())then
if GetIssuedOrderId()==OrderId("attack") or GetIssuedOrderId()==OrderId("smart")then
if IsUnitVisible(GetTriggerUnit(),GetOwningPlayer(GetOrderTargetUnit()))then
return KFKF(GetOrderTargetUnit(),GetTriggerUnit())
endif
endif
endif
return false
endfunction
function KJKJ takes nothing returns nothing
call KhKh(GetOrderTargetUnit(),GetTriggerUnit())
endfunction
function KiKi takes nothing returns boolean
return KFKF(GetTriggerUnit(),GetAttacker())
endfunction
function KIKI takes nothing returns nothing
call KhKh(GetTriggerUnit(),GetAttacker())
endfunction
function KKKK takes unit pfU returns nothing
local group lgg
local trigger ltt
local timer ltm
local string lf5=H2Tx(pfU)
call SetBoolean(lf5,"HeroAIManager",true)
set lgg=CreateGroup()
call SetHandle(lf5,"Defenders",lgg)
set ltt=CreateTrigger()
call SetHandle(lf5,"OnAttackOrder",ltt)
call TriggerRegisterUnitEvent(ltt,pfU,EVENT_UNIT_ISSUED_TARGET_ORDER)
call TriggerAddCondition(ltt,Condition(function KjKj))
call TriggerAddAction(ltt,function KJKJ)
set ltt=CreateTrigger()
call SetHandle(lf5,"OnAttacked",ltt)
call TriggerRegisterUnitEvent(ltt,pfU,EVENT_UNIT_ATTACKED)
call TriggerAddCondition(ltt,Condition(function KiKi))
call TriggerAddAction(ltt,function KIKI)
set ltm=CreateTimer()
call SetHandle(H2Tx(pfU),"DefendTimer",ltm)
call SetHandle(H2Tx(ltm),"Hero",pfU)
endfunction
function Trig_HeroAIManager_Actions takes nothing returns nothing
call KKKK(GetTriggerUnit())
endfunction
function StartTrigger_HeroAIManager takes nothing returns nothing
set gg_trg_HeroAIManager=CreateTrigger()
call TriggerRegisterEnterRectSimple(gg_trg_HeroAIManager,GetWorldBounds())
call TriggerAddCondition(gg_trg_HeroAIManager,Condition(function Trig_HeroAIManager_Conditions))
call TriggerAddAction(gg_trg_HeroAIManager,function Trig_HeroAIManager_Actions)
endfunction
function InitTrig_HeroAIManager takes nothing returns nothing
endfunction
function KVKV takes nothing returns nothing
local unit lKw=GetTriggerUnit()
local unit lKW=GetUnit(H2Tx(lKw),"Locust")
call RemoveUnit(lKW)
endfunction
function Trig_True_Sights_Actions takes nothing returns nothing
local group lgg
local unit lKw
local unit lKW
local trigger ltt
local integer lii
set ltt=CreateTrigger()
call TriggerAddAction(ltt,function KVKV)
set lgg=CreateGroup()
call GroupEnumUnitsOfPlayer(lgg,udg_pA_DTAX_SEPlayers[0],null)
loop
set lKw=FirstOfGroup(lgg)
exitwhen lKw==null
call GroupRemoveUnit(lgg,lKw)
if GetUnitAbilityLevel(lKw,'Adts')>0 or GetUnitAbilityLevel(lKw,'Atru')>0 then
call TriggerRegisterUnitEvent(ltt,lKw,EVENT_UNIT_DEATH)
set lKW=CreateUnit(udg_pA_DTAX_SEPlayers[1],'u00B',-5000,-5100,0)
call SetUnitScale(lKW,0,0,0)
call SetUnitPathing(lKW,false)
call SetUnitInvulnerable(lKW,true)
call SetUnitX(lKW,GetUnitX(lKw))
call SetUnitY(lKW,GetUnitY(lKw))
call SetHandle(H2Tx(lKw),"Locust",lKW)
endif
endloop
call DestroyGroup(lgg)
set lgg=CreateGroup()
call GroupEnumUnitsOfPlayer(lgg,udg_pA_DTAX_SCPlayers[0],null)
loop
set lKw=FirstOfGroup(lgg)
exitwhen lKw==null
call GroupRemoveUnit(lgg,lKw)
if GetUnitAbilityLevel(lKw,'Adts')>0 or GetUnitAbilityLevel(lKw,'Atru')>0 then
call TriggerRegisterUnitEvent(ltt,lKw,EVENT_UNIT_DEATH)
set lKW=CreateUnit(udg_pA_DTAX_SCPlayers[1],'u00B',3400,4400,0)
call SetUnitScale(lKW,0,0,0)
call SetUnitPathing(lKW,false)
call SetUnitInvulnerable(lKW,true)
call SetUnitX(lKW,GetUnitX(lKw))
call SetUnitY(lKW,GetUnitY(lKw))
call SetHandle(H2Tx(lKw),"Locust",lKW)
endif
endloop
call DestroyGroup(lgg)
endfunction
function StartTrigger_True_Sights takes nothing returns nothing
set gg_trg_True_Sights=CreateTrigger()
call TriggerRegisterTimerEvent(gg_trg_True_Sights,25,false)
call TriggerAddAction(gg_trg_True_Sights,function Trig_True_Sights_Actions)
endfunction
function InitTrig_True_Sights takes nothing returns nothing
endfunction
function KYKY takes unit pKw returns boolean
if IsUnitType(pKw,UNIT_TYPE_STRUCTURE) and GetUnitAbilityLevel(pKw,'Adts')>0 then
return true
endif
return false
endfunction
function KXKX takes unit pKw returns unit
local string lf5=H2Tx(pKw)
return GetUnit(lf5,"TowerAI|TowerTarget")
endfunction
function Trig_TowerAI_Conditions takes nothing returns boolean
local unit lKw=GetAttacker()
local unit lKZ
if not(KYKY(lKw))then
return false
endif
if(CVReturnUnit(lKw)!=null)then
return false
endif
set lKZ=KXKX(lKw)
if(lKZ==null)then
return true
endif
if(GetUnitState(lKZ,UNIT_STATE_LIFE)<1)then
return true
endif
if(IsUnitInRange(lKw,lKZ,GetUnitAcquireRange(lKw)))then
return false
endif
return true
endfunction
function KyKy takes unit pKw,unit pFB returns nothing
local string lf5=H2Tx(pKw)
call SetHandle(lf5,"TowerAI|TowerTarget",pFB)
endfunction
function Trig_TowerAI_Actions takes nothing returns nothing
local unit lKw=GetAttacker()
local group lgg=CreateGroup()
local unit luu
local real lK1
local real lK2=151.
local unit lK3=null
call GroupEnumUnitsInRange(lgg,GetUnitX(lKw),GetUnitY(lKw),GetUnitAcquireRange(lKw),null)
loop
set luu=FirstOfGroup(lgg)
exitwhen luu==null
call GroupRemoveUnit(lgg,luu)
if IsUnitEnemy(luu,GetOwningPlayer(lKw))then
set lK1=GetUnitState(luu,UNIT_STATE_LIFE)
if lK1<lK2 and lK1>1 and GetUnitTypeId(luu)!='o00C'then
set lK2=lK1
set lK3=luu
endif
endif
endloop
call KyKy(lKw,lK3)
if lK3!=null then
call DisableTrigger(GetTriggeringTrigger())
call IssueTargetOrderById(lKw,OrderId("attack"),lK3)
if GetOwningPlayer(lKw)==udg_pA_DTAX_SEPlayers[0]then
call SetUnitAnimation(lKw,"attack alternate")
endif
call EnableTrigger(GetTriggeringTrigger())
endif
call DestroyGroup(lgg)
endfunction
function StartTrigger_TowerAI takes nothing returns nothing
set gg_trg_TowerAI=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_TowerAI,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(gg_trg_TowerAI,Condition(function Trig_TowerAI_Conditions))
call TriggerAddAction(gg_trg_TowerAI,function Trig_TowerAI_Actions)
endfunction
function InitTrig_TowerAI takes nothing returns nothing
endfunction
function K5K5 takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetAttacker()))and IsUnitVisible(GetFilterUnit(),GetOwningPlayer(GetAttacker()))and GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>1 and IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==false and GetOwningPlayer(GetFilterUnit())!=udg_p_DTAX_Player12
endfunction
function K6K6 takes nothing returns nothing
if IsUnitType(GetEnumUnit(),UNIT_TYPE_STRUCTURE)then
set udg_u_DTAX_temp=GetEnumUnit()
endif
if IsUnitType(GetEnumUnit(),UNIT_TYPE_HERO)==false then
set udg_u_DTAX_temp_target=GetEnumUnit()
endif
endfunction
function Trig_Mechanical_Control_Actions takes nothing returns nothing
local unit lJD=GetAttacker()
local unit lFB=GetTriggerUnit()
local group lEw=CreateGroup()
local boolexpr lEW=Condition(function K5K5)
local trigger ltt=GetTriggeringTrigger()
call DisableTrigger(ltt)
set udg_u_DTAX_temp=null
set udg_u_DTAX_temp_target=null
call GroupEnumUnitsInRange(lEw,GetUnitX(lJD),GetUnitY(lJD),1200,lEW)
call ForGroup(lEw,function K6K6)
call DestroyGroup(lEw)
call DestroyBoolExpr(lEW)
if udg_u_DTAX_temp!=null then
call IssueTargetOrderById(lJD,OrderId("attack"),udg_u_DTAX_temp)
call GroupAddUnit(udg_ew,lJD)
elseif IsUnitType(lFB,UNIT_TYPE_HERO) and udg_u_DTAX_temp_target!=null then
call IssueTargetOrderById(lJD,OrderId("attack"),udg_u_DTAX_temp_target)
call GroupAddUnit(udg_ew,lJD)
endif
call EnableTrigger(ltt)
endfunction
function Trig_Mechanical_Control_Conditions takes nothing returns boolean
return(GetUnitTypeId(GetAttacker())=='ebal'or GetUnitTypeId(GetAttacker())=='umtw')and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false
endfunction
function StartTrigger_Mechanical_Control takes nothing returns nothing
set gg_trg_Mechanical_Control=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Mechanical_Control,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddAction(gg_trg_Mechanical_Control,function Trig_Mechanical_Control_Actions)
call TriggerAddCondition(gg_trg_Mechanical_Control,Condition(function Trig_Mechanical_Control_Conditions))
endfunction
function InitTrig_Mechanical_Control takes nothing returns nothing
endfunction
function SimErrorII takes player pfH,string pfi returns nothing
local sound lfI=CreateSoundFromLabel("InterfaceError",false,false,false,10,10)
if(GetLocalPlayer()==pfH)then
if(pfi!="")and(pfi!=null)then
call DisplayTimedTextToPlayer(pfH,0,0,5.,"|cffffcc00"+pfi+"|r")
endif
call StartSound(lfI)
endif
call KillSoundWhenDone(lfI)
endfunction
function l2l2 takes nothing returns nothing
local string le5=I2S(GetPlayerId(GetTriggerPlayer()))
local string ll3=SubString(GetEventPlayerChatString(),8,9)
local integer ll4=0
if ll3=="1"then
set ll4=1
elseif ll3=="2"then
set ll4=2
elseif ll3=="3"then
set ll4=3
endif
if ll4==0 then
call SimErrorII(GetTriggerPlayer(),"Invalid Option. Select from -option 1/2/3")
return
endif
if GetBoolean("lQ",le5)then
call SimErrorII(GetTriggerPlayer(),"You have already voted.")
return
endif
call SetBoolean("lQ",le5,true)
call SetInteger("lQ","Option"+I2S(ll4)+"Count",1+GetInteger("lQ","Option"+I2S(ll4)+"Count"))
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,udg_A6,20,"You have chosen Option "+I2S(ll4)+".")
endfunction
function l1l1 takes nothing returns nothing
local integer lii=udg_i_DTAX_FirstSEHero
loop
exitwhen lii>udg_i_DTAX_LastSCHero
set udg_A1[lii]=false
set lii=lii+1
endloop
endfunction
function lZlZ takes nothing returns integer
local integer lfc
local integer lfC
local integer ll0
if(GetRandomInt(1,2)==1)then
set lfc=udg_i_DTAX_FirstSEHero
set lfC=udg_i_DTAX_LastSEHero
else
set lfc=udg_i_DTAX_FirstSCHero
set lfC=udg_i_DTAX_LastSCHero
endif
set ll0=GetRandomInt(lfc,lfC)
if udg_b_DTAX_is_dupe_mode then
return ll0
endif
loop
exitwhen udg_A1[ll0]==false
set ll0=GetRandomInt(lfc,lfC)
endloop
set udg_A1[ll0]=true
return ll0
endfunction
function lnln takes nothing returns nothing
local integer array ll5
local integer array ll6
local integer array ll7
local integer array ll8
local integer array ll9
local integer array lLa
local integer array lLA
local integer lLb=ForceActivePlayers(udg_f_DTAX_SEPlayers)
local integer lLB=ForceActivePlayers(udg_f_DTAX_SCPlayers)
local integer lii
local integer lxx
local string lLc="|c008A2BE2Option 1: |r"
local string lLC="|c008A2BE2Option 2: |r"
local string lLd="|c008A2BE2Option 3: |r"
local integer lLD
local integer lLe
local integer lLE
local trigger ltt=CreateTrigger()
local location llS=GetRectCenter(gg_rct_SentinelTavernsRect)
local location llt=GetRectCenter(gg_rct_ScourgeTavernsRect)
local location llY=GetRectCenter(gg_rct_SentinelHeroSpawn)
local location llz=GetRectCenter(gg_rct_ScourgeHeroSpawn)
local integer lEY
set udg_b_DTAX_is_VoteRandom_mode=true
set udg_A8=false
set udg_A9=false
call DenyHeroRandomSpawn()
call DenyHeroFully()
call PanCameraToTimedLocForPlayer(udg_pA_DTAX_SEPlayers[1],llY,0)
call PanCameraToTimedLocForPlayer(udg_pA_DTAX_SEPlayers[2],llY,0)
call PanCameraToTimedLocForPlayer(udg_pA_DTAX_SEPlayers[3],llY,0)
call PanCameraToTimedLocForPlayer(udg_pA_DTAX_SEPlayers[4],llY,0)
call PanCameraToTimedLocForPlayer(udg_pA_DTAX_SEPlayers[5],llY,0)
call PanCameraToTimedLocForPlayer(udg_pA_DTAX_SCPlayers[1],llz,0)
call PanCameraToTimedLocForPlayer(udg_pA_DTAX_SCPlayers[2],llz,0)
call PanCameraToTimedLocForPlayer(udg_pA_DTAX_SCPlayers[3],llz,0)
call PanCameraToTimedLocForPlayer(udg_pA_DTAX_SCPlayers[4],llz,0)
call PanCameraToTimedLocForPlayer(udg_pA_DTAX_SCPlayers[5],llz,0)
call TriggerRegisterPlayerChatEvent(ltt,udg_pA_DTAX_SEPlayers[1],"-option",false)
call TriggerRegisterPlayerChatEvent(ltt,udg_pA_DTAX_SEPlayers[2],"-option",false)
call TriggerRegisterPlayerChatEvent(ltt,udg_pA_DTAX_SEPlayers[3],"-option",false)
call TriggerRegisterPlayerChatEvent(ltt,udg_pA_DTAX_SEPlayers[4],"-option",false)
call TriggerRegisterPlayerChatEvent(ltt,udg_pA_DTAX_SEPlayers[5],"-option",false)
call TriggerRegisterPlayerChatEvent(ltt,udg_pA_DTAX_SCPlayers[1],"-option",false)
call TriggerRegisterPlayerChatEvent(ltt,udg_pA_DTAX_SCPlayers[2],"-option",false)
call TriggerRegisterPlayerChatEvent(ltt,udg_pA_DTAX_SCPlayers[3],"-option",false)
call TriggerRegisterPlayerChatEvent(ltt,udg_pA_DTAX_SCPlayers[4],"-option",false)
call TriggerRegisterPlayerChatEvent(ltt,udg_pA_DTAX_SCPlayers[5],"-option",false)
call TriggerAddAction(ltt,function l2l2)
call l1l1()
set lii=1
loop
exitwhen lii>lLb
set ll5[lii]=udg_iA_DTAX_HeroTypes[lZlZ()]
set lLc=lLc+GetObjectName(ll5[lii])
set lii=lii+1
if lii<=lLb then
set lLc=lLc+"|c005BFEEA-|r"
endif
endloop
set lLc=lLc+" |c00FF0000vs |r"
set lii=1
loop
exitwhen lii>lLB
set ll6[lii]=udg_iA_DTAX_HeroTypes[lZlZ()]
set lLc=lLc+GetObjectName(ll6[lii])
set lii=lii+1
if lii<=lLB then
set lLc=lLc+"|c005BFEEA-|r"
endif
endloop
call l1l1()
set lii=1
loop
exitwhen lii>lLb
set ll7[lii]=udg_iA_DTAX_HeroTypes[lZlZ()]
set lLC=lLC+GetObjectName(ll7[lii])+" "
set lii=lii+1
if lii<=lLb then
set lLC=lLC+"|c005BFEEA-|r"
endif
endloop
set lLC=lLC+" |c00FF0000vs |r"
set lii=1
loop
exitwhen lii>lLB
set ll8[lii]=udg_iA_DTAX_HeroTypes[lZlZ()]
set lLC=lLC+GetObjectName(ll8[lii])+" "
set lii=lii+1
if lii<=lLB then
set lLC=lLC+"|c005BFEEA-|r"
endif
endloop
call l1l1()
set lii=1
loop
exitwhen lii>lLb
set ll9[lii]=udg_iA_DTAX_HeroTypes[lZlZ()]
set lLd=lLd+GetObjectName(ll9[lii])+" "
set lii=lii+1
if lii<=lLb then
set lLd=lLd+"|c005BFEEA-|r"
endif
endloop
set lLd=lLd+" |c00FF0000vs |r"
set lii=1
loop
exitwhen lii>lLB
set lLa[lii]=udg_iA_DTAX_HeroTypes[lZlZ()]
set lLd=lLd+GetObjectName(lLa[lii])+" "
set lii=lii+1
if lii<=lLB then
set lLd=lLd+"|c005BFEEA-|r"
endif
endloop
call TriggerSleepAction(0)
call MultyEcho(bj_FORCE_ALL_PLAYERS,45," ")
call MultyEcho(bj_FORCE_ALL_PLAYERS,45,"You have 30 seconds to vote from the options below using -option 1/2/3.")
call MultyEcho(bj_FORCE_ALL_PLAYERS,45,"Please note that the groups listed in the options do not imply that Sentinel will have the first hero set, it is random.")
call MultyEcho(bj_FORCE_ALL_PLAYERS,45," ")
call MultyEcho(bj_FORCE_ALL_PLAYERS,45,lLc)
call MultyEcho(bj_FORCE_ALL_PLAYERS,45," ")
call MultyEcho(bj_FORCE_ALL_PLAYERS,45,lLC)
call MultyEcho(bj_FORCE_ALL_PLAYERS,45," ")
call MultyEcho(bj_FORCE_ALL_PLAYERS,45,lLd)
call PolledWait(30)
call DisableTrigger(ltt)
call DestroyTriggerEx(ltt)
set lLD=GetInteger("lQ","Option1Count")
set lLe=GetInteger("lQ","Option2Count")
set lLE=GetInteger("lQ","Option3Count")
set lii=1
loop
exitwhen lii>lLb
set lLA[lii]=ll5[lii]
set lii=lii+1
endloop
set lxx=GetRandomInt(1,3)
if lxx==1 then
if lLb==1 then
set lLA[1]=ll5[1]
elseif lLb==2 then
set lLA[1]=ll5[2]
set lLA[2]=ll5[1]
elseif lLb==3 then
set lLA[1]=ll5[3]
set lLA[2]=ll5[1]
set lLA[3]=ll5[2]
elseif lLb==4 then
set lLA[1]=ll5[4]
set lLA[2]=ll5[3]
set lLA[3]=ll5[2]
set lLA[4]=ll5[1]
elseif lLb==5 then
set lLA[1]=ll5[5]
set lLA[2]=ll5[4]
set lLA[3]=ll5[1]
set lLA[4]=ll5[2]
set lLA[5]=ll5[3]
endif
elseif lxx==2 then
if lLb==1 then
set lLA[1]=ll5[1]
elseif lLb==2 then
set lLA[1]=ll5[2]
set lLA[2]=ll5[1]
elseif lLb==3 then
set lLA[1]=ll5[2]
set lLA[2]=ll5[3]
set lLA[3]=ll5[1]
elseif lLb==4 then
set lLA[1]=ll5[3]
set lLA[2]=ll5[1]
set lLA[3]=ll5[4]
set lLA[4]=ll5[2]
elseif lLb==5 then
set lLA[1]=ll5[4]
set lLA[2]=ll5[3]
set lLA[3]=ll5[2]
set lLA[4]=ll5[5]
set lLA[5]=ll5[1]
endif
else
if lLb==1 then
set lLA[1]=ll5[1]
elseif lLb==2 then
set lLA[1]=ll5[1]
set lLA[2]=ll5[2]
elseif lLb==3 then
set lLA[1]=ll5[3]
set lLA[2]=ll5[2]
set lLA[3]=ll5[1]
elseif lLb==4 then
set lLA[1]=ll5[2]
set lLA[2]=ll5[4]
set lLA[3]=ll5[3]
set lLA[4]=ll5[1]
elseif lLb==5 then
set lLA[1]=ll5[5]
set lLA[2]=ll5[1]
set lLA[3]=ll5[3]
set lLA[4]=ll5[4]
set lLA[5]=ll5[2]
endif
endif
set lii=1
loop
exitwhen lii>lLb
set ll5[lii]=lLA[lii]
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lLb
set lLA[lii]=ll6[lii]
set lii=lii+1
endloop
set lxx=GetRandomInt(1,3)
if lxx==1 then
if lLb==1 then
set lLA[1]=ll6[1]
elseif lLb==2 then
set lLA[1]=ll6[2]
set lLA[2]=ll6[1]
elseif lLb==3 then
set lLA[1]=ll6[3]
set lLA[2]=ll6[1]
set lLA[3]=ll6[2]
elseif lLb==4 then
set lLA[1]=ll6[4]
set lLA[2]=ll6[3]
set lLA[3]=ll6[2]
set lLA[4]=ll6[1]
elseif lLb==5 then
set lLA[1]=ll6[5]
set lLA[2]=ll6[4]
set lLA[3]=ll6[1]
set lLA[4]=ll6[2]
set lLA[5]=ll6[3]
endif
elseif lxx==2 then
if lLb==1 then
set lLA[1]=ll6[1]
elseif lLb==2 then
set lLA[1]=ll6[2]
set lLA[2]=ll6[1]
elseif lLb==3 then
set lLA[1]=ll6[2]
set lLA[2]=ll6[3]
set lLA[3]=ll6[1]
elseif lLb==4 then
set lLA[1]=ll6[3]
set lLA[2]=ll6[1]
set lLA[3]=ll6[4]
set lLA[4]=ll6[2]
elseif lLb==5 then
set lLA[1]=ll6[4]
set lLA[2]=ll6[3]
set lLA[3]=ll6[2]
set lLA[4]=ll6[5]
set lLA[5]=ll6[1]
endif
else
if lLb==1 then
set lLA[1]=ll6[1]
elseif lLb==2 then
set lLA[1]=ll6[1]
set lLA[2]=ll6[2]
elseif lLb==3 then
set lLA[1]=ll6[3]
set lLA[2]=ll6[2]
set lLA[3]=ll6[1]
elseif lLb==4 then
set lLA[1]=ll6[2]
set lLA[2]=ll6[4]
set lLA[3]=ll6[3]
set lLA[4]=ll6[1]
elseif lLb==5 then
set lLA[1]=ll6[5]
set lLA[2]=ll6[1]
set lLA[3]=ll6[3]
set lLA[4]=ll6[4]
set lLA[5]=ll6[2]
endif
endif
set lii=1
loop
exitwhen lii>lLb
set ll6[lii]=lLA[lii]
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lLb
set lLA[lii]=ll7[lii]
set lii=lii+1
endloop
set lxx=GetRandomInt(1,3)
if lxx==1 then
if lLb==1 then
set lLA[1]=ll7[1]
elseif lLb==2 then
set lLA[1]=ll7[2]
set lLA[2]=ll7[1]
elseif lLb==3 then
set lLA[1]=ll7[3]
set lLA[2]=ll7[1]
set lLA[3]=ll7[2]
elseif lLb==4 then
set lLA[1]=ll7[4]
set lLA[2]=ll7[3]
set lLA[3]=ll7[2]
set lLA[4]=ll7[1]
elseif lLb==5 then
set lLA[1]=ll7[5]
set lLA[2]=ll7[4]
set lLA[3]=ll7[1]
set lLA[4]=ll7[2]
set lLA[5]=ll7[3]
endif
elseif lxx==2 then
if lLb==1 then
set lLA[1]=ll7[1]
elseif lLb==2 then
set lLA[1]=ll7[2]
set lLA[2]=ll7[1]
elseif lLb==3 then
set lLA[1]=ll7[2]
set lLA[2]=ll7[3]
set lLA[3]=ll7[1]
elseif lLb==4 then
set lLA[1]=ll7[3]
set lLA[2]=ll7[1]
set lLA[3]=ll7[4]
set lLA[4]=ll7[2]
elseif lLb==5 then
set lLA[1]=ll7[4]
set lLA[2]=ll7[3]
set lLA[3]=ll7[2]
set lLA[4]=ll7[5]
set lLA[5]=ll7[1]
endif
else
if lLb==1 then
set lLA[1]=ll7[1]
elseif lLb==2 then
set lLA[1]=ll7[1]
set lLA[2]=ll7[2]
elseif lLb==3 then
set lLA[1]=ll7[3]
set lLA[2]=ll7[2]
set lLA[3]=ll7[1]
elseif lLb==4 then
set lLA[1]=ll7[2]
set lLA[2]=ll7[4]
set lLA[3]=ll7[3]
set lLA[4]=ll7[1]
elseif lLb==5 then
set lLA[1]=ll7[5]
set lLA[2]=ll7[1]
set lLA[3]=ll7[3]
set lLA[4]=ll7[4]
set lLA[5]=ll7[2]
endif
endif
set lii=1
loop
exitwhen lii>lLb
set ll7[lii]=lLA[lii]
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lLb
set lLA[lii]=ll8[lii]
set lii=lii+1
endloop
set lxx=GetRandomInt(1,3)
if lxx==1 then
if lLb==1 then
set lLA[1]=ll8[1]
elseif lLb==2 then
set lLA[1]=ll8[2]
set lLA[2]=ll8[1]
elseif lLb==3 then
set lLA[1]=ll8[3]
set lLA[2]=ll8[1]
set lLA[3]=ll8[2]
elseif lLb==4 then
set lLA[1]=ll8[4]
set lLA[2]=ll8[3]
set lLA[3]=ll8[2]
set lLA[4]=ll8[1]
elseif lLb==5 then
set lLA[1]=ll8[5]
set lLA[2]=ll8[4]
set lLA[3]=ll8[1]
set lLA[4]=ll8[2]
set lLA[5]=ll8[3]
endif
elseif lxx==2 then
if lLb==1 then
set lLA[1]=ll8[1]
elseif lLb==2 then
set lLA[1]=ll8[2]
set lLA[2]=ll8[1]
elseif lLb==3 then
set lLA[1]=ll8[2]
set lLA[2]=ll8[3]
set lLA[3]=ll8[1]
elseif lLb==4 then
set lLA[1]=ll8[3]
set lLA[2]=ll8[1]
set lLA[3]=ll8[4]
set lLA[4]=ll8[2]
elseif lLb==5 then
set lLA[1]=ll8[4]
set lLA[2]=ll8[3]
set lLA[3]=ll8[2]
set lLA[4]=ll8[5]
set lLA[5]=ll8[1]
endif
else
if lLb==1 then
set lLA[1]=ll8[1]
elseif lLb==2 then
set lLA[1]=ll8[1]
set lLA[2]=ll8[2]
elseif lLb==3 then
set lLA[1]=ll8[3]
set lLA[2]=ll8[2]
set lLA[3]=ll8[1]
elseif lLb==4 then
set lLA[1]=ll8[2]
set lLA[2]=ll8[4]
set lLA[3]=ll8[3]
set lLA[4]=ll8[1]
elseif lLb==5 then
set lLA[1]=ll8[5]
set lLA[2]=ll8[1]
set lLA[3]=ll8[3]
set lLA[4]=ll8[4]
set lLA[5]=ll8[2]
endif
endif
set lii=1
loop
exitwhen lii>lLb
set ll8[lii]=lLA[lii]
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lLb
set lLA[lii]=ll9[lii]
set lii=lii+1
endloop
set lxx=GetRandomInt(1,3)
if lxx==1 then
if lLb==1 then
set lLA[1]=ll9[1]
elseif lLb==2 then
set lLA[1]=ll9[2]
set lLA[2]=ll9[1]
elseif lLb==3 then
set lLA[1]=ll9[3]
set lLA[2]=ll9[1]
set lLA[3]=ll9[2]
elseif lLb==4 then
set lLA[1]=ll9[4]
set lLA[2]=ll9[3]
set lLA[3]=ll9[2]
set lLA[4]=ll9[1]
elseif lLb==5 then
set lLA[1]=ll9[5]
set lLA[2]=ll9[4]
set lLA[3]=ll9[1]
set lLA[4]=ll9[2]
set lLA[5]=ll9[3]
endif
elseif lxx==2 then
if lLb==1 then
set lLA[1]=ll9[1]
elseif lLb==2 then
set lLA[1]=ll9[2]
set lLA[2]=ll9[1]
elseif lLb==3 then
set lLA[1]=ll9[2]
set lLA[2]=ll9[3]
set lLA[3]=ll9[1]
elseif lLb==4 then
set lLA[1]=ll9[3]
set lLA[2]=ll9[1]
set lLA[3]=ll9[4]
set lLA[4]=ll9[2]
elseif lLb==5 then
set lLA[1]=ll9[4]
set lLA[2]=ll9[3]
set lLA[3]=ll9[2]
set lLA[4]=ll9[5]
set lLA[5]=ll9[1]
endif
else
if lLb==1 then
set lLA[1]=ll9[1]
elseif lLb==2 then
set lLA[1]=ll9[1]
set lLA[2]=ll9[2]
elseif lLb==3 then
set lLA[1]=ll9[3]
set lLA[2]=ll9[2]
set lLA[3]=ll9[1]
elseif lLb==4 then
set lLA[1]=ll9[2]
set lLA[2]=ll9[4]
set lLA[3]=ll9[3]
set lLA[4]=ll9[1]
elseif lLb==5 then
set lLA[1]=ll9[5]
set lLA[2]=ll9[1]
set lLA[3]=ll9[3]
set lLA[4]=ll9[4]
set lLA[5]=ll9[2]
endif
endif
set lii=1
loop
exitwhen lii>lLb
set ll9[lii]=lLA[lii]
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lLb
set lLA[lii]=lLa[lii]
set lii=lii+1
endloop
set lxx=GetRandomInt(1,3)
if lxx==1 then
if lLb==1 then
set lLA[1]=lLa[1]
elseif lLb==2 then
set lLA[1]=lLa[2]
set lLA[2]=lLa[1]
elseif lLb==3 then
set lLA[1]=lLa[3]
set lLA[2]=lLa[1]
set lLA[3]=lLa[2]
elseif lLb==4 then
set lLA[1]=lLa[4]
set lLA[2]=lLa[3]
set lLA[3]=lLa[2]
set lLA[4]=lLa[1]
elseif lLb==5 then
set lLA[1]=lLa[5]
set lLA[2]=lLa[4]
set lLA[3]=lLa[1]
set lLA[4]=lLa[2]
set lLA[5]=lLa[3]
endif
elseif lxx==2 then
if lLb==1 then
set lLA[1]=lLa[1]
elseif lLb==2 then
set lLA[1]=lLa[2]
set lLA[2]=lLa[1]
elseif lLb==3 then
set lLA[1]=lLa[2]
set lLA[2]=lLa[3]
set lLA[3]=lLa[1]
elseif lLb==4 then
set lLA[1]=lLa[3]
set lLA[2]=lLa[1]
set lLA[3]=lLa[4]
set lLA[4]=lLa[2]
elseif lLb==5 then
set lLA[1]=lLa[4]
set lLA[2]=lLa[3]
set lLA[3]=lLa[2]
set lLA[4]=lLa[5]
set lLA[5]=lLa[1]
endif
else
if lLb==1 then
set lLA[1]=lLa[1]
elseif lLb==2 then
set lLA[1]=lLa[1]
set lLA[2]=lLa[2]
elseif lLb==3 then
set lLA[1]=lLa[3]
set lLA[2]=lLa[2]
set lLA[3]=lLa[1]
elseif lLb==4 then
set lLA[1]=lLa[2]
set lLA[2]=lLa[4]
set lLA[3]=lLa[3]
set lLA[4]=lLa[1]
elseif lLb==5 then
set lLA[1]=lLa[5]
set lLA[2]=lLa[1]
set lLA[3]=lLa[3]
set lLA[4]=lLa[4]
set lLA[5]=lLa[2]
endif
endif
set lii=1
loop
exitwhen lii>lLb
set lLa[lii]=lLA[lii]
set lii=lii+1
endloop
set lEY=GetRandomInt(1,2)
if lLD>=lLe and lLD>=lLE then
call ClearTextMessages()
call MultyEcho(bj_FORCE_ALL_PLAYERS,45,"Voted: "+lLc)
call MultyEcho(bj_FORCE_ALL_PLAYERS,45," ")
set lii=1
set lxx=1
loop
exitwhen lii>5
if PlayerIsActive(udg_pA_DTAX_SEPlayers[lii])then
if lEY==1 then
set udg_uA_DTAX_player_hero_unit[GetPlayerId(udg_pA_DTAX_SEPlayers[lii])]=CreateUnitAtLoc(udg_pA_DTAX_SEPlayers[lii],ll5[lxx],llS,bj_UNIT_FACING)
else
set udg_uA_DTAX_player_hero_unit[GetPlayerId(udg_pA_DTAX_SEPlayers[lii])]=CreateUnitAtLoc(udg_pA_DTAX_SEPlayers[lii],ll6[lxx],llS,bj_UNIT_FACING)
endif
call SetPlayerState(udg_pA_DTAX_SEPlayers[lii],PLAYER_STATE_RESOURCE_FOOD_CAP,6)
call TriggerSleepAction(0)
set lxx=lxx+1
endif
set lii=lii+1
endloop
set lii=1
set lxx=1
loop
exitwhen lii>5
if PlayerIsActive(udg_pA_DTAX_SCPlayers[lii])then
if lEY==1 then
set udg_uA_DTAX_player_hero_unit[GetPlayerId(udg_pA_DTAX_SCPlayers[lii])]=CreateUnitAtLoc(udg_pA_DTAX_SCPlayers[lii],ll6[lxx],llt,bj_UNIT_FACING)
else
set udg_uA_DTAX_player_hero_unit[GetPlayerId(udg_pA_DTAX_SCPlayers[lii])]=CreateUnitAtLoc(udg_pA_DTAX_SCPlayers[lii],ll5[lxx],llt,bj_UNIT_FACING)
endif
call SetPlayerState(udg_pA_DTAX_SEPlayers[lii],PLAYER_STATE_RESOURCE_FOOD_CAP,6)
call TriggerSleepAction(0)
set lxx=lxx+1
endif
set lii=lii+1
endloop
elseif lLe>=lLD and lLe>=lLE then
call ClearTextMessages()
call MultyEcho(bj_FORCE_ALL_PLAYERS,45,"Voted: "+lLC)
call MultyEcho(bj_FORCE_ALL_PLAYERS,45," ")
set lii=1
set lxx=1
loop
exitwhen lii>5
if PlayerIsActive(udg_pA_DTAX_SEPlayers[lii])then
if lEY==1 then
set udg_uA_DTAX_player_hero_unit[GetPlayerId(udg_pA_DTAX_SEPlayers[lii])]=CreateUnitAtLoc(udg_pA_DTAX_SEPlayers[lii],ll7[lxx],llS,bj_UNIT_FACING)
else
set udg_uA_DTAX_player_hero_unit[GetPlayerId(udg_pA_DTAX_SEPlayers[lii])]=CreateUnitAtLoc(udg_pA_DTAX_SEPlayers[lii],ll8[lxx],llS,bj_UNIT_FACING)
endif
call SetPlayerState(udg_pA_DTAX_SEPlayers[lii],PLAYER_STATE_RESOURCE_FOOD_CAP,6)
call TriggerSleepAction(0)
set lxx=lxx+1
endif
set lii=lii+1
endloop
set lii=1
set lxx=1
loop
exitwhen lii>5
if PlayerIsActive(udg_pA_DTAX_SCPlayers[lii])then
if lEY==1 then
set udg_uA_DTAX_player_hero_unit[GetPlayerId(udg_pA_DTAX_SCPlayers[lii])]=CreateUnitAtLoc(udg_pA_DTAX_SCPlayers[lii],ll8[lxx],llt,bj_UNIT_FACING)
else
set udg_uA_DTAX_player_hero_unit[GetPlayerId(udg_pA_DTAX_SCPlayers[lii])]=CreateUnitAtLoc(udg_pA_DTAX_SCPlayers[lii],ll7[lxx],llt,bj_UNIT_FACING)
endif
call SetPlayerState(udg_pA_DTAX_SEPlayers[lii],PLAYER_STATE_RESOURCE_FOOD_CAP,6)
call TriggerSleepAction(0)
set lxx=lxx+1
endif
set lii=lii+1
endloop
elseif lLE>=lLD and lLE>=lLe then
call ClearTextMessages()
call MultyEcho(bj_FORCE_ALL_PLAYERS,45,"Voted: "+lLd)
call MultyEcho(bj_FORCE_ALL_PLAYERS,45," ")
set lii=1
set lxx=1
loop
exitwhen lii>5
if PlayerIsActive(udg_pA_DTAX_SEPlayers[lii])then
if lEY==1 then
set udg_uA_DTAX_player_hero_unit[GetPlayerId(udg_pA_DTAX_SEPlayers[lii])]=CreateUnitAtLoc(udg_pA_DTAX_SEPlayers[lii],ll9[lxx],llS,bj_UNIT_FACING)
else
set udg_uA_DTAX_player_hero_unit[GetPlayerId(udg_pA_DTAX_SEPlayers[lii])]=CreateUnitAtLoc(udg_pA_DTAX_SEPlayers[lii],lLa[lxx],llS,bj_UNIT_FACING)
endif
call SetPlayerState(udg_pA_DTAX_SEPlayers[lii],PLAYER_STATE_RESOURCE_FOOD_CAP,6)
call TriggerSleepAction(0)
set lxx=lxx+1
endif
set lii=lii+1
endloop
set lii=1
set lxx=1
loop
exitwhen lii>5
if PlayerIsActive(udg_pA_DTAX_SCPlayers[lii])then
if lEY==1 then
set udg_uA_DTAX_player_hero_unit[GetPlayerId(udg_pA_DTAX_SCPlayers[lii])]=CreateUnitAtLoc(udg_pA_DTAX_SCPlayers[lii],lLa[lxx],llt,bj_UNIT_FACING)
else
set udg_uA_DTAX_player_hero_unit[GetPlayerId(udg_pA_DTAX_SCPlayers[lii])]=CreateUnitAtLoc(udg_pA_DTAX_SCPlayers[lii],ll9[lxx],llt,bj_UNIT_FACING)
endif
call SetPlayerState(udg_pA_DTAX_SEPlayers[lii],PLAYER_STATE_RESOURCE_FOOD_CAP,6)
call TriggerSleepAction(0)
set lxx=lxx+1
endif
set lii=lii+1
endloop
endif
call PolledWait(50)
set udg_A7=true
call RemoveLocation(llS)
call RemoveLocation(llt)
call RemoveLocation(llY)
call RemoveLocation(llz)
endfunction
function InitTrig_Voting takes nothing returns nothing
endfunction
function SoloAddLevel takes nothing returns nothing
call SetHeroLevel(udg_uA_DTAX_player_hero_unit[GetPlayerId(udg_p_DTAX_Host)],GetHeroLevel(udg_uA_DTAX_player_hero_unit[GetPlayerId(udg_p_DTAX_Host)])+1,true)
set udg_bg=true
endfunction
function AddCreepWave takes nothing returns nothing
call TriggerExecute(gg_trg_SpawnCreeps)
set udg_bg=true
endfunction
function ResetHero takes nothing returns nothing
local unit lfU=udg_uA_DTAX_player_hero_unit[GetPlayerId(udg_p_DTAX_Host)]
call UnitResetCooldown(lfU)
call SetUnitState(lfU,UNIT_STATE_LIFE,GetUnitState(lfU,UNIT_STATE_MAX_LIFE))
call SetUnitState(lfU,UNIT_STATE_MANA,GetUnitState(lfU,UNIT_STATE_MAX_MANA))
set udg_bg=true
endfunction
function Suicide takes nothing returns nothing
call KillUnit(udg_uA_DTAX_player_hero_unit[GetPlayerId(udg_p_DTAX_Host)])
set udg_bg=true
endfunction
function AddGold takes nothing returns nothing
local string ljt=SubString(GetEventPlayerChatString(),5,StringLength(GetEventPlayerChatString()))
local integer lfa=S2I(ljt)
call SetPlayerState(udg_p_DTAX_Host,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(udg_p_DTAX_Host,PLAYER_STATE_RESOURCE_GOLD)+lfa)
set udg_bg=true
endfunction
function SoloMode takes nothing returns nothing
local player lOnlyPlayer=udg_p_DTAX_Host
local trigger ltt
call DisplayTimedTextToPlayer(udg_p_DTAX_Host,0,0,60,"Single Player Mode detected. You may use commands like -lvlup, -refresh, -spawncreeps, -kill and -gold xxxx")
set ltt=CreateTrigger()
call TriggerRegisterPlayerChatEvent(ltt,udg_p_DTAX_Host,"-lvlup",true)
call TriggerAddAction(ltt,function SoloAddLevel)
set ltt=CreateTrigger()
call TriggerRegisterPlayerChatEvent(ltt,udg_p_DTAX_Host,"-spawncreeps",true)
call TriggerAddAction(ltt,function AddCreepWave)
set ltt=CreateTrigger()
call TriggerRegisterPlayerChatEvent(ltt,udg_p_DTAX_Host,"-refresh",true)
call TriggerAddAction(ltt,function ResetHero)
set ltt=CreateTrigger()
call TriggerRegisterPlayerChatEvent(ltt,udg_p_DTAX_Host,"-kill",true)
call TriggerAddAction(ltt,function Suicide)
set ltt=CreateTrigger()
call TriggerRegisterPlayerChatEvent(ltt,udg_p_DTAX_Host,"-gold",false)
call TriggerAddAction(ltt,function AddGold)
endfunction
function InitTrig_Single_Player takes nothing returns nothing
endfunction
function LgLg takes nothing returns nothing
call DropUnit(GetEnumUnit())
endfunction
function LjLj takes nothing returns nothing
if(GetUnitTypeId(GetEnumUnit())=='n004')then
call RemoveUnit(GetEnumUnit())
endif
if(GetUnitTypeId(GetEnumUnit())=='o003')then
call RemoveUnit(GetEnumUnit())
endif
endfunction
function LGLG takes unit pfU returns nothing
local integer lLh=GetPlayerId(GetOwningPlayer(pfU))
set udg_itmA_DTAX_players_item_in_slot1[lLh]=UnitItemInSlot(pfU,0)
set udg_itmA_DTAX_players_item_in_slot2[lLh]=UnitItemInSlot(pfU,1)
set udg_itmA_DTAX_players_item_in_slot3[lLh]=UnitItemInSlot(pfU,2)
set udg_itmA_DTAX_players_item_in_slot4[lLh]=UnitItemInSlot(pfU,3)
set udg_itmA_DTAX_players_item_in_slot5[lLh]=UnitItemInSlot(pfU,4)
set udg_itmA_DTAX_players_item_in_slot6[lLh]=UnitItemInSlot(pfU,5)
endfunction
function LHLH takes player pfe,player pfE returns integer
local unit lLi=udg_uA_DTAX_player_hero_unit[GetPlayerId(pfe)]
local unit lLI=udg_uA_DTAX_player_hero_unit[GetPlayerId(pfE)]
call UnitRemoveBuffs(lLi,true,true)
call UnitRemoveBuffs(lLI,true,true)
if lLi==null and lLI==null then
call MultyEcho(bj_FORCE_ALL_PLAYERS,15,udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(udg_pA_DTAX_SEPlayers[0])]+GetPlayerName(pfe)+" and "+GetPlayerName(pfE)+" did not pick a hero so they have no hero to be assigned.|r")
elseif GetRandomInt(1,2)==1 then
if(lLi!=null)then
return GetUnitTypeId(lLi)
else
return GetUnitTypeId(lLI)
endif
else
if(lLI!=null)then
return GetUnitTypeId(lLI)
else
return GetUnitTypeId(lLi)
endif
endif
call MultyEcho(bj_FORCE_ALL_PLAYERS,15,udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(udg_pA_DTAX_SEPlayers[0])]+GetPlayerName(pfe)+" and "+GetPlayerName(pfE)+" have not picked a hero. They will be given a random hero!")
return EyEy()
endfunction
function LJLJ takes nothing returns nothing
local integer lEq
local group lLk=CreateGroup()
local unit lRandUnit
local location llY=GetRectCenter(gg_rct_SentinelHeroSpawn)
local location llz=GetRectCenter(gg_rct_ScourgeHeroSpawn)
local integer lLK=ForceActivePlayers(udg_f_DTAX_SEPlayers)
local player array lLl
local player array lLL
local integer lxx
local integer lyy
local real lLm
local real lLn
local real lLN
local integer lLo
local group lEw=GetUnitsInRectMatching(GetWorldBounds(),null)
set udg_A9=false
set udg_A8=false
call DenyHeroRandomSpawn()
call DenyHeroFully()
call PolledWait(3)
call ForGroup(lEw,function LjLj)
call DestroyGroup(lEw)
set lEq=1
set lxx=1
set lyy=1
loop
exitwhen lEq>5
if(PlayerIsActive(udg_pA_DTAX_SEPlayers[lEq]))then
call LGLG(udg_uA_DTAX_player_hero_unit[GetPlayerId(udg_pA_DTAX_SEPlayers[lEq])])
call GroupAddUnit(lLk,udg_uA_DTAX_player_hero_unit[GetPlayerId(udg_pA_DTAX_SEPlayers[lEq])])
set lLl[lxx]=udg_pA_DTAX_SEPlayers[lEq]
set lxx=lxx+1
endif
if(PlayerIsActive(udg_pA_DTAX_SCPlayers[lEq]))then
call LGLG(udg_uA_DTAX_player_hero_unit[GetPlayerId(udg_pA_DTAX_SCPlayers[lEq])])
call GroupAddUnit(lLk,udg_uA_DTAX_player_hero_unit[GetPlayerId(udg_pA_DTAX_SCPlayers[lEq])])
set lLL[lyy]=udg_pA_DTAX_SCPlayers[lEq]
set lyy=lyy+1
endif
set lEq=lEq+1
endloop
set lxx=1
loop
exitwhen lxx>lLK
set lLo=LHLH(lLl[lxx],lLL[lxx])
if(udg_uA_DTAX_player_hero_unit[GetPlayerId(lLl[lxx])]==null)then
set lLm=GetLocationX(llY)+GetRandomReal(1,40)
set lLn=GetLocationY(llY)+GetRandomReal(1,40)
set lLN=270
else
set lLm=GetUnitX(udg_uA_DTAX_player_hero_unit[GetPlayerId(lLl[lxx])])
set lLn=GetUnitY(udg_uA_DTAX_player_hero_unit[GetPlayerId(lLl[lxx])])
set lLN=GetUnitFacing(udg_uA_DTAX_player_hero_unit[GetPlayerId(lLl[lxx])])
call SetUnitPathing(udg_uA_DTAX_player_hero_unit[GetPlayerId(lLl[lxx])],false)
endif
set udg_uA_DTAX_player_hero_unit[GetPlayerId(lLl[lxx])]=CreateUnit(lLl[lxx],lLo,lLm,lLn,lLN)
call SetUnitPathing(udg_uA_DTAX_player_hero_unit[GetPlayerId(lLl[lxx])],false)
call SetUnitPosition(udg_uA_DTAX_player_hero_unit[GetPlayerId(lLl[lxx])],lLm,lLn)
call UnitAddItem(udg_uA_DTAX_player_hero_unit[GetPlayerId(lLl[lxx])],udg_itmA_DTAX_players_item_in_slot1[GetPlayerId(lLl[lxx])])
call UnitAddItem(udg_uA_DTAX_player_hero_unit[GetPlayerId(lLl[lxx])],udg_itmA_DTAX_players_item_in_slot2[GetPlayerId(lLl[lxx])])
call UnitAddItem(udg_uA_DTAX_player_hero_unit[GetPlayerId(lLl[lxx])],udg_itmA_DTAX_players_item_in_slot3[GetPlayerId(lLl[lxx])])
call UnitAddItem(udg_uA_DTAX_player_hero_unit[GetPlayerId(lLl[lxx])],udg_itmA_DTAX_players_item_in_slot4[GetPlayerId(lLl[lxx])])
call UnitAddItem(udg_uA_DTAX_player_hero_unit[GetPlayerId(lLl[lxx])],udg_itmA_DTAX_players_item_in_slot5[GetPlayerId(lLl[lxx])])
call UnitAddItem(udg_uA_DTAX_player_hero_unit[GetPlayerId(lLl[lxx])],udg_itmA_DTAX_players_item_in_slot6[GetPlayerId(lLl[lxx])])
call ClearSelectionForPlayer(lLl[lxx])
call SelectUnitAddForPlayer(udg_uA_DTAX_player_hero_unit[GetPlayerId(lLl[lxx])],lLl[lxx])
call PanCameraToTimedForPlayer(lLl[lxx],lLm,lLn,0)
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Other\\Awaken\\Awaken.mdl",lLm,lLn))
if(udg_uA_DTAX_player_hero_unit[GetPlayerId(lLL[lxx])]==null)then
set lLm=GetLocationX(llz)
set lLn=GetLocationY(llz)
set lLN=270
else
set lLm=GetUnitX(udg_uA_DTAX_player_hero_unit[GetPlayerId(lLL[lxx])])
set lLn=GetUnitY(udg_uA_DTAX_player_hero_unit[GetPlayerId(lLL[lxx])])
set lLN=GetUnitFacing(udg_uA_DTAX_player_hero_unit[GetPlayerId(lLL[lxx])])
call SetUnitPathing(udg_uA_DTAX_player_hero_unit[GetPlayerId(lLL[lxx])],false)
endif
set udg_uA_DTAX_player_hero_unit[GetPlayerId(lLL[lxx])]=CreateUnit(lLL[lxx],lLo,lLm,lLn,lLN)
call SetUnitPathing(udg_uA_DTAX_player_hero_unit[GetPlayerId(lLL[lxx])],false)
call SetUnitPosition(udg_uA_DTAX_player_hero_unit[GetPlayerId(lLL[lxx])],lLm,lLn)
call UnitAddItem(udg_uA_DTAX_player_hero_unit[GetPlayerId(lLL[lxx])],udg_itmA_DTAX_players_item_in_slot1[GetPlayerId(lLL[lxx])])
call UnitAddItem(udg_uA_DTAX_player_hero_unit[GetPlayerId(lLL[lxx])],udg_itmA_DTAX_players_item_in_slot2[GetPlayerId(lLL[lxx])])
call UnitAddItem(udg_uA_DTAX_player_hero_unit[GetPlayerId(lLL[lxx])],udg_itmA_DTAX_players_item_in_slot3[GetPlayerId(lLL[lxx])])
call UnitAddItem(udg_uA_DTAX_player_hero_unit[GetPlayerId(lLL[lxx])],udg_itmA_DTAX_players_item_in_slot4[GetPlayerId(lLL[lxx])])
call UnitAddItem(udg_uA_DTAX_player_hero_unit[GetPlayerId(lLL[lxx])],udg_itmA_DTAX_players_item_in_slot5[GetPlayerId(lLL[lxx])])
call UnitAddItem(udg_uA_DTAX_player_hero_unit[GetPlayerId(lLL[lxx])],udg_itmA_DTAX_players_item_in_slot6[GetPlayerId(lLL[lxx])])
call ClearSelectionForPlayer(lLL[lxx])
call SelectUnitAddForPlayer(udg_uA_DTAX_player_hero_unit[GetPlayerId(lLL[lxx])],lLL[lxx])
call PanCameraToTimedForPlayer(lLL[lxx],lLm,lLn,0)
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Other\\Awaken\\Awaken.mdl",lLm,lLn))
set lxx=lxx+1
endloop
call ForGroup(lLk,function LgLg)
call DestroyGroup(lLk)
set lxx=1
loop
exitwhen lxx>lLK
call SetUnitPathing(udg_uA_DTAX_player_hero_unit[GetPlayerId(lLl[lxx])],true)
call SetUnitPathing(udg_uA_DTAX_player_hero_unit[GetPlayerId(lLL[lxx])],true)
set lxx=lxx+1
endloop
call PolledWait(55)
set udg_b_DTAX_is_mirrormatch_started=true
call RemoveLocation(llY)
call RemoveLocation(llz)
endfunction
function lJlJ takes nothing returns nothing
local trigger ltt=CreateTrigger()
set udg_b_DTAX_is_mirrormatch_mode=true
call HeroDenyAll('H00I')
call TriggerRegisterTimerEvent(ltt,57,false)
call TriggerAddAction(ltt,function LJLJ)
endfunction
function InitTrig_Mirrormatch takes nothing returns nothing
endfunction
function LOLO takes nothing returns nothing
local integer lLp=GetInteger(H2Tx(GetTriggeringTrigger()),"PlayerId")
local integer lEq
local integer lEQ
local integer lEY
local integer lLP
local location llS=GetRectCenter(gg_rct_SentinelTavernsRect)
local location llt=GetRectCenter(gg_rct_ScourgeTavernsRect)
if udg_A5 then
return
endif
if PlayerIsSentinel(Player(lLp))then
set lEq=udg_i_DTAX_FirstSEHero
set lEQ=udg_i_DTAX_LastSEHero
set lLP=0
else
set lEq=udg_i_DTAX_FirstSCHero
set lEQ=udg_i_DTAX_LastSCHero
set lLP=1
endif
if udg_b_DTAX_is_allpick_mode then
set lEq=udg_i_DTAX_FirstSEHero
set lEQ=udg_i_DTAX_LastSCHero
if PlayerIsSentinel(Player(lLp))then
call CreateUnitAtLoc(Player(lLp),'n00C',llt,bj_UNIT_FACING)
else
call CreateUnitAtLoc(Player(lLp),'n00C',llS,bj_UNIT_FACING)
endif
endif
if not udg_b_DTAX_is_allrandom_mode then
loop
exitwhen lEq>lEQ
if udg_bA_DTAX_used_hero_types_SAME1[lEq]==false then
call SetPlayerTechMaxAllowed(Player(lLp),udg_iA_DTAX_HeroTypes[lEq],1)
endif
set lEq=lEq+1
endloop
if(GetPlayerState(Player(lLp),PLAYER_STATE_RESOURCE_GOLD)<250)then
call SetPlayerState(Player(lLp),PLAYER_STATE_RESOURCE_GOLD,250)
endif
elseif(udg_iA_UNKNOWN_heroes_count_per_team[lLP]<ReturnMin(udg_i_DTAX_LastSEHero,udg_i_DTAX_LastSCHero-udg_i_DTAX_FirstSCHero+1))then
set udg_uA_DTAX_player_hero_unit[lLp]=null
if PlayerIsActive(Player(lLp))then
loop
set lEY=EyEy()
if udg_bA_DTAX_used_hero_types_SAME1[lEY]==false then
set udg_bA_DTAX_used_hero_types_SAME1[lEY]=true
call SetPlayerState(Player(lLp),PLAYER_STATE_RESOURCE_FOOD_CAP,6)
call PolledWait(.01)
if PlayerIsSentinel(Player(lLp))then
set udg_uA_DTAX_player_hero_unit[lLp]=CreateUnitAtLoc(Player(lLp),udg_iA_DTAX_HeroTypes[lEY],llS,bj_UNIT_FACING)
else
set udg_uA_DTAX_player_hero_unit[lLp]=CreateUnitAtLoc(Player(lLp),udg_iA_DTAX_HeroTypes[lEY],llt,bj_UNIT_FACING)
endif
endif
exitwhen udg_uA_DTAX_player_hero_unit[lLp]!=null
endloop
endif
endif
call RemoveLocation(llS)
call RemoveLocation(llt)
if not udg_b_DTAX_is_allrandom_mode then
endif
endfunction
function ljlj takes nothing returns nothing
local location liD
local real lLq
local trigger ltt
local integer lLQ
local integer lxx
set udg_b_DTAX_is_deathmatch_mode=true
set lxx=1
loop
exitwhen lxx>5
set lLQ=GetPlayerId(udg_pA_DTAX_SEPlayers[lxx])
set ltt=CreateTrigger()
call TriggerRegisterTimerExpireEvent(ltt,udg_tA_DTAX_hero_revive_timer[lLQ])
call TriggerAddAction(ltt,function LOLO)
call SetInteger(H2Tx(ltt),"PlayerId",lLQ)
set lLQ=GetPlayerId(udg_pA_DTAX_SCPlayers[lxx])
set ltt=CreateTrigger()
call TriggerRegisterTimerExpireEvent(ltt,udg_tA_DTAX_hero_revive_timer[lLQ])
call TriggerAddAction(ltt,function LOLO)
call SetInteger(H2Tx(ltt),"PlayerId",lLQ)
set lxx=lxx+1
endloop
set liD=GetUnitLoc(gg_unit_n002_0007)
set lLq=GetUnitFacing(gg_unit_n002_0007)
call RemoveUnit(gg_unit_n002_0007)
set gg_unit_n002_0007=CreateUnit(udg_pA_DTAX_SEPlayers[0],'n001',GetLocationX(liD),GetLocationY(liD),lLq)
call SetUnitColor(gg_unit_n002_0007,ConvertPlayerColor(15))
call RemoveLocation(liD)
set liD=GetUnitLoc(gg_unit_n002_0047)
set lLq=GetUnitFacing(gg_unit_n002_0047)
call RemoveUnit(gg_unit_n002_0047)
set gg_unit_n002_0047=CreateUnit(udg_pA_DTAX_SCPlayers[0],'n001',GetLocationX(liD),GetLocationY(liD),lLq)
call SetUnitColor(gg_unit_n002_0047,ConvertPlayerColor(15))
call RemoveLocation(liD)
call UnitRemoveAbility(gg_unit_n008_0090,'Aawa')
call UnitRemoveAbility(gg_unit_n01D_0091,'Aawa')
call UnitRemoveAbility(gg_unit_ntav_0092,'Aawa')
call UnitRemoveAbility(gg_unit_n01N_0093,'Aawa')
call UnitRemoveAbility(gg_unit_n005_0094,'Aawa')
call UnitRemoveAbility(gg_unit_n01P_0095,'Aawa')
call UnitRemoveAbility(gg_unit_n007_0096,'Aawa')
call UnitRemoveAbility(gg_unit_n01B_0097,'Aawa')
endfunction
function InitTrig_Deathmatch takes nothing returns nothing
endfunction
function LuLu takes nothing returns nothing
local integer lxx=1
local player lEk
local unit lfU=GetTriggerUnit()
local integer lLU=GetUnitTypeId(lfU)
if(GetOwningPlayer(lfU)==udg_p_DTAX_Host and IsUnitType(lfU,UNIT_TYPE_HERO))then
call DisableTrigger(GetTriggeringTrigger())
if udg_bA_DTAX_player_randomed[GetPlayerId(udg_p_DTAX_Host)]==false and udg_b_DTAX_is_allrandom_mode==false and udg_b_DTAX_is_teamrandom_mode==false then
call SetPlayerState(udg_p_DTAX_Host,PLAYER_STATE_RESOURCE_GOLD,250+GetPlayerState(udg_p_DTAX_Host,PLAYER_STATE_RESOURCE_GOLD))
endif
set udg_bA_DTAX_player_has_repicked_hero[GetPlayerId(udg_p_DTAX_Host)]=true
call TriggerSleepAction(0)
loop
exitwhen lxx>5
set lEk=udg_pA_DTAX_SEPlayers[lxx]
if PlayerIsActive(lEk)and lEk!=udg_p_DTAX_Host then
set udg_uA_DTAX_player_hero_unit[GetPlayerId(lEk)]=CreateUnit(lEk,lLU,GetRectCenterX(gg_rct_SentinelHeroSpawn),GetRectCenterY(gg_rct_SentinelHeroSpawn),270)
endif
set lEk=udg_pA_DTAX_SCPlayers[lxx]
if PlayerIsActive(lEk)and lEk!=udg_p_DTAX_Host then
set udg_uA_DTAX_player_hero_unit[GetPlayerId(lEk)]=CreateUnit(lEk,lLU,GetRectCenterX(gg_rct_ScourgeHeroSpawn),GetRectCenterY(gg_rct_ScourgeHeroSpawn),270)
endif
set lxx=lxx+1
endloop
endif
endfunction
function lklk takes nothing returns nothing
local integer lxx=1
local trigger ltt=CreateTrigger()
local region lrr=CreateRegion()
set udg_b_DTAX_is_samehero_mode=true
call HeroDenyAll('H00I')
loop
exitwhen lxx>5
if(udg_pA_DTAX_SEPlayers[lxx]!=udg_p_DTAX_Host)then
call HeroDenyForPlayer(udg_pA_DTAX_SEPlayers[lxx])
set udg_bA_DTAX_player_randomed[GetPlayerId(udg_pA_DTAX_SEPlayers[lxx])]=true
set udg_bA_DTAX_player_has_repicked_hero[GetPlayerId(udg_pA_DTAX_SEPlayers[lxx])]=true
endif
if(udg_pA_DTAX_SCPlayers[lxx]!=udg_p_DTAX_Host)then
call HeroDenyForPlayer(udg_pA_DTAX_SCPlayers[lxx])
set udg_bA_DTAX_player_randomed[GetPlayerId(udg_pA_DTAX_SCPlayers[lxx])]=true
set udg_bA_DTAX_player_has_repicked_hero[GetPlayerId(udg_pA_DTAX_SCPlayers[lxx])]=true
endif
set lxx=lxx+1
endloop
call RegionAddRect(lrr,bj_mapInitialPlayableArea)
call TriggerRegisterEnterRegion(ltt,lrr,null)
call TriggerAddAction(ltt,function LuLu)
endfunction
function InitTrig_SameHero_Deny_Geomancer takes nothing returns nothing
endfunction
function Add8GoldAllII takes nothing returns nothing
call SetPlayerState(udg_pA_DTAX_SEPlayers[1],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(udg_pA_DTAX_SEPlayers[1],PLAYER_STATE_RESOURCE_GOLD)+8)
call SetPlayerState(udg_pA_DTAX_SEPlayers[2],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(udg_pA_DTAX_SEPlayers[2],PLAYER_STATE_RESOURCE_GOLD)+8)
call SetPlayerState(udg_pA_DTAX_SEPlayers[3],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(udg_pA_DTAX_SEPlayers[3],PLAYER_STATE_RESOURCE_GOLD)+8)
call SetPlayerState(udg_pA_DTAX_SEPlayers[4],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(udg_pA_DTAX_SEPlayers[4],PLAYER_STATE_RESOURCE_GOLD)+8)
call SetPlayerState(udg_pA_DTAX_SEPlayers[5],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(udg_pA_DTAX_SEPlayers[5],PLAYER_STATE_RESOURCE_GOLD)+8)
call SetPlayerState(udg_pA_DTAX_SCPlayers[1],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(udg_pA_DTAX_SCPlayers[1],PLAYER_STATE_RESOURCE_GOLD)+8)
call SetPlayerState(udg_pA_DTAX_SCPlayers[2],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(udg_pA_DTAX_SCPlayers[2],PLAYER_STATE_RESOURCE_GOLD)+8)
call SetPlayerState(udg_pA_DTAX_SCPlayers[3],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(udg_pA_DTAX_SCPlayers[3],PLAYER_STATE_RESOURCE_GOLD)+8)
call SetPlayerState(udg_pA_DTAX_SCPlayers[4],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(udg_pA_DTAX_SCPlayers[4],PLAYER_STATE_RESOURCE_GOLD)+8)
call SetPlayerState(udg_pA_DTAX_SCPlayers[5],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(udg_pA_DTAX_SCPlayers[5],PLAYER_STATE_RESOURCE_GOLD)+8)
endfunction
function lsls takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterTimerEvent(ltt,7,true)
call TriggerAddAction(ltt,function Add8GoldAllII)
set udg_b_DTAX_easy_mode=true
set udg_triggerl182=ltt
call SetPlayerTechResearched(udg_pA_DTAX_SEPlayers[0],'R004',1)
call SetPlayerTechResearched(udg_pA_DTAX_SCPlayers[0],'R004',1)
call SetPlayerHandicapXP(udg_pA_DTAX_SEPlayers[1],1.5)
call SetPlayerHandicapXP(udg_pA_DTAX_SEPlayers[2],1.5)
call SetPlayerHandicapXP(udg_pA_DTAX_SEPlayers[3],1.5)
call SetPlayerHandicapXP(udg_pA_DTAX_SEPlayers[4],1.5)
call SetPlayerHandicapXP(udg_pA_DTAX_SEPlayers[5],1.5)
call SetPlayerHandicapXP(udg_pA_DTAX_SCPlayers[1],1.5)
call SetPlayerHandicapXP(udg_pA_DTAX_SCPlayers[2],1.5)
call SetPlayerHandicapXP(udg_pA_DTAX_SCPlayers[3],1.5)
call SetPlayerHandicapXP(udg_pA_DTAX_SCPlayers[4],1.5)
call SetPlayerHandicapXP(udg_pA_DTAX_SCPlayers[5],1.5)
endfunction
function InitTrig_Easymode takes nothing returns nothing
endfunction
function Trig_NormalModeDefaulted_Actions takes nothing returns nothing
set udg_b_DTAX_select_game_mode_time_elapsed=true
call PolledWait(2)
if udg_b_DTAX_bGameStarted then
call MultyEcho(bj_FORCE_ALL_PLAYERS,20.,udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(udg_p_DTAX_Host)]+GetPlayerName(udg_p_DTAX_Host)+"|r"+" has defaulted to "+"|c006699CC"+"Normal Mode"+"|r"+". You will get 175 gold refunded when you pick a hero.")
call MultyEcho(bj_FORCE_ALL_PLAYERS,20.," ")
endif
endfunction
function StartTrigger_NormalModeDefaulted takes nothing returns nothing
set gg_trg_NormalModeDefaulted=CreateTrigger()
call TriggerRegisterTimerEventSingle(gg_trg_NormalModeDefaulted,14.)
call TriggerAddAction(gg_trg_NormalModeDefaulted,function Trig_NormalModeDefaulted_Actions)
endfunction
function InitTrig_NormalModeDefaulted takes nothing returns nothing
endfunction
function WTFModeAction takes nothing returns nothing
call TriggerSleepAction(0)
call UnitResetCooldown(GetTriggerUnit())
call SetUnitManaPercentBJ(GetTriggerUnit(),100)
endfunction
function Trig_WTF_Mode_Actions takes nothing returns nothing
local trigger ltt=GetTriggeringTrigger()
local integer ljV=ForceActivePlayers(udg_f_DTAX_SEPlayers)+ForceActivePlayers(udg_f_DTAX_SCPlayers)
local integer lNumRequired=ReturnMin(ljV,ljV/2+1)
local string lf5=H2Tx(ltt)
local integer ljw=GetInteger(lf5,"ExecCount")
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,60.," ")
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,90.,"WTF mode activated. In this mode spells have no cooldown or manacost.")
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,90.,"This is a FOR FUN ONLY mode.")
set ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddAction(ltt,function WTFModeAction)
endfunction
function Trig_WTF_Mode_Conditions takes nothing returns boolean
return not udg_b_DTAX_select_game_mode_time_elapsed
endfunction
function StartTrigger_WTF_Mode takes nothing returns nothing
set gg_trg_WTF_Mode=CreateTrigger()
call TriggerRegisterPlayerChatEvent(gg_trg_WTF_Mode,udg_p_DTAX_Host,"-wtf",true)
call TriggerAddAction(gg_trg_WTF_Mode,function Trig_WTF_Mode_Actions)
call TriggerAddCondition(gg_trg_WTF_Mode,Condition(function Trig_WTF_Mode_Conditions))
endfunction
function InitTrig_WTF_Mode takes nothing returns nothing
endfunction
function fDfD takes boolean pfe,boolean pfE returns integer
local integer lfc
local integer lfC
if pfe and pfE then
if(GetRandomInt(1,2)==1)then
set lfc=udg_i_DTAX_FirstSEHero
set lfC=udg_i_DTAX_LastSEHero
else
set lfc=udg_i_DTAX_FirstSCHero
set lfC=udg_i_DTAX_LastSCHero
endif
elseif pfe then
set lfc=udg_i_DTAX_FirstSEHero
set lfC=udg_i_DTAX_LastSEHero
else
set lfc=udg_i_DTAX_FirstSCHero
set lfC=udg_i_DTAX_LastSCHero
endif
return GetRandomInt(lfc,lfC)
endfunction
function lvlv takes integer pEY returns boolean
return pEY!=88 and pEY!=89 and pEY!=90 and pEY!=23
endfunction
function lVlV takes nothing returns nothing
local integer lxx=1
local boolean array llw
local integer lEY
local integer lMaxHeroes=udg_i_DTAX_LastSEHero-udg_i_DTAX_FirstSEHero+udg_i_DTAX_LastSCHero-udg_i_DTAX_FirstSCHero+4
local unit lStore1=gg_unit_n008_0090
local unit lStore2=gg_unit_n01D_0091
set lxx=1
loop
exitwhen lxx==23
set lEY=fDfD(true,true)
if llw[lEY]==false and lvlv(lEY)then
set llw[lEY]=true
set udg_ez[lxx]=lEY
if lxx<=11 then
call AddUnitToStock(udg_u_Draft_n01Y_0098,udg_iA_DTAX_HeroTypes[lEY],1,1)
call AddUnitToStock(udg_u_Draft_n01Y_0100,udg_iA_DTAX_HeroTypes[lEY],1,1)
else
call AddUnitToStock(udg_u_Draft_n01Z_0099,udg_iA_DTAX_HeroTypes[lEY],1,1)
call AddUnitToStock(udg_u_Draft_n01Z_0101,udg_iA_DTAX_HeroTypes[lEY],1,1)
endif
set lxx=lxx+1
endif
endloop
endfunction
function lTlT takes player ppp returns unit
local integer lii=1
local location lfd
loop
exitwhen udg_bA_DTAX_used_hero_types_SAME1[udg_ez[lii]]==false
set lii=lii+1
endloop
set udg_bA_DTAX_player_randomed[GetPlayerId(ppp)]=true
if PlayerIsSentinel(ppp)then
set lfd=GetRectCenter(gg_rct_SentinelTavernsRect)
else
set lfd=GetRectCenter(gg_rct_ScourgeTavernsRect)
endif
set udg_uA_DTAX_player_hero_unit[GetPlayerId(ppp)]=CreateUnitAtLoc(ppp,udg_iA_DTAX_HeroTypes[udg_ez[lii]],lfd,0)
set udg_bA_DTAX_used_hero_types_SAME1[udg_ez[lii]]=true
call RemoveLocation(lfd)
return udg_uA_DTAX_player_hero_unit[GetPlayerId(ppp)]
endfunction
function lulu takes player ppp returns nothing
local unit llU
call PolledWait(3)
if PlayerIsActive(ppp)and udg_uA_DTAX_player_hero_unit[GetPlayerId(ppp)]==null and GetPlayerState(ppp,PLAYER_STATE_RESOURCE_GOLD)<250 then
call MultyEcho(bj_FORCE_ALL_PLAYERS,15.,udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(ppp)]+GetPlayerName(ppp)+"|r"+" does not have enough gold to be randomly assigned a hero.")
endif
if PlayerIsActive(ppp)and udg_uA_DTAX_player_hero_unit[GetPlayerId(ppp)]==null and GetPlayerState(ppp,PLAYER_STATE_RESOURCE_GOLD)>249 then
set llU=lTlT(ppp)
call SetPlayerState(ppp,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(ppp,PLAYER_STATE_RESOURCE_GOLD)-250)
endif
call PolledWait(3)
endfunction
function lPlP takes nothing returns nothing
local integer array llW
local player llx
local player llX
local boolean lly=false
local location llS=GetRectCenter(gg_rct_SentinelTavernsRect)
local location llt=GetRectCenter(gg_rct_ScourgeTavernsRect)
local player lEk=Player(15)
call RemoveUnit(gg_unit_n008_0090)
call RemoveUnit(gg_unit_n01D_0091)
call RemoveUnit(gg_unit_ntav_0092)
call RemoveUnit(gg_unit_n01N_0093)
call RemoveUnit(gg_unit_n005_0094)
call RemoveUnit(gg_unit_n01P_0095)
call RemoveUnit(gg_unit_n007_0096)
call RemoveUnit(gg_unit_n01B_0097)
set udg_u_Draft_n01Y_0098=CreateUnit(lEk,'n01Y',-6464,-6592,270)
set udg_u_Draft_n01Z_0099=CreateUnit(lEk,'n01Z',-6080,-6592,270)
set udg_u_Draft_n01Y_0100=CreateUnit(lEk,'n01Y',5888,6208,270)
set udg_u_Draft_n01Z_0101=CreateUnit(lEk,'n01Z',6272,6208,270)
call SetUnitColor(udg_u_Draft_n01Y_0098,ConvertPlayerColor(0))
call SetUnitColor(udg_u_Draft_n01Z_0099,ConvertPlayerColor(0))
call SetUnitColor(udg_u_Draft_n01Y_0100,ConvertPlayerColor(0))
call SetUnitColor(udg_u_Draft_n01Z_0101,ConvertPlayerColor(0))
call PanCameraToTimedLocForPlayer(udg_pA_DTAX_SEPlayers[1],llS,0)
call PanCameraToTimedLocForPlayer(udg_pA_DTAX_SEPlayers[2],llS,0)
call PanCameraToTimedLocForPlayer(udg_pA_DTAX_SEPlayers[3],llS,0)
call PanCameraToTimedLocForPlayer(udg_pA_DTAX_SEPlayers[4],llS,0)
call PanCameraToTimedLocForPlayer(udg_pA_DTAX_SEPlayers[5],llS,0)
call PanCameraToTimedLocForPlayer(udg_pA_DTAX_SCPlayers[1],llt,0)
call PanCameraToTimedLocForPlayer(udg_pA_DTAX_SCPlayers[2],llt,0)
call PanCameraToTimedLocForPlayer(udg_pA_DTAX_SCPlayers[3],llt,0)
call PanCameraToTimedLocForPlayer(udg_pA_DTAX_SCPlayers[4],llt,0)
call PanCameraToTimedLocForPlayer(udg_pA_DTAX_SCPlayers[5],llt,0)
call ClearSelectionForPlayer(udg_pA_DTAX_SEPlayers[1])
call ClearSelectionForPlayer(udg_pA_DTAX_SEPlayers[2])
call ClearSelectionForPlayer(udg_pA_DTAX_SEPlayers[3])
call ClearSelectionForPlayer(udg_pA_DTAX_SEPlayers[4])
call ClearSelectionForPlayer(udg_pA_DTAX_SEPlayers[5])
call ClearSelectionForPlayer(udg_pA_DTAX_SCPlayers[1])
call ClearSelectionForPlayer(udg_pA_DTAX_SCPlayers[2])
call ClearSelectionForPlayer(udg_pA_DTAX_SCPlayers[3])
call ClearSelectionForPlayer(udg_pA_DTAX_SCPlayers[4])
call ClearSelectionForPlayer(udg_pA_DTAX_SCPlayers[5])
call SelectUnitAddForPlayer(udg_u_Draft_n01Y_0098,udg_pA_DTAX_SEPlayers[1])
call SelectUnitAddForPlayer(udg_u_Draft_n01Y_0098,udg_pA_DTAX_SEPlayers[2])
call SelectUnitAddForPlayer(udg_u_Draft_n01Y_0098,udg_pA_DTAX_SEPlayers[3])
call SelectUnitAddForPlayer(udg_u_Draft_n01Y_0098,udg_pA_DTAX_SEPlayers[4])
call SelectUnitAddForPlayer(udg_u_Draft_n01Y_0098,udg_pA_DTAX_SEPlayers[5])
call SelectUnitAddForPlayer(udg_u_Draft_n01Y_0100,udg_pA_DTAX_SCPlayers[1])
call SelectUnitAddForPlayer(udg_u_Draft_n01Y_0100,udg_pA_DTAX_SCPlayers[2])
call SelectUnitAddForPlayer(udg_u_Draft_n01Y_0100,udg_pA_DTAX_SCPlayers[3])
call SelectUnitAddForPlayer(udg_u_Draft_n01Y_0100,udg_pA_DTAX_SCPlayers[4])
call SelectUnitAddForPlayer(udg_u_Draft_n01Y_0100,udg_pA_DTAX_SCPlayers[5])
call RemoveLocation(llS)
call RemoveLocation(llt)
set udg_b_DTAX_is_RandomDraft_mode=true
set udg_A9=false
set udg_A8=false
call DisableTrigger(gg_trg_NormalGoldIncome)
if udg_b_DTAX_easy_mode then
call DisableTrigger(udg_triggerl182)
endif
call lVlV()
set llW[GetPlayerId(udg_pA_DTAX_SEPlayers[1])]=GetPlayerState(udg_pA_DTAX_SEPlayers[1],PLAYER_STATE_RESOURCE_GOLD)
set llW[GetPlayerId(udg_pA_DTAX_SEPlayers[2])]=GetPlayerState(udg_pA_DTAX_SEPlayers[2],PLAYER_STATE_RESOURCE_GOLD)
set llW[GetPlayerId(udg_pA_DTAX_SEPlayers[3])]=GetPlayerState(udg_pA_DTAX_SEPlayers[3],PLAYER_STATE_RESOURCE_GOLD)
set llW[GetPlayerId(udg_pA_DTAX_SEPlayers[4])]=GetPlayerState(udg_pA_DTAX_SEPlayers[4],PLAYER_STATE_RESOURCE_GOLD)
set llW[GetPlayerId(udg_pA_DTAX_SEPlayers[5])]=GetPlayerState(udg_pA_DTAX_SEPlayers[5],PLAYER_STATE_RESOURCE_GOLD)
set llW[GetPlayerId(udg_pA_DTAX_SCPlayers[1])]=GetPlayerState(udg_pA_DTAX_SCPlayers[1],PLAYER_STATE_RESOURCE_GOLD)
set llW[GetPlayerId(udg_pA_DTAX_SCPlayers[2])]=GetPlayerState(udg_pA_DTAX_SCPlayers[2],PLAYER_STATE_RESOURCE_GOLD)
set llW[GetPlayerId(udg_pA_DTAX_SCPlayers[3])]=GetPlayerState(udg_pA_DTAX_SCPlayers[3],PLAYER_STATE_RESOURCE_GOLD)
set llW[GetPlayerId(udg_pA_DTAX_SCPlayers[4])]=GetPlayerState(udg_pA_DTAX_SCPlayers[4],PLAYER_STATE_RESOURCE_GOLD)
set llW[GetPlayerId(udg_pA_DTAX_SCPlayers[5])]=GetPlayerState(udg_pA_DTAX_SCPlayers[5],PLAYER_STATE_RESOURCE_GOLD)
call SetPlayerState(udg_pA_DTAX_SEPlayers[1],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(udg_pA_DTAX_SEPlayers[2],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(udg_pA_DTAX_SEPlayers[3],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(udg_pA_DTAX_SEPlayers[4],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(udg_pA_DTAX_SEPlayers[5],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(udg_pA_DTAX_SCPlayers[1],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(udg_pA_DTAX_SCPlayers[2],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(udg_pA_DTAX_SCPlayers[3],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(udg_pA_DTAX_SCPlayers[4],PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerState(udg_pA_DTAX_SCPlayers[5],PLAYER_STATE_RESOURCE_GOLD,0)
call PolledWait(15.-TimerGetElapsed(udg_t_DTAX_game_time))
call SuspendTimeOfDay(true)
if GetRandomInt(1,2)==1 then
set lly=true
endif
call MultyEcho(bj_FORCE_ALL_PLAYERS,40.,"22 heroes have been added to the available pool")
if lly then
call MultyEcho(bj_FORCE_ALL_PLAYERS,40.,"The "+udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(udg_pA_DTAX_SEPlayers[0])]+"Sentinel"+"|r"+" will begin the 1-2-2-2-2-1 draft in 10 seconds.")
else
call MultyEcho(bj_FORCE_ALL_PLAYERS,40.,"The "+udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(udg_pA_DTAX_SCPlayers[0])]+"Scourge"+"|r"+" will begin the 1-2-2-2-2-1 draft in 10 seconds.")
endif
call PolledWait(10)
if lly then
set llx=udg_pA_DTAX_SEPlayers[1]
else
set llx=udg_pA_DTAX_SCPlayers[1]
endif
call MultyEcho(bj_FORCE_ALL_PLAYERS,15.,udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(llx)]+GetPlayerName(llx)+"|r"+" has 20 seconds to pick a hero.")
call SetPlayerState(llx,PLAYER_STATE_RESOURCE_GOLD,llW[GetPlayerId(llx)])
call PolledWait(20.)
call HeroDenyForPlayer(llx)
call lulu(llx)
if lly then
set llx=udg_pA_DTAX_SCPlayers[1]
set llX=udg_pA_DTAX_SCPlayers[2]
else
set llx=udg_pA_DTAX_SEPlayers[1]
set llX=udg_pA_DTAX_SEPlayers[2]
endif
call MultyEcho(bj_FORCE_ALL_PLAYERS,15.,udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(llx)]+GetPlayerName(llx)+"|r"+" has 20 seconds to pick a hero.")
call MultyEcho(bj_FORCE_ALL_PLAYERS,15.,udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(llX)]+GetPlayerName(llX)+"|r"+" has 20 seconds to pick a hero.")
call SetPlayerState(llx,PLAYER_STATE_RESOURCE_GOLD,llW[GetPlayerId(llx)])
call SetPlayerState(llX,PLAYER_STATE_RESOURCE_GOLD,llW[GetPlayerId(llX)])
call PolledWait(20.)
call HeroDenyForPlayer(llx)
call HeroDenyForPlayer(llX)
call lulu(llx)
call lulu(llX)
if lly then
set llx=udg_pA_DTAX_SEPlayers[2]
set llX=udg_pA_DTAX_SEPlayers[3]
else
set llx=udg_pA_DTAX_SCPlayers[2]
set llX=udg_pA_DTAX_SCPlayers[3]
endif
call MultyEcho(bj_FORCE_ALL_PLAYERS,15.,udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(llx)]+GetPlayerName(llx)+"|r"+" has 20 seconds to pick a hero.")
call MultyEcho(bj_FORCE_ALL_PLAYERS,15.,udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(llX)]+GetPlayerName(llX)+"|r"+" has 20 seconds to pick a hero.")
call SetPlayerState(llx,PLAYER_STATE_RESOURCE_GOLD,llW[GetPlayerId(llx)])
call SetPlayerState(llX,PLAYER_STATE_RESOURCE_GOLD,llW[GetPlayerId(llX)])
call PolledWait(20.)
call HeroDenyForPlayer(llx)
call HeroDenyForPlayer(llX)
call lulu(llx)
call lulu(llX)
if lly then
set llx=udg_pA_DTAX_SCPlayers[3]
set llX=udg_pA_DTAX_SCPlayers[4]
else
set llx=udg_pA_DTAX_SEPlayers[3]
set llX=udg_pA_DTAX_SEPlayers[4]
endif
call MultyEcho(bj_FORCE_ALL_PLAYERS,15.,udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(llx)]+GetPlayerName(llx)+"|r"+" has 20 seconds to pick a hero.")
call MultyEcho(bj_FORCE_ALL_PLAYERS,15.,udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(llX)]+GetPlayerName(llX)+"|r"+" has 20 seconds to pick a hero.")
call SetPlayerState(llx,PLAYER_STATE_RESOURCE_GOLD,llW[GetPlayerId(llx)])
call SetPlayerState(llX,PLAYER_STATE_RESOURCE_GOLD,llW[GetPlayerId(llX)])
call PolledWait(20.)
call HeroDenyForPlayer(llx)
call HeroDenyForPlayer(llX)
call lulu(llx)
call lulu(llX)
if lly then
set llx=udg_pA_DTAX_SEPlayers[4]
set llX=udg_pA_DTAX_SEPlayers[5]
else
set llx=udg_pA_DTAX_SCPlayers[4]
set llX=udg_pA_DTAX_SCPlayers[5]
endif
call MultyEcho(bj_FORCE_ALL_PLAYERS,15.,udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(llx)]+GetPlayerName(llx)+"|r"+" has 20 seconds to pick a hero.")
call MultyEcho(bj_FORCE_ALL_PLAYERS,15.,udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(llX)]+GetPlayerName(llX)+"|r"+" has 20 seconds to pick a hero.")
call SetPlayerState(llx,PLAYER_STATE_RESOURCE_GOLD,llW[GetPlayerId(llx)])
call SetPlayerState(llX,PLAYER_STATE_RESOURCE_GOLD,llW[GetPlayerId(llX)])
call PolledWait(20.)
call HeroDenyForPlayer(llx)
call HeroDenyForPlayer(llX)
call lulu(llx)
call lulu(llX)
if lly then
set llx=udg_pA_DTAX_SCPlayers[5]
else
set llx=udg_pA_DTAX_SEPlayers[5]
endif
call MultyEcho(bj_FORCE_ALL_PLAYERS,15.,udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(llx)]+GetPlayerName(llx)+"|r"+" has 20 seconds to pick a hero.")
call SetPlayerState(llx,PLAYER_STATE_RESOURCE_GOLD,llW[GetPlayerId(llx)])
call PolledWait(20.)
call HeroDenyForPlayer(llx)
call lulu(llx)
call EnableTrigger(gg_trg_NormalGoldIncome)
if udg_b_DTAX_easy_mode then
call EnableTrigger(udg_triggerl182)
endif
call SuspendTimeOfDay(false)
call PolledWait(15.)
set udg_bi=true
endfunction
function InitTrig_Drafting takes nothing returns nothing
endfunction
function L8L8 takes nothing returns nothing
local unit lfo=GetTriggerUnit()
local player lEk=GetOwningPlayer(lfo)
set udg_Az=lEk
call RemoveUnit(lfo)
if L7L7()and udg_bC[GetPlayerId(lEk)]==false then
set udg_bC[GetPlayerId(lEk)]=true
call HeroDenyForPlayer(lEk)
call DisplayTimedTextToPlayer(lEk,0,udg_A6,10,"You will be given a random hero soon.")
call PolledWait(6)
set udg_Az=lEk
if L7L7()then
set udg_bA_DTAX_player_randomed[GetPlayerId(lEk)]=true
call fBfB(lEk)
else
call DisplayTimedTextToPlayer(lEk,0,udg_A6,10,"You cannot be assigned a random hero.")
endif
endif
endfunction
function Random_RandomIcon takes nothing returns nothing
if GetUnitTypeId(GetTriggerUnit())=='E01L'then
call L8L8()
endif
endfunction
function InitTrig_Random_Hero takes nothing returns nothing
endfunction
function L9L9 takes nothing returns boolean
local unit lfU=udg_uA_DTAX_player_hero_unit[GetPlayerId(GetTriggerPlayer())]
if udg_A9==false then
return false
endif
if(udg_bA_DTAX_player_has_repicked_hero[GetPlayerId(GetTriggerPlayer())])then
return false
endif
if(udg_uA_DTAX_player_hero_unit[GetPlayerId(GetTriggerPlayer())]==null)then
return false
endif
if udg_b_DTAX_is_deathmatch_mode or udg_b_DTAX_is_VoteRandom_mode or udg_b_DTAX_is_Reverse_mode then
return false
endif
if(udg_b_DTAX_repick_time_elapsed)then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,udg_A6,10,"Too late to repick.")
return false
endif
if(GetPlayerState(GetTriggerPlayer(),PLAYER_STATE_RESOURCE_GOLD)<udg_i_DTAX_GLOBAL_gold_cost)then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,udg_A6,10,"Not enough gold to repick.")
return false
endif
if GetPlayerState(GetTriggerPlayer(),PLAYER_STATE_RESOURCE_GOLD)<350 and udg_b_DTAX_is_allpick_mode or udg_b_DTAX_bGameStarted then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,udg_A6,10,"Not enough gold to repick and buy a new hero.")
return false
endif
if GetUnitState(lfU,UNIT_STATE_MANA)!=GetUnitState(lfU,UNIT_STATE_MAX_MANA)or GetUnitState(lfU,UNIT_STATE_LIFE)!=GetUnitState(lfU,UNIT_STATE_MAX_LIFE)then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,udg_A6,10,"You cannot repick without full hp and mana.")
return false
endif
return true
endfunction
function mama takes nothing returns nothing
if(IsUnitType(GetEnumUnit(),UNIT_TYPE_HERO))then
if(GetUnitTypeId(GetEnumUnit())=='U006')then
call ExecuteFunc("HxHx")
endif
call MultyEcho(GetPlayersEnemies(GetTriggerPlayer()),10.,"An enemy player has repicked "+ReturnHeroName(GetEnumUnit())+".")
endif
if(GetUnitTypeId(GetEnumUnit())=='n004')then
call RemoveUnit(GetEnumUnit())
endif
if(GetUnitTypeId(GetEnumUnit())=='n018')then
call RemoveUnit(GetEnumUnit())
endif
if(GetUnitTypeId(GetEnumUnit())=='n01C')then
call RemoveUnit(GetEnumUnit())
endif
if(GetUnitTypeId(GetEnumUnit())=='n01G')then
call RemoveUnit(GetEnumUnit())
endif
endfunction
function mAmA takes nothing returns nothing
local player lEk=GetTriggerPlayer()
local group lEw=GetUnitsInRectOfPlayer(GetWorldBounds(),lEk)
local integer lfc
local integer lfC
local location lfd
local unit lRepickedUnit
local integer lEY
local integer lEq
local integer lEQ
local unit luu
local location llS=GetRectCenter(gg_rct_SentinelTavernsRect)
local location llt=GetRectCenter(gg_rct_ScourgeTavernsRect)
if(PlayerIsSentinel(lEk))then
set lfc=udg_i_DTAX_FirstSEHero
set lfC=udg_i_DTAX_LastSEHero
set lfd=GetRectCenter(gg_rct_SentinelTavernsRect)
else
set lfc=udg_i_DTAX_FirstSCHero
set lfC=udg_i_DTAX_LastSCHero
set lfd=GetRectCenter(gg_rct_ScourgeTavernsRect)
endif
if udg_b_DTAX_is_allrandom_mode then
if(GetRandomInt(1,2)==1)then
set lfc=udg_i_DTAX_FirstSEHero
set lfC=udg_i_DTAX_LastSEHero
else
set lfc=udg_i_DTAX_FirstSCHero
set lfC=udg_i_DTAX_LastSCHero
endif
endif
if udg_b_DTAX_is_allpick_mode or udg_b_DTAX_bGameStarted then
set udg_i_DTAX_GLOBAL_gold_cost=100
endif
set luu=GetUnit(H2Tx(GetTriggerPlayer()),"ChargeUnit")
if luu!=null and GetUnitTypeId(luu)=='e00C'then
call RemoveUnit(luu)
endif
call AdjustPlayerStateBJ(-1*udg_i_DTAX_GLOBAL_gold_cost,lEk,PLAYER_STATE_RESOURCE_GOLD)
set udg_bA_DTAX_player_has_repicked_hero[GetPlayerId(lEk)]=true
call ForGroup(lEw,function mama)
call DropUnit(udg_uA_DTAX_player_hero_unit[GetPlayerId(lEk)])
set udg_uA_DTAX_player_hero_unit[GetPlayerId(GetTriggerPlayer())]=null
if udg_b_DTAX_is_allpick_mode or udg_b_DTAX_bGameStarted then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,60,"You can now pick a new hero.")
if udg_b_DTAX_is_allpick_mode then
set lEq=udg_i_DTAX_FirstSEHero
set lEQ=udg_i_DTAX_LastSCHero
endif
if PlayerIsSentinel(lEk)then
if udg_b_DTAX_bGameStarted then
set lEq=udg_i_DTAX_FirstSEHero
set lEQ=udg_i_DTAX_LastSEHero
else
call CreateUnitAtLoc(lEk,'n00C',llt,bj_UNIT_FACING)
endif
call PanCameraToTimedLocForPlayer(lEk,llS,0)
else
if udg_b_DTAX_bGameStarted then
set lEq=udg_i_DTAX_FirstSCHero
set lEQ=udg_i_DTAX_LastSCHero
else
call CreateUnitAtLoc(lEk,'n00C',llS,bj_UNIT_FACING)
endif
call PanCameraToTimedLocForPlayer(lEk,llt,0)
endif
loop
exitwhen lEq>lEQ
if udg_bA_DTAX_used_hero_types_SAME1[lEq]==false then
call SetPlayerTechMaxAllowed(lEk,udg_iA_DTAX_HeroTypes[lEq],1)
endif
set lEq=lEq+1
endloop
call RemoveLocation(llS)
call RemoveLocation(llt)
return
endif
loop
call PolledWait(.01)
set lEY=GetRandomInt(lfc,lfC)
if(udg_bA_DTAX_used_hero_types_SAME1[lEY]==false)then
set udg_bA_DTAX_used_hero_types_SAME1[lEY]=true
set udg_uA_DTAX_player_hero_unit[GetPlayerId(lEk)]=CreateUnitAtLoc(lEk,udg_iA_DTAX_HeroTypes[lEY],lfd,bj_UNIT_FACING)
call HeroDenyAll(udg_iA_DTAX_HeroTypes[lEY])
endif
exitwhen udg_uA_DTAX_player_hero_unit[GetPlayerId(GetTriggerPlayer())]!=null
endloop
call DestroyGroup(lEw)
call RemoveLocation(lfd)
call RemoveLocation(llS)
call RemoveLocation(llt)
endfunction
function LwLw takes nothing returns nothing
if L9L9()then
call mAmA()
endif
endfunction
function InitTrig_Repick takes nothing returns nothing
endfunction
function mImI takes nothing returns nothing
call SetHandle(H2Tx(GetTriggerPlayer()),"SwapHeroWithPlayer",udg_pA_DTAX_SEPlayers[1])
call SwapDialogButtons()
endfunction
function mjmj takes nothing returns nothing
call SetHandle(H2Tx(GetTriggerPlayer()),"SwapHeroWithPlayer",udg_pA_DTAX_SEPlayers[2])
call SwapDialogButtons()
endfunction
function mJmJ takes nothing returns nothing
call SetHandle(H2Tx(GetTriggerPlayer()),"SwapHeroWithPlayer",udg_pA_DTAX_SEPlayers[3])
call SwapDialogButtons()
endfunction
function mkmk takes nothing returns nothing
call SetHandle(H2Tx(GetTriggerPlayer()),"SwapHeroWithPlayer",udg_pA_DTAX_SEPlayers[4])
call SwapDialogButtons()
endfunction
function mKmK takes nothing returns nothing
call SetHandle(H2Tx(GetTriggerPlayer()),"SwapHeroWithPlayer",udg_pA_DTAX_SEPlayers[5])
call SwapDialogButtons()
endfunction
function mlml takes nothing returns nothing
call SetHandle(H2Tx(GetTriggerPlayer()),"SwapHeroWithPlayer",udg_pA_DTAX_SCPlayers[1])
call SwapDialogButtons()
endfunction
function mLmL takes nothing returns nothing
call SetHandle(H2Tx(GetTriggerPlayer()),"SwapHeroWithPlayer",udg_pA_DTAX_SCPlayers[2])
call SwapDialogButtons()
endfunction
function mmmm takes nothing returns nothing
call SetHandle(H2Tx(GetTriggerPlayer()),"SwapHeroWithPlayer",udg_pA_DTAX_SCPlayers[3])
call SwapDialogButtons()
endfunction
function mMmM takes nothing returns nothing
call SetHandle(H2Tx(GetTriggerPlayer()),"SwapHeroWithPlayer",udg_pA_DTAX_SCPlayers[4])
call SwapDialogButtons()
endfunction
function mnmn takes nothing returns nothing
call SetHandle(H2Tx(GetTriggerPlayer()),"SwapHeroWithPlayer",udg_pA_DTAX_SCPlayers[5])
call SwapDialogButtons()
endfunction
function DenySwap takes nothing returns nothing
call SetBoolean(H2Tx(GetTriggerPlayer()),"AlreadySwapped",false)
endfunction
function SwapInit takes nothing returns nothing
local player lEk=GetTriggerPlayer()
local player lmF
local dialog lmg=DialogCreate()
local button lmG
local integer lEq=1
local trigger array lmO
call SetBoolean(H2Tx(GetTriggerPlayer()),"AlreadySwapped",true)
set lmO[1]=CreateTrigger()
call TriggerAddAction(lmO[1],function mImI)
set lmO[2]=CreateTrigger()
call TriggerAddAction(lmO[2],function mjmj)
set lmO[3]=CreateTrigger()
call TriggerAddAction(lmO[3],function mJmJ)
set lmO[4]=CreateTrigger()
call TriggerAddAction(lmO[4],function mkmk)
set lmO[5]=CreateTrigger()
call TriggerAddAction(lmO[5],function mKmK)
set lmO[6]=CreateTrigger()
call TriggerAddAction(lmO[6],function mlml)
set lmO[7]=CreateTrigger()
call TriggerAddAction(lmO[7],function mLmL)
set lmO[8]=CreateTrigger()
call TriggerAddAction(lmO[8],function mmmm)
set lmO[9]=CreateTrigger()
call TriggerAddAction(lmO[9],function mMmM)
set lmO[10]=CreateTrigger()
call TriggerAddAction(lmO[10],function mnmn)
set lmG=DialogAddButton(lmg,"Cancel",0)
set lmO[0]=CreateTrigger()
call TriggerRegisterDialogButtonEvent(lmO[0],lmG)
call TriggerAddAction(lmO[0],function DenySwap)
if PlayerIsSentinel(lEk)then
loop
exitwhen lEq>5
if(lEk!=udg_pA_DTAX_SEPlayers[lEq]and PlayerIsActive(udg_pA_DTAX_SEPlayers[lEq])and udg_uA_DTAX_player_hero_unit[GetPlayerId(udg_pA_DTAX_SEPlayers[lEq])]!=null)then
set lmG=DialogAddButton(lmg,udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(udg_pA_DTAX_SEPlayers[lEq])]+GetPlayerName(udg_pA_DTAX_SEPlayers[lEq])+"|r - "+ReturnHeroName(udg_uA_DTAX_player_hero_unit[GetPlayerId(udg_pA_DTAX_SEPlayers[lEq])]),0)
call TriggerRegisterDialogButtonEvent(lmO[lEq],lmG)
endif
set lEq=lEq+1
endloop
else
loop
exitwhen lEq>5
if(lEk!=udg_pA_DTAX_SCPlayers[lEq]and PlayerIsActive(udg_pA_DTAX_SCPlayers[lEq])and udg_uA_DTAX_player_hero_unit[GetPlayerId(udg_pA_DTAX_SCPlayers[lEq])]!=null)then
set lmG=DialogAddButton(lmg,udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(udg_pA_DTAX_SCPlayers[lEq])]+GetPlayerName(udg_pA_DTAX_SCPlayers[lEq])+"|r - "+ReturnHeroName(udg_uA_DTAX_player_hero_unit[GetPlayerId(udg_pA_DTAX_SCPlayers[lEq])]),0)
call TriggerRegisterDialogButtonEvent(lmO[5+lEq],lmG)
endif
set lEq=lEq+1
endloop
endif
call DialogSetMessage(lmg,"Pick the player to swap with")
call DialogDisplay(lEk,lmg,true)
call PolledWait(10)
call DialogDisplay(lEk,lmg,false)
call PolledWait(1)
call DialogDestroy(lmg)
endfunction
function mpmp takes player pES returns boolean
local integer lEq=1
local integer lmP=0
loop
exitwhen lEq>5
if PlayerIsSentinel(pES)then
if udg_uA_DTAX_player_hero_unit[GetPlayerId(udg_pA_DTAX_SEPlayers[lEq])]!=null and udg_pA_DTAX_SEPlayers[lEq]!=pES then
set lmP=lmP+1
endif
else
if udg_uA_DTAX_player_hero_unit[GetPlayerId(udg_pA_DTAX_SCPlayers[lEq])]!=null and udg_pA_DTAX_SCPlayers[lEq]!=pES then
set lmP=lmP+1
endif
endif
set lEq=lEq+1
endloop
if lmP>0 then
return true
else
return false
endif
endfunction
function mqmq takes nothing returns boolean
if udg_b_DTAX_swap_hero_time_elapsed and udg_b_DTAX_league_mode==false and udg_b_DTAX_is_RandomDraft_mode==false then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,udg_A6,10,"You cannot use -swaphero after 90 seconds have elapsed.")
return false
endif
if GetUnitState(udg_uA_DTAX_player_hero_unit[GetPlayerId(GetTriggerPlayer())],UNIT_STATE_LIFE)<1 then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,udg_A6,10,"You must have a living hero in order to swap with someone.")
return false
endif
if GetBoolean(H2Tx(GetTriggerPlayer()),"AlreadySwapped")then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,udg_A6,10,"You can only initiate a swap request once.")
return false
endif
if(udg_b_DTAX_league_mode and udg_b_DTAX_pick_started)or(udg_b_DTAX_is_RandomDraft_mode and udg_bi)then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,udg_A6,10,"Too late to use -swaphero.")
return false
endif
if mpmp(GetTriggerPlayer())==false then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,udg_A6,10,"No hero available to swap with.")
return false
endif
return true
endfunction
function LxLx takes nothing returns nothing
if mqmq()then
call SwapInit()
endif
endfunction
function InitTrig_SwapHero takes nothing returns nothing
endfunction
function Waveform_Spell takes nothing returns boolean
return GetSpellAbilityId()=='A0FN'
endfunction
function Waveform_Filter takes nothing returns boolean
local unit lOQ=GetFilterUnit()
if IsUnitInGroup(lOQ,udg_g_UNKNOWN_some_defenders_group)then
return false
endif
if IsUnitEnemy(lOQ,GetOwningPlayer(udg_u_DTAX_temp))and GetUnitAbilityLevel(lOQ,'A04R')!=1 and GetUnitState(lOQ,UNIT_STATE_LIFE)>0 and IsUnitType(lOQ,UNIT_TYPE_STRUCTURE)==false then
return true
endif
return false
endfunction
function Waveform_Damage takes nothing returns nothing
call UnitDamageTarget(udg_u_DTAX_temp,GetEnumUnit(),udg_r_DTAX_necrolyte_reaperscythe_ratio,true,true,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)
endfunction
function Waveform_Main takes nothing returns nothing
local timer ltt=GetExpiredTimer()
local string lf5=H2Tx(ltt)
local unit lJV=GetUnit(lf5,"Caster")
local unit lfo=GetUnit(lf5,"UnitVar")
local real lnM=GetReal(lf5,"Angle")
local integer lpt=GetInteger(lf5,"Remaining")
local group lMW=GetGroup(lf5,"AlreadyDamaged")
local real lpT=GetUnitX(lfo)
local real lpu=GetUnitY(lfo)
local real lpC=lpT+1000*.05*Cos(lnM)
local real lpd=lpu+1000*.05*Sin(lnM)
local group lEw=CreateGroup()
local boolexpr lEW=Condition(function Waveform_Filter)
set udg_u_DTAX_temp=lfo
set udg_r_DTAX_necrolyte_reaperscythe_ratio=GetUnitAbilityLevel(lfo,'A0FN')*75+25
set udg_g_UNKNOWN_some_defenders_group=lMW
call GroupEnumUnitsInRange(lEw,lpT,lpu,280,lEW)
call ForGroup(lEw,function Waveform_Damage)
call GroupAddGroup(lEw,lMW)
call DestroyBoolExpr(lEW)
call DestroyGroup(lEw)
set lpt=lpt-1
call SetInteger(lf5,"Remaining",lpt)
call SetUnitPosition(lfo,lpC,lpd)
call SetUnitPosition(lJV,lpC,lpd)
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl",lpT,lpu))
if lpt==0 then
call RemoveUnit(lJV)
call ShowUnit(lfo,true)
call SetUnitPathing(lfo,true)
call ClearSelectionForPlayer(GetOwningPlayer(lfo))
call SelectUnitAddForPlayer(lfo,GetOwningPlayer(lfo))
call PauseTimer(ltt)
call PolledWait(1)
call FastFlush(lf5)
call DestroyTimer(ltt)
endif
endfunction
function Waveform_Set takes nothing returns nothing
local unit lfo=GetTriggerUnit()
local real lFC=GetUnitX(lfo)
local real lFd=GetUnitY(lfo)
local location ln3=GetSpellTargetLoc()
local real lEv=GetLocationX(ln3)
local real lEV=GetLocationY(ln3)
local timer ltt=CreateTimer()
local string lf5=H2Tx(ltt)
local group lMW=CreateGroup()
local unit lJV=CreateUnit(GetOwningPlayer(lfo),'o00G',lFC,lFd,0)
call RemoveLocation(ln3)
if GetSpellTargetUnit()!=null then
set lEv=GetUnitX(GetSpellTargetUnit())
set lEV=GetUnitY(GetSpellTargetUnit())
endif
call ShowUnit(lfo,false)
call SetUnitPathing(lfo,false)
call SetUnitPathing(lJV,false)
call SetHandle(lf5,"UnitVar",lfo)
call SetHandle(lf5,"Caster",lJV)
call SetHandle(lf5,"AlreadyDamaged",lMW)
call SetReal(lf5,"Angle",Atan2(lEV-lFd,lEv-lFC))
call SetInteger(lf5,"Remaining",ReturnMax(R2I(SquareRoot((lEv-lFC)*(lEv-lFC)+(lEV-lFd)*(lEV-lFd))/50),1))
call TimerStart(ltt,.04,true,function Waveform_Main)
if(udg_bA_DTAX_player_has_repicked_hero[GetPlayerId(GetOwningPlayer(lfo))]==false)then
set udg_bA_DTAX_player_has_repicked_hero[GetPlayerId(GetOwningPlayer(lfo))]=true
call PolledWait(5)
set udg_bA_DTAX_player_has_repicked_hero[GetPlayerId(GetOwningPlayer(lfo))]=false
endif
endfunction
function Waveform_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function Waveform_Spell))
call TriggerAddAction(ltt,function Waveform_Set)
endfunction
function InitTrig_InitHero takes nothing returns nothing
endfunction
function F2F2 takes integer pF3,integer pF4,integer pF5,integer pF6,integer pF7 returns nothing
set udg_iA_DTAX_reciepe_item1_id[udg_i_DTAX_reciepes_counter]=pF3
set udg_iA_DTAX_reciepe_item2_id[udg_i_DTAX_reciepes_counter]=pF4
set udg_iA_DTAX_reciepe_item3_id[udg_i_DTAX_reciepes_counter]=pF5
set udg_iA_DTAX_reciepe_item4_id[udg_i_DTAX_reciepes_counter]=pF6
set udg_iA_DTAX_reciepe_result_id[udg_i_DTAX_reciepes_counter]=pF7
set udg_iA_DTAX_reciepe_lenght[udg_i_DTAX_reciepes_counter]=4
if(pF3==0)then
set udg_iA_DTAX_reciepe_lenght[udg_i_DTAX_reciepes_counter]=udg_iA_DTAX_reciepe_lenght[udg_i_DTAX_reciepes_counter]-1
endif
if(pF4==0)then
set udg_iA_DTAX_reciepe_lenght[udg_i_DTAX_reciepes_counter]=udg_iA_DTAX_reciepe_lenght[udg_i_DTAX_reciepes_counter]-1
endif
if(pF5==0)then
set udg_iA_DTAX_reciepe_lenght[udg_i_DTAX_reciepes_counter]=udg_iA_DTAX_reciepe_lenght[udg_i_DTAX_reciepes_counter]-1
endif
if(pF6==0)then
set udg_iA_DTAX_reciepe_lenght[udg_i_DTAX_reciepes_counter]=udg_iA_DTAX_reciepe_lenght[udg_i_DTAX_reciepes_counter]-1
endif
set udg_i_DTAX_reciepes_counter=udg_i_DTAX_reciepes_counter+1
set udg_i_DTAX_max_reciepes_count=udg_i_DTAX_reciepes_counter
endfunction
function F8F8 takes nothing returns nothing
set udg_i_DTAX_reciepes_counter=1
call F2F2('rots','rump','mcri',0,'bfhr')
call F2F2('stwa','tbar','rsps',0,'tfar')
call F2F2('shdt','tbar','srrc',0,'sor9')
call F2F2('vddl','sor1','ram3',0,'olig')
call F2F2('rump','oli2','rwiz',0,'kgal')
call F2F2('srbd','whwd','fgrg',0,'rde4')
call F2F2('bgst','sksh','spsh',0,'ram1')
call F2F2('belv','tmmt','sand',0,'rde0')
call F2F2('ram1','rde0','wcyc',0,'rnsp')
call F2F2('whwd','srtl','penr',0,'rugt')
call F2F2('srtl','lure','rreb',0,'ofir')
call F2F2('flag','stwa','rre1',0,'ocor')
call F2F2('soul','rej2','lhst',0,'spre')
call F2F2('rst1','tgxp','stre',0,'hlst')
call F2F2('tbar','lgdh','sbok',0,'gsou')
call F2F2('whwd','ciri','shhn',0,'soul')
call F2F2('srtl','shrs','sora',0,'pspd')
call F2F2('iwbr','tbsm','mcou',0,'sfog')
call F2F2('rdis','tmmt','ciri',0,'wswd')
call F2F2('modt','shhn',0,0,'grsl')
call F2F2('tmmt','sora','rlif',0,'ccmd')
call F2F2('scul','jdrn',0,0,'rots')
call F2F2('ratf','flag','sora',0,'gldo')
call F2F2('rhe2','sor2','tmsc',0,'lure')
call F2F2('shcw','rej6',0,0,'ratf')
call F2F2('shcw','shtm','ciri','gomn','rej2')
call F2F2('jdrn','prvt',0,0,'horl')
call F2F2('pgin','hbth','oli2',0,'oslo')
call F2F2('soul','ratf','clfm',0,'oven')
call F2F2('sor2','sksh','texp',0,'ofro')
call F2F2('shrs','crys',0,0,'ram4')
call F2F2('shtm','tmsc','rma2',0,'rej5')
call F2F2('rej5','rma2',0,0,'lnrn')
call F2F2('lnrn','rma2',0,0,'mlst')
call F2F2('mlst','rma2',0,0,'mnsf')
call F2F2('mnsf','rma2',0,0,'rej1')
call F2F2('tgxp','rspl',0,0,'tlum')
call F2F2('iwbr','tkno','stel',0,'klmm')
call F2F2('tbsm','tmsc','tdex',0,'rat6')
call F2F2('pgma','stre',0,0,'pdiv')
call F2F2('pclr','ratf','gvsm',0,'kybl')
call F2F2('infs','klmm','sfog',0,'mnst')
call F2F2('belv','flag','pinv',0,'rnec')
call F2F2('wswd','rde2','oli2',0,'schl')
call F2F2('bgst','shtm','bspd',0,'ches')
call F2F2('ches','bspd',0,0,'I002')
call F2F2('I002','bspd',0,0,'I001')
call F2F2('rej4','rej6','oli2',0,'I00L')
call F2F2('I00V','pgin','modt',0,'I00T')
call F2F2('srbd','rnec',0,0,'I00Q')
call F2F2('grsl','jdrn','I014',0,'I012')
call F2F2('I019',0,0,0,'I00J')
endfunction
function InitTrig_SetUpReciepes takes nothing returns nothing
endfunction
function Trig_Disassemble_Conditions takes nothing returns boolean
return GetSpellAbilityId()=='A0K5'
endfunction
function Trig_Disassemble_Actions takes nothing returns nothing
local unit lJt=GetTriggerUnit()
local item lJT=UnitItemInSlot(lJt,0)
if GetItemTypeId(lJT)=='I00Q'then
call RemoveItem(lJT)
call CreateItem('srbd',GetUnitX(lJt),GetUnitY(lJt))
call CreateItem('rnec',GetUnitX(lJt),GetUnitY(lJt))
endif
if GetItemTypeId(lJT)=='grsl'then
call RemoveItem(lJT)
call CreateItem('shhn',GetUnitX(lJt),GetUnitY(lJt))
call CreateItem('modt',GetUnitX(lJt),GetUnitY(lJt))
endif
endfunction
function StartTrigger_Disassemble takes nothing returns nothing
set gg_trg_Disassemble=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Disassemble,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Disassemble,Condition(function Trig_Disassemble_Conditions))
call TriggerAddAction(gg_trg_Disassemble,function Trig_Disassemble_Actions)
endfunction
function InitTrig_Disassemble takes nothing returns nothing
endfunction
function Trig_Mjollnir_Conditions takes nothing returns boolean
return GetSpellAbilityId()=='A0JL'
endfunction
function StaticChargeRandomRoll takes nothing returns boolean
return GetUnitAbilityLevel(GetTriggerUnit(),'B049')==1 and GetRandomInt(1,100)<21 and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function StaticChargeMain takes nothing returns nothing
local unit lFb=GetTriggerUnit()
local unit lFB=GetAttacker()
local unit lJV=CreateUnit(GetOwningPlayer(lFb),'e00E',GetUnitX(lFb),GetUnitY(lFb),0)
local trigger ltt=GetTriggeringTrigger()
call UnitAddAbility(lJV,'A0K6')
call IssueTargetOrderById(lJV,OrderId("forkedlightning"),lFB)
call DisableTrigger(ltt)
call PolledWait(1)
if GetBoolean(H2Tx(ltt),"End")==false then
call EnableTrigger(ltt)
endif
endfunction
function Trig_Mjollnir_Actions takes nothing returns nothing
local unit lFb=GetTriggerUnit()
local unit lFB=GetSpellTargetUnit()
local unit lJV=CreateUnit(GetOwningPlayer(lFB),'e01R',0,0,0)
local trigger ltt=CreateTrigger()
local string lf5=H2Tx(ltt)
local effect lFX=AddSpecialEffectTarget("Abilities\\Spells\\Orc\\LightningShield\\LightningShieldTarget.mdl",lFB,"origin")
call UnitAddAbility(lFB,'A0P1')
call TriggerRegisterUnitEvent(ltt,lFB,EVENT_UNIT_ATTACKED)
call TriggerAddCondition(ltt,Condition(function StaticChargeRandomRoll))
call TriggerAddAction(ltt,function StaticChargeMain)
call SetBoolean(lf5,"End",false)
call PolledWait(18)
call DisableTrigger(ltt)
call SetBoolean(lf5,"End",true)
call UnitRemoveAbility(lFB,'A0P1')
call DestroyEffect(lFX)
call PolledWait(5)
call FastFlush(lf5)
call DestroyTriggerEx(ltt)
endfunction
function StartTrigger_Mjollnir takes nothing returns nothing
set gg_trg_Mjollnir=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Mjollnir,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Mjollnir,Condition(function Trig_Mjollnir_Conditions))
call TriggerAddAction(gg_trg_Mjollnir,function Trig_Mjollnir_Actions)
endfunction
function InitTrig_Mjollnir takes nothing returns nothing
endfunction
function Trig_Crow_Morph_Actions takes nothing returns nothing
local unit lJY=GetTriggerUnit()
local real lxx=GetUnitX(lJY)
local real lyy=GetUnitY(lJY)
local real lff=GetUnitFacing(lJY)
local player lEk=GetOwningPlayer(lJY)
local unit lJz
if ItemOfType(lJY,'tgxp')!=null and ItemOfType(lJY,'I00Y')!=null then
call RemoveItem(ItemOfType(lJY,'tgxp'))
call RemoveItem(ItemOfType(lJY,'I00Y'))
set lJz=CreateUnit(lEk,'e01H',lxx,lyy,lff)
call UnitAddItem(lJz,UnitItemInSlot(lJY,0))
call UnitAddItem(lJz,UnitItemInSlot(lJY,1))
call UnitAddItem(lJz,UnitItemInSlot(lJY,2))
call UnitAddItem(lJz,UnitItemInSlot(lJY,3))
call UnitAddItem(lJz,UnitItemInSlot(lJY,4))
call UnitAddItem(lJz,UnitItemInSlot(lJY,5))
call RemoveUnit(lJY)
call DestroyEffect(AddSpecialEffectTargetUnitBJ("origin",lJz,"Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl"))
else
call SimError(GetOwningPlayer(lJY),"Recipe requirements not complete!")
endif
endfunction
function Trig_Crow_Morph_Conditions takes nothing returns boolean
return GetSpellAbilityId()=='A0GD'
endfunction
function StartTrigger_Crow_Morph takes nothing returns nothing
set gg_trg_Crow_Morph=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Crow_Morph,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddAction(gg_trg_Crow_Morph,function Trig_Crow_Morph_Actions)
call TriggerAddCondition(gg_trg_Crow_Morph,Condition(function Trig_Crow_Morph_Conditions))
endfunction
function InitTrig_Crow_Morph takes nothing returns nothing
endfunction
function Trig_Perseverance_Split_Conditions takes nothing returns boolean
return GetItemTypeId(GetManipulatedItem())=='ratf'and IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)
endfunction
function PerseveranceBrokeCheck takes nothing returns boolean
local integer lxx=0
loop
exitwhen lxx>5
if UnitItemInSlot(GetTriggerUnit(),lxx)==null then
return true
endif
set lxx=lxx+1
endloop
return false
endfunction
function Trig_Perseverance_Split_Actions takes nothing returns nothing
if PerseveranceBrokeCheck()==false then
call SimError(GetOwningPlayer(GetTriggerUnit()),"You must have an empty item slot to break up Perseverance")
return
endif
call DisableTrigger(gg_trg_Try_Apply_Reciepe)
call RemoveItem(GetManipulatedItem())
call UnitAddItem(GetTriggerUnit(),CreateItem('shcw',0,0))
call UnitAddItem(GetTriggerUnit(),CreateItem('rej6',0,0))
call EnableTrigger(gg_trg_Try_Apply_Reciepe)
endfunction
function StartTrigger_Perseverance_Split takes nothing returns nothing
set gg_trg_Perseverance_Split=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Perseverance_Split,EVENT_PLAYER_UNIT_USE_ITEM)
call TriggerAddCondition(gg_trg_Perseverance_Split,Condition(function Trig_Perseverance_Split_Conditions))
call TriggerAddAction(gg_trg_Perseverance_Split,function Trig_Perseverance_Split_Actions)
endfunction
function InitTrig_Perseverance_Split takes nothing returns nothing
endfunction
function Trig_Teleportation_Item_Conditions takes nothing returns boolean
return GetSpellAbilityId()=='A0CX'and GetSpellTargetUnit()!=null
endfunction
function Trig_Teleportation_Item_Actions takes nothing returns nothing
local location liD=GetUnitLoc(GetTriggerUnit())
local unit lJV
local unit lFB=GetSpellTargetUnit()
set lJV=CreateUnitAtLoc(GetOwningPlayer(GetTriggerUnit()),'e00C',liD,bj_UNIT_FACING)
call UnitAddAbility(lJV,'A0KZ')
call UnitApplyTimedLifeBJ(5.,'BTLF',lJV)
call IssueTargetOrderById(lJV,OrderId("innerfire"),lFB)
call SetUnitPathing(lJV,false)
call SetUnitInvulnerable(lJV,true)
call UnitAddAbility(lJV,'Aloc')
call RemoveLocation(liD)
endfunction
function StartTrigger_Teleportation_Item takes nothing returns nothing
set gg_trg_Teleportation_Item=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Teleportation_Item,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Teleportation_Item,Condition(function Trig_Teleportation_Item_Conditions))
call TriggerAddAction(gg_trg_Teleportation_Item,function Trig_Teleportation_Item_Actions)
endfunction
function InitTrig_Teleportation_Item takes nothing returns nothing
endfunction
function Trig_Mekansm_Armor_Heal_Conditions takes nothing returns boolean
return GetSpellAbilityId()=='A0CK'
endfunction
function MekansmCheck takes nothing returns boolean
return IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))and GetUnitAbilityLevel(GetTriggerUnit(),'B06B')==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false
endfunction
function MekansmHeal takes nothing returns nothing
call SetUnitState(GetEnumUnit(),UNIT_STATE_LIFE,GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)+250)
endfunction
function Trig_Mekansm_Armor_Heal_Actions takes nothing returns nothing
local unit lfU=GetTriggerUnit()
local group lEw=CreateGroup()
local boolexpr lEW=Condition(function MekansmCheck)
call GroupEnumUnitsInRange(lEw,GetUnitX(lfU),GetUnitY(lfU),450,lEW)
call ForGroup(lEw,function MekansmHeal)
call DestroyBoolExpr(lEW)
call DestroyGroup(lEw)
endfunction
function StartTrigger_Mekansm_Armor_Heal takes nothing returns nothing
set gg_trg_Mekansm_Armor_Heal=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Mekansm_Armor_Heal,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Mekansm_Armor_Heal,Condition(function Trig_Mekansm_Armor_Heal_Conditions))
call TriggerAddAction(gg_trg_Mekansm_Armor_Heal,function Trig_Mekansm_Armor_Heal_Actions)
endfunction
function InitTrig_Mekansm_Armor_Heal takes nothing returns nothing
endfunction
function Trig_Rune_Capture_Actions takes nothing returns nothing
if GetSpellAbilityId()=='A0H6'then
call SetHandle(H2Tx(GetTriggerUnit()),"BottleTargetUnit",null)
call SetInteger(H2Tx(GetTriggerUnit()),"BottleTargetItemId",0)
if GetUnitTypeId(GetSpellTargetUnit())=='nfoh'or GetUnitTypeId(GetSpellTargetUnit())=='ndfl'then
call SetHandle(H2Tx(GetTriggerUnit()),"BottleTargetUnit",GetSpellTargetUnit())
elseif ItemIsRune(GetItemTypeId(GetSpellTargetItem()))then
call SetInteger(H2Tx(GetTriggerUnit()),"BottleTargetItemId",GetItemTypeId(GetSpellTargetItem()))
call RemoveItem(GetSpellTargetItem())
endif
endif
endfunction
function StartTrigger_Rune_Capture takes nothing returns nothing
set gg_trg_Rune_Capture=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Rune_Capture,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddAction(gg_trg_Rune_Capture,function Trig_Rune_Capture_Actions)
endfunction
function InitTrig_Rune_Capture takes nothing returns nothing
endfunction
function Trig_Bottle_Control_Conditions takes nothing returns boolean
return GetItemTypeId(GetManipulatedItem())=='I00J'or GetItemTypeId(GetManipulatedItem())=='I00H'or GetItemTypeId(GetManipulatedItem())=='I00I'or GetItemTypeId(GetManipulatedItem())=='I00G'or GetItemTypeId(GetManipulatedItem())=='I00K'or GetItemTypeId(GetManipulatedItem())=='I00Z'
endfunction
function PlaySoundForPlayer takes player pES,string pfg returns nothing
local sound lfG=CreateSound(pfg,false,false,false,10,10,"DefaultEAXON")
if(GetLocalPlayer()==pES)then
call StartSound(lfG)
endif
call KillSoundWhenDone(lfG)
endfunction
function GetItem takes string pTable,string pKey returns item
return GetStoredInteger(udg_gc_DTAX_Core,pTable,pKey)
return null
endfunction
function kaka takes nothing returns nothing
local timer ltt=GetExpiredTimer()
local string lf5=H2Tx(ltt)
local item lJT=GetItem(lf5,"Item")
local unit lkA=GetUnit(lf5,"Unit")
if(GetItemTypeId(lJT)=='I00K'or GetItemTypeId(lJT)=='I00Z')and GetUnitState(lkA,UNIT_STATE_LIFE)>1 then
call FastFlush(lf5)
call RemoveItem(lJT)
set lJT=CreateItem('I00J',0,0)
call UnitAddItem(lkA,lJT)
call KillTimer(ltt)
endif
endfunction
function kbkb takes item pkB,unit pfo returns nothing
local timer ltt=CreateTimer()
call SetHandle(H2Tx(ltt),"Item",pkB)
call SetHandle(H2Tx(ltt),"Unit",pfo)
if GetItemTypeId(pkB)=='I00Z'then
call TimerStart(ltt,180,true,function kaka)
else
call TimerStart(ltt,'x',true,function kaka)
endif
endfunction
function Trig_Bottle_Control_Actions takes nothing returns nothing
local unit lfo=GetTriggerUnit()
local unit lke
local integer lkE
local item lJT=GetManipulatedItem()
local item lkB
local item lkf
local integer lJ9=GetItemTypeId(lJT)
local item lRuneTempItem1
local item lRuneTempItem2
if lJ9=='I00G'then
set lke=GetUnit(H2Tx(lfo),"BottleTargetUnit")
set lkE=GetInteger(H2Tx(lfo),"BottleTargetItemId")
if GetUnitTypeId(lke)=='nfoh'or GetUnitTypeId(lke)=='ndfl'then
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\ReplenishMana\\SpiritTouchTarget.mdl",lfo,"overhead"))
call PlaySoundForPlayer(GetOwningPlayer(lfo),"Abilities\\Spells\\Human\\Heal\\HealTarget.wav")
call RemoveItem(lJT)
set lkB=CreateItem('I00J',0,0)
call UnitAddItem(lfo,lkB)
elseif ItemIsRune(lkE)then
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\ReplenishMana\\SpiritTouchTarget.mdl",lfo,"overhead"))
call RemoveItem(lJT)
set lkB=CreateItem('I00K',GetUnitX(lfo),GetUnitY(lfo))
call DisableTrigger(gg_trg_Specific_Reciepes)
call UnitAddItem(lfo,lkB)
call EnableTrigger(gg_trg_Specific_Reciepes)
call SetInteger(H2Tx(lkB),H2Tx(lfo),lkE)
call kbkb(lkB,lfo)
endif
elseif lJ9=='I00J'then
call RemoveItem(lJT)
set lkB=CreateItem('I00H',0,0)
call UnitAddItem(lfo,lkB)
elseif lJ9=='I00H'then
call RemoveItem(lJT)
set lkB=CreateItem('I00I',0,0)
call UnitAddItem(lfo,lkB)
elseif lJ9=='I00I'then
call RemoveItem(lJT)
set lkB=CreateItem('I00G',0,0)
call UnitAddItem(lfo,lkB)
elseif lJ9=='I00K'then
set lkB=CreateItem(GetInteger(H2Tx(lJT),H2Tx(lfo)),GetUnitX(lfo),GetUnitY(lfo))
call FastFlush(H2Tx(lJT))
call RemoveItem(lJT)
call UnitAddItem(lfo,lkB)
set lkB=CreateItem('I00J',0,0)
call UnitAddItem(lfo,lkB)
endif
endfunction
function StartTrigger_Bottle_Control takes nothing returns nothing
set gg_trg_Bottle_Control=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Bottle_Control,EVENT_PLAYER_UNIT_USE_ITEM)
call TriggerAddCondition(gg_trg_Bottle_Control,Condition(function Trig_Bottle_Control_Conditions))
call TriggerAddAction(gg_trg_Bottle_Control,function Trig_Bottle_Control_Actions)
endfunction
function InitTrig_Bottle_Control takes nothing returns nothing
endfunction
function Trig_Aegis_Conditions takes nothing returns boolean
if(GetItemTypeId(GetManipulatedItem())!='olig')then
return false
endif
return true
endfunction
function kgkg takes unit pgF returns nothing
local location lHS
if(PlayerIsScourge(GetOwningPlayer(pgF)))then
set lHS=GetRectCenter(gg_rct_ScourgeHeroSpawn)
else
set lHS=GetRectCenter(gg_rct_SentinelHeroSpawn)
endif
call HsHs(pgF,lHS)
call RemoveLocation(lHS)
endfunction
function kGkG takes unit pEU returns nothing
if GetUnitTypeId(pEU)=='H00I'then
call kgkg(pEU)
endif
endfunction
function Trig_Aegis_Actions takes nothing returns nothing
local unit lfo=GetTriggerUnit()
local location lfd
if(PlayerIsSentinel(GetOwningPlayer(lfo)))then
set lfd=GetRectCenter(gg_rct_SentinelHeroSpawn)
else
set lfd=GetRectCenter(gg_rct_ScourgeHeroSpawn)
endif
call PolledWait(3.)
call PanCameraToTimedLocForPlayer(GetOwningPlayer(lfo),lfd,1.)
call SetUnitPositionLoc(lfo,lfd)
call kGkG(GetTriggerUnit())
call RemoveLocation(lfd)
if udg_A5 then
call PauseUnit(lfo,true)
call PolledWait(6)
call PauseUnit(lfo,true)
endif
call gDgD(lfo)
endfunction
function StartTrigger_Aegis takes nothing returns nothing
set gg_trg_Aegis=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Aegis,EVENT_PLAYER_UNIT_USE_ITEM)
call TriggerAddCondition(gg_trg_Aegis,Condition(function Trig_Aegis_Conditions))
call TriggerAddAction(gg_trg_Aegis,function Trig_Aegis_Actions)
endfunction
function InitTrig_Aegis takes nothing returns nothing
endfunction
function Trig_Charges_Connection_Conditions takes nothing returns boolean
return GetItemType(GetManipulatedItem())==ITEM_TYPE_PURCHASABLE
endfunction
function Trig_Charges_Connection_Actions takes nothing returns nothing
local item lF3=GetManipulatedItem()
local item lF4
local unit lfU=GetTriggerUnit()
call DisableTrigger(GetTriggeringTrigger())
call UnitRemoveItem(lfU,lF3)
set lF4=InventoryItem(lfU,GetItemTypeId(lF3))
call UnitRemoveItem(lfU,lF4)
call SetItemCharges(lF3,GetItemCharges(lF3)+GetItemCharges(lF4))
call RemoveItem(lF4)
call UnitAddItem(lfU,lF3)
call EnableTrigger(GetTriggeringTrigger())
endfunction
function StartTrigger_Charges_Connection takes nothing returns nothing
set gg_trg_Charges_Connection=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Charges_Connection,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerAddCondition(gg_trg_Charges_Connection,Condition(function Trig_Charges_Connection_Conditions))
call TriggerAddAction(gg_trg_Charges_Connection,function Trig_Charges_Connection_Actions)
endfunction
function InitTrig_Charges_Connection takes nothing returns nothing
endfunction
function Trig_Courier_Set_Droppable_Actions takes nothing returns nothing
if GetUnitTypeId(GetTriggerUnit())=='n00I'or GetUnitTypeId(GetTriggerUnit())=='e01H'then
if GetItemTypeId(GetManipulatedItem())=='olig'or GetItemTypeId(GetManipulatedItem())=='sor3'or GetItemTypeId(GetManipulatedItem())=='sor6'or GetItemTypeId(GetManipulatedItem())=='sor5'or GetItemTypeId(GetManipulatedItem())=='sor4'or GetItemTypeId(GetManipulatedItem())=='pspd'then
call SetItemDroppable(GetManipulatedItem(),true)
endif
endif
endfunction
function StartTrigger_Courier_Set_Droppable takes nothing returns nothing
set gg_trg_Courier_Set_Droppable=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Courier_Set_Droppable,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerAddAction(gg_trg_Courier_Set_Droppable,function Trig_Courier_Set_Droppable_Actions)
endfunction
function InitTrig_Courier_Set_Droppable takes nothing returns nothing
endfunction
function Trig_Courier_Set_UnDroppable_Actions takes nothing returns nothing
if GetUnitTypeId(GetTriggerUnit())=='n00I'or GetUnitTypeId(GetTriggerUnit())=='e01H'then
if GetItemTypeId(GetManipulatedItem())=='olig'or GetItemTypeId(GetManipulatedItem())=='sor3'or GetItemTypeId(GetManipulatedItem())=='sor6'or GetItemTypeId(GetManipulatedItem())=='sor5'or GetItemTypeId(GetManipulatedItem())=='sor4'or GetItemTypeId(GetManipulatedItem())=='pspd'then
call SetItemDroppable(GetManipulatedItem(),false)
endif
endif
endfunction
function StartTrigger_Courier_Set_UnDroppable takes nothing returns nothing
set gg_trg_Courier_Set_UnDroppable=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Courier_Set_UnDroppable,EVENT_PLAYER_UNIT_DROP_ITEM)
call TriggerAddAction(gg_trg_Courier_Set_UnDroppable,function Trig_Courier_Set_UnDroppable_Actions)
endfunction
function InitTrig_Courier_Set_UnDroppable takes nothing returns nothing
endfunction
function Trig_Helm_of_the_Dominator_Conditions takes nothing returns boolean
return GetSpellAbilityId()=='ACch'
endfunction
function Trig_Helm_of_the_Dominator_Actions takes nothing returns nothing
call UnitApplyTimedLifeBJ(1200.,'BTLF',GetSpellTargetUnit())
call UnitAddAbility(GetSpellTargetUnit(),'Aeth')
call MaxMana(GetSpellTargetUnit())
endfunction
function StartTrigger_Helm_of_the_Dominator takes nothing returns nothing
set gg_trg_Helm_of_the_Dominator=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Helm_of_the_Dominator,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Helm_of_the_Dominator,Condition(function Trig_Helm_of_the_Dominator_Conditions))
call TriggerAddAction(gg_trg_Helm_of_the_Dominator,function Trig_Helm_of_the_Dominator_Actions)
endfunction
function InitTrig_Helm_of_the_Dominator takes nothing returns nothing
endfunction
function Trig_Refresher_Orb_Conditions takes nothing returns boolean
return GetSpellAbilityId()=='A02W'
endfunction
function Trig_Refresher_Orb_Actions takes nothing returns nothing
call UnitResetCooldown(GetTriggerUnit())
endfunction
function StartTrigger_Refresher_Orb takes nothing returns nothing
set gg_trg_Refresher_Orb=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Refresher_Orb,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Refresher_Orb,Condition(function Trig_Refresher_Orb_Conditions))
call TriggerAddAction(gg_trg_Refresher_Orb,function Trig_Refresher_Orb_Actions)
endfunction
function InitTrig_Refresher_Orb takes nothing returns nothing
endfunction
function Trig_Necronomicon_Conditions takes nothing returns boolean
if(GetSpellAbilityId()=='A0HB')then
return true
endif
if(GetSpellAbilityId()=='A0D3')then
return true
endif
if(GetSpellAbilityId()=='A0DF')then
return true
endif
return false
endfunction
function kpkp takes nothing returns nothing
if((GetUnitTypeId(GetEnumUnit())=='n00H')or(GetUnitTypeId(GetEnumUnit())=='n00G')or(GetUnitTypeId(GetEnumUnit())=='n00K')or(GetUnitTypeId(GetEnumUnit())=='n00J')or(GetUnitTypeId(GetEnumUnit())=='n00A')or(GetUnitTypeId(GetEnumUnit())=='n006'))then
call RemoveUnit(GetEnumUnit())
endif
endfunction
function Trig_Necronomicon_Actions takes nothing returns nothing
local group lEw=GetUnitsOfPlayerAll(GetOwningPlayer(GetTriggerUnit()))
call ForGroupBJ(lEw,function kpkp)
call DestroyGroup(lEw)
endfunction
function StartTrigger_Necronomicon takes nothing returns nothing
set gg_trg_Necronomicon=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Necronomicon,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(gg_trg_Necronomicon,Condition(function Trig_Necronomicon_Conditions))
call TriggerAddAction(gg_trg_Necronomicon,function Trig_Necronomicon_Actions)
endfunction
function InitTrig_Necronomicon takes nothing returns nothing
endfunction
function Trig_Illusion_Rune_Conditions takes nothing returns boolean
if(GetItemTypeId(GetManipulatedItem())!='I007')then
return false
endif
return true
endfunction
function Trig_Illusion_Rune_Actions takes nothing returns nothing
local unit lfo=GetTriggerUnit()
local location liD=GetUnitLoc(lfo)
local unit lJV
set lJV=CreateUnitAtLoc(GetOwningPlayer(lfo),'e00C',liD,bj_UNIT_FACING)
call UnitAddAbility(lJV,'A0GR')
call UnitApplyTimedLifeBJ(2.,'BTLF',lJV)
call IssueTargetOrderById(lJV,852274,lfo)
call SetUnitPathing(lJV,false)
call SetUnitInvulnerable(lJV,true)
call UnitAddAbility(lJV,'Aloc')
call RemoveLocation(liD)
endfunction
function StartTrigger_Illusion_Rune takes nothing returns nothing
set gg_trg_Illusion_Rune=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Illusion_Rune,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerAddCondition(gg_trg_Illusion_Rune,Condition(function Trig_Illusion_Rune_Conditions))
call TriggerAddAction(gg_trg_Illusion_Rune,function Trig_Illusion_Rune_Actions)
endfunction
function InitTrig_Illusion_Rune takes nothing returns nothing
endfunction
function krkr takes nothing returns nothing
set udg_itm_DTAX_any_item_in_runic_region_REF1=GetEnumItem()
endfunction
function Trig_Recreate_Rune_Actions takes nothing returns nothing
local integer lEY=GetRandomInt(1,10)
set udg_itm_DTAX_any_item_in_runic_region_REF1=null
call EnumItemsInRectBJ(gg_rct_LeftRuneSpawn,function krkr)
if(udg_itm_DTAX_any_item_in_runic_region_REF1==null)then
set udg_bA_DTAX_is_any_item_in_runic_region_REF1[1]=true
else
set udg_bA_DTAX_is_any_item_in_runic_region_REF1[1]=false
endif
set udg_itm_DTAX_any_item_in_runic_region_REF1=null
call EnumItemsInRectBJ(gg_rct_RightRuneSpawn,function krkr)
if(udg_itm_DTAX_any_item_in_runic_region_REF1==null)then
set udg_bA_DTAX_is_any_item_in_runic_region_REF1[2]=true
else
set udg_bA_DTAX_is_any_item_in_runic_region_REF1[2]=false
endif
if(udg_bA_DTAX_is_any_item_in_runic_region_REF1[1]and udg_bA_DTAX_is_any_item_in_runic_region_REF1[2])then
if(lEY==1)then
call CreateItemLoc('fgrd',udg_loc_DTAX_LeftRuneSpawn)
endif
if(lEY==2)then
call CreateItemLoc('pres',udg_loc_DTAX_LeftRuneSpawn)
endif
if(lEY==3)then
call CreateItemLoc('pomn',udg_loc_DTAX_LeftRuneSpawn)
endif
if(lEY==4)then
call CreateItemLoc('pnvu',udg_loc_DTAX_LeftRuneSpawn)
endif
if(lEY==5)then
call CreateItemLoc('fgrd',udg_loc_DTAX_RightRuneSpawn)
endif
if(lEY==6)then
call CreateItemLoc('pres',udg_loc_DTAX_RightRuneSpawn)
endif
if(lEY==7)then
call CreateItemLoc('pomn',udg_loc_DTAX_RightRuneSpawn)
endif
if(lEY==8)then
call CreateItemLoc('pnvu',udg_loc_DTAX_RightRuneSpawn)
endif
if(lEY==9)then
call CreateItemLoc('I007',udg_loc_DTAX_LeftRuneSpawn)
endif
if(lEY==10)then
call CreateItemLoc('I007',udg_loc_DTAX_RightRuneSpawn)
endif
set udg_bA_DTAX_is_any_item_in_runic_region_REF1[1]=false
set udg_bA_DTAX_is_any_item_in_runic_region_REF1[2]=false
endif
endfunction
function StartTrigger_Recreate_Rune takes nothing returns nothing
set gg_trg_Recreate_Rune=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(gg_trg_Recreate_Rune,120.)
call TriggerAddAction(gg_trg_Recreate_Rune,function Trig_Recreate_Rune_Actions)
endfunction
function InitTrig_Recreate_Rune takes nothing returns nothing
endfunction
function Trig_Powerups_Replacements_Conditions takes nothing returns boolean
return GetItemType(GetManipulatedItem())==ITEM_TYPE_POWERUP
endfunction
function kSkS takes unit pEU,item pkt,integer pkT returns nothing
call RemoveItem(pkt)
call UnitAddItemById(pEU,pkT)
endfunction
function Trig_Powerups_Replacements_Actions takes nothing returns nothing
local item lkU=GetManipulatedItem()
local unit lfo=GetTriggerUnit()
local integer lkv=GetItemTypeId(lkU)
call DisableTrigger(GetTriggeringTrigger())
if(lkv=='tsct')then
call kSkS(lfo,lkU,'mcri')
elseif(lkv=='tst2')then
call kSkS(lfo,lkU,'vddl')
elseif(lkv=='tpow')then
call kSkS(lfo,lkU,'tstr')
elseif(lkv=='tint')then
call kSkS(lfo,lkU,'tin2')
elseif(lkv=='tdx2')then
call kSkS(lfo,lkU,'texp')
elseif(lkv=='rwat')then
call kSkS(lfo,lkU,'tdex')
elseif(lkv=='rspd')then
call kSkS(lfo,lkU,'rspl')
elseif(lkv=='rres')then
call kSkS(lfo,lkU,'rsps')
elseif(lkv=='rman')then
call kSkS(lfo,lkU,'rreb')
elseif(lkv=='rhe1')then
call kSkS(lfo,lkU,'rre1')
elseif(lkv=='rre2')then
call kSkS(lfo,lkU,'rhe2')
elseif(lkv=='rhe3')then
call kSkS(lfo,lkU,'rma2')
elseif(lkv=='manh')then
call kSkS(lfo,lkU,'rdis')
elseif(lkv=='guvi')then
call kSkS(lfo,lkU,'gold')
elseif(lkv=='gfor')then
call kSkS(lfo,lkU,'gomn')
elseif(lkv=='lmbr')then
call kSkS(lfo,lkU,'ward')
elseif(lkv=='evtl')then
call kSkS(lfo,lkU,'lhst')
elseif(lkv=='ssil')then
call kSkS(lfo,lkU,'stel')
elseif(lkv=='rag1')then
call kSkS(lfo,lkU,'rwiz')
elseif(lkv=='brac')then
call kSkS(lfo,lkU,'sbch')
elseif(lkv=='rde3')then
call kSkS(lfo,lkU,'rlif')
elseif(lkv=='rde1')then
call kSkS(lfo,lkU,'rde2')
elseif(lkv=='pmna')then
call kSkS(lfo,lkU,'prvt')
elseif(lkv=='odef')then
call kSkS(lfo,lkU,'penr')
elseif(lkv=='rin1')then
call kSkS(lfo,lkU,'mcou')
elseif(lkv=='kpin')then
call kSkS(lfo,lkU,'lgdh')
elseif(lkv=='hcun')then
call kSkS(lfo,lkU,'rhth')
elseif(lkv=='gcel')then
call kSkS(lfo,lkU,'hval')
elseif(lkv=='dsum')then
call kSkS(lfo,lkU,'rst1')
elseif(lkv=='clsd')then
call kSkS(lfo,lkU,'crys')
elseif(lkv=='rat9')then
call kSkS(lfo,lkU,'clfm')
elseif(lkv=='cnob')then
call kSkS(lfo,lkU,'ratc')
elseif(lkv=='ajen')then
call kSkS(lfo,lkU,'bspd')
elseif(lkv=='afac')then
call kSkS(lfo,lkU,'spsh')
elseif(lkv=='wlsd')then
call kSkS(lfo,lkU,'wcyc')
elseif(lkv=='woms')then
call kSkS(lfo,lkU,'wshs')
elseif(lkv=='totw')then
call kSkS(lfo,lkU,'will')
elseif(lkv=='fgfh')then
call kSkS(lfo,lkU,'fgrg')
elseif(lkv=='sres')then
call kSkS(lfo,lkU,'srrc')
elseif(lkv=='I003')then
call kSkS(lfo,lkU,'sand')
elseif(lkv=='pghe')then
call kSkS(lfo,lkU,'pgma')
elseif(lkv=='shar')then
call kSkS(lfo,lkU,'infs')
elseif(lkv=='hslv')then
call kSkS(lfo,lkU,'pclr')
elseif(lkv=='moon')then
call kSkS(lfo,lkU,'pinv')
elseif(lkv=='I00A')then
call kSkS(lfo,lkU,'I00B')
elseif(lkv=='I00R')then
call kSkS(lfo,lkU,'I00V')
elseif(lkv=='I00X')then
call kSkS(lfo,lkU,'I00Y')
elseif(lkv=='I013')then
call kSkS(lfo,lkU,'I014')
endif
call EnableTrigger(GetTriggeringTrigger())
endfunction
function StartTrigger_Powerups_Replacements takes nothing returns nothing
set gg_trg_Powerups_Replacements=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Powerups_Replacements,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerAddCondition(gg_trg_Powerups_Replacements,Condition(function Trig_Powerups_Replacements_Conditions))
call TriggerAddAction(gg_trg_Powerups_Replacements,function Trig_Powerups_Replacements_Actions)
endfunction
function InitTrig_Powerups_Replacements takes nothing returns nothing
endfunction
function kVkV takes unit pfo,integer pF3,integer pF4,integer pF5,integer pF6,integer pkB,integer pkw returns boolean
local effect lkW
if(pkw==1)then
if(UnitHasItemOfTypeBJ(pfo,pF3))then
call RemoveItem(GetItemOfTypeFromUnitBJ(pfo,pF3))
set lkW=AddSpecialEffectTargetUnitBJ("origin",pfo,"Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl")
call UnitAddItemById(pfo,pkB)
call DestroyEffect(lkW)
return true
endif
endif
if(pkw==2)then
if(UnitHasItemOfTypeBJ(pfo,pF3))then
if(UnitHasItemOfTypeBJ(pfo,pF4))then
call RemoveItem(GetItemOfTypeFromUnitBJ(pfo,pF3))
call RemoveItem(GetItemOfTypeFromUnitBJ(pfo,pF4))
set lkW=AddSpecialEffectTargetUnitBJ("origin",pfo,"Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl")
call UnitAddItemById(pfo,pkB)
call DestroyEffect(lkW)
return true
endif
endif
endif
if(pkw==3)then
if(UnitHasItemOfTypeBJ(pfo,pF3))then
if(UnitHasItemOfTypeBJ(pfo,pF4))then
if(UnitHasItemOfTypeBJ(pfo,pF5))then
call RemoveItem(GetItemOfTypeFromUnitBJ(pfo,pF3))
call RemoveItem(GetItemOfTypeFromUnitBJ(pfo,pF4))
call RemoveItem(GetItemOfTypeFromUnitBJ(pfo,pF5))
set lkW=AddSpecialEffectTargetUnitBJ("origin",pfo,"Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl")
call UnitAddItemById(pfo,pkB)
call DestroyEffect(lkW)
return true
endif
endif
endif
endif
if(pkw==4)then
if(UnitHasItemOfTypeBJ(pfo,pF3))then
if(UnitHasItemOfTypeBJ(pfo,pF4))then
if(UnitHasItemOfTypeBJ(pfo,pF5))then
if(UnitHasItemOfTypeBJ(pfo,pF6))then
call RemoveItem(GetItemOfTypeFromUnitBJ(pfo,pF3))
call RemoveItem(GetItemOfTypeFromUnitBJ(pfo,pF4))
call RemoveItem(GetItemOfTypeFromUnitBJ(pfo,pF5))
call RemoveItem(GetItemOfTypeFromUnitBJ(pfo,pF6))
set lkW=AddSpecialEffectTargetUnitBJ("origin",pfo,"Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl")
call UnitAddItemById(pfo,pkB)
call DestroyEffect(lkW)
return true
endif
endif
endif
endif
endif
return false
endfunction
function Trig_Try_Apply_Reciepe_Actions takes nothing returns nothing
local unit lfo=GetTriggerUnit()
local integer lEq=1
local integer lEQ=udg_i_DTAX_max_reciepes_count
loop
exitwhen lEq>lEQ
if(kVkV(lfo,udg_iA_DTAX_reciepe_item1_id[lEq],udg_iA_DTAX_reciepe_item2_id[lEq],udg_iA_DTAX_reciepe_item3_id[lEq],udg_iA_DTAX_reciepe_item4_id[lEq],udg_iA_DTAX_reciepe_result_id[lEq],udg_iA_DTAX_reciepe_lenght[lEq]))then
set lEq=lEQ+1
endif
set lEq=lEq+1
endloop
endfunction
function StartTrigger_Try_Apply_Reciepe takes nothing returns nothing
set gg_trg_Try_Apply_Reciepe=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Try_Apply_Reciepe,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerAddAction(gg_trg_Try_Apply_Reciepe,function Trig_Try_Apply_Reciepe_Actions)
endfunction
function InitTrig_Try_Apply_Reciepe takes nothing returns nothing
endfunction
function Trig_RM_Replace_and_Denies_Conditions takes nothing returns boolean
return GetItemType(GetManipulatedItem())==ITEM_TYPE_PERMANENT or GetItemType(GetManipulatedItem())==ITEM_TYPE_CHARGED
endfunction
function Trig_RM_Replace_and_Denies_Actions takes nothing returns nothing
local unit lfo=GetTriggerUnit()
local item lkU=GetManipulatedItem()
local integer lkY=GetUnitTypeId(lfo)
local integer lkz=GetItemTypeId(lkU)
call DisableTrigger(GetTriggeringTrigger())
if(IsUnitType(lfo,UNIT_TYPE_MELEE_ATTACKER))then
if(lkz=='thdm')then
call RemoveItem(lkU)
call UnitAddItemById(lfo,'tbak')
endif
if(lkz=='ocor')then
call RemoveItem(lkU)
call UnitAddItemById(lfo,'nspi')
endif
else
if(lkz=='tbak')then
call RemoveItem(lkU)
call UnitAddItemById(lfo,'thdm')
endif
if(lkz=='nspi')then
call RemoveItem(lkU)
call UnitAddItemById(lfo,'ocor')
endif
endif
if lkz=='desc'and(lkY=='Hvwd'or lkY=='U00F')then
call DisplayTimedTextToPlayer(GetOwningPlayer(lfo),0,udg_A6,10,"|c00ff0303Your hero is not allowed to wield this item|r")
call UnitRemoveItem(lfo,lkU)
endif
if lkz=='ofro'and(lkY=='n00I'or lkY=='e01H')then
call DisplayTimedTextToPlayer(GetOwningPlayer(lfo),0,udg_A6,10,"|c00ff0303Your chicken is not allowed to wield this item due to a wc3 bug.|r")
call UnitRemoveItem(lfo,lkU)
endif
if lkz=='oflg'and(lkY=='e01H')then
call DisplayTimedTextToPlayer(GetOwningPlayer(lfo),0,udg_A6,10,"|c00ff0303Your crow is not allowed to wield this item.|r")
call UnitRemoveItem(lfo,lkU)
endif
if lkz=='ofro'and lkY=='U007'then
call DisplayTimedTextToPlayer(GetOwningPlayer(lfo),0,udg_A6,10,"|c00ff0303Do not use two avatars in right after each other, there is a warcraft engine bug with this.|r")
endif
call EnableTrigger(GetTriggeringTrigger())
endfunction
function StartTrigger_RM_Replace_and_Denies takes nothing returns nothing
set gg_trg_RM_Replace_and_Denies=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_RM_Replace_and_Denies,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerAddCondition(gg_trg_RM_Replace_and_Denies,Condition(function Trig_RM_Replace_and_Denies_Conditions))
call TriggerAddAction(gg_trg_RM_Replace_and_Denies,function Trig_RM_Replace_and_Denies_Actions)
endfunction
function InitTrig_RM_Replace_and_Denies takes nothing returns nothing
endfunction
function Trig_Aghanim_Scepter_Conditions takes nothing returns boolean
return InventoryItem(GetTriggerUnit(),'ram2')!=null and InventoryItem(GetTriggerUnit(),'oslo')!=null and(GetUnitTypeId(GetTriggerUnit())!='n00I'and GetUnitTypeId(GetTriggerUnit())!='e01H')
endfunction
function Trig_Aghanim_Scepter_Actions takes nothing returns nothing
local unit lfo=GetTriggerUnit()
local integer lkY=GetUnitTypeId(lfo)
call DisableTrigger(GetTriggeringTrigger())
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl",lfo,"origin"))
call RemoveItem(InventoryItem(lfo,'ram2'))
call RemoveItem(InventoryItem(lfo,'oslo'))
if lkY=='Hblm'then
call UnitAddAbility(lfo,'A0PD')
endif
if lkY=='H004'then
call UnitAddAbility(lfo,'A0PC')
endif
if lkY=='UC18'then
call UnitAddAbility(lfo,'A0PA')
endif
if lkY=='Hmkg'then
call UnitAddAbility(lfo,'A0P9')
endif
if lkY=='H00H'then
call UnitAddAbility(lfo,'A0PB')
endif
if lkY=='UC01'then
call UnitAddAbility(lfo,'A0P7')
endif
if lkY=='Orkn'then
call UnitAddAbility(lfo,'A0P8')
endif
if lkY=='Hmbr'then
call UnitAddAbility(lfo,'A0PF')
endif
if(lkY=='Ulic'or lkY=='Ekee'or lkY=='UC18')then
call UnitAddItemById(lfo,'sor3')
elseif(lkY=='H00H'or lkY=='Emns'or lkY=='H004'or lkY=='Hmbr')then
call UnitAddItemById(lfo,'sor4')
elseif(lkY=='Hjai'or lkY=='Orkn'or lkY=='UC01'or lkY=='EC57')then
call UnitAddItemById(lfo,'sor5')
elseif(lkY=='U00E'or lkY=='E005'or lkY=='E01A')then
call UnitAddItemById(lfo,'sor6')
elseif(lkY=='Hmkg')then
call UnitAddItemById(lfo,'sor6')
call SetInteger(H2Tx(lfo),"MulticastLevel",GetInteger(H2Tx(lfo),"MulticastLevel")+1)
elseif lkY=='UC42'or lkY=='Hblm'then
call UnitAddItemById(lfo,'I016')
else
call UnitAddItemById(lfo,'I006')
endif
call EnableTrigger(GetTriggeringTrigger())
endfunction
function StartTrigger_Aghanim_Scepter takes nothing returns nothing
set gg_trg_Aghanim_Scepter=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Aghanim_Scepter,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerAddCondition(gg_trg_Aghanim_Scepter,Condition(function Trig_Aghanim_Scepter_Conditions))
call TriggerAddAction(gg_trg_Aghanim_Scepter,function Trig_Aghanim_Scepter_Actions)
endfunction
function InitTrig_Aghanim_Scepter takes nothing returns nothing
endfunction
function Trig_Specific_Reciepes_Actions takes nothing returns nothing
local unit lfo=GetTriggerUnit()
local integer lEq=0
local integer lk2=0
local item lRuneTempItem1
local item lRuneTempItem2
local item lRuneTempItem3
local item lkf
call DisableTrigger(GetTriggeringTrigger())
loop
exitwhen lEq>5
if(GetItemTypeId(UnitItemInSlot(lfo,lEq))=='flag')then
set lk2=lk2+1
endif
set lEq=lEq+1
endloop
if lk2>1 and InventoryItem(lfo,'will')!=null then
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl",lfo,"origin"))
call RemoveItem(InventoryItem(lfo,'will'))
call RemoveItem(InventoryItem(lfo,'flag'))
call RemoveItem(InventoryItem(lfo,'flag'))
call UnitAddItemById(lfo,'tels')
endif
if ItemOfType(lfo,'tgxp')!=null and ItemOfType(lfo,'sman')!=null and ItemOfType(lfo,'I00Y')!=null then
call RemoveItem(ItemOfType(lfo,'tgxp'))
call RemoveItem(ItemOfType(lfo,'I00Y'))
set lkf=ItemOfType(lfo,'sman')
if GetItemCharges(lkf)==1 then
call RemoveItem(lkf)
else
call SetItemCharges(lkf,GetItemCharges(lkf)-1)
endif
call UnitAddItemById(lfo,'I00W')
call DestroyEffect(AddSpecialEffectTargetUnitBJ("origin",lfo,"Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl"))
endif
set lk2=0
set lEq=0
loop
exitwhen lEq>5
if(GetItemTypeId(UnitItemInSlot(lfo,lEq))=='gvsm')then
set lk2=lk2+1
endif
set lEq=lEq+1
endloop
if lk2>1 and InventoryItem(lfo,'hbth')!=null and InventoryItem(lfo,'ward')!=null then
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl",lfo,"origin"))
call RemoveItem(InventoryItem(lfo,'hbth'))
call RemoveItem(InventoryItem(lfo,'ward'))
call RemoveItem(InventoryItem(lfo,'gvsm'))
call RemoveItem(InventoryItem(lfo,'gvsm'))
call UnitAddItemById(lfo,'thdm')
endif
call EnableTrigger(GetTriggeringTrigger())
endfunction
function StartTrigger_Specific_Reciepes takes nothing returns nothing
set gg_trg_Specific_Reciepes=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Specific_Reciepes,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerAddAction(gg_trg_Specific_Reciepes,function Trig_Specific_Reciepes_Actions)
endfunction
function InitTrig_Specific_Reciepes takes nothing returns nothing
endfunction
function Trig_Undroppable_Cooldowns_Conditions takes nothing returns boolean
if(GetItemTypeId(GetManipulatedItem())=='horl')then
set udg_r_DTAX_item_cooldown_time=30.
return true
endif
if(GetItemTypeId(GetManipulatedItem())=='oven')then
set udg_r_DTAX_item_cooldown_time=210
return true
endif
if(GetItemTypeId(GetManipulatedItem())=='mnst')then
set udg_r_DTAX_item_cooldown_time=45.
return true
endif
if(GetItemTypeId(GetManipulatedItem())=='I002')then
set udg_r_DTAX_item_cooldown_time=60.
return true
endif
if(GetItemTypeId(GetManipulatedItem())=='ches')then
set udg_r_DTAX_item_cooldown_time=60.
return true
endif
if(GetItemTypeId(GetManipulatedItem())=='pdiv')then
set udg_r_DTAX_item_cooldown_time=100.
return true
endif
if(GetItemTypeId(GetManipulatedItem())=='I001')then
set udg_r_DTAX_item_cooldown_time=60.
return true
endif
if(GetItemTypeId(GetManipulatedItem())=='bfhr')then
set udg_r_DTAX_item_cooldown_time=20.
return true
endif
if(GetItemTypeId(GetManipulatedItem())=='wswd')then
set udg_r_DTAX_item_cooldown_time=12.
return true
endif
if(GetItemTypeId(GetManipulatedItem())=='rej2')then
set udg_r_DTAX_item_cooldown_time=3
return true
endif
if(GetItemTypeId(GetManipulatedItem())=='lnrn')then
set udg_r_DTAX_item_cooldown_time=40.
return true
endif
if(GetItemTypeId(GetManipulatedItem())=='spre')then
set udg_r_DTAX_item_cooldown_time=13.
return true
endif
if(GetItemTypeId(GetManipulatedItem())=='rots')then
set udg_r_DTAX_item_cooldown_time=300.
return true
endif
if(GetItemTypeId(GetManipulatedItem())=='tlum')then
set udg_r_DTAX_item_cooldown_time=60.
return true
endif
if(GetItemTypeId(GetManipulatedItem())=='sfog')then
set udg_r_DTAX_item_cooldown_time=15.
return true
endif
if(GetItemTypeId(GetManipulatedItem())=='mnsf')then
set udg_r_DTAX_item_cooldown_time=40.
return true
endif
if(GetItemTypeId(GetManipulatedItem())=='stwp')then
set udg_r_DTAX_item_cooldown_time=65.
return true
endif
if(GetItemTypeId(GetManipulatedItem())=='schl')then
set udg_r_DTAX_item_cooldown_time=70.
return true
endif
if(GetItemTypeId(GetManipulatedItem())=='rej1')then
set udg_r_DTAX_item_cooldown_time=40.
return true
endif
if(GetItemTypeId(GetManipulatedItem())=='kybl')then
set udg_r_DTAX_item_cooldown_time=120.
return true
endif
if(GetItemTypeId(GetManipulatedItem())=='rej5')then
set udg_r_DTAX_item_cooldown_time=40.
return true
endif
if(GetItemTypeId(GetManipulatedItem())=='ccmd')then
set udg_r_DTAX_item_cooldown_time=26.
return true
endif
if(GetItemTypeId(GetManipulatedItem())=='mlst')then
set udg_r_DTAX_item_cooldown_time=40.
return true
endif
if(GetItemTypeId(GetManipulatedItem())=='desc')then
set udg_r_DTAX_item_cooldown_time=25.
return true
endif
if(GetItemTypeId(GetManipulatedItem())=='I00C')then
set udg_r_DTAX_item_cooldown_time=60.
return true
endif
if(GetItemTypeId(GetManipulatedItem())=='I00Q')then
set udg_r_DTAX_item_cooldown_time=45.
return true
endif
if(GetItemTypeId(GetManipulatedItem())=='I00T')then
set udg_r_DTAX_item_cooldown_time=30.
return true
endif
return false
endfunction
function Trig_Undroppable_Cooldowns_Actions takes nothing returns nothing
local integer lEq=1
local integer lEQ=6
local integer lk5=GetItemTypeId(GetManipulatedItem())
local unit lk6=GetManipulatingUnit()
loop
exitwhen lEq>lEQ
set udg_itm_DTAX_used_item_search_counter=UnitItemInSlotBJ(lk6,lEq)
if(GetItemTypeId(udg_itm_DTAX_used_item_search_counter)==lk5)then
set udg_i_DTAX_used_item_array_counter_REF2=(udg_i_DTAX_used_item_array_counter_REF2+1)
set udg_rA_DTAX_used_item_cooldown_time_holder_REF2[udg_i_DTAX_used_item_array_counter_REF2]=udg_r_DTAX_item_cooldown_time
set udg_itmA_DTAX_used_item_holder_REF2[udg_i_DTAX_used_item_array_counter_REF2]=udg_itm_DTAX_used_item_search_counter
call SetItemDroppable(udg_itm_DTAX_used_item_search_counter,false)
endif
set lEq=lEq+1
endloop
endfunction
function StartTrigger_Undroppable_Cooldowns takes nothing returns nothing
set gg_trg_Undroppable_Cooldowns=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Undroppable_Cooldowns,EVENT_PLAYER_UNIT_USE_ITEM)
call TriggerAddCondition(gg_trg_Undroppable_Cooldowns,Condition(function Trig_Undroppable_Cooldowns_Conditions))
call TriggerAddAction(gg_trg_Undroppable_Cooldowns,function Trig_Undroppable_Cooldowns_Actions)
endfunction
function InitTrig_Undroppable_Cooldowns takes nothing returns nothing
endfunction
function Trig_Reset_Droppable_Status_Actions takes nothing returns nothing
local integer lEq=2
local integer lEQ=udg_i_DTAX_used_item_array_counter_REF2
if(udg_i_DTAX_used_item_array_counter_REF2>0 and udg_rA_DTAX_used_item_cooldown_time_holder_REF2[1]<1.)then
loop
exitwhen lEq>lEQ
set udg_rA_DTAX_used_item_cooldown_time_holder_REF2[lEq-1]=udg_rA_DTAX_used_item_cooldown_time_holder_REF2[lEq]
set udg_itmA_DTAX_used_item_holder_REF2[lEq-1]=udg_itmA_DTAX_used_item_holder_REF2[lEq]
set lEq=lEq+1
endloop
set udg_i_DTAX_used_item_array_counter_REF2=udg_i_DTAX_used_item_array_counter_REF2-1
endif
set lEq=1
set lEQ=udg_i_DTAX_used_item_array_counter_REF2
loop
exitwhen lEq>lEQ
if(udg_rA_DTAX_used_item_cooldown_time_holder_REF2[lEq]>=1.)then
set udg_rA_DTAX_used_item_cooldown_time_holder_REF2[lEq]=udg_rA_DTAX_used_item_cooldown_time_holder_REF2[lEq]-1
if(udg_rA_DTAX_used_item_cooldown_time_holder_REF2[lEq]<1.)then
call SetItemDroppable(udg_itmA_DTAX_used_item_holder_REF2[lEq],true)
endif
endif
set lEq=lEq+1
endloop
endfunction
function StartTrigger_Reset_Droppable_Status takes nothing returns nothing
set gg_trg_Reset_Droppable_Status=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(gg_trg_Reset_Droppable_Status,1.)
call TriggerAddAction(gg_trg_Reset_Droppable_Status,function Trig_Reset_Droppable_Status_Actions)
endfunction
function InitTrig_Reset_Droppable_Status takes nothing returns nothing
endfunction
function Trig_Double_Damage_Rune_Conditions takes nothing returns boolean
if(GetItemTypeId(GetManipulatedItem())=='pnvu')then
if(GetUnitTypeId(GetTriggerUnit())=='Otch')then
return true
endif
endif
return false
endfunction
function Trig_Double_Damage_Rune_Actions takes nothing returns nothing
local unit lNJ=GetTriggerUnit()
local unit lJV
local location lNk=GetUnitLoc(lNJ)
call UnitRemoveAbility(lNJ,'B01P')
call PolledWait(.1)
set lJV=CreateUnitAtLoc(GetOwningPlayer(lNJ),'e00E',lNk,bj_UNIT_FACING)
call UnitAddAbility(lJV,'AIrr')
call IssueImmediateOrderById(lJV,OrderId("roar"))
call RemoveLocation(lNk)
endfunction
function StartTrigger_Double_Damage_Rune takes nothing returns nothing
set gg_trg_Double_Damage_Rune=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Double_Damage_Rune,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerAddCondition(gg_trg_Double_Damage_Rune,Condition(function Trig_Double_Damage_Rune_Conditions))
call TriggerAddAction(gg_trg_Double_Damage_Rune,function Trig_Double_Damage_Rune_Actions)
endfunction
function InitTrig_Double_Damage_Rune takes nothing returns nothing
endfunction
function Trig_Double_Damage_End_Conditions takes nothing returns boolean
if(not(UnitHasBuffBJ(GetAttacker(),'Broa')))then
return false
endif
return true
endfunction
function Trig_Double_Damage_End_Actions takes nothing returns nothing
call PolledWait(.35)
call UnitRemoveAbility(GetAttacker(),'Broa')
endfunction
function StartTrigger_Double_Damage_End takes nothing returns nothing
set gg_trg_Double_Damage_End=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Double_Damage_End,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(gg_trg_Double_Damage_End,Condition(function Trig_Double_Damage_End_Conditions))
call TriggerAddAction(gg_trg_Double_Damage_End,function Trig_Double_Damage_End_Actions)
endfunction
function InitTrig_Double_Damage_End takes nothing returns nothing
endfunction
function Trig_TripleKill_Dropdown1_Actions takes nothing returns nothing
set udg_iA_DTAX_tripple_kill_status[1]=0
endfunction
function StartTrigger_TripleKill_Dropdown1 takes nothing returns nothing
set gg_trg_TripleKill_Dropdown1=CreateTrigger()
call TriggerRegisterTimerExpireEvent(gg_trg_TripleKill_Dropdown1,udg_tA_DTAX_player_tripple_kill_expiration_timer[1])
call TriggerAddAction(gg_trg_TripleKill_Dropdown1,function Trig_TripleKill_Dropdown1_Actions)
endfunction
function InitTrig_TripleKill_Dropdown1 takes nothing returns nothing
endfunction
function Trig_TripleKill_Dropdown2_Actions takes nothing returns nothing
set udg_iA_DTAX_tripple_kill_status[2]=0
endfunction
function StartTrigger_TripleKill_Dropdown2 takes nothing returns nothing
set gg_trg_TripleKill_Dropdown2=CreateTrigger()
call TriggerRegisterTimerExpireEvent(gg_trg_TripleKill_Dropdown2,udg_tA_DTAX_player_tripple_kill_expiration_timer[2])
call TriggerAddAction(gg_trg_TripleKill_Dropdown2,function Trig_TripleKill_Dropdown2_Actions)
endfunction
function InitTrig_TripleKill_Dropdown2 takes nothing returns nothing
endfunction
function Trig_TripleKill_Dropdown3_Actions takes nothing returns nothing
set udg_iA_DTAX_tripple_kill_status[3]=0
endfunction
function StartTrigger_TripleKill_Dropdown3 takes nothing returns nothing
set gg_trg_TripleKill_Dropdown3=CreateTrigger()
call TriggerRegisterTimerExpireEvent(gg_trg_TripleKill_Dropdown3,udg_tA_DTAX_player_tripple_kill_expiration_timer[3])
call TriggerAddAction(gg_trg_TripleKill_Dropdown3,function Trig_TripleKill_Dropdown3_Actions)
endfunction
function InitTrig_TripleKill_Dropdown3 takes nothing returns nothing
endfunction
function Trig_TripleKill_Dropdown4_Actions takes nothing returns nothing
set udg_iA_DTAX_tripple_kill_status[4]=0
endfunction
function StartTrigger_TripleKill_Dropdown4 takes nothing returns nothing
set gg_trg_TripleKill_Dropdown4=CreateTrigger()
call TriggerRegisterTimerExpireEvent(gg_trg_TripleKill_Dropdown4,udg_tA_DTAX_player_tripple_kill_expiration_timer[4])
call TriggerAddAction(gg_trg_TripleKill_Dropdown4,function Trig_TripleKill_Dropdown4_Actions)
endfunction
function InitTrig_TripleKill_Dropdown4 takes nothing returns nothing
endfunction
function Trig_TripleKill_Dropdown5_Actions takes nothing returns nothing
set udg_iA_DTAX_tripple_kill_status[5]=0
endfunction
function StartTrigger_TripleKill_Dropdown5 takes nothing returns nothing
set gg_trg_TripleKill_Dropdown5=CreateTrigger()
call TriggerRegisterTimerExpireEvent(gg_trg_TripleKill_Dropdown5,udg_tA_DTAX_player_tripple_kill_expiration_timer[5])
call TriggerAddAction(gg_trg_TripleKill_Dropdown5,function Trig_TripleKill_Dropdown5_Actions)
endfunction
function InitTrig_TripleKill_Dropdown5 takes nothing returns nothing
endfunction
function Trig_TripleKill_Dropdown7_Actions takes nothing returns nothing
set udg_iA_DTAX_tripple_kill_status[7]=0
endfunction
function StartTrigger_TripleKill_Dropdown7 takes nothing returns nothing
set gg_trg_TripleKill_Dropdown7=CreateTrigger()
call TriggerRegisterTimerExpireEvent(gg_trg_TripleKill_Dropdown7,udg_tA_DTAX_player_tripple_kill_expiration_timer[7])
call TriggerAddAction(gg_trg_TripleKill_Dropdown7,function Trig_TripleKill_Dropdown7_Actions)
endfunction
function InitTrig_TripleKill_Dropdown7 takes nothing returns nothing
endfunction
function Trig_TripleKill_Dropdown8_Actions takes nothing returns nothing
set udg_iA_DTAX_tripple_kill_status[8]=0
endfunction
function StartTrigger_TripleKill_Dropdown8 takes nothing returns nothing
set gg_trg_TripleKill_Dropdown8=CreateTrigger()
call TriggerRegisterTimerExpireEvent(gg_trg_TripleKill_Dropdown8,udg_tA_DTAX_player_tripple_kill_expiration_timer[8])
call TriggerAddAction(gg_trg_TripleKill_Dropdown8,function Trig_TripleKill_Dropdown8_Actions)
endfunction
function InitTrig_TripleKill_Dropdown8 takes nothing returns nothing
endfunction
function Trig_TripleKill_Dropdown9_Actions takes nothing returns nothing
set udg_iA_DTAX_tripple_kill_status[9]=0
endfunction
function StartTrigger_TripleKill_Dropdown9 takes nothing returns nothing
set gg_trg_TripleKill_Dropdown9=CreateTrigger()
call TriggerRegisterTimerExpireEvent(gg_trg_TripleKill_Dropdown9,udg_tA_DTAX_player_tripple_kill_expiration_timer[9])
call TriggerAddAction(gg_trg_TripleKill_Dropdown9,function Trig_TripleKill_Dropdown9_Actions)
endfunction
function InitTrig_TripleKill_Dropdown9 takes nothing returns nothing
endfunction
function Trig_TripleKill_Dropdown10_Actions takes nothing returns nothing
set udg_iA_DTAX_tripple_kill_status[10]=0
endfunction
function StartTrigger_TripleKill_Dropdown10 takes nothing returns nothing
set gg_trg_TripleKill_Dropdown10=CreateTrigger()
call TriggerRegisterTimerExpireEvent(gg_trg_TripleKill_Dropdown10,udg_tA_DTAX_player_tripple_kill_expiration_timer[10])
call TriggerAddAction(gg_trg_TripleKill_Dropdown10,function Trig_TripleKill_Dropdown10_Actions)
endfunction
function InitTrig_TripleKill_Dropdown10 takes nothing returns nothing
endfunction
function Trig_TripleKill_Dropdown11_Actions takes nothing returns nothing
set udg_iA_DTAX_tripple_kill_status[11]=0
endfunction
function StartTrigger_TripleKill_Dropdown11 takes nothing returns nothing
set gg_trg_TripleKill_Dropdown11=CreateTrigger()
call TriggerRegisterTimerExpireEvent(gg_trg_TripleKill_Dropdown11,udg_tA_DTAX_player_tripple_kill_expiration_timer[11])
call TriggerAddAction(gg_trg_TripleKill_Dropdown11,function Trig_TripleKill_Dropdown11_Actions)
endfunction
function InitTrig_TripleKill_Dropdown11 takes nothing returns nothing
endfunction
function DoNothingWTF takes nothing returns nothing
endfunction
function Roshan_Secret takes nothing returns nothing
local location iG=GetRectCenter(gg_rct_RoshanPlace)
local weathereffect ih=AddWeatherEffect(gg_rct_RoshanRect,'SNbs')
local unit iH
local trigger t=CreateTrigger()
call EnableWeatherEffect(ih,true)
call PolledWait(10)
set iH=CreateUnitAtLoc(Player(12),'n01X',iG,330)
call UnitAddItem(iH,CreateItem('I017',0,0))
call TriggerRegisterUnitEvent(t,iH,EVENT_UNIT_DEATH)
call TriggerAddAction(t,function DoNothingWTF)
endfunction
function InitTrig_Roshan_Secret takes nothing returns nothing
endfunction
function Trig_Roshan_Kill_Conditions takes nothing returns boolean
return GetUnitTypeId(GetDyingUnit())=='n00L'
endfunction
function Trig_Roshan_Kill_Actions takes nothing returns nothing
if(PlayerIsSentinel(GetOwningPlayer(GetKillingUnit())))then
call MultyEcho(bj_FORCE_ALL_PLAYERS,10.,"Roshan has been slain by the |c00ff0000Sentinel|r!  Each Sentinel player receives 800 bonus gold.")
call AdjustPlayerStateBJ(800,udg_pA_DTAX_SEPlayers[1],PLAYER_STATE_RESOURCE_GOLD)
call AdjustPlayerStateBJ(800,udg_pA_DTAX_SEPlayers[2],PLAYER_STATE_RESOURCE_GOLD)
call AdjustPlayerStateBJ(800,udg_pA_DTAX_SEPlayers[3],PLAYER_STATE_RESOURCE_GOLD)
call AdjustPlayerStateBJ(800,udg_pA_DTAX_SEPlayers[4],PLAYER_STATE_RESOURCE_GOLD)
call AdjustPlayerStateBJ(800,udg_pA_DTAX_SEPlayers[5],PLAYER_STATE_RESOURCE_GOLD)
endif
if(PlayerIsScourge(GetOwningPlayer(GetKillingUnit())))then
call MultyEcho(bj_FORCE_ALL_PLAYERS,10.,"Roshan has been slain by the |c00004000Scourge|r!  Each Scourge player receives 800 bonus gold.")
call AdjustPlayerStateBJ(800,udg_pA_DTAX_SCPlayers[1],PLAYER_STATE_RESOURCE_GOLD)
call AdjustPlayerStateBJ(800,udg_pA_DTAX_SCPlayers[2],PLAYER_STATE_RESOURCE_GOLD)
call AdjustPlayerStateBJ(800,udg_pA_DTAX_SCPlayers[3],PLAYER_STATE_RESOURCE_GOLD)
call AdjustPlayerStateBJ(800,udg_pA_DTAX_SCPlayers[4],PLAYER_STATE_RESOURCE_GOLD)
call AdjustPlayerStateBJ(800,udg_pA_DTAX_SCPlayers[5],PLAYER_STATE_RESOURCE_GOLD)
endif
call DisableTrigger(gg_trg_Roshan_Kill)
endfunction
function StartTrigger_Roshan_Kill takes nothing returns nothing
set gg_trg_Roshan_Kill=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Roshan_Kill,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(gg_trg_Roshan_Kill,Condition(function Trig_Roshan_Kill_Conditions))
call TriggerAddAction(gg_trg_Roshan_Kill,function Trig_Roshan_Kill_Actions)
endfunction
function InitTrig_Roshan_Kill takes nothing returns nothing
endfunction
function Trig_Roshan_Protection_Conditions takes nothing returns boolean
if(GetTriggerUnit()!=udg_u_DTAX_GLOBAL_Roshan)then
return false
endif
if(IsUnitIllusion(GetAttacker()))then
call KillUnit(GetAttacker())
return false
endif
return true
endfunction
function Trig_Roshan_Protection_Actions takes nothing returns nothing
if(UnitHasBuffBJ(GetTriggerUnit(),'BPSE'))then
call UnitRemoveAbility(GetTriggerUnit(),'BPSE')
endif
endfunction
function StartTrigger_Roshan_Protection takes nothing returns nothing
set gg_trg_Roshan_Protection=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Roshan_Protection,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(gg_trg_Roshan_Protection,Condition(function Trig_Roshan_Protection_Conditions))
call TriggerAddAction(gg_trg_Roshan_Protection,function Trig_Roshan_Protection_Actions)
endfunction
function InitTrig_Roshan_Protection takes nothing returns nothing
endfunction
function Trig_Roshan_Control_Conditions takes nothing returns boolean
if(GetUnitTypeId(GetAttacker())!='n00L')then
return false
endif
if(IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE))then
return true
endif
return false
endfunction
function Trig_Roshan_Control_Actions takes nothing returns nothing
local location ljk=GetRectCenter(gg_rct_RoshanPlace)
call SetUnitPositionLoc(GetAttacker(),ljk)
call RemoveLocation(ljk)
endfunction
function StartTrigger_Roshan_Control takes nothing returns nothing
set gg_trg_Roshan_Control=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Roshan_Control,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(gg_trg_Roshan_Control,Condition(function Trig_Roshan_Control_Conditions))
call TriggerAddAction(gg_trg_Roshan_Control,function Trig_Roshan_Control_Actions)
endfunction
function InitTrig_Roshan_Control takes nothing returns nothing
endfunction
function Trig_Necronomicon_Warrior_1_Conditions takes nothing returns boolean
if(not(GetUnitTypeId(GetTriggerUnit())=='n00J'))then
return false
endif
if(IsUnitType(GetKillingUnit(),UNIT_TYPE_STRUCTURE))then
return false
endif
return true
endfunction
function Trig_Necronomicon_Warrior_1_Actions takes nothing returns nothing
if IsUnitAlly(GetDyingUnit(),GetOwningPlayer(GetKillingUnit()))==false then
call UnitDamageTargetBJ(GetDyingUnit(),GetKillingUnit(),200.,ATTACK_TYPE_HERO,DAMAGE_TYPE_MAGIC)
endif
endfunction
function StartTrigger_Necronomicon_Warrior_1 takes nothing returns nothing
set gg_trg_Necronomicon_Warrior_1=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Necronomicon_Warrior_1,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(gg_trg_Necronomicon_Warrior_1,Condition(function Trig_Necronomicon_Warrior_1_Conditions))
call TriggerAddAction(gg_trg_Necronomicon_Warrior_1,function Trig_Necronomicon_Warrior_1_Actions)
endfunction
function InitTrig_Necronomicon_Warrior_1 takes nothing returns nothing
endfunction
function Trig_Necronomicon_Warrior_2_Conditions takes nothing returns boolean
if(not(GetUnitTypeId(GetTriggerUnit())=='n00A'))then
return false
endif
if(IsUnitType(GetKillingUnit(),UNIT_TYPE_STRUCTURE))then
return false
endif
return true
endfunction
function Trig_Necronomicon_Warrior_2_Actions takes nothing returns nothing
if IsUnitAlly(GetDyingUnit(),GetOwningPlayer(GetKillingUnit()))==false then
call UnitDamageTargetBJ(GetDyingUnit(),GetKillingUnit(),400.,ATTACK_TYPE_HERO,DAMAGE_TYPE_MAGIC)
endif
endfunction
function StartTrigger_Necronomicon_Warrior_2 takes nothing returns nothing
set gg_trg_Necronomicon_Warrior_2=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Necronomicon_Warrior_2,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(gg_trg_Necronomicon_Warrior_2,Condition(function Trig_Necronomicon_Warrior_2_Conditions))
call TriggerAddAction(gg_trg_Necronomicon_Warrior_2,function Trig_Necronomicon_Warrior_2_Actions)
endfunction
function InitTrig_Necronomicon_Warrior_2 takes nothing returns nothing
endfunction
function Trig_Necronomicon_Warrior_3_Conditions takes nothing returns boolean
if(not(GetUnitTypeId(GetTriggerUnit())=='n006'))then
return false
endif
if(IsUnitType(GetKillingUnit(),UNIT_TYPE_STRUCTURE))then
return false
endif
return true
endfunction
function Trig_Necronomicon_Warrior_3_Actions takes nothing returns nothing
if IsUnitAlly(GetDyingUnit(),GetOwningPlayer(GetKillingUnit()))==false then
call UnitDamageTargetBJ(GetDyingUnit(),GetKillingUnit(),600.,ATTACK_TYPE_HERO,DAMAGE_TYPE_MAGIC)
endif
endfunction
function StartTrigger_Necronomicon_Warrior_3 takes nothing returns nothing
set gg_trg_Necronomicon_Warrior_3=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Necronomicon_Warrior_3,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(gg_trg_Necronomicon_Warrior_3,Condition(function Trig_Necronomicon_Warrior_3_Conditions))
call TriggerAddAction(gg_trg_Necronomicon_Warrior_3,function Trig_Necronomicon_Warrior_3_Actions)
endfunction
function InitTrig_Necronomicon_Warrior_3 takes nothing returns nothing
endfunction
function Trig_UniversalDeathPact_Conditions takes nothing returns boolean
if GetUnitTypeId(GetSpellTargetUnit())=='n00I'or GetUnitTypeId(GetSpellTargetUnit())=='e01H'then
return false
endif
if(GetSpellAbilityId()=='A04Q')then
return true
endif
if(GetSpellAbilityId()=='A053')then
return true
endif
if(GetSpellAbilityId()=='A08L')then
return true
endif
return false
endfunction
function Trig_UniversalDeathPact_Actions takes nothing returns nothing
local unit lfo=GetTriggerUnit()
local unit lVf=GetSpellTargetUnit()
if(GetSpellAbilityId()=='A04Q')then
call SetWidgetLife(lfo,(GetUnitStateSwap(UNIT_STATE_LIFE,lfo)+(GetUnitStateSwap(UNIT_STATE_LIFE,lVf)*(.15+(I2R(GetUnitAbilityLevelSwapped('A04Q',lfo))*.4)))))
call KillUnit(lVf)
endif
if(GetSpellAbilityId()=='A053')then
call SetUnitManaBJ(lfo,(GetUnitStateSwap(UNIT_STATE_MANA,lfo)+(GetUnitStateSwap(UNIT_STATE_LIFE,lVf)*(I2R(GetUnitAbilityLevelSwapped('A053',lfo))*.15))))
call KillUnit(lVf)
endif
if(GetSpellAbilityId()=='A08L')then
call SetWidgetLife(lfo,(GetUnitStateSwap(UNIT_STATE_LIFE,lfo)+(GetUnitStateSwap(UNIT_STATE_LIFE,lVf)*.85)))
call PolledWait(.01)
call SetUnitManaBJ(lfo,(GetUnitStateSwap(UNIT_STATE_MANA,lfo)+(GetUnitStateSwap(UNIT_STATE_LIFE,lVf)*.15)))
call KillUnit(lVf)
endif
endfunction
function StartTrigger_UniversalDeathPact takes nothing returns nothing
set gg_trg_UniversalDeathPact=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_UniversalDeathPact,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_UniversalDeathPact,Condition(function Trig_UniversalDeathPact_Conditions))
call TriggerAddAction(gg_trg_UniversalDeathPact,function Trig_UniversalDeathPact_Actions)
endfunction
function InitTrig_UniversalDeathPact takes nothing returns nothing
endfunction
function iWiW takes nothing returns nothing
set udg_bj=ReturnMax(udg_bj-1,0)
call MultiboardSetItemValue(udg_eT,I2S(udg_bj))
call MultiboardSetItemValue(udg_eu,I2S(udg_bj))
endfunction
function ixix takes nothing returns string
local string lgd
if(udg_i_DTAX_game_minutes<10)then
set lgd=I2S(udg_i_DTAX_game_hours)+":0"+I2S(udg_i_DTAX_game_minutes)
else
set lgd=I2S(udg_i_DTAX_game_hours)+":"+I2S(udg_i_DTAX_game_minutes)
endif
return lgd
endfunction
function IsSentinelEx takes player pEk returns boolean
return PlayerIsSentinel(pEk)
endfunction
function IsScourgeEx takes player pEk returns boolean
return PlayerIsScourge(pEk)
endfunction
function ReturnColoredPlayerName takes player pEk returns string
return udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(pEk)]+GetPlayerName(pEk)+"|r"
endfunction
function ReturnHeroNameII takes player pEk returns string
return ReturnHeroName(udg_uA_DTAX_player_hero_unit[GetPlayerId(pEk)])
endfunction
function iZiZ takes player pEk,integer pi0 returns string
return ItemIconDataBaseGet(UnitItemInSlot(udg_uA_DTAX_player_hero_unit[GetPlayerId(pEk)],pi0-1))
endfunction
function i6i6 takes player ppp returns string
return I2S(GetUnitLevel(udg_uA_DTAX_player_hero_unit[GetPlayerId(ppp)]))
endfunction
function ReturnPlayerGoldAsString takes player pEk returns string
return I2S(GetPlayerState(pEk,PLAYER_STATE_RESOURCE_GOLD))
endfunction
function i8i8 takes player pEk returns string
return I2S(udg_Stat_SomeStat4[GetPlayerId(pEk)])
endfunction
function i9i9 takes player pEk returns string
return I2S(udg_Stat_SomeHeroKillPoints[GetPlayerId(pEk)])
endfunction
function i7i7 takes player ppp returns string
return I2S(GetInteger("Stats"+I2S(GetPlayerId(ppp)),"NumOfWards"))
endfunction
function IaIa takes player pEk returns string
return I2S(udg_iA_DTAX_iA_kill_death_counter[GetPlayerId(pEk)])
endfunction
function IAIA takes player pEk returns string
return I2S(udg_iA_DTAX_kill_counter[GetPlayerId(pEk)])
endfunction
function IfIf takes player pEk returns string
local integer lIF=udg_Stat_SomeStat3[GetPlayerId(pEk)]
local string lgd
local integer lIg
local integer lIG
set lIg=(lIF/60)-(1/2)
set lIG=ModuloInteger(lIF,60)
if(lIG<10)then
set lgd=I2S(lIg)+":0"+I2S(lIG)
else
set lgd=I2S(lIg)+":"+I2S(lIG)
endif
return lgd
endfunction
function i4i4 takes player ppp returns string
return I2S(GetInteger("Stats"+I2S(GetPlayerId(ppp)),"NumOfConsumables"))
endfunction
function i5i5 takes player ppp returns string
return I2S(GetInteger("Stats"+I2S(GetPlayerId(ppp)),"NumOfVeggies"))
endfunction
function IEIE takes player pEk returns string
return I2S(udg_HeroesKilledAndTowersDestroyed[GetPlayerId(pEk)])
endfunction
function IbIb takes player pEk returns string
return I2S(udg_iA_DTAX_enemy_mobs_killed[GetPlayerId(pEk)])
endfunction
function IBIB takes player pEk returns string
return I2S(udg_iA_DTAX_ally_mobs_killed[GetPlayerId(pEk)])
endfunction
function IcIc takes player ppp returns string
return I2S(GetInteger("Stats"+I2S(GetPlayerId(ppp)),"NumOfNeutrals"))
endfunction
function ICIC takes player pEk returns string
return I2S(udg_Stat_SomeStat1[GetPlayerId(pEk)])
endfunction
function IdId takes player pEk returns string
return I2S(udg_Stat_SomeStat2[GetPlayerId(pEk)])
endfunction
function IeIe takes player pEk returns string
return I2S(udg_Stat_SomeChainKillsPoints[GetPlayerId(pEk)])
endfunction
function ReturnHeroIconForPlayer takes player pEk returns string
return udg_sA_DTAX_HeroIcons[GetUnitPointValue(udg_uA_DTAX_player_hero_unit[GetPlayerId(pEk)])]
endfunction
function IhIh takes player pFb,player pFB returns string
local integer lkk=GetInteger("Stats"+I2S(GetPlayerId(pFb)),"Killed "+I2S(GetPlayerId(pFB)))
local integer ldd=GetInteger("Stats"+I2S(GetPlayerId(pFb)),"Died To "+I2S(GetPlayerId(pFB)))
if lkk<1 then
set lkk=0
endif
if ldd<1 then
set ldd=0
endif
return I2S(lkk)+"/"+I2S(ldd)
endfunction
function iYiY takes player pEk returns string
return udg_bJ[GetPlayerId(pEk)]
endfunction
function FinalBoardShow takes nothing returns nothing
local integer lIJ=udg_i_DTAX_SE_players_count
local integer lIk=udg_i_DTAX_SC_players_count
local player array lIK
local player array lIl
local integer lIL
local integer lIm
local integer lIM=25+lIJ+lIk+4
local integer lIn=1+lIJ+lIk
local multiboarditem lIN
local multiboard lIo
local multiboard lIO
local integer lii
local integer lxx
local integer lIp
local integer lIP
local string lee="|r"
local string lc0="|cff99ccff"
local timer ltt=CreateTimer()
call DisableTrigger(gg_trg_KD_Refresh)
call DestroyMultiboard(udg_mb_DTAX_game_kd_multiboard)
set lIo=CreateMultiboard()
set lIO=CreateMultiboard()
call MultiboardSetItemsWidth(lIo,.07)
call MultiboardSetItemsWidth(lIO,.07)
call MultiboardSetRowCount(lIo,lIM-lIJ)
call MultiboardSetRowCount(lIO,lIM-lIk)
call MultiboardSetColumnCount(lIo,lIn)
call MultiboardSetColumnCount(lIO,lIn)
call MultiboardSetTitleText(lIo,"DotA Allstars Scores - "+ixix()+" - "+udg_s_DTAX_gamemode_name+" - "+"|c00ff0303"+I2S(udg_iA_DTAX_iA_kill_death_counter[GetPlayerId(udg_pA_DTAX_SEPlayers[0])])+"|r"+"/"+"|c0020c000"+I2S(udg_iA_DTAX_kill_counter[GetPlayerId(udg_pA_DTAX_SEPlayers[0])])+"|r")
call MultiboardSetTitleText(lIO,"DotA Allstars Scores - "+ixix()+" - "+udg_s_DTAX_gamemode_name+" - "+"|c00ff0303"+I2S(udg_iA_DTAX_iA_kill_death_counter[GetPlayerId(udg_pA_DTAX_SEPlayers[0])])+"|r"+"/"+"|c0020c000"+I2S(udg_iA_DTAX_kill_counter[GetPlayerId(udg_pA_DTAX_SEPlayers[0])])+"|r")
call MultiboardMinimize(lIo,false)
call MultiboardMinimize(lIO,false)
set lxx=1
set lii=1
loop
exitwhen lii>5
if PlayerIsActive(udg_pA_DTAX_SEPlayers[lii])or GetPlayerSlotState(udg_pA_DTAX_SEPlayers[lii])==PLAYER_SLOT_STATE_LEFT then
set lIK[lxx]=udg_pA_DTAX_SEPlayers[lii]
set lxx=lxx+1
endif
set lii=lii+1
endloop
set lxx=1
set lii=1
loop
exitwhen lii>5
if PlayerIsActive(udg_pA_DTAX_SCPlayers[lii])or GetPlayerSlotState(udg_pA_DTAX_SCPlayers[lii])==PLAYER_SLOT_STATE_LEFT then
set lIl[lxx]=udg_pA_DTAX_SCPlayers[lii]
set lxx=lxx+1
endif
set lii=lii+1
endloop
if IsSentinelEx(GetLocalPlayer())then
call MultiboardDisplay(lIo,true)
elseif IsScourgeEx(GetLocalPlayer())then
call MultiboardDisplay(lIO,true)
endif
set lii=0
set lIm=0
loop
exitwhen lii>lIM
set lIN=MultiboardGetItem(lIo,lii,lIm)
call MultiboardSetItemWidth(lIN,.075)
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lii,lIm)
call MultiboardSetItemWidth(lIN,.075)
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIL=0
set lIm=0
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,false,false)
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,false,false)
call MultiboardReleaseItem(lIN)
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,ReturnColoredPlayerName(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,ReturnColoredPlayerName(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,ReturnColoredPlayerName(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,ReturnColoredPlayerName(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIm=0
set lIL=0
set lIL=lIL+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Hero"+lee)
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Hero"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,ReturnHeroNameII(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,ReturnHeroNameII(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,ReturnHeroNameII(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,ReturnHeroNameII(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIm=0
set lIL=lIL+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Item 1"+lee)
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Item 1"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,false,true)
call MultiboardSetItemIcon(lIN,iZiZ(lIK[lii],1))
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,false,true)
call MultiboardSetItemIcon(lIN,iZiZ(lIK[lii],1))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,false,true)
call MultiboardSetItemIcon(lIN,iZiZ(lIl[lii],1))
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,false,true)
call MultiboardSetItemIcon(lIN,iZiZ(lIl[lii],1))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIm=0
set lIL=lIL+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Item 2"+lee)
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Item 2"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,false,true)
call MultiboardSetItemIcon(lIN,iZiZ(lIK[lii],2))
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,false,true)
call MultiboardSetItemIcon(lIN,iZiZ(lIK[lii],2))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,false,true)
call MultiboardSetItemIcon(lIN,iZiZ(lIl[lii],2))
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,false,true)
call MultiboardSetItemIcon(lIN,iZiZ(lIl[lii],2))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIm=0
set lIL=lIL+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Item 3"+lee)
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Item 3"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,false,true)
call MultiboardSetItemIcon(lIN,iZiZ(lIK[lii],3))
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,false,true)
call MultiboardSetItemIcon(lIN,iZiZ(lIK[lii],3))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,false,true)
call MultiboardSetItemIcon(lIN,iZiZ(lIl[lii],3))
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,false,true)
call MultiboardSetItemIcon(lIN,iZiZ(lIl[lii],3))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIm=0
set lIL=lIL+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Item 4"+lee)
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Item 4"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,false,true)
call MultiboardSetItemIcon(lIN,iZiZ(lIK[lii],4))
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,false,true)
call MultiboardSetItemIcon(lIN,iZiZ(lIK[lii],4))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,false,true)
call MultiboardSetItemIcon(lIN,iZiZ(lIl[lii],4))
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,false,true)
call MultiboardSetItemIcon(lIN,iZiZ(lIl[lii],4))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIm=0
set lIL=lIL+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Item 5"+lee)
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Item 5"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,false,true)
call MultiboardSetItemIcon(lIN,iZiZ(lIK[lii],5))
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,false,true)
call MultiboardSetItemIcon(lIN,iZiZ(lIK[lii],5))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,false,true)
call MultiboardSetItemIcon(lIN,iZiZ(lIl[lii],5))
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,false,true)
call MultiboardSetItemIcon(lIN,iZiZ(lIl[lii],5))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIm=0
set lIL=lIL+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Item 6"+lee)
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Item 6"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,false,true)
call MultiboardSetItemIcon(lIN,iZiZ(lIK[lii],6))
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,false,true)
call MultiboardSetItemIcon(lIN,iZiZ(lIK[lii],6))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,false,true)
call MultiboardSetItemIcon(lIN,iZiZ(lIl[lii],6))
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,false,true)
call MultiboardSetItemIcon(lIN,iZiZ(lIl[lii],6))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIm=0
set lIL=lIL+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Hero Level"+lee)
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Hero Level"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,i6i6(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,i6i6(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,i6i6(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,i6i6(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIm=0
set lIL=lIL+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Current Gold"+lee)
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Current Gold"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,ReturnPlayerGoldAsString(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,ReturnPlayerGoldAsString(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,ReturnPlayerGoldAsString(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,ReturnPlayerGoldAsString(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIm=0
set lIL=lIL+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Hero Kill Gold"+lee)
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Hero Kill Gold"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,i8i8(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,i8i8(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,i8i8(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,i8i8(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIm=0
set lIL=lIL+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Gold Lost"+lee)
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Gold Lost"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,i9i9(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,i9i9(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,i9i9(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,i9i9(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIm=0
set lIL=lIL+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Wards"+lee)
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Wards"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,i7i7(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,i7i7(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,i7i7(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,i7i7(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIm=0
set lIL=lIL+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Total Kills"+lee)
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Total Kills"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IaIa(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IaIa(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IaIa(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IaIa(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIm=0
set lIL=lIL+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Total Deaths"+lee)
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Total Deaths"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IAIA(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IAIA(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IAIA(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IAIA(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIm=0
set lIL=lIL+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Time Dead"+lee)
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Time Dead"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IfIf(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IfIf(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IfIf(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IfIf(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIm=0
set lIL=lIL+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Consumables"+lee)
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Consumables"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,i4i4(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,i4i4(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,i4i4(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,i4i4(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIm=0
set lIL=lIL+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Veggies"+lee)
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Veggies"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,i5i5(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,i5i5(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,i5i5(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,i5i5(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIm=0
set lIL=lIL+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Towers Killed"+lee)
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Towers Killed"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IEIE(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IEIE(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IEIE(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IEIE(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIm=0
set lIL=lIL+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Creep Kills"+lee)
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Creep Kills"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IbIb(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IbIb(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IbIb(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IbIb(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIm=0
set lIL=lIL+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Creep Denies"+lee)
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Creep Denies"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IBIB(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IBIB(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IBIB(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IBIB(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIm=0
set lIL=lIL+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Neutral Kills"+lee)
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Neutral Kills"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IcIc(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IcIc(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IcIc(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IcIc(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIm=0
set lIL=lIL+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Double Kills"+lee)
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Double Kills"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,ICIC(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,ICIC(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,ICIC(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,ICIC(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIm=0
set lIL=lIL+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Triple Kills"+lee)
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Triple Kills"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IdId(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IdId(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IdId(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IdId(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIm=0
set lIL=lIL+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Longest Spree"+lee)
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Longest Spree"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IeIe(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IeIe(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IeIe(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IeIe(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIp=lIL
set lIP=lIL
set lIL=lIp
set lxx=1
loop
exitwhen lxx>lIk
set lIm=0
set lIL=lIL+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,true)
call MultiboardSetItemIcon(lIN,ReturnHeroIconForPlayer(lIl[lxx]))
call MultiboardSetItemValue(lIN,lc0+" K/D"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IhIh(lIK[lii],lIl[lxx]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN," ")
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lxx=lxx+1
endloop
set lIp=lIL
set lIL=lIP
set lxx=1
loop
exitwhen lxx>lIJ
set lIm=0
set lIL=lIL+1
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,true)
call MultiboardSetItemIcon(lIN,ReturnHeroIconForPlayer(lIK[lxx]))
call MultiboardSetItemValue(lIN,lc0+" K/D"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN," ")
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(lIO,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IhIh(lIl[lii],lIK[lxx]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lxx=lxx+1
endloop
set lIP=lIL
set lIm=0
set lIp=lIp+1
set lIP=lIP+1
set lIN=MultiboardGetItem(lIo,lIp,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+" "+lee)
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIP,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+" "+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIp,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN," ")
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIP,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN," ")
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIp,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN," ")
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIP,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN," ")
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIm=0
set lIp=lIp+1
set lIP=lIP+1
set lIN=MultiboardGetItem(lIo,lIp,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Left At"+lee)
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIP,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Left At"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIp,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,iYiY(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIP,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,iYiY(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIp,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,iYiY(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIP,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,iYiY(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIm=0
set lIp=lIp+1
set lIP=lIP+1
set lIN=MultiboardGetItem(lIo,lIp,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Winner"+lee)
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIP,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Winner"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIp,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN," ")
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIP,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN," ")
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIp,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN," ")
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIP,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN," ")
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIN=MultiboardGetItem(lIo,lIp,1)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,udg_bI)
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIP,1)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,udg_bI)
call MultiboardReleaseItem(lIN)
set lIm=0
set lIp=lIp+1
set lIP=lIP+1
set lIN=MultiboardGetItem(lIo,lIp,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"End Game"+lee)
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIP,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"End Game"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIp,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN," ")
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIP,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN," ")
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(lIo,lIp,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN," ")
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIP,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN," ")
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set udg_bj='x'
set lIN=MultiboardGetItem(lIo,lIp,1)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,I2S(udg_bj))
call MultiboardReleaseItem(lIN)
set lIN=MultiboardGetItem(lIO,lIP,1)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,I2S(udg_bj))
call MultiboardReleaseItem(lIN)
set udg_eT=MultiboardGetItem(lIo,lIp,1)
set udg_eu=MultiboardGetItem(lIO,lIP,1)
call TimerStart(ltt,1,true,function iWiW)
endfunction
function InitTrig_FinalStatBoard takes nothing returns nothing
endfunction
function Color2DigitI takes player pWho returns integer
return HexString2Digit(SubString(udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(pWho)],4,6))
endfunction
function Color2DigitII takes player pWho returns integer
return HexString2Digit(SubString(udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(pWho)],6,8))
endfunction
function Color2DigitIII takes player pWho returns integer
return HexString2Digit(SubString(udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(pWho)],8,10))
endfunction
function Trig_KD_Show_Actions takes nothing returns nothing
local integer lEq
local integer lEQ
local integer lis
local integer liS
set udg_i_DTAX_SE_players_count=ForceActivePlayers(udg_f_DTAX_SEPlayers)
set lEq=1
set lEQ=5
set lis=1
loop
exitwhen lEq>lEQ
if(PlayerIsActive(udg_pA_DTAX_SEPlayers[lEq]))then
set udg_pA_DTAX_SE_players[lis]=udg_pA_DTAX_SEPlayers[lEq]
set lis=lis+1
endif
set lEq=lEq+1
endloop
set udg_i_DTAX_SC_players_count=ForceActivePlayers(udg_f_DTAX_SCPlayers)
set lEq=1
set lEQ=5
set lis=1
loop
exitwhen lEq>lEQ
if(PlayerIsActive(udg_pA_DTAX_SCPlayers[lEq]))then
set udg_pA_DTAX_SC_players[lis]=udg_pA_DTAX_SCPlayers[lEq]
set lis=lis+1
endif
set lEq=lEq+1
endloop
set udg_mb_DTAX_game_kd_multiboard=CreateMultiboardBJ(4,6+udg_i_DTAX_SC_players_count+udg_i_DTAX_SE_players_count,udg_s_DTAX_sMultiBoardHeader)
call MultiboardSetItemValueBJ(udg_mb_DTAX_game_kd_multiboard,1,1,"Player")
call MultiboardSetItemValueBJ(udg_mb_DTAX_game_kd_multiboard,2,1,"Dead?")
call MultiboardSetItemValueBJ(udg_mb_DTAX_game_kd_multiboard,3,1," Kills")
call MultiboardSetItemValueBJ(udg_mb_DTAX_game_kd_multiboard,4,1,"Deaths")
call MultiboardSetItemValueBJ(udg_mb_DTAX_game_kd_multiboard,1,2,"The Sentinel")
call MultiboardSetItemValueBJ(udg_mb_DTAX_game_kd_multiboard,1,3+udg_i_DTAX_SE_players_count,"The Scourge")
call MultiboardSetItemValueBJ(udg_mb_DTAX_game_kd_multiboard,3,3+udg_i_DTAX_SE_players_count,"   0")
call MultiboardSetItemValueBJ(udg_mb_DTAX_game_kd_multiboard,4,3+udg_i_DTAX_SE_players_count,"    0")
call MultiboardSetItemValueBJ(udg_mb_DTAX_game_kd_multiboard,3,2,"   0")
call MultiboardSetItemValueBJ(udg_mb_DTAX_game_kd_multiboard,4,2,"    0")
call MultiboardSetItemColorBJ(udg_mb_DTAX_game_kd_multiboard,1,2,Color2DigitI(udg_pA_DTAX_SEPlayers[0])/255.*100,Color2DigitII(udg_pA_DTAX_SEPlayers[0])/255.*100,Color2DigitIII(udg_pA_DTAX_SEPlayers[0])/255.*100,0)
call MultiboardSetItemColorBJ(udg_mb_DTAX_game_kd_multiboard,1,3+udg_i_DTAX_SE_players_count,Color2DigitI(udg_pA_DTAX_SCPlayers[0])/255.*100,Color2DigitII(udg_pA_DTAX_SCPlayers[0])/255.*100,Color2DigitIII(udg_pA_DTAX_SCPlayers[0])/255.*100,0)
set lEq=1
set lEQ=6+udg_i_DTAX_SC_players_count+udg_i_DTAX_SE_players_count
loop
exitwhen lEq>lEQ
call MultiboardSetItemWidthBJ(udg_mb_DTAX_game_kd_multiboard,1,lEq,9.8)
call MultiboardSetItemWidthBJ(udg_mb_DTAX_game_kd_multiboard,2,lEq,4.2)
call MultiboardSetItemWidthBJ(udg_mb_DTAX_game_kd_multiboard,3,lEq,4.)
call MultiboardSetItemWidthBJ(udg_mb_DTAX_game_kd_multiboard,4,lEq,4.6)
call MultiboardSetItemColorBJ(udg_mb_DTAX_game_kd_multiboard,2,lEq,86.2,86.2,.0,0)
call MultiboardSetItemColorBJ(udg_mb_DTAX_game_kd_multiboard,3,lEq,100.,.0,.0,0)
call MultiboardSetItemColorBJ(udg_mb_DTAX_game_kd_multiboard,4,lEq,.0,5.,100.,0)
set lEq=lEq+1
endloop
set lEq=1
set lEQ=4
loop
exitwhen lEq>lEQ
set lis=1
set liS=6+udg_i_DTAX_SC_players_count+udg_i_DTAX_SE_players_count
loop
exitwhen lis>liS
call MultiboardSetItemStyleBJ(udg_mb_DTAX_game_kd_multiboard,lEq,lis,true,false)
set lis=lis+1
endloop
set lEq=lEq+1
endloop
set lEq=1
set lEQ=udg_i_DTAX_SE_players_count
loop
exitwhen lEq>lEQ
call MultiboardSetItemStyleBJ(udg_mb_DTAX_game_kd_multiboard,1,lEq+2,true,true)
call MultiboardSetItemValueBJ(udg_mb_DTAX_game_kd_multiboard,1,lEq+2,GetPlayerName(udg_pA_DTAX_SE_players[lEq]))
call MultiboardSetItemColorBJ(udg_mb_DTAX_game_kd_multiboard,1,lEq+2,Color2DigitI(udg_pA_DTAX_SE_players[lEq])/255.*100,Color2DigitII(udg_pA_DTAX_SE_players[lEq])/255.*100,Color2DigitIII(udg_pA_DTAX_SE_players[lEq])/255.*100,0)
call MultiboardSetItemValueBJ(udg_mb_DTAX_game_kd_multiboard,2,(lEq+2),"     ")
call MultiboardSetItemValueBJ(udg_mb_DTAX_game_kd_multiboard,3,(lEq+2),"   0")
call MultiboardSetItemValueBJ(udg_mb_DTAX_game_kd_multiboard,4,(lEq+2),"    0")
set lEq=lEq+1
endloop
set lEq=1
set lEQ=udg_i_DTAX_SC_players_count
loop
exitwhen lEq>lEQ
call MultiboardSetItemStyleBJ(udg_mb_DTAX_game_kd_multiboard,1,lEq+3+udg_i_DTAX_SE_players_count,true,true)
call MultiboardSetItemValueBJ(udg_mb_DTAX_game_kd_multiboard,1,lEq+3+udg_i_DTAX_SE_players_count,GetPlayerName(udg_pA_DTAX_SC_players[lEq]))
call MultiboardSetItemColorBJ(udg_mb_DTAX_game_kd_multiboard,1,lEq+3+udg_i_DTAX_SE_players_count,Color2DigitI(udg_pA_DTAX_SC_players[lEq])/255.*100,Color2DigitII(udg_pA_DTAX_SC_players[lEq])/255.*100,Color2DigitIII(udg_pA_DTAX_SC_players[lEq])/255.*100,0)
call MultiboardSetItemValueBJ(udg_mb_DTAX_game_kd_multiboard,2,(lEq+3+udg_i_DTAX_SE_players_count),"     ")
call MultiboardSetItemValueBJ(udg_mb_DTAX_game_kd_multiboard,3,(lEq+3+udg_i_DTAX_SE_players_count),"   0")
call MultiboardSetItemValueBJ(udg_mb_DTAX_game_kd_multiboard,4,(lEq+3+udg_i_DTAX_SE_players_count),"    0")
set lEq=lEq+1
endloop
call MultiboardSetItemValueBJ(udg_mb_DTAX_game_kd_multiboard,1,6+udg_i_DTAX_SC_players_count+udg_i_DTAX_SE_players_count-2,"Time Elapsed")
call MultiboardSetItemColorBJ(udg_mb_DTAX_game_kd_multiboard,3,6+udg_i_DTAX_SC_players_count+udg_i_DTAX_SE_players_count-2,100.,100.,100.,0)
call MultiboardSetItemValueBJ(udg_mb_DTAX_game_kd_multiboard,1,6+udg_i_DTAX_SC_players_count+udg_i_DTAX_SE_players_count-1,(udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(udg_pA_DTAX_SEPlayers[0])]+("Towers Lost"+"|r")))
call MultiboardSetItemValueBJ(udg_mb_DTAX_game_kd_multiboard,1,6+udg_i_DTAX_SC_players_count+udg_i_DTAX_SE_players_count,(udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(udg_pA_DTAX_SCPlayers[0])]+("Towers Lost"+"|r")))
call MultiboardSetItemValueBJ(udg_mb_DTAX_game_kd_multiboard,3,6+udg_i_DTAX_SC_players_count+udg_i_DTAX_SE_players_count-1,"    0")
call MultiboardSetItemValueBJ(udg_mb_DTAX_game_kd_multiboard,3,6+udg_i_DTAX_SC_players_count+udg_i_DTAX_SE_players_count,"    0")
call MultiboardDisplay(udg_mb_DTAX_game_kd_multiboard,true)
if udg_b_DTAX_observer_slot_used and(GetLocalPlayer()==udg_p_DTAX_SE or GetLocalPlayer()==udg_p_DTAX_SC)then
call MultiboardDisplay(udg_mb_DTAX_game_kd_multiboard,false)
endif
endfunction
function StartTrigger_KD_Show takes nothing returns nothing
set gg_trg_KD_Show=CreateTrigger()
call TriggerRegisterTimerEventSingle(gg_trg_KD_Show,.01)
call TriggerAddAction(gg_trg_KD_Show,function Trig_KD_Show_Actions)
endfunction
function InitTrig_KD_Show takes nothing returns nothing
endfunction
function Trig_KD_Update_Actions takes nothing returns nothing
local integer lEq
local integer lEQ
call MultiboardSetItemValueBJ(udg_mb_DTAX_game_kd_multiboard,3,2,("   "+I2S(udg_iA_DTAX_iA_kill_death_counter[GetPlayerId(udg_pA_DTAX_SEPlayers[0])])))
call MultiboardSetItemValueBJ(udg_mb_DTAX_game_kd_multiboard,4,2,("    "+I2S(udg_iA_DTAX_kill_counter[GetPlayerId(udg_pA_DTAX_SEPlayers[0])])))
call MultiboardSetItemValueBJ(udg_mb_DTAX_game_kd_multiboard,3,3+udg_i_DTAX_SE_players_count,("   "+I2S(udg_iA_DTAX_iA_kill_death_counter[GetPlayerId(udg_pA_DTAX_SCPlayers[0])])))
call MultiboardSetItemValueBJ(udg_mb_DTAX_game_kd_multiboard,4,3+udg_i_DTAX_SE_players_count,("    "+I2S(udg_iA_DTAX_kill_counter[GetPlayerId(udg_pA_DTAX_SCPlayers[0])])))
set lEq=1
set lEQ=udg_i_DTAX_SE_players_count
loop
exitwhen lEq>lEQ
call MultiboardSetItemValueBJ(udg_mb_DTAX_game_kd_multiboard,3,(lEq+2),("   "+I2S(udg_iA_DTAX_iA_kill_death_counter[GetPlayerId(udg_pA_DTAX_SE_players[lEq])])))
call MultiboardSetItemValueBJ(udg_mb_DTAX_game_kd_multiboard,4,(lEq+2),("    "+I2S(udg_iA_DTAX_kill_counter[GetPlayerId(udg_pA_DTAX_SE_players[lEq])])))
set lEq=lEq+1
endloop
set lEq=1
set lEQ=udg_i_DTAX_SC_players_count
loop
exitwhen lEq>lEQ
call MultiboardSetItemValueBJ(udg_mb_DTAX_game_kd_multiboard,3,(lEq+3+udg_i_DTAX_SE_players_count),("   "+I2S(udg_iA_DTAX_iA_kill_death_counter[GetPlayerId(udg_pA_DTAX_SC_players[lEq])])))
call MultiboardSetItemValueBJ(udg_mb_DTAX_game_kd_multiboard,4,(lEq+3+udg_i_DTAX_SE_players_count),("    "+I2S(udg_iA_DTAX_kill_counter[GetPlayerId(udg_pA_DTAX_SC_players[lEq])])))
set lEq=lEq+1
endloop
endfunction
function StartTrigger_KD_Update takes nothing returns nothing
set gg_trg_KD_Update=CreateTrigger()
call TriggerAddAction(gg_trg_KD_Update,function Trig_KD_Update_Actions)
endfunction
function InitTrig_KD_Update takes nothing returns nothing
endfunction
function Trig_KD_Refresh_Actions takes nothing returns nothing
local integer lEq
local integer lEQ
local string lgd
if udg_b_DTAX_observer_slot_used and(GetLocalPlayer()==udg_p_DTAX_SE or GetLocalPlayer()==udg_p_DTAX_SC)then
else
call MultiboardDisplay(udg_mb_DTAX_game_kd_multiboard,true)
endif
call SetWaterBaseColor(0,0,255,255)
set lEq=1
set lEQ=udg_i_DTAX_SE_players_count
loop
exitwhen lEq>lEQ
if udg_uA_DTAX_player_hero_unit[GetPlayerId(udg_pA_DTAX_SE_players[lEq])]!=null then
call MultiboardSetItemIconBJ(udg_mb_DTAX_game_kd_multiboard,1,lEq+2,udg_sA_DTAX_HeroIcons[GetUnitPointValue(udg_uA_DTAX_player_hero_unit[GetPlayerId(udg_pA_DTAX_SE_players[lEq])])])
endif
if((GetPlayerState(Player(GetPlayerId(udg_pA_DTAX_SE_players[lEq])),PLAYER_STATE_RESOURCE_FOOD_USED)==0)and udg_uA_DTAX_player_hero_unit[GetPlayerId(udg_pA_DTAX_SE_players[lEq])]!=null and TimerGetRemaining(udg_tA_DTAX_hero_revive_timer[GetPlayerId(udg_pA_DTAX_SE_players[lEq])])>0)then
call MultiboardSetItemValueBJ(udg_mb_DTAX_game_kd_multiboard,2,(lEq+2),("    "+I2S(R2I(TimerGetRemaining(udg_tA_DTAX_hero_revive_timer[GetPlayerId(udg_pA_DTAX_SE_players[lEq])])))))
else
call MultiboardSetItemValueBJ(udg_mb_DTAX_game_kd_multiboard,2,(lEq+2),"     ")
endif
set lEq=lEq+1
endloop
set lEq=1
set lEQ=udg_i_DTAX_SC_players_count
loop
exitwhen lEq>lEQ
if udg_uA_DTAX_player_hero_unit[GetPlayerId(udg_pA_DTAX_SC_players[lEq])]!=null then
call MultiboardSetItemIconBJ(udg_mb_DTAX_game_kd_multiboard,1,lEq+3+udg_i_DTAX_SE_players_count,udg_sA_DTAX_HeroIcons[GetUnitPointValue(udg_uA_DTAX_player_hero_unit[GetPlayerId(udg_pA_DTAX_SC_players[lEq])])])
endif
if((GetPlayerState(Player(GetPlayerId(udg_pA_DTAX_SC_players[lEq])),PLAYER_STATE_RESOURCE_FOOD_USED)==0)and udg_uA_DTAX_player_hero_unit[GetPlayerId(udg_pA_DTAX_SC_players[lEq])]!=null and TimerGetRemaining(udg_tA_DTAX_hero_revive_timer[GetPlayerId(udg_pA_DTAX_SC_players[lEq])])>0)then
call MultiboardSetItemValueBJ(udg_mb_DTAX_game_kd_multiboard,2,(lEq+3+udg_i_DTAX_SE_players_count),("    "+I2S(R2I(TimerGetRemaining(udg_tA_DTAX_hero_revive_timer[GetPlayerId(udg_pA_DTAX_SC_players[lEq])])))))
else
call MultiboardSetItemValueBJ(udg_mb_DTAX_game_kd_multiboard,2,(lEq+3+udg_i_DTAX_SE_players_count),"     ")
endif
set lEq=lEq+1
endloop
set udg_i_DTAX_game_hours=((R2I(TimerGetElapsed(udg_t_DTAX_game_time))/60)-(1/2))
set udg_i_DTAX_game_minutes=ModuloInteger(R2I(TimerGetElapsed(udg_t_DTAX_game_time)),60)
if(udg_i_DTAX_game_minutes<10)then
set lgd=I2S(udg_i_DTAX_game_hours)+":0"+I2S(udg_i_DTAX_game_minutes)
else
set lgd=I2S(udg_i_DTAX_game_hours)+":"+I2S(udg_i_DTAX_game_minutes)
endif
call MultiboardSetItemValueBJ(udg_mb_DTAX_game_kd_multiboard,3,6+udg_i_DTAX_SC_players_count+udg_i_DTAX_SE_players_count-2," "+lgd)
call MultiboardSetItemValueBJ(udg_mb_DTAX_game_kd_multiboard,3,6+udg_i_DTAX_SC_players_count+udg_i_DTAX_SE_players_count-1,udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(udg_pA_DTAX_SEPlayers[0])]+"    "+I2S(udg_iA_DTAX_towers_lost_each_side[1]))
call MultiboardSetItemValueBJ(udg_mb_DTAX_game_kd_multiboard,3,6+udg_i_DTAX_SC_players_count+udg_i_DTAX_SE_players_count,udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(udg_pA_DTAX_SCPlayers[0])]+"    "+I2S(udg_iA_DTAX_towers_lost_each_side[2])+"|r")
endfunction
function StartTrigger_KD_Refresh takes nothing returns nothing
set gg_trg_KD_Refresh=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(gg_trg_KD_Refresh,1.)
call TriggerAddAction(gg_trg_KD_Refresh,function Trig_KD_Refresh_Actions)
endfunction
function InitTrig_KD_Refresh takes nothing returns nothing
endfunction
function Trig_CS_Board_Actions takes nothing returns nothing
set udg_lbA_DTAX_CS_boards[GetPlayerId(udg_pA_DTAX_SEPlayers[1])]=CreateLeaderboard()
set udg_lbA_DTAX_CS_boards[GetPlayerId(udg_pA_DTAX_SEPlayers[2])]=CreateLeaderboard()
set udg_lbA_DTAX_CS_boards[GetPlayerId(udg_pA_DTAX_SEPlayers[3])]=CreateLeaderboard()
set udg_lbA_DTAX_CS_boards[GetPlayerId(udg_pA_DTAX_SEPlayers[4])]=CreateLeaderboard()
set udg_lbA_DTAX_CS_boards[GetPlayerId(udg_pA_DTAX_SEPlayers[5])]=CreateLeaderboard()
set udg_lbA_DTAX_CS_boards[GetPlayerId(udg_pA_DTAX_SCPlayers[1])]=CreateLeaderboard()
set udg_lbA_DTAX_CS_boards[GetPlayerId(udg_pA_DTAX_SCPlayers[2])]=CreateLeaderboard()
set udg_lbA_DTAX_CS_boards[GetPlayerId(udg_pA_DTAX_SCPlayers[3])]=CreateLeaderboard()
set udg_lbA_DTAX_CS_boards[GetPlayerId(udg_pA_DTAX_SCPlayers[4])]=CreateLeaderboard()
set udg_lbA_DTAX_CS_boards[GetPlayerId(udg_pA_DTAX_SCPlayers[5])]=CreateLeaderboard()
call PlayerSetLeaderboard(udg_pA_DTAX_SEPlayers[1],udg_lbA_DTAX_CS_boards[GetPlayerId(udg_pA_DTAX_SEPlayers[1])])
call PlayerSetLeaderboard(udg_pA_DTAX_SEPlayers[2],udg_lbA_DTAX_CS_boards[GetPlayerId(udg_pA_DTAX_SEPlayers[2])])
call PlayerSetLeaderboard(udg_pA_DTAX_SEPlayers[3],udg_lbA_DTAX_CS_boards[GetPlayerId(udg_pA_DTAX_SEPlayers[3])])
call PlayerSetLeaderboard(udg_pA_DTAX_SEPlayers[4],udg_lbA_DTAX_CS_boards[GetPlayerId(udg_pA_DTAX_SEPlayers[4])])
call PlayerSetLeaderboard(udg_pA_DTAX_SEPlayers[5],udg_lbA_DTAX_CS_boards[GetPlayerId(udg_pA_DTAX_SEPlayers[5])])
call PlayerSetLeaderboard(udg_pA_DTAX_SCPlayers[1],udg_lbA_DTAX_CS_boards[GetPlayerId(udg_pA_DTAX_SCPlayers[1])])
call PlayerSetLeaderboard(udg_pA_DTAX_SCPlayers[2],udg_lbA_DTAX_CS_boards[GetPlayerId(udg_pA_DTAX_SCPlayers[2])])
call PlayerSetLeaderboard(udg_pA_DTAX_SCPlayers[3],udg_lbA_DTAX_CS_boards[GetPlayerId(udg_pA_DTAX_SCPlayers[3])])
call PlayerSetLeaderboard(udg_pA_DTAX_SCPlayers[4],udg_lbA_DTAX_CS_boards[GetPlayerId(udg_pA_DTAX_SCPlayers[4])])
call PlayerSetLeaderboard(udg_pA_DTAX_SCPlayers[5],udg_lbA_DTAX_CS_boards[GetPlayerId(udg_pA_DTAX_SCPlayers[5])])
call LeaderboardDisplay(udg_lbA_DTAX_CS_boards[GetPlayerId(udg_pA_DTAX_SEPlayers[1])],false)
call LeaderboardDisplay(udg_lbA_DTAX_CS_boards[GetPlayerId(udg_pA_DTAX_SEPlayers[2])],false)
call LeaderboardDisplay(udg_lbA_DTAX_CS_boards[GetPlayerId(udg_pA_DTAX_SEPlayers[3])],false)
call LeaderboardDisplay(udg_lbA_DTAX_CS_boards[GetPlayerId(udg_pA_DTAX_SEPlayers[4])],false)
call LeaderboardDisplay(udg_lbA_DTAX_CS_boards[GetPlayerId(udg_pA_DTAX_SEPlayers[5])],false)
call LeaderboardDisplay(udg_lbA_DTAX_CS_boards[GetPlayerId(udg_pA_DTAX_SCPlayers[1])],false)
call LeaderboardDisplay(udg_lbA_DTAX_CS_boards[GetPlayerId(udg_pA_DTAX_SCPlayers[2])],false)
call LeaderboardDisplay(udg_lbA_DTAX_CS_boards[GetPlayerId(udg_pA_DTAX_SCPlayers[3])],false)
call LeaderboardDisplay(udg_lbA_DTAX_CS_boards[GetPlayerId(udg_pA_DTAX_SCPlayers[4])],false)
call LeaderboardDisplay(udg_lbA_DTAX_CS_boards[GetPlayerId(udg_pA_DTAX_SCPlayers[5])],false)
call LeaderboardSetLabelBJ(udg_lbA_DTAX_CS_boards[GetPlayerId(udg_pA_DTAX_SEPlayers[1])],"Creep Kills: 0 Denies: 0")
call LeaderboardSetLabelBJ(udg_lbA_DTAX_CS_boards[GetPlayerId(udg_pA_DTAX_SEPlayers[2])],"Creep Kills: 0 Denies: 0")
call LeaderboardSetLabelBJ(udg_lbA_DTAX_CS_boards[GetPlayerId(udg_pA_DTAX_SEPlayers[3])],"Creep Kills: 0 Denies: 0")
call LeaderboardSetLabelBJ(udg_lbA_DTAX_CS_boards[GetPlayerId(udg_pA_DTAX_SEPlayers[4])],"Creep Kills: 0 Denies: 0")
call LeaderboardSetLabelBJ(udg_lbA_DTAX_CS_boards[GetPlayerId(udg_pA_DTAX_SEPlayers[5])],"Creep Kills: 0 Denies: 0")
call LeaderboardSetLabelBJ(udg_lbA_DTAX_CS_boards[GetPlayerId(udg_pA_DTAX_SCPlayers[1])],"Creep Kills: 0 Denies: 0")
call LeaderboardSetLabelBJ(udg_lbA_DTAX_CS_boards[GetPlayerId(udg_pA_DTAX_SCPlayers[2])],"Creep Kills: 0 Denies: 0")
call LeaderboardSetLabelBJ(udg_lbA_DTAX_CS_boards[GetPlayerId(udg_pA_DTAX_SCPlayers[3])],"Creep Kills: 0 Denies: 0")
call LeaderboardSetLabelBJ(udg_lbA_DTAX_CS_boards[GetPlayerId(udg_pA_DTAX_SCPlayers[4])],"Creep Kills: 0 Denies: 0")
call LeaderboardSetLabelBJ(udg_lbA_DTAX_CS_boards[GetPlayerId(udg_pA_DTAX_SCPlayers[5])],"Creep Kills: 0 Denies: 0")
endfunction
function StartTrigger_CS_Board takes nothing returns nothing
set gg_trg_CS_Board=CreateTrigger()
call TriggerRegisterTimerEventSingle(gg_trg_CS_Board,1.)
call TriggerAddAction(gg_trg_CS_Board,function Trig_CS_Board_Actions)
endfunction
function InitTrig_CS_Board takes nothing returns nothing
endfunction
function I6I6 takes nothing returns nothing
local integer lIJ=udg_i_DTAX_SE_players_count
local integer lIk=udg_i_DTAX_SC_players_count
local integer lIM=25+lIJ+lIk+4
local integer lIn=1+lIJ+lIk
set udg_Stat_Board=CreateMultiboard()
call MultiboardSetItemsWidth(udg_Stat_Board,.07)
call MultiboardSetRowCount(udg_Stat_Board,lIM)
call MultiboardSetColumnCount(udg_Stat_Board,lIn)
call MultiboardSetTitleText(udg_Stat_Board,"DotA Allstars Scores "+" - "+udg_s_DTAX_gamemode_name)
call MultiboardMinimize(udg_Stat_Board,false)
if GetLocalPlayer()==udg_p_DTAX_SE or GetLocalPlayer()==udg_p_DTAX_SC then
call MultiboardDisplay(udg_Stat_Board,true)
endif
endfunction
function ItIt takes player pEk returns string
return udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(pEk)]+GetPlayerName(pEk)+"|r"
endfunction
function ITIT takes player pEk returns string
return ReturnHeroName(udg_uA_DTAX_player_hero_unit[GetPlayerId(pEk)])
endfunction
function ISIS takes player pEk,integer pi0 returns string
return ItemIconDataBaseGet(UnitItemInSlot(udg_uA_DTAX_player_hero_unit[GetPlayerId(pEk)],pi0-1))
endfunction
function IVIV takes player ppp returns string
return I2S(GetUnitLevel(udg_uA_DTAX_player_hero_unit[GetPlayerId(ppp)]))
endfunction
function ReturnGoldOfPlayerAsStringIV takes player pEk returns string
return I2S(GetPlayerState(pEk,PLAYER_STATE_RESOURCE_GOLD))
endfunction
function IWIW takes player pEk returns string
return I2S(udg_Stat_SomeStat4[GetPlayerId(pEk)])
endfunction
function IxIx takes player pEk returns string
return I2S(udg_Stat_SomeHeroKillPoints[GetPlayerId(pEk)])
endfunction
function IwIw takes player ppp returns string
return I2S(GetInteger("Stats"+I2S(GetPlayerId(ppp)),"NumOfWards"))
endfunction
function IXIX takes player pEk returns string
return I2S(udg_iA_DTAX_iA_kill_death_counter[GetPlayerId(pEk)])
endfunction
function IyIy takes player pEk returns string
return I2S(udg_iA_DTAX_kill_counter[GetPlayerId(pEk)])
endfunction
function I4I4 takes player pEk returns string
local integer lIF=udg_Stat_SomeStat3[GetPlayerId(pEk)]
local string lgd
local integer lIg
local integer lIG
set lIg=(lIF/60)-(1/2)
set lIG=ModuloInteger(lIF,60)
if(lIG<10)then
set lgd=I2S(lIg)+":0"+I2S(lIG)
else
set lgd=I2S(lIg)+":"+I2S(lIG)
endif
return lgd
endfunction
function IUIU takes player ppp returns string
return I2S(GetInteger("Stats"+I2S(GetPlayerId(ppp)),"NumOfConsumables"))
endfunction
function IvIv takes player ppp returns string
return I2S(GetInteger("Stats"+I2S(GetPlayerId(ppp)),"NumOfVeggies"))
endfunction
function I3I3 takes player pEk returns string
return I2S(udg_HeroesKilledAndTowersDestroyed[GetPlayerId(pEk)])
endfunction
function IYIY takes player pEk returns string
return I2S(udg_iA_DTAX_enemy_mobs_killed[GetPlayerId(pEk)])
endfunction
function IzIz takes player pEk returns string
return I2S(udg_iA_DTAX_ally_mobs_killed[GetPlayerId(pEk)])
endfunction
function IZIZ takes player ppp returns string
return I2S(GetInteger("Stats"+I2S(GetPlayerId(ppp)),"NumOfNeutrals"))
endfunction
function I0I0 takes player pEk returns string
return I2S(udg_Stat_SomeStat1[GetPlayerId(pEk)])
endfunction
function I1I1 takes player pEk returns string
return I2S(udg_Stat_SomeStat2[GetPlayerId(pEk)])
endfunction
function I2I2 takes player pEk returns string
return I2S(udg_Stat_SomeChainKillsPoints[GetPlayerId(pEk)])
endfunction
function IsIs takes player pEk returns string
return udg_sA_DTAX_HeroIcons[GetUnitPointValue(udg_uA_DTAX_player_hero_unit[GetPlayerId(pEk)])]
endfunction
function I5I5 takes player pFb,player pFB returns string
local integer lkk=GetInteger("Stats"+I2S(GetPlayerId(pFb)),"Killed "+I2S(GetPlayerId(pFB)))
local integer ldd=GetInteger("Stats"+I2S(GetPlayerId(pFb)),"Died To "+I2S(GetPlayerId(pFB)))
if lkk<1 then
set lkk=0
endif
if ldd<1 then
set ldd=0
endif
return I2S(lkk)+"/"+I2S(ldd)
endfunction
function IRIR takes player pEk returns string
return udg_bJ[GetPlayerId(pEk)]
endfunction
function IqIq takes nothing returns string
local string lgd
if(udg_i_DTAX_game_minutes<10)then
set lgd=I2S(udg_i_DTAX_game_hours)+":0"+I2S(udg_i_DTAX_game_minutes)
else
set lgd=I2S(udg_i_DTAX_game_hours)+":"+I2S(udg_i_DTAX_game_minutes)
endif
return lgd
endfunction
function Trig_FinalStatBoard_Refresh_Actions takes nothing returns nothing
local integer lIJ=udg_i_DTAX_SE_players_count
local integer lIk=udg_i_DTAX_SC_players_count
local player array lIK
local player array lIl
local integer lIL
local integer lIm
local integer lIM=25+lIJ+lIk+4
local integer lIn=1+lIJ+lIk
local multiboarditem lIN
local integer lii
local integer lxx
local integer lIp
local integer lIP
local string lee="|r"
local string lc0="|cff99ccff"
if GetTriggerExecCount(GetTriggeringTrigger())==1 then
call I6I6()
endif
call MultiboardSetTitleText(udg_Stat_Board,"DotA Allstars Scores "+" - "+udg_s_DTAX_gamemode_name+" - "+"|c00ff0303"+I2S(udg_iA_DTAX_iA_kill_death_counter[GetPlayerId(udg_pA_DTAX_SEPlayers[0])])+"|r"+"/"+"|c0020c000"+I2S(udg_iA_DTAX_kill_counter[GetPlayerId(udg_pA_DTAX_SEPlayers[0])])+"|r")
set lxx=1
set lii=1
loop
exitwhen lii>5
if PlayerIsActive(udg_pA_DTAX_SEPlayers[lii])or GetPlayerSlotState(udg_pA_DTAX_SEPlayers[lii])==PLAYER_SLOT_STATE_LEFT then
set lIK[lxx]=udg_pA_DTAX_SEPlayers[lii]
set lxx=lxx+1
endif
set lii=lii+1
endloop
set lxx=1
set lii=1
loop
exitwhen lii>5
if PlayerIsActive(udg_pA_DTAX_SCPlayers[lii])or GetPlayerSlotState(udg_pA_DTAX_SCPlayers[lii])==PLAYER_SLOT_STATE_LEFT then
set lIl[lxx]=udg_pA_DTAX_SCPlayers[lii]
set lxx=lxx+1
endif
set lii=lii+1
endloop
set lii=0
set lIm=0
loop
exitwhen lii>lIM
set lIN=MultiboardGetItem(udg_Stat_Board,lii,lIm)
call MultiboardSetItemWidth(lIN,.075)
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIL=0
set lIm=0
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,false,false)
call MultiboardReleaseItem(lIN)
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,ItIt(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,ItIt(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIm=0
set lIL=0
set lIL=lIL+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Hero"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,ITIT(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,ITIT(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIm=0
set lIL=lIL+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Item 1"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,false,true)
call MultiboardSetItemIcon(lIN,ISIS(lIK[lii],1))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,false,true)
call MultiboardSetItemIcon(lIN,ISIS(lIl[lii],1))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIm=0
set lIL=lIL+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Item 2"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,false,true)
call MultiboardSetItemIcon(lIN,ISIS(lIK[lii],2))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,false,true)
call MultiboardSetItemIcon(lIN,ISIS(lIl[lii],2))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIm=0
set lIL=lIL+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Item 3"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,false,true)
call MultiboardSetItemIcon(lIN,ISIS(lIK[lii],3))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,false,true)
call MultiboardSetItemIcon(lIN,ISIS(lIl[lii],3))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIm=0
set lIL=lIL+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Item 4"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,false,true)
call MultiboardSetItemIcon(lIN,ISIS(lIK[lii],4))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,false,true)
call MultiboardSetItemIcon(lIN,ISIS(lIl[lii],4))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIm=0
set lIL=lIL+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Item 5"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,false,true)
call MultiboardSetItemIcon(lIN,ISIS(lIK[lii],5))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,false,true)
call MultiboardSetItemIcon(lIN,ISIS(lIl[lii],5))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIm=0
set lIL=lIL+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Item 6"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,false,true)
call MultiboardSetItemIcon(lIN,ISIS(lIK[lii],6))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,false,true)
call MultiboardSetItemIcon(lIN,ISIS(lIl[lii],6))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIm=0
set lIL=lIL+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Hero Level"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IVIV(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IVIV(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIm=0
set lIL=lIL+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Current Gold"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,ReturnGoldOfPlayerAsStringIV(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,ReturnGoldOfPlayerAsStringIV(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIm=0
set lIL=lIL+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Hero Kill Gold"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IWIW(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IWIW(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIm=0
set lIL=lIL+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Gold Lost"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IxIx(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IxIx(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIm=0
set lIL=lIL+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Wards"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IwIw(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IwIw(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIm=0
set lIL=lIL+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Total Kills"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IXIX(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IXIX(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIm=0
set lIL=lIL+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Total Deaths"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IyIy(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IyIy(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIm=0
set lIL=lIL+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Time Dead"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,I4I4(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,I4I4(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIm=0
set lIL=lIL+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Consumables"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IUIU(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IUIU(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIm=0
set lIL=lIL+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Veggies"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IvIv(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IvIv(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIm=0
set lIL=lIL+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Towers Killed"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,I3I3(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,I3I3(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIm=0
set lIL=lIL+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Creep Kills"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IYIY(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IYIY(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIm=0
set lIL=lIL+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Creep Denies"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IzIz(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IzIz(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIm=0
set lIL=lIL+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Neutral Kills"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IZIZ(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IZIZ(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIm=0
set lIL=lIL+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Double Kills"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,I0I0(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,I0I0(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIm=0
set lIL=lIL+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Triple Kills"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,I1I1(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,I1I1(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIm=0
set lIL=lIL+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Longest Spree"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,I2I2(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,I2I2(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lxx=1
loop
exitwhen lxx>lIJ
set lIm=0
set lIL=lIL+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,true)
call MultiboardSetItemIcon(lIN,IsIs(lIK[lxx]))
call MultiboardSetItemValue(lIN,lc0+" K/D"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,I5I5(lIK[lii],lIK[lxx]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,I5I5(lIl[lii],lIK[lxx]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lxx=lxx+1
endloop
set lxx=1
loop
exitwhen lxx>lIk
set lIm=0
set lIL=lIL+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,true)
call MultiboardSetItemIcon(lIN,IsIs(lIl[lxx]))
call MultiboardSetItemValue(lIN,lc0+" K/D"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,I5I5(lIK[lii],lIl[lxx]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,I5I5(lIl[lii],lIl[lxx]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lxx=lxx+1
endloop
set lIm=0
set lIL=lIL+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+" "+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN," ")
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN," ")
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIm=0
set lIL=lIL+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Left At"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IRIR(lIK[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IRIR(lIl[lii]))
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIm=0
set lIL=lIL+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Winner"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN," ")
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN," ")
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,1)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,udg_bI)
call MultiboardReleaseItem(lIN)
set lIm=0
set lIL=lIL+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,lc0+"Game Time"+lee)
call MultiboardReleaseItem(lIN)
set lIm=0
set lii=1
loop
exitwhen lii>lIJ
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN," ")
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lii=1
loop
exitwhen lii>lIk
set lIm=lIm+1
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,lIm)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN," ")
call MultiboardReleaseItem(lIN)
set lii=lii+1
endloop
set lIN=MultiboardGetItem(udg_Stat_Board,lIL,1)
call MultiboardSetItemStyle(lIN,true,false)
call MultiboardSetItemValue(lIN,IqIq())
call MultiboardReleaseItem(lIN)
endfunction
function StartTrigger_FinalStatBoard_Refresh takes nothing returns nothing
set gg_trg_FinalStatBoard_Refresh=CreateTrigger()
call TriggerRegisterTimerEvent(gg_trg_FinalStatBoard_Refresh,1,true)
call TriggerAddAction(gg_trg_FinalStatBoard_Refresh,function Trig_FinalStatBoard_Refresh_Actions)
endfunction
function InitTrig_FinalStatBoard_Refresh takes nothing returns nothing
endfunction
function Trig_NeutralKillsCounter_Actions takes nothing returns nothing
call SetInteger("Stats"+I2S(GetPlayerId(GetOwningPlayer(GetKillingUnit()))),"NumOfNeutrals",GetInteger("Stats"+I2S(GetPlayerId(GetOwningPlayer(GetKillingUnit()))),"NumOfNeutrals")+1)
endfunction
function Trig_NeutralKillsCounter_Conditions takes nothing returns boolean
return GetOwningPlayer(GetTriggerUnit())==udg_p_DTAX_Player12
endfunction
function StartTrigger_NeutralKillsCounter takes nothing returns nothing
set gg_trg_NeutralKillsCounter=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_NeutralKillsCounter,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddAction(gg_trg_NeutralKillsCounter,function Trig_NeutralKillsCounter_Actions)
call TriggerAddCondition(gg_trg_NeutralKillsCounter,Condition(function Trig_NeutralKillsCounter_Conditions))
endfunction
function InitTrig_NeutralKillsCounter takes nothing returns nothing
endfunction
function Trig_SelledItemsCounter_Actions takes nothing returns nothing
local player lpp=GetOwningPlayer(GetBuyingUnit())
local integer lfX=GetItemTypeId(GetSoldItem())
local integer lJQ=GetInteger("Stats"+I2S(GetPlayerId(lpp)),"NumOfConsumables")
local integer lJr=GetInteger("Stats"+I2S(GetPlayerId(lpp)),"NumOfVeggies")
local integer lJR=GetInteger("Stats"+I2S(GetPlayerId(lpp)),"NumOfWards")
if lfX=='sor7'or lfX=='tgrh'then
set lJR=lJR+3
set lJQ=lJQ+3
endif
if lfX=='silk'then
set lJr=lJr+2
set lJQ=lJQ+2
endif
if lfX=='sman'or lfX=='plcl'or lfX=='stwp'or lfX=='sor8'then
set lJQ=lJQ+1
endif
call SetInteger("Stats"+I2S(GetPlayerId(lpp)),"NumOfConsumables",lJQ)
call SetInteger("Stats"+I2S(GetPlayerId(lpp)),"NumOfVeggies",lJr)
call SetInteger("Stats"+I2S(GetPlayerId(lpp)),"NumOfWards",lJR)
endfunction
function StartTrigger_SelledItemsCounter takes nothing returns nothing
set gg_trg_SelledItemsCounter=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_SelledItemsCounter,EVENT_PLAYER_UNIT_SELL_ITEM)
call TriggerAddAction(gg_trg_SelledItemsCounter,function Trig_SelledItemsCounter_Actions)
endfunction
function InitTrig_SelledItemsCounter takes nothing returns nothing
endfunction
function kckc takes nothing returns nothing
local timer ltt=GetExpiredTimer()
local string lf5=H2Tx(ltt)
local unit lFB=GetUnit(lf5,"Target")
local effect lFX=GetFX(lf5,"FX")
local real lFC=GetReal(lf5,"SourceX")
local real lFd=GetReal(lf5,"SourceY")
if GetUnitState(lFB,UNIT_STATE_LIFE)>1 then
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl",GetUnitX(lFB),GetUnitY(lFB)))
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\NightElf\\Blink\\BlinkTarget.mdl",lFC,lFd))
call SetUnitPosition(lFB,lFC,lFd)
endif
call DestroyEffect(lFX)
call KillTimer(ltt)
endfunction
function Bottle_Recall takes nothing returns nothing
local unit Fd=GetSpellTargetUnit()
local real Fe=GetUnitX(Fd)
local real FE=GetUnitY(Fd)
local effect FX=AddSpecialEffect("Abilities\\Weapons\\SpiritOfVengeanceMissile\\SpiritOfVengeanceMissile.mdl",Fe,FE)
local timer t=CreateTimer()
local string f8=H2Tx(t)
call TimedEffect("Abilities\\Weapons\\SpiritOfVengeanceMissile\\SpiritOfVengeanceMissile.mdl",Fd,"overhead",15)
call SetHandle(f8,"FX",FX)
call SetHandle(f8,"Target",Fd)
call SetReal(f8,"SourceX",Fe)
call SetReal(f8,"SourceY",FE)
call TimerStart(t,15,false,function kckc)
endfunction
function InitTrig_Bottle_Recall takes nothing returns nothing
endfunction
function Trig_Waypoint_Final_Conditions takes nothing returns boolean
if((GetOwningPlayer(GetTriggerUnit())==udg_pA_DTAX_SEPlayers[0]))then
return true
endif
if((GetOwningPlayer(GetTriggerUnit())==udg_pA_DTAX_SCPlayers[0]))then
return true
endif
return false
endfunction
function Trig_Waypoint_Final_Actions takes nothing returns nothing
if(GetOwningPlayer(GetTriggerUnit())==udg_pA_DTAX_SEPlayers[0])then
call IssuePointOrderByIdLoc(GetTriggerUnit(),OrderId("attack"),udg_loc_DTAX_AttackToScourge)
else
call IssuePointOrderByIdLoc(GetTriggerUnit(),OrderId("attack"),udg_loc_DTAX_AttackToSentinel)
endif
endfunction
function StartTrigger_Waypoint_Final takes nothing returns nothing
set gg_trg_Waypoint_Final=CreateTrigger()
call TriggerRegisterUnitInRangeSimple(gg_trg_Waypoint_Final,300.,gg_unit_e00A_0104)
call TriggerRegisterUnitInRangeSimple(gg_trg_Waypoint_Final,300.,gg_unit_e00B_0103)
call TriggerRegisterUnitInRangeSimple(gg_trg_Waypoint_Final,300.,gg_unit_e00D_0102)
call TriggerAddCondition(gg_trg_Waypoint_Final,Condition(function Trig_Waypoint_Final_Conditions))
call TriggerAddAction(gg_trg_Waypoint_Final,function Trig_Waypoint_Final_Actions)
endfunction
function InitTrig_Waypoint_Final takes nothing returns nothing
endfunction
function Trig_Waypoint_MiddleSE_Conditions takes nothing returns boolean
if(not(GetOwningPlayer(GetTriggerUnit())==udg_pA_DTAX_SEPlayers[0]))then
return false
endif
return true
endfunction
function Trig_Waypoint_MiddleSE_Actions takes nothing returns nothing
call IssuePointOrderByIdLoc(GetTriggerUnit(),OrderId("attack"),udg_loc_DTAX_AttackToMid)
endfunction
function StartTrigger_Waypoint_MiddleSE takes nothing returns nothing
set gg_trg_Waypoint_MiddleSE=CreateTrigger()
call TriggerRegisterEnterRectSimple(gg_trg_Waypoint_MiddleSE,gg_rct_SentinelRangedCreepSpawnCenter)
call TriggerRegisterEnterRectSimple(gg_trg_Waypoint_MiddleSE,gg_rct_SentinelMeleeCreepSpawnCenter)
call TriggerAddCondition(gg_trg_Waypoint_MiddleSE,Condition(function Trig_Waypoint_MiddleSE_Conditions))
call TriggerAddAction(gg_trg_Waypoint_MiddleSE,function Trig_Waypoint_MiddleSE_Actions)
endfunction
function InitTrig_Waypoint_MiddleSE takes nothing returns nothing
endfunction
function Trig_Waypoint_MiddleSC_Conditions takes nothing returns boolean
if(not(GetOwningPlayer(GetTriggerUnit())==udg_pA_DTAX_SCPlayers[0]))then
return false
endif
return true
endfunction
function Trig_Waypoint_MiddleSC_Actions takes nothing returns nothing
call IssuePointOrderByIdLoc(GetTriggerUnit(),OrderId("attack"),udg_loc_DTAX_AttackToMid)
endfunction
function StartTrigger_Waypoint_MiddleSC takes nothing returns nothing
set gg_trg_Waypoint_MiddleSC=CreateTrigger()
call TriggerRegisterEnterRectSimple(gg_trg_Waypoint_MiddleSC,gg_rct_ScourgeRangedCreepSpawnCenter)
call TriggerRegisterEnterRectSimple(gg_trg_Waypoint_MiddleSC,gg_rct_ScourgeMeleeCreepSpawnCenter)
call TriggerAddCondition(gg_trg_Waypoint_MiddleSC,Condition(function Trig_Waypoint_MiddleSC_Conditions))
call TriggerAddAction(gg_trg_Waypoint_MiddleSC,function Trig_Waypoint_MiddleSC_Actions)
endfunction
function InitTrig_Waypoint_MiddleSC takes nothing returns nothing
endfunction
function Trig_Waypoint_LeftSE_Conditions takes nothing returns boolean
if(not(GetOwningPlayer(GetTriggerUnit())==udg_pA_DTAX_SEPlayers[0]))then
return false
endif
return true
endfunction
function Trig_Waypoint_LeftSE_Actions takes nothing returns nothing
call IssuePointOrderByIdLoc(GetTriggerUnit(),OrderId("attack"),udg_loc_DTAX_AttackToLeft)
endfunction
function StartTrigger_Waypoint_LeftSE takes nothing returns nothing
set gg_trg_Waypoint_LeftSE=CreateTrigger()
call TriggerRegisterEnterRectSimple(gg_trg_Waypoint_LeftSE,gg_rct_SentinelRangedCreepSpawnLeft)
call TriggerRegisterEnterRectSimple(gg_trg_Waypoint_LeftSE,gg_rct_SentinelMeleeCreepSpawnLeft)
call TriggerAddCondition(gg_trg_Waypoint_LeftSE,Condition(function Trig_Waypoint_LeftSE_Conditions))
call TriggerAddAction(gg_trg_Waypoint_LeftSE,function Trig_Waypoint_LeftSE_Actions)
endfunction
function InitTrig_Waypoint_LeftSE takes nothing returns nothing
endfunction
function Trig_Waypoint_LeftSC_Conditions takes nothing returns boolean
if(not(GetOwningPlayer(GetTriggerUnit())==udg_pA_DTAX_SCPlayers[0]))then
return false
endif
return true
endfunction
function Trig_Waypoint_LeftSC_Actions takes nothing returns nothing
call IssuePointOrderByIdLoc(GetTriggerUnit(),OrderId("attack"),udg_loc_DTAX_AttackToLeft)
endfunction
function StartTrigger_Waypoint_LeftSC takes nothing returns nothing
set gg_trg_Waypoint_LeftSC=CreateTrigger()
call TriggerRegisterEnterRectSimple(gg_trg_Waypoint_LeftSC,gg_rct_ScourgeMeleeCreepSpawnLeft)
call TriggerRegisterEnterRectSimple(gg_trg_Waypoint_LeftSC,gg_rct_ScourgeRangedCreepSpawnLeft)
call TriggerAddCondition(gg_trg_Waypoint_LeftSC,Condition(function Trig_Waypoint_LeftSC_Conditions))
call TriggerAddAction(gg_trg_Waypoint_LeftSC,function Trig_Waypoint_LeftSC_Actions)
endfunction
function InitTrig_Waypoint_LeftSC takes nothing returns nothing
endfunction
function Trig_Waypoint_RightSC_Conditions takes nothing returns boolean
if(not(GetOwningPlayer(GetTriggerUnit())==udg_pA_DTAX_SCPlayers[0]))then
return false
endif
return true
endfunction
function Trig_Waypoint_RightSC_Actions takes nothing returns nothing
call IssuePointOrderByIdLoc(GetTriggerUnit(),OrderId("attack"),udg_loc_DTAX_AttackToRight)
endfunction
function StartTrigger_Waypoint_RightSC takes nothing returns nothing
set gg_trg_Waypoint_RightSC=CreateTrigger()
call TriggerRegisterEnterRectSimple(gg_trg_Waypoint_RightSC,gg_rct_ScourgeRangedCreepSpawnRight)
call TriggerRegisterEnterRectSimple(gg_trg_Waypoint_RightSC,gg_rct_ScourgeMeleeCreepSpawnRight)
call TriggerAddCondition(gg_trg_Waypoint_RightSC,Condition(function Trig_Waypoint_RightSC_Conditions))
call TriggerAddAction(gg_trg_Waypoint_RightSC,function Trig_Waypoint_RightSC_Actions)
endfunction
function InitTrig_Waypoint_RightSC takes nothing returns nothing
endfunction
function Trig_Waypoint_RightSE_Conditions takes nothing returns boolean
if(not(GetOwningPlayer(GetTriggerUnit())==udg_pA_DTAX_SEPlayers[0]))then
return false
endif
return true
endfunction
function Trig_Waypoint_RightSE_Actions takes nothing returns nothing
call IssuePointOrderByIdLoc(GetTriggerUnit(),OrderId("attack"),udg_loc_DTAX_AttackToRight)
endfunction
function StartTrigger_Waypoint_RightSE takes nothing returns nothing
set gg_trg_Waypoint_RightSE=CreateTrigger()
call TriggerRegisterEnterRectSimple(gg_trg_Waypoint_RightSE,gg_rct_SentinelMeleeCreepSpawnRight)
call TriggerRegisterEnterRectSimple(gg_trg_Waypoint_RightSE,gg_rct_SentinelRangedCreepSpawnRight)
call TriggerAddCondition(gg_trg_Waypoint_RightSE,Condition(function Trig_Waypoint_RightSE_Conditions))
call TriggerAddAction(gg_trg_Waypoint_RightSE,function Trig_Waypoint_RightSE_Actions)
endfunction
function InitTrig_Waypoint_RightSE takes nothing returns nothing
endfunction
function Trig_Waypoint_Init_Conditions takes nothing returns boolean
return k9k9(GetTriggerUnit())
endfunction
function KaKa takes unit pEU returns boolean
if(GetOwningPlayer(pEU)==udg_pA_DTAX_SEPlayers[0])then
return true
endif
return false
endfunction
function Trig_Waypoint_Init_Actions takes nothing returns nothing
if KaKa(GetTriggerUnit())then
call SetUnitAbilityLevel(GetTriggerUnit(),udg_i_DTAX_creep_waypoint_ability_id,5)
else
call SetUnitAbilityLevel(GetTriggerUnit(),udg_i_DTAX_creep_waypoint_ability_id,1)
endif
if(CVReturnUnit(GetTriggerUnit())==null)then
call KbKb(GetTriggerUnit())
endif
endfunction
function StartTrigger_Waypoint_Init takes nothing returns nothing
set gg_trg_Waypoint_Init=CreateTrigger()
call TriggerRegisterUnitInRangeSimple(gg_trg_Waypoint_Init,300.,gg_unit_e00A_0104)
call TriggerRegisterUnitInRangeSimple(gg_trg_Waypoint_Init,300.,gg_unit_e00B_0103)
call TriggerRegisterUnitInRangeSimple(gg_trg_Waypoint_Init,300.,gg_unit_e00D_0102)
call TriggerAddCondition(gg_trg_Waypoint_Init,Condition(function Trig_Waypoint_Init_Conditions))
call TriggerAddAction(gg_trg_Waypoint_Init,function Trig_Waypoint_Init_Actions)
endfunction
function InitTrig_Waypoint_Init takes nothing returns nothing
endfunction
function K8K8 takes nothing returns nothing
if GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)<1 then
call GroupRemoveUnit(udg_ew,GetEnumUnit())
endif
if GetUnitCurrentOrder(GetEnumUnit())!=851983then
call GroupRemoveUnit(udg_ew,GetEnumUnit())
call IssuePointOrderByIdLoc(GetEnumUnit(),OrderId("attack"),k8k8(GetEnumUnit()))
endif
endfunction
function Trig_Waypoint_Order_Actions takes nothing returns nothing
call ForGroup(udg_ew,function K8K8)
endfunction
function StartTrigger_Waypoint_Order takes nothing returns nothing
set gg_trg_Waypoint_Order=CreateTrigger()
call TriggerRegisterTimerEvent(gg_trg_Waypoint_Order,2,true)
call TriggerAddAction(gg_trg_Waypoint_Order,function Trig_Waypoint_Order_Actions)
endfunction
function InitTrig_Waypoint_Order takes nothing returns nothing
endfunction
function CacheInit takes nothing returns nothing
call FlushGameCache(InitGameCache("DotACache.x"))
set udg_gc_DTAX_Core=InitGameCache("DotACache.x")
endfunction
function GameStart takes nothing returns nothing
call CacheInit()
call SetFloatGameState(GAME_STATE_TIME_OF_DAY,6.)
call SuspendTimeOfDay(false)
call SetTimeOfDayScale(.5)
call SetSkyModel("Environment\\Sky\\FoggedSky\\FoggedSky.mdl")
call SetCreepCampFilterState(true)
set udg_s_DTAX_sMultiBoardHeader="DotA Allstars"
call TimerStart(udg_t_DTAX_game_time,99999.,false,null)
set udg_wea_DTAX_weGlobalRain=AddWeatherEffect(bj_mapInitialPlayableArea,'RAhr')
set udg_wea_DTAX_weGlobalSnow=AddWeatherEffect(bj_mapInitialPlayableArea,'SNbs')
set udg_pA_DTAX_SEPlayers[0]=Player(0)
set udg_pA_DTAX_SEPlayers[1]=Player(1)
set udg_pA_DTAX_SEPlayers[2]=Player(2)
set udg_pA_DTAX_SEPlayers[3]=Player(3)
set udg_pA_DTAX_SEPlayers[4]=Player(4)
set udg_pA_DTAX_SEPlayers[5]=Player(5)
set udg_pA_DTAX_SCPlayers[0]=Player(6)
set udg_pA_DTAX_SCPlayers[1]=Player(7)
set udg_pA_DTAX_SCPlayers[2]=Player(8)
set udg_pA_DTAX_SCPlayers[3]=Player(9)
set udg_pA_DTAX_SCPlayers[4]=Player(10)
set udg_pA_DTAX_SCPlayers[5]=Player(11)
set udg_p_DTAX_Player12=Player(12)
set udg_p_DTAX_NeutralAgressivePlayer=Player(15)
call SetUnitPathing(gg_unit_e008_0105,false)
call SetUnitPathing(gg_unit_e00A_0104,false)
call SetUnitPathing(gg_unit_e00B_0103,false)
call SetUnitPathing(gg_unit_e00D_0102,false)
call SetUnitPathing(gg_unit_e001_0106,false)
call SetUnitInvulnerable(gg_unit_e001_0106,true)
call SetUnitInvulnerable(gg_unit_e00D_0102,true)
call SetUnitInvulnerable(gg_unit_e00B_0103,true)
call SetUnitInvulnerable(gg_unit_e00A_0104,true)
call SetUnitInvulnerable(gg_unit_e008_0105,true)
set udg_loc_DTAX_AttackToScourge=GetUnitLoc(gg_unit_e001_0106)
set udg_loc_DTAX_AttackToSentinel=GetUnitLoc(gg_unit_e008_0105)
set udg_loc_DTAX_AttackToMid=GetUnitLoc(gg_unit_e00B_0103)
set udg_loc_DTAX_AttackToLeft=GetUnitLoc(gg_unit_e00D_0102)
set udg_loc_DTAX_AttackToRight=GetUnitLoc(gg_unit_e00A_0104)
set udg_i_DTAX_creep_waypoint_ability_id='A06G'
set udg_locA_DTAX_waypoint_locations[1]=udg_loc_DTAX_AttackToSentinel
set udg_locA_DTAX_waypoint_locations[2]=udg_loc_DTAX_AttackToLeft
set udg_locA_DTAX_waypoint_locations[3]=udg_loc_DTAX_AttackToMid
set udg_locA_DTAX_waypoint_locations[4]=udg_loc_DTAX_AttackToRight
set udg_locA_DTAX_waypoint_locations[5]=udg_loc_DTAX_AttackToScourge
set udg_loc_DTAX_ScourgeMeleeCreepSpawnCenter=GetRectCenter(gg_rct_ScourgeMeleeCreepSpawnCenter)
set udg_loc_DTAX_ScourgeMeleeCreepSpawnLeft=GetRectCenter(gg_rct_ScourgeMeleeCreepSpawnLeft)
set udg_loc_DTAX_ScourgeMeleeCreepSpawnRight=GetRectCenter(gg_rct_ScourgeMeleeCreepSpawnRight)
set udg_loc_DTAX_ScourgeRangedCreepSpawnCenter=GetRectCenter(gg_rct_ScourgeRangedCreepSpawnCenter)
set udg_loc_DTAX_ScourgeRangedCreepSpawnRight=GetRectCenter(gg_rct_ScourgeRangedCreepSpawnLeft)
set udg_loc_DTAX_ScourgeRangedCreepSpawnLeft=GetRectCenter(gg_rct_ScourgeRangedCreepSpawnRight)
set udg_loc_DTAX_SentinelRangedCreepSpawnCenter=GetRectCenter(gg_rct_SentinelRangedCreepSpawnCenter)
set udg_loc_DTAX_SentinelRangedCreepSpawnRight=GetRectCenter(gg_rct_SentinelRangedCreepSpawnLeft)
set udg_loc_DTAX_SentinelRangedCreepSpawnLeft=GetRectCenter(gg_rct_SentinelRangedCreepSpawnRight)
set udg_loc_DTAX_SentinelMeleeCreepSpawnCenter=GetRectCenter(gg_rct_SentinelMeleeCreepSpawnCenter)
set udg_loc_DTAX_SentinelMeleeCreepSpawnRight=GetRectCenter(gg_rct_SentinelMeleeCreepSpawnLeft)
set udg_loc_DTAX_SentinelMeleeCreepSpawnLeft=GetRectCenter(gg_rct_SentinelMeleeCreepSpawnRight)
set udg_loc_DTAX_LeftRuneSpawn=GetRectCenter(gg_rct_LeftRuneSpawn)
set udg_loc_DTAX_RightRuneSpawn=GetRectCenter(gg_rct_RightRuneSpawn)
set udg_b_DTAX_bGameStarted=true
endfunction
function InitTrig_Game_Start takes nothing returns nothing
endfunction
function PlayerIsUnused takes player pWho returns boolean
return GetPlayerSlotState(pWho)==PLAYER_SLOT_STATE_EMPTY
endfunction
function LFLF takes nothing returns nothing
local player lEk
set udg_A8=false
set udg_A9=false
call DenyHeroFully()
call DenyHeroRandomSpawn()
call PolledWait(3)
set udg_bd=true
set lEk=udg_pA_DTAX_SEPlayers[1]
if PlayerIsUnused(lEk)==false and udg_bb[GetPlayerId(lEk)]==false then
call fBfB(lEk)
endif
set lEk=udg_pA_DTAX_SEPlayers[2]
if PlayerIsUnused(lEk)==false and udg_bb[GetPlayerId(lEk)]==false then
call fBfB(lEk)
endif
set lEk=udg_pA_DTAX_SEPlayers[3]
if PlayerIsUnused(lEk)==false and udg_bb[GetPlayerId(lEk)]==false then
call fBfB(lEk)
endif
set lEk=udg_pA_DTAX_SEPlayers[4]
if PlayerIsUnused(lEk)==false and udg_bb[GetPlayerId(lEk)]==false then
call fBfB(lEk)
endif
set lEk=udg_pA_DTAX_SEPlayers[5]
if PlayerIsUnused(lEk)==false and udg_bb[GetPlayerId(lEk)]==false then
call fBfB(lEk)
endif
set lEk=udg_pA_DTAX_SCPlayers[1]
if PlayerIsUnused(lEk)==false and udg_bb[GetPlayerId(lEk)]==false then
call fBfB(lEk)
endif
set lEk=udg_pA_DTAX_SCPlayers[2]
if PlayerIsUnused(lEk)==false and udg_bb[GetPlayerId(lEk)]==false then
call fBfB(lEk)
endif
set lEk=udg_pA_DTAX_SCPlayers[3]
if PlayerIsUnused(lEk)==false and udg_bb[GetPlayerId(lEk)]==false then
call fBfB(lEk)
endif
set lEk=udg_pA_DTAX_SCPlayers[4]
if PlayerIsUnused(lEk)==false and udg_bb[GetPlayerId(lEk)]==false then
call fBfB(lEk)
endif
set lEk=udg_pA_DTAX_SCPlayers[5]
if PlayerIsUnused(lEk)==false and udg_bb[GetPlayerId(lEk)]==false then
call fBfB(lEk)
endif
endfunction
function lOlO takes nothing returns nothing
local string lf5="Global|ReverseMode"
local player array lLb
local player array lLB
local integer lxx=0
local integer lyy=0
local integer lii=0
local trigger ltt=CreateTrigger()
set udg_b_DTAX_is_Reverse_mode=true
call TriggerAddAction(ltt,function LFLF)
call TriggerRegisterTimerEvent(ltt,60-TimerGetElapsed(udg_t_DTAX_game_time),false)
if PlayerIsActive(udg_pA_DTAX_SEPlayers[1])then
set lxx=lxx+1
set lLb[lxx]=udg_pA_DTAX_SEPlayers[1]
call SetPlayerState(lLb[lxx],PLAYER_STATE_RESOURCE_FOOD_CAP,11)
endif
if PlayerIsActive(udg_pA_DTAX_SEPlayers[2])then
set lxx=lxx+1
set lLb[lxx]=udg_pA_DTAX_SEPlayers[2]
call SetPlayerState(lLb[lxx],PLAYER_STATE_RESOURCE_FOOD_CAP,11)
endif
if PlayerIsActive(udg_pA_DTAX_SEPlayers[3])then
set lxx=lxx+1
set lLb[lxx]=udg_pA_DTAX_SEPlayers[3]
call SetPlayerState(lLb[lxx],PLAYER_STATE_RESOURCE_FOOD_CAP,11)
endif
if PlayerIsActive(udg_pA_DTAX_SEPlayers[4])then
set lxx=lxx+1
set lLb[lxx]=udg_pA_DTAX_SEPlayers[4]
call SetPlayerState(lLb[lxx],PLAYER_STATE_RESOURCE_FOOD_CAP,11)
endif
if PlayerIsActive(udg_pA_DTAX_SEPlayers[5])then
set lxx=lxx+1
set lLb[lxx]=udg_pA_DTAX_SEPlayers[5]
call SetPlayerState(lLb[lxx],PLAYER_STATE_RESOURCE_FOOD_CAP,11)
endif
if PlayerIsActive(udg_pA_DTAX_SCPlayers[1])then
set lyy=lyy+1
set lLB[lyy]=udg_pA_DTAX_SCPlayers[1]
call SetPlayerState(lLB[lyy],PLAYER_STATE_RESOURCE_FOOD_CAP,11)
endif
if PlayerIsActive(udg_pA_DTAX_SCPlayers[2])then
set lyy=lyy+1
set lLB[lyy]=udg_pA_DTAX_SCPlayers[2]
call SetPlayerState(lLB[lyy],PLAYER_STATE_RESOURCE_FOOD_CAP,11)
endif
if PlayerIsActive(udg_pA_DTAX_SCPlayers[3])then
set lyy=lyy+1
set lLB[lyy]=udg_pA_DTAX_SCPlayers[3]
call SetPlayerState(lLB[lyy],PLAYER_STATE_RESOURCE_FOOD_CAP,11)
endif
if PlayerIsActive(udg_pA_DTAX_SCPlayers[4])then
set lyy=lyy+1
set lLB[lyy]=udg_pA_DTAX_SCPlayers[4]
call SetPlayerState(lLB[lyy],PLAYER_STATE_RESOURCE_FOOD_CAP,11)
endif
if PlayerIsActive(udg_pA_DTAX_SCPlayers[5])then
set lyy=lyy+1
set lLB[lyy]=udg_pA_DTAX_SCPlayers[5]
call SetPlayerState(lLB[lyy],PLAYER_STATE_RESOURCE_FOOD_CAP,11)
endif
set lii=1
loop
exitwhen lii>lxx
call SetHandle(lf5,GetPlayerName(lLb[lii]),lLB[lii])
call SetHandle(lf5,GetPlayerName(lLB[lii]),lLb[lii])
set lii=lii+1
endloop
endfunction
function InitTrig_PlayersFoodCap takes nothing returns nothing
endfunction
function ForceCountPlayers takes nothing returns nothing
if GetPlayerSlotState(GetEnumPlayer())==PLAYER_SLOT_STATE_PLAYING then
if GetEnumPlayer()!=Player(13)and GetEnumPlayer()!=Player(14)then
set bj_forceCountPlayers=bj_forceCountPlayers+1
endif
endif
endfunction
function ForcePlayers takes force pWhat returns integer
set bj_forceCountPlayers=0
call ForForce(pWhat,function ForceCountPlayers)
return bj_forceCountPlayers
endfunction
function SetMarkersOwns takes nothing returns nothing
call SetUnitOwner(gg_unit_ncop_0080,udg_pA_DTAX_SEPlayers[1],false)
call SetUnitOwner(gg_unit_ncop_0081,udg_pA_DTAX_SEPlayers[2],false)
call SetUnitOwner(gg_unit_ncop_0082,udg_pA_DTAX_SEPlayers[3],false)
call SetUnitOwner(gg_unit_ncop_0083,udg_pA_DTAX_SEPlayers[4],false)
call SetUnitOwner(gg_unit_ncop_0084,udg_pA_DTAX_SEPlayers[5],false)
call SetUnitOwner(gg_unit_ncop_0085,udg_pA_DTAX_SCPlayers[1],false)
call SetUnitOwner(gg_unit_ncop_0086,udg_pA_DTAX_SCPlayers[2],false)
call SetUnitOwner(gg_unit_ncop_0087,udg_pA_DTAX_SCPlayers[3],false)
call SetUnitOwner(gg_unit_ncop_0088,udg_pA_DTAX_SCPlayers[4],false)
call SetUnitOwner(gg_unit_ncop_0089,udg_pA_DTAX_SCPlayers[5],false)
endfunction
function IsShop takes unit pfo returns boolean
local integer lID=GetUnitTypeId(pfo)
if lID=='n00V'or lID=='n00W'or lID=='n002'or lID=='n001'or lID=='n00X'or lID=='nC38'or lID=='n01K'or lID=='n009'then
return true
endif
return false
endfunction
function FixBaseOwning takes nothing returns nothing
if(GetOwningPlayer(GetEnumUnit())==Player(0))then
call SetUnitOwner(GetEnumUnit(),udg_pA_DTAX_SEPlayers[0],false)
if IsShop(GetEnumUnit())==false then
call SetUnitColor(GetEnumUnit(),ConvertPlayerColor(0))
endif
else
call SetUnitOwner(GetEnumUnit(),udg_pA_DTAX_SCPlayers[0],false)
if IsShop(GetEnumUnit())==false then
call SetUnitColor(GetEnumUnit(),ConvertPlayerColor(6))
endif
endif
endfunction
function ObserverOwningChange takes nothing returns nothing
local group lEw=CreateGroup()
call GroupEnumUnitsOfPlayer(lEw,Player(0),null)
call ForGroup(lEw,function FixBaseOwning)
call GroupClear(lEw)
call GroupEnumUnitsOfPlayer(lEw,Player(6),null)
call ForGroup(lEw,function FixBaseOwning)
call DestroyGroup(lEw)
endfunction
function TeamInit takes nothing returns nothing
local integer lFV
local integer lFw
local integer lEq
local integer lEQ
local integer lxx=0
local integer lyy=0
local trigger ltt
if GetPlayerState(udg_pA_DTAX_SEPlayers[0],PLAYER_STATE_OBSERVER)!=0 or GetPlayerState(udg_pA_DTAX_SCPlayers[0],PLAYER_STATE_OBSERVER)!=0 then
set udg_b_DTAX_observer_slot_used=true
set udg_pA_DTAX_SEPlayers[0]=Player(13)
set udg_pA_DTAX_SCPlayers[0]=Player(14)
set udg_p_DTAX_SE=Player(0)
set udg_p_DTAX_SC=Player(6)
call SetAllyColorFilterState(0)
loop
exitwhen lxx>5
call SetPlayerAlliance(Player(0),udg_pA_DTAX_SEPlayers[lxx],ConvertAllianceType(0),true)
call SetPlayerAlliance(Player(0),udg_pA_DTAX_SEPlayers[lxx],ConvertAllianceType(4),true)
call SetPlayerAlliance(Player(0),udg_pA_DTAX_SCPlayers[lxx],ConvertAllianceType(0),false)
call SetPlayerAlliance(Player(0),udg_pA_DTAX_SCPlayers[lxx],ConvertAllianceType(4),false)
set lxx=lxx+1
endloop
endif
call ForceAddPlayer(udg_f_DTAX_SEPlayers,udg_pA_DTAX_SEPlayers[0])
call ForceAddPlayer(udg_f_DTAX_SEPlayers,udg_pA_DTAX_SEPlayers[1])
call ForceAddPlayer(udg_f_DTAX_SEPlayers,udg_pA_DTAX_SEPlayers[2])
call ForceAddPlayer(udg_f_DTAX_SEPlayers,udg_pA_DTAX_SEPlayers[3])
call ForceAddPlayer(udg_f_DTAX_SEPlayers,udg_pA_DTAX_SEPlayers[4])
call ForceAddPlayer(udg_f_DTAX_SEPlayers,udg_pA_DTAX_SEPlayers[5])
call ForceAddPlayer(udg_f_DTAX_SCPlayers,udg_pA_DTAX_SCPlayers[0])
call ForceAddPlayer(udg_f_DTAX_SCPlayers,udg_pA_DTAX_SCPlayers[1])
call ForceAddPlayer(udg_f_DTAX_SCPlayers,udg_pA_DTAX_SCPlayers[2])
call ForceAddPlayer(udg_f_DTAX_SCPlayers,udg_pA_DTAX_SCPlayers[3])
call ForceAddPlayer(udg_f_DTAX_SCPlayers,udg_pA_DTAX_SCPlayers[4])
call ForceAddPlayer(udg_f_DTAX_SCPlayers,udg_pA_DTAX_SCPlayers[5])
call ForceAddPlayer(udg_for_DTAX_NonComputerPlayers,udg_pA_DTAX_SEPlayers[1])
call ForceAddPlayer(udg_for_DTAX_NonComputerPlayers,udg_pA_DTAX_SEPlayers[2])
call ForceAddPlayer(udg_for_DTAX_NonComputerPlayers,udg_pA_DTAX_SEPlayers[3])
call ForceAddPlayer(udg_for_DTAX_NonComputerPlayers,udg_pA_DTAX_SEPlayers[4])
call ForceAddPlayer(udg_for_DTAX_NonComputerPlayers,udg_pA_DTAX_SEPlayers[5])
call ForceAddPlayer(udg_for_DTAX_NonComputerPlayers,udg_pA_DTAX_SCPlayers[1])
call ForceAddPlayer(udg_for_DTAX_NonComputerPlayers,udg_pA_DTAX_SCPlayers[2])
call ForceAddPlayer(udg_for_DTAX_NonComputerPlayers,udg_pA_DTAX_SCPlayers[3])
call ForceAddPlayer(udg_for_DTAX_NonComputerPlayers,udg_pA_DTAX_SCPlayers[4])
call ForceAddPlayer(udg_for_DTAX_NonComputerPlayers,udg_pA_DTAX_SCPlayers[5])
if udg_b_DTAX_observer_slot_used then
call ForceAddPlayer(udg_for_DTAX_NonComputerPlayers,Player(0))
call ForceAddPlayer(udg_for_DTAX_NonComputerPlayers,Player(6))
endif
set lxx=0
set lyy=0
loop
exitwhen lxx>5
loop
exitwhen lyy>5
if(lxx!=lyy)then
call SetPlayerAlliance(udg_pA_DTAX_SEPlayers[lxx],udg_pA_DTAX_SEPlayers[lyy],ConvertAllianceType(0),true)
call SetPlayerAlliance(udg_pA_DTAX_SEPlayers[lxx],udg_pA_DTAX_SEPlayers[lyy],ConvertAllianceType(1),true)
call SetPlayerAlliance(udg_pA_DTAX_SEPlayers[lxx],udg_pA_DTAX_SEPlayers[lyy],ConvertAllianceType(2),true)
call SetPlayerAlliance(udg_pA_DTAX_SEPlayers[lxx],udg_pA_DTAX_SEPlayers[lyy],ConvertAllianceType(3),true)
call SetPlayerAlliance(udg_pA_DTAX_SEPlayers[lxx],udg_pA_DTAX_SEPlayers[lyy],ConvertAllianceType(4),true)
call SetPlayerAlliance(udg_pA_DTAX_SEPlayers[lxx],udg_pA_DTAX_SEPlayers[lyy],ConvertAllianceType(5),true)
call SetPlayerAlliance(udg_pA_DTAX_SEPlayers[lxx],udg_pA_DTAX_SEPlayers[lyy],ConvertAllianceType(6),false)
call SetPlayerAlliance(udg_pA_DTAX_SEPlayers[lxx],udg_pA_DTAX_SEPlayers[lyy],ConvertAllianceType(7),false)
call SetPlayerAlliance(udg_pA_DTAX_SCPlayers[lxx],udg_pA_DTAX_SCPlayers[lyy],ConvertAllianceType(0),true)
call SetPlayerAlliance(udg_pA_DTAX_SCPlayers[lxx],udg_pA_DTAX_SCPlayers[lyy],ConvertAllianceType(1),true)
call SetPlayerAlliance(udg_pA_DTAX_SCPlayers[lxx],udg_pA_DTAX_SCPlayers[lyy],ConvertAllianceType(2),true)
call SetPlayerAlliance(udg_pA_DTAX_SCPlayers[lxx],udg_pA_DTAX_SCPlayers[lyy],ConvertAllianceType(3),true)
call SetPlayerAlliance(udg_pA_DTAX_SCPlayers[lxx],udg_pA_DTAX_SCPlayers[lyy],ConvertAllianceType(4),true)
call SetPlayerAlliance(udg_pA_DTAX_SCPlayers[lxx],udg_pA_DTAX_SCPlayers[lyy],ConvertAllianceType(5),true)
call SetPlayerAlliance(udg_pA_DTAX_SCPlayers[lxx],udg_pA_DTAX_SCPlayers[lyy],ConvertAllianceType(6),false)
call SetPlayerAlliance(udg_pA_DTAX_SCPlayers[lxx],udg_pA_DTAX_SCPlayers[lyy],ConvertAllianceType(7),false)
call SetPlayerAlliance(udg_pA_DTAX_SEPlayers[lxx],udg_pA_DTAX_SCPlayers[lyy],ConvertAllianceType(0),false)
call SetPlayerAlliance(udg_pA_DTAX_SEPlayers[lxx],udg_pA_DTAX_SCPlayers[lyy],ConvertAllianceType(1),false)
call SetPlayerAlliance(udg_pA_DTAX_SEPlayers[lxx],udg_pA_DTAX_SCPlayers[lyy],ConvertAllianceType(2),false)
call SetPlayerAlliance(udg_pA_DTAX_SEPlayers[lxx],udg_pA_DTAX_SCPlayers[lyy],ConvertAllianceType(3),false)
call SetPlayerAlliance(udg_pA_DTAX_SEPlayers[lxx],udg_pA_DTAX_SCPlayers[lyy],ConvertAllianceType(4),false)
call SetPlayerAlliance(udg_pA_DTAX_SEPlayers[lxx],udg_pA_DTAX_SCPlayers[lyy],ConvertAllianceType(5),false)
call SetPlayerAlliance(udg_pA_DTAX_SEPlayers[lxx],udg_pA_DTAX_SCPlayers[lyy],ConvertAllianceType(6),false)
call SetPlayerAlliance(udg_pA_DTAX_SEPlayers[lxx],udg_pA_DTAX_SCPlayers[lyy],ConvertAllianceType(7),false)
call SetPlayerAlliance(udg_pA_DTAX_SCPlayers[lxx],udg_pA_DTAX_SEPlayers[lyy],ConvertAllianceType(0),false)
call SetPlayerAlliance(udg_pA_DTAX_SCPlayers[lxx],udg_pA_DTAX_SEPlayers[lyy],ConvertAllianceType(1),false)
call SetPlayerAlliance(udg_pA_DTAX_SCPlayers[lxx],udg_pA_DTAX_SEPlayers[lyy],ConvertAllianceType(2),false)
call SetPlayerAlliance(udg_pA_DTAX_SCPlayers[lxx],udg_pA_DTAX_SEPlayers[lyy],ConvertAllianceType(3),false)
call SetPlayerAlliance(udg_pA_DTAX_SCPlayers[lxx],udg_pA_DTAX_SEPlayers[lyy],ConvertAllianceType(4),false)
call SetPlayerAlliance(udg_pA_DTAX_SCPlayers[lxx],udg_pA_DTAX_SEPlayers[lyy],ConvertAllianceType(5),false)
call SetPlayerAlliance(udg_pA_DTAX_SCPlayers[lxx],udg_pA_DTAX_SEPlayers[lyy],ConvertAllianceType(6),false)
call SetPlayerAlliance(udg_pA_DTAX_SCPlayers[lxx],udg_pA_DTAX_SEPlayers[lyy],ConvertAllianceType(7),false)
endif
set lyy=lyy+1
endloop
set lyy=0
set lxx=lxx+1
endloop
call SetPlayerTeam(udg_pA_DTAX_SEPlayers[0],0)
call SetPlayerTeam(udg_pA_DTAX_SEPlayers[1],0)
call SetPlayerTeam(udg_pA_DTAX_SEPlayers[2],0)
call SetPlayerTeam(udg_pA_DTAX_SEPlayers[3],0)
call SetPlayerTeam(udg_pA_DTAX_SEPlayers[4],0)
call SetPlayerTeam(udg_pA_DTAX_SEPlayers[5],0)
call SetPlayerTeam(udg_pA_DTAX_SCPlayers[0],1)
call SetPlayerTeam(udg_pA_DTAX_SCPlayers[1],1)
call SetPlayerTeam(udg_pA_DTAX_SCPlayers[2],1)
call SetPlayerTeam(udg_pA_DTAX_SCPlayers[3],1)
call SetPlayerTeam(udg_pA_DTAX_SCPlayers[4],1)
call SetPlayerTeam(udg_pA_DTAX_SCPlayers[5],1)
call SetPlayerName(udg_pA_DTAX_SEPlayers[0],"The Sentinel")
call SetPlayerName(udg_pA_DTAX_SCPlayers[0],"The Scourge")
call SetMarkersOwns()
if(udg_pA_DTAX_SEPlayers[0]!=Player(0)or udg_pA_DTAX_SCPlayers[0]!=Player(6))then
call ObserverOwningChange()
endif
call ColorDataBase()
set lFw=ForcePlayers(udg_f_DTAX_SEPlayers)
set lFV=ForcePlayers(udg_f_DTAX_SCPlayers)
set lEq=1
set lEQ=5
loop
exitwhen lEq>lEQ
if(PlayerIsActive(udg_pA_DTAX_SEPlayers[lEq]))then
call SetPlayerState(udg_pA_DTAX_SEPlayers[lEq],PLAYER_STATE_RESOURCE_GOLD,(3500/lFw))
call SetPlayerState(udg_pA_DTAX_SEPlayers[lEq],PLAYER_STATE_RESOURCE_LUMBER,0)
call SetPlayerState(udg_pA_DTAX_SEPlayers[lEq],PLAYER_STATE_RESOURCE_FOOD_CAP,5)
endif
if(PlayerIsActive(udg_pA_DTAX_SCPlayers[lEq]))then
call SetPlayerState(udg_pA_DTAX_SCPlayers[lEq],PLAYER_STATE_RESOURCE_GOLD,(3500/lFV))
call SetPlayerState(udg_pA_DTAX_SCPlayers[lEq],PLAYER_STATE_RESOURCE_LUMBER,0)
call SetPlayerState(udg_pA_DTAX_SCPlayers[lEq],PLAYER_STATE_RESOURCE_FOOD_CAP,5)
endif
set lEq=lEq+1
endloop
call SetPlayerHandicapXP(udg_pA_DTAX_SEPlayers[1],1)
call SetPlayerHandicapXP(udg_pA_DTAX_SEPlayers[2],1)
call SetPlayerHandicapXP(udg_pA_DTAX_SEPlayers[3],1)
call SetPlayerHandicapXP(udg_pA_DTAX_SEPlayers[4],1)
call SetPlayerHandicapXP(udg_pA_DTAX_SEPlayers[5],1)
call SetPlayerHandicapXP(udg_pA_DTAX_SCPlayers[1],1)
call SetPlayerHandicapXP(udg_pA_DTAX_SCPlayers[2],1)
call SetPlayerHandicapXP(udg_pA_DTAX_SCPlayers[3],1)
call SetPlayerHandicapXP(udg_pA_DTAX_SCPlayers[4],1)
call SetPlayerHandicapXP(udg_pA_DTAX_SCPlayers[5],1)
call SetPlayerState(udg_pA_DTAX_SEPlayers[0],PLAYER_STATE_GIVES_BOUNTY,1)
call SetPlayerState(udg_pA_DTAX_SEPlayers[1],PLAYER_STATE_GIVES_BOUNTY,1)
call SetPlayerState(udg_pA_DTAX_SEPlayers[2],PLAYER_STATE_GIVES_BOUNTY,1)
call SetPlayerState(udg_pA_DTAX_SEPlayers[3],PLAYER_STATE_GIVES_BOUNTY,1)
call SetPlayerState(udg_pA_DTAX_SEPlayers[4],PLAYER_STATE_GIVES_BOUNTY,1)
call SetPlayerState(udg_pA_DTAX_SEPlayers[5],PLAYER_STATE_GIVES_BOUNTY,1)
call SetPlayerState(udg_pA_DTAX_SCPlayers[0],PLAYER_STATE_GIVES_BOUNTY,1)
call SetPlayerState(udg_pA_DTAX_SCPlayers[1],PLAYER_STATE_GIVES_BOUNTY,1)
call SetPlayerState(udg_pA_DTAX_SCPlayers[2],PLAYER_STATE_GIVES_BOUNTY,1)
call SetPlayerState(udg_pA_DTAX_SCPlayers[3],PLAYER_STATE_GIVES_BOUNTY,1)
call SetPlayerState(udg_pA_DTAX_SCPlayers[4],PLAYER_STATE_GIVES_BOUNTY,1)
call SetPlayerState(udg_pA_DTAX_SCPlayers[5],PLAYER_STATE_GIVES_BOUNTY,1)
call HostAlloc()
call FT()
endfunction
function InitTrig_Teams takes nothing returns nothing
endfunction
function ExEx takes nothing returns nothing
local integer lEq
local integer lEQ
local integer lEX=0
set udg_i_DTAX_selectable_hero_types_start=udg_i_DTAX_FirstSEHero
set lEq=udg_i_DTAX_FirstSEHero
set lEQ=udg_i_DTAX_LastSEHero
loop
exitwhen lEq>lEQ
set lEX=lEX+1
set udg_iA_DTAX_selectable_hero_types[lEX]=lEq
set lEq=lEq+1
endloop
set lEq=udg_i_DTAX_FirstSCHero
set lEQ=udg_i_DTAX_LastSCHero
loop
exitwhen lEq>lEQ
set lEX=lEX+1
set udg_iA_DTAX_selectable_hero_types[lEX]=lEq
set lEq=lEq+1
endloop
set udg_i_DTAX_selectable_hero_types_finish=lEX
endfunction
function HeroDataBase takes nothing returns nothing
set udg_i_DTAX_FirstSEHero=1
set udg_iA_DTAX_HeroTypes[1]='Hvwd'
set udg_sA_DTAX_HeroNames[1]="Vengeful Spirit"
set udg_sA_DTAX_HeroIcons[1]="ReplaceableTextures\\CommandButtons\\BTNAvengingWatcher.blp"
set udg_iA_DTAX_HeroTypes[2]='Hmbr'
set udg_sA_DTAX_HeroNames[2]="Zeus"
set udg_sA_DTAX_HeroIcons[2]="ReplaceableTextures\\CommandButtons\\BTNHeroMountainKing.blp"
set udg_iA_DTAX_HeroTypes[3]='Emoo'
set udg_sA_DTAX_HeroNames[3]="Enchantress"
set udg_sA_DTAX_HeroIcons[3]="ReplaceableTextures\\CommandButtons\\BTNDryad.blp"
set udg_iA_DTAX_HeroTypes[4]='O00P'
set udg_sA_DTAX_HeroNames[4]="Morphling"
set udg_sA_DTAX_HeroIcons[4]="ReplaceableTextures\\CommandButtons\\BTNSeaElemental.blp"
set udg_iA_DTAX_HeroTypes[5]='Hjai'
set udg_sA_DTAX_HeroNames[5]="Rylai"
set udg_sA_DTAX_HeroIcons[5]="ReplaceableTextures\\CommandButtons\\BTNJaina.blp"
set udg_iA_DTAX_HeroTypes[6]='H001'
set udg_sA_DTAX_HeroNames[6]="Sven"
set udg_sA_DTAX_HeroIcons[6]="ReplaceableTextures\\CommandButtons\\BTNFelGuardBlue.tga"
set udg_iA_DTAX_HeroTypes[7]='HC49'
set udg_sA_DTAX_HeroNames[7]="Slithice"
set udg_sA_DTAX_HeroIcons[7]="ReplaceableTextures\\CommandButtons\\BTNSeaWitch.blp"
set udg_iA_DTAX_HeroTypes[8]='Otch'
set udg_sA_DTAX_HeroNames[8]="Earthshaker"
set udg_sA_DTAX_HeroIcons[8]="ReplaceableTextures\\CommandButtons\\BTNTauren.blp"
set udg_iA_DTAX_HeroTypes[9]='HC92'
set udg_sA_DTAX_HeroNames[9]="Rikimaru"
set udg_sA_DTAX_HeroIcons[9]="ReplaceableTextures\\CommandButtons\\BTNSatyrTrickster.blp"
set udg_iA_DTAX_HeroTypes[10]='N01O'
set udg_sA_DTAX_HeroNames[10]="Syllabear"
set udg_sA_DTAX_HeroIcons[10]="ReplaceableTextures\\CommandButtons\\BTNDruidOfTheClaw.blp"
set udg_iA_DTAX_HeroTypes[11]='H004'
set udg_sA_DTAX_HeroNames[11]="Lina"
set udg_sA_DTAX_HeroIcons[11]="ReplaceableTextures\\CommandButtons\\BTNSorceress.blp"
set udg_iA_DTAX_HeroTypes[12]='Nbbc'
set udg_sA_DTAX_HeroNames[12]="Yurnero"
set udg_sA_DTAX_HeroIcons[12]="ReplaceableTextures\\CommandButtons\\BTNChaosBlademaster.blp"
set udg_iA_DTAX_HeroTypes[13]='N01A'
set udg_sA_DTAX_HeroNames[13]="Nortrom"
set udg_sA_DTAX_HeroIcons[13]="ReplaceableTextures\\CommandButtons\\BTNSpellBreaker.blp"
set udg_iA_DTAX_HeroTypes[14]='Hamg'
set udg_sA_DTAX_HeroNames[14]="Rooftrellen"
set udg_sA_DTAX_HeroIcons[14]="ReplaceableTextures\\CommandButtons\\BTNTreant.blp"
set udg_iA_DTAX_HeroTypes[15]='Uktl'
set udg_sA_DTAX_HeroNames[15]="Enigma"
set udg_sA_DTAX_HeroIcons[15]="ReplaceableTextures\\CommandButtons\\BTNSpell_Shadow_SummonVoidWalker.blp"
set udg_iA_DTAX_HeroTypes[16]='Hblm'
set udg_sA_DTAX_HeroNames[16]="Ezalor"
set udg_sA_DTAX_HeroIcons[16]="ReplaceableTextures\\CommandButtons\\BTNGhostMage.blp"
set udg_iA_DTAX_HeroTypes[17]='Huth'
set udg_sA_DTAX_HeroNames[17]="Ursa"
set udg_sA_DTAX_HeroIcons[17]="ReplaceableTextures\\CommandButtons\\BTNFurbolgTracker.blp"
set udg_iA_DTAX_HeroTypes[18]='Hmkg'
set udg_sA_DTAX_HeroNames[18]="Ogre Magi"
set udg_sA_DTAX_HeroIcons[18]="ReplaceableTextures\\CommandButtons\\BTNOgreMagi.blp"
set udg_iA_DTAX_HeroTypes[19]='Ntin'
set udg_sA_DTAX_HeroNames[19]="Tinker"
set udg_sA_DTAX_HeroIcons[19]="ReplaceableTextures\\CommandButtons\\BTNHeroTinker.blp"
set udg_iA_DTAX_HeroTypes[20]='Emns'
set udg_sA_DTAX_HeroNames[20]="Furion"
set udg_sA_DTAX_HeroIcons[20]="ReplaceableTextures\\CommandButtons\\BTNFurion.blp"
set udg_iA_DTAX_HeroTypes[21]='Ogrh'
set udg_sA_DTAX_HeroNames[21]="Phantom Lancer"
set udg_sA_DTAX_HeroIcons[21]="ReplaceableTextures\\CommandButtons\\BTNHellScream.blp"
set udg_iA_DTAX_HeroTypes[22]='Ucrl'
set udg_sA_DTAX_HeroNames[22]="Tiny"
set udg_sA_DTAX_HeroIcons[22]="ReplaceableTextures\\CommandButtons\\BTNMountainGiant.blp"
set udg_iA_DTAX_HeroTypes[23]='H00K'
set udg_sA_DTAX_HeroNames[23]="Techies"
set udg_sA_DTAX_HeroIcons[23]="ReplaceableTextures\\CommandButtons\\BTNGoblinSapper.blp"
set udg_iA_DTAX_HeroTypes[24]='H00A'
set udg_sA_DTAX_HeroNames[24]="Chen"
set udg_sA_DTAX_HeroIcons[24]="ReplaceableTextures\\CommandButtons\\BTNHeroFarseer.blp"
set udg_iA_DTAX_HeroTypes[25]='E005'
set udg_sA_DTAX_HeroNames[25]="Luna"
set udg_sA_DTAX_HeroIcons[25]="ReplaceableTextures\\CommandButtons\\BTNHuntress.blp"
set udg_iA_DTAX_HeroTypes[26]='Usyl'
set udg_sA_DTAX_HeroNames[26]="Sniper"
set udg_sA_DTAX_HeroIcons[26]="ReplaceableTextures\\CommandButtons\\BTNRifleman.blp"
set udg_iA_DTAX_HeroTypes[27]='N016'
set udg_sA_DTAX_HeroNames[27]="Troll"
set udg_sA_DTAX_HeroIcons[27]="ReplaceableTextures\\CommandButtons\\BTNForestTroll.blp"
set udg_iA_DTAX_HeroTypes[28]='Orkn'
set udg_sA_DTAX_HeroNames[28]="Rhasta"
set udg_sA_DTAX_HeroIcons[28]="ReplaceableTextures\\CommandButtons\\BTNShadowHunter.blp"
set udg_iA_DTAX_HeroTypes[29]='H008'
set udg_sA_DTAX_HeroNames[29]="Bristleback"
set udg_sA_DTAX_HeroIcons[29]="ReplaceableTextures\\CommandButtons\\BTNRazorManeChief.blp"
set udg_iA_DTAX_HeroTypes[30]='Npbm'
set udg_sA_DTAX_HeroNames[30]="Panda"
set udg_sA_DTAX_HeroIcons[30]="ReplaceableTextures\\CommandButtons\\BTNPandarenBrewmaster.blp"
set udg_iA_DTAX_HeroTypes[31]='H000'
set udg_sA_DTAX_HeroNames[31]="Centaur"
set udg_sA_DTAX_HeroIcons[31]="ReplaceableTextures\\CommandButtons\\BTNCentaurKhan.blp"
set udg_iA_DTAX_HeroTypes[32]='Naka'
set udg_sA_DTAX_HeroNames[32]="Gondar"
set udg_sA_DTAX_HeroIcons[32]="ReplaceableTextures\\CommandButtons\\BTNakama.blp"
set udg_iA_DTAX_HeroTypes[33]='Hlgr'
set udg_sA_DTAX_HeroNames[33]="Knight Davion"
set udg_sA_DTAX_HeroIcons[33]="ReplaceableTextures\\CommandButtons\\BTNTheCaptain.blp"
set udg_iA_DTAX_HeroTypes[34]='Edem'
set udg_sA_DTAX_HeroNames[34]="Magina"
set udg_sA_DTAX_HeroIcons[34]="ReplaceableTextures\\CommandButtons\\BTNHeroDemonHunter.blp"
set udg_iA_DTAX_HeroTypes[35]='Nbrn'
set udg_sA_DTAX_HeroNames[35]="Traxex"
set udg_sA_DTAX_HeroIcons[35]="ReplaceableTextures\\CommandButtons\\BTNBansheeRanger.tga"
set udg_iA_DTAX_HeroTypes[36]='Harf'
set udg_sA_DTAX_HeroNames[36]="Omniknight"
set udg_sA_DTAX_HeroIcons[36]="ReplaceableTextures\\CommandButtons\\BTNArthas.blp"
set udg_iA_DTAX_HeroTypes[37]='H00D'
set udg_sA_DTAX_HeroNames[37]="Rexxar"
set udg_sA_DTAX_HeroIcons[37]="ReplaceableTextures\\CommandButtons\\BTNBeastMaster.blp"
set udg_iA_DTAX_HeroTypes[38]='E00P'
set udg_sA_DTAX_HeroNames[38]="Jakiro"
set udg_sA_DTAX_HeroIcons[38]="ReplaceableTextures\\CommandButtons\\BTNChimaera.blp"
set udg_iA_DTAX_HeroTypes[39]='N01I'
set udg_sA_DTAX_HeroNames[39]="Alchemist"
set udg_sA_DTAX_HeroIcons[39]="ReplaceableTextures\\CommandButtons\\BTNHeroAlchemist.blp"
set udg_iA_DTAX_HeroTypes[40]='N01V'
set udg_sA_DTAX_HeroNames[40]="Mirana"
set udg_sA_DTAX_HeroIcons[40]="ReplaceableTextures\\CommandButtons\\BTNPriestessOfTheMoon.blp"
set udg_i_DTAX_LastSEHero=40
set udg_i_DTAX_FirstSCHero=49
set udg_iA_DTAX_HeroTypes[49]='Eevi'
set udg_sA_DTAX_HeroNames[49]="Terrorblade"
set udg_sA_DTAX_HeroIcons[49]="ReplaceableTextures\\CommandButtons\\BTNEvilIllidan.blp"
set udg_iA_DTAX_HeroTypes[50]='Ekee'
set udg_sA_DTAX_HeroNames[50]="Leshrac"
set udg_sA_DTAX_HeroIcons[50]="ReplaceableTextures\\CommandButtons\\BTNKeeperGhostBlue.blp"
set udg_iA_DTAX_HeroTypes[51]='Ulic'
set udg_sA_DTAX_HeroNames[51]="Lich"
set udg_sA_DTAX_HeroIcons[51]="ReplaceableTextures\\CommandButtons\\BTNLichVersion2.blp"
set udg_iA_DTAX_HeroTypes[52]='UC76'
set udg_sA_DTAX_HeroNames[52]="Krobelus"
set udg_sA_DTAX_HeroIcons[52]="ReplaceableTextures\\CommandButtons\\BTNBanshee.blp"
set udg_iA_DTAX_HeroTypes[53]='UC18'
set udg_sA_DTAX_HeroNames[53]="Lion"
set udg_sA_DTAX_HeroIcons[53]="ReplaceableTextures\\CommandButtons\\BTNLion.BLP"
set udg_iA_DTAX_HeroTypes[54]='EC57'
set udg_sA_DTAX_HeroNames[54]="Venomancer"
set udg_sA_DTAX_HeroIcons[54]="ReplaceableTextures\\CommandButtons\\BTNHydralisk.blp"
set udg_iA_DTAX_HeroTypes[55]='UC11'
set udg_sA_DTAX_HeroNames[55]="Magnus"
set udg_sA_DTAX_HeroIcons[55]="ReplaceableTextures\\CommandButtons\\BTNBlueMagnataur.tga"
set udg_iA_DTAX_HeroTypes[56]='UC60'
set udg_sA_DTAX_HeroNames[56]="Visage"
set udg_sA_DTAX_HeroIcons[56]="ReplaceableTextures\\CommandButtons\\BTNSpiritWyvern.blp"
set udg_iA_DTAX_HeroTypes[57]='U00A'
set udg_sA_DTAX_HeroNames[57]="Nessaj"
set udg_sA_DTAX_HeroIcons[57]="ReplaceableTextures\\CommandButtons\\BTNChaosWarlord.blp"
set udg_iA_DTAX_HeroTypes[58]='U008'
set udg_sA_DTAX_HeroNames[58]="Lycan"
set udg_sA_DTAX_HeroIcons[58]="ReplaceableTextures\\CommandButtons\\BTNKiljaedin.blp"
set udg_iA_DTAX_HeroTypes[59]='U006'
set udg_sA_DTAX_HeroNames[59]="Broodmother"
set udg_sA_DTAX_HeroIcons[59]="ReplaceableTextures\\CommandButtons\\BTNSpiderBlack.blp"
set udg_iA_DTAX_HeroTypes[60]='Ewar'
set udg_sA_DTAX_HeroNames[60]="Mortred"
set udg_sA_DTAX_HeroIcons[60]="ReplaceableTextures\\CommandButtons\\BTNHeroWarden.blp"
set udg_iA_DTAX_HeroTypes[61]='H00V'
set udg_sA_DTAX_HeroNames[61]="Medusa"
set udg_sA_DTAX_HeroIcons[61]="ReplaceableTextures\\CommandButtons\\BTNNagaSeaWitch.blp"
set udg_iA_DTAX_HeroTypes[62]='Udre'
set udg_sA_DTAX_HeroNames[62]="Balanar"
set udg_sA_DTAX_HeroIcons[62]="ReplaceableTextures\\CommandButtons\\BTNTichondrius.blp"
set udg_iA_DTAX_HeroTypes[63]='NC00'
set udg_sA_DTAX_HeroNames[63]="Leoric"
set udg_sA_DTAX_HeroIcons[63]="ReplaceableTextures\\CommandButtons\\BTNSkeletonArcher.tga"
set udg_iA_DTAX_HeroTypes[64]='UC42'
set udg_sA_DTAX_HeroNames[64]="Lucifer"
set udg_sA_DTAX_HeroIcons[64]="ReplaceableTextures\\CommandButtons\\BTNDoomGuard.blp"
set udg_iA_DTAX_HeroTypes[65]='U000'
set udg_sA_DTAX_HeroNames[65]="Nerubian Assassin"
set udg_sA_DTAX_HeroIcons[65]="ReplaceableTextures\\CommandButtons\\BTNHeroCryptLord.tga"
set udg_iA_DTAX_HeroTypes[66]='UC91'
set udg_sA_DTAX_HeroNames[66]="Slardar"
set udg_sA_DTAX_HeroIcons[66]="ReplaceableTextures\\CommandButtons\\BTNNagaMyrmidon.tga"
set udg_iA_DTAX_HeroTypes[67]='UC01'
set udg_sA_DTAX_HeroNames[67]="Akasha"
set udg_sA_DTAX_HeroIcons[67]="ReplaceableTextures\\CommandButtons\\BTNBlueDemoness.tga"
set udg_iA_DTAX_HeroTypes[68]='E004'
set udg_sA_DTAX_HeroNames[68]="Clinkz"
set udg_sA_DTAX_HeroIcons[68]="ReplaceableTextures\\CommandButtons\\BTNSkeletonMage.blp"
set udg_iA_DTAX_HeroTypes[69]='EC45'
set udg_sA_DTAX_HeroNames[69]="Void"
set udg_sA_DTAX_HeroIcons[69]="ReplaceableTextures\\CommandButtons\\BTNFacelessOne.blp"
set udg_iA_DTAX_HeroTypes[70]='EC77'
set udg_sA_DTAX_HeroNames[70]="Viper"
set udg_sA_DTAX_HeroIcons[70]="ReplaceableTextures\\CommandButtons\\BTNNetherDragon.blp"
set udg_iA_DTAX_HeroTypes[71]='E002'
set udg_sA_DTAX_HeroNames[71]="Razor"
set udg_sA_DTAX_HeroIcons[71]="ReplaceableTextures\\CommandButtons\\BTNRevenant.blp"
set udg_iA_DTAX_HeroTypes[72]='U007'
set udg_sA_DTAX_HeroNames[72]="Naix"
set udg_sA_DTAX_HeroIcons[72]="ReplaceableTextures\\CommandButtons\\BTNGhoul.blp"
set udg_iA_DTAX_HeroTypes[73]='H00H'
set udg_sA_DTAX_HeroNames[73]="Pugna"
set udg_sA_DTAX_HeroIcons[73]="ReplaceableTextures\\CommandButtons\\BTNPugna.BLP"
set udg_iA_DTAX_HeroTypes[74]='Ofar'
set udg_sA_DTAX_HeroNames[74]="Tidehunter"
set udg_sA_DTAX_HeroIcons[74]="ReplaceableTextures\\CommandButtons\\BTNSeaGiantGreen.blp"
set udg_iA_DTAX_HeroTypes[75]='Oshd'
set udg_sA_DTAX_HeroNames[75]="Atropos"
set udg_sA_DTAX_HeroIcons[75]="ReplaceableTextures\\CommandButtons\\BTNVoidWalker.blp"
set udg_iA_DTAX_HeroTypes[76]='U00E'
set udg_sA_DTAX_HeroNames[76]="Necrolyte"
set udg_sA_DTAX_HeroIcons[76]="ReplaceableTextures\\CommandButtons\\BTNGhostOfKelThuzad.blp"
set udg_iA_DTAX_HeroTypes[77]='U00F'
set udg_sA_DTAX_HeroNames[77]="Pudge"
set udg_sA_DTAX_HeroIcons[77]="ReplaceableTextures\\CommandButtons\\BTNAbomination.blp"
set udg_iA_DTAX_HeroTypes[78]='O00J'
set udg_sA_DTAX_HeroNames[78]="Barathrum"
set udg_sA_DTAX_HeroIcons[78]="ReplaceableTextures\\CommandButtons\\BTNSpiritWalker.blp"
set udg_iA_DTAX_HeroTypes[79]='Ubal'
set udg_sA_DTAX_HeroNames[79]="Weaver"
set udg_sA_DTAX_HeroIcons[79]="ReplaceableTextures\\CommandButtons\\BTNNerubianQueen.blp"
set udg_iA_DTAX_HeroTypes[80]='Nfir'
set udg_sA_DTAX_HeroNames[80]="Nevermore"
set udg_sA_DTAX_HeroIcons[80]="ReplaceableTextures\\CommandButtons\\BTNShade.blp"
set udg_iA_DTAX_HeroTypes[81]='U00K'
set udg_sA_DTAX_HeroNames[81]="Crixalis"
set udg_sA_DTAX_HeroIcons[81]="ReplaceableTextures\\CommandButtons\\BTNArachnathidGreen.blp"
set udg_iA_DTAX_HeroTypes[82]='Opgh'
set udg_sA_DTAX_HeroNames[82]="Axe"
set udg_sA_DTAX_HeroIcons[82]="ReplaceableTextures\\CommandButtons\\BTNChaosGrom.blp"
set udg_iA_DTAX_HeroTypes[83]='Hvsh'
set udg_sA_DTAX_HeroNames[83]="Strygwyr"
set udg_sA_DTAX_HeroIcons[83]="ReplaceableTextures\\CommandButtons\\BTNShaman.blp"
set udg_iA_DTAX_HeroTypes[84]='Udea'
set udg_sA_DTAX_HeroNames[84]="Abaddon"
set udg_sA_DTAX_HeroIcons[84]="ReplaceableTextures\\CommandButtons\\BTNHeroDeathKnight.blp"
set udg_iA_DTAX_HeroTypes[85]='E01B'
set udg_sA_DTAX_HeroNames[85]="Spectre"
set udg_sA_DTAX_HeroIcons[85]="ReplaceableTextures\\CommandButtons\\BTNvengeanceincarnate.blp"
set udg_iA_DTAX_HeroTypes[86]='E01A'
set udg_sA_DTAX_HeroNames[86]="Witch Doctor"
set udg_sA_DTAX_HeroIcons[86]="ReplaceableTextures\\CommandButtons\\BTNWitchDoctor.blp"
set udg_iA_DTAX_HeroTypes[87]='U00P'
set udg_sA_DTAX_HeroNames[87]="Destroyer"
set udg_sA_DTAX_HeroIcons[87]="ReplaceableTextures\\CommandButtons\\BTNDestroyer.blp"
set udg_iA_DTAX_HeroTypes[88]='E01C'
set udg_sA_DTAX_HeroNames[88]="Warlock"
set udg_sA_DTAX_HeroIcons[88]="ReplaceableTextures\\CommandButtons\\BTNGuldan.blp"
set udg_iA_DTAX_HeroTypes[89]='H00I'
set udg_sA_DTAX_HeroNames[89]="Geomancer"
set udg_sA_DTAX_HeroIcons[89]="ReplaceableTextures\\CommandButtons\\BTNKoboldGeomancer.blp"
set udg_iA_DTAX_HeroTypes[90]='N01W'
set udg_sA_DTAX_HeroNames[90]="Dazzle"
set udg_sA_DTAX_HeroIcons[90]="ReplaceableTextures\\CommandButtons\\BTNDarkTrollShadowPriest.blp"
set udg_i_DTAX_LastSCHero=90
set udg_iA_DTAX_HeroAgiSet[1]='Nbrn'
set udg_iA_DTAX_HeroAgiSet[2]='Edem'
set udg_iA_DTAX_HeroAgiSet[3]='N016'
set udg_iA_DTAX_HeroAgiSet[4]='Nbbc'
set udg_iA_DTAX_HeroAgiSet[5]='Naka'
set udg_iA_DTAX_HeroAgiSet[6]='O00P'
set udg_iA_DTAX_HeroAgiSet[7]='Usyl'
set udg_iA_DTAX_HeroAgiSet[8]='E005'
set udg_iA_DTAX_HeroAgiSet[9]='N01O'
set udg_iA_DTAX_HeroAgiSet[10]='HC92'
set udg_iA_DTAX_HeroAgiSet[11]='Hvwd'
set udg_iA_DTAX_HeroAgiSet[12]='HC49'
set udg_iA_DTAX_HeroAgiSet[13]='Huth'
set udg_iA_DTAX_HeroAgiSet[14]='Ogrh'
set udg_iA_DTAX_HeroAgiSet[15]='U006'
set udg_iA_DTAX_HeroAgiSet[16]='EC57'
set udg_iA_DTAX_HeroAgiSet[17]='Eevi'
set udg_iA_DTAX_HeroAgiSet[18]='Ubal'
set udg_iA_DTAX_HeroAgiSet[19]='E004'
set udg_iA_DTAX_HeroAgiSet[20]='EC77'
set udg_iA_DTAX_HeroAgiSet[21]='Hvsh'
set udg_iA_DTAX_HeroAgiSet[22]='Nfir'
set udg_iA_DTAX_HeroAgiSet[23]='E002'
set udg_iA_DTAX_HeroAgiSet[24]='EC45'
set udg_iA_DTAX_HeroAgiSet[25]='Ewar'
set udg_iA_DTAX_HeroAgiSet[26]='U000'
set udg_iA_DTAX_HeroAgiSet[27]='H00V'
set udg_iA_DTAX_HeroAgiSet[28]='E01B'
set udg_iA_DTAX_HeroAgiSet[29]='N01V'
set udg_iA_DTAX_HeroAgiSet[30]='H00I'
set udg_i_DTAX_HeroAgiSetLast=30
set udg_iA_DTAX_HeroStrSet[1]='Npbm'
set udg_iA_DTAX_HeroStrSet[2]='Hlgr'
set udg_iA_DTAX_HeroStrSet[3]='Harf'
set udg_iA_DTAX_HeroStrSet[4]='H000'
set udg_iA_DTAX_HeroStrSet[5]='H001'
set udg_iA_DTAX_HeroStrSet[6]='Hamg'
set udg_iA_DTAX_HeroStrSet[7]='H008'
set udg_iA_DTAX_HeroStrSet[8]='Ucrl'
set udg_iA_DTAX_HeroStrSet[9]='Otch'
set udg_iA_DTAX_HeroStrSet[10]='NC00'
set udg_iA_DTAX_HeroStrSet[11]='Udre'
set udg_iA_DTAX_HeroStrSet[12]='UC11'
set udg_iA_DTAX_HeroStrSet[13]='Ofar'
set udg_iA_DTAX_HeroStrSet[14]='U00F'
set udg_iA_DTAX_HeroStrSet[15]='U00K'
set udg_iA_DTAX_HeroStrSet[16]='O00J'
set udg_iA_DTAX_HeroStrSet[17]='Udea'
set udg_iA_DTAX_HeroStrSet[18]='Opgh'
set udg_iA_DTAX_HeroStrSet[19]='U00A'
set udg_iA_DTAX_HeroStrSet[20]='U007'
set udg_iA_DTAX_HeroStrSet[21]='UC91'
set udg_iA_DTAX_HeroStrSet[22]='UC42'
set udg_iA_DTAX_HeroStrSet[23]='U008'
set udg_iA_DTAX_HeroStrSet[24]='H00D'
set udg_iA_DTAX_HeroStrSet[25]='N01I'
set udg_i_DTAX_HeroStrSetLast=25
set udg_iA_DTAX_HeroIntSet[1]='Orkn'
set udg_iA_DTAX_HeroIntSet[2]='Emoo'
set udg_iA_DTAX_HeroIntSet[3]='Emns'
set udg_iA_DTAX_HeroIntSet[4]='H004'
set udg_iA_DTAX_HeroIntSet[5]='Hjai'
set udg_iA_DTAX_HeroIntSet[6]='Uktl'
set udg_iA_DTAX_HeroIntSet[7]='Hmbr'
set udg_iA_DTAX_HeroIntSet[8]='H00K'
set udg_iA_DTAX_HeroIntSet[9]='Ntin'
set udg_iA_DTAX_HeroIntSet[10]='Hmkg'
set udg_iA_DTAX_HeroIntSet[11]='Hblm'
set udg_iA_DTAX_HeroIntSet[12]='N01A'
set udg_iA_DTAX_HeroIntSet[13]='H00A'
set udg_iA_DTAX_HeroIntSet[14]='Ulic'
set udg_iA_DTAX_HeroIntSet[15]='Ekee'
set udg_iA_DTAX_HeroIntSet[16]='UC76'
set udg_iA_DTAX_HeroIntSet[17]='UC18'
set udg_iA_DTAX_HeroIntSet[18]='UC01'
set udg_iA_DTAX_HeroIntSet[19]='UC60'
set udg_iA_DTAX_HeroIntSet[20]='H00H'
set udg_iA_DTAX_HeroIntSet[21]='Oshd'
set udg_iA_DTAX_HeroIntSet[22]='U00E'
set udg_iA_DTAX_HeroIntSet[23]='E01A'
set udg_iA_DTAX_HeroIntSet[24]='U00P'
set udg_iA_DTAX_HeroIntSet[25]='E00P'
set udg_iA_DTAX_HeroIntSet[26]='E01C'
set udg_iA_DTAX_HeroIntSet[27]='N01W'
set udg_i_DTAX_HeroIntSetLast=27
call ExEx()
endfunction
function InitTrig_HeroDataBase takes nothing returns nothing
endfunction
function ItemIconDataBaseSet takes integer pfX,string pFz returns nothing
call SetString("ItemIcon",I2S(pfX),pFz)
endfunction
function ItemIconDataBase takes nothing returns nothing
call ItemIconDataBaseSet('olig',"ReplaceableTextures\\CommandButtons\\BTNArcaniteArmor.blp")
call ItemIconDataBaseSet('sor3',"ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp")
call ItemIconDataBaseSet('sor6',"ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp")
call ItemIconDataBaseSet('sor5',"ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp")
call ItemIconDataBaseSet('sor4',"ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp")
call ItemIconDataBaseSet('gldo',"ReplaceableTextures\\CommandButtons\\BTNINV_ThrowingAxe_06.blp")
call ItemIconDataBaseSet('ofro',"ReplaceableTextures\\CommandButtons\\BTNRodOfNecromancy.blp")
call ItemIconDataBaseSet('rat6',"ReplaceableTextures\\CommandButtons\\BTNINV_Chest_Plate06.blp")
call ItemIconDataBaseSet('tlum',"ReplaceableTextures\\CommandButtons\\BTNAbility_Rogue_Sprint.blp")
call ItemIconDataBaseSet('tfar',"ReplaceableTextures\\CommandButtons\\BTNRunedBracers.blp")
call ItemIconDataBaseSet('ofir',"ReplaceableTextures\\CommandButtons\\BTNINV_Weapon_Crossbow_10.blp")
call ItemIconDataBaseSet('nspi',"ReplaceableTextures\\CommandButtons\\BTNINV_Hammer_10.blp")
call ItemIconDataBaseSet('ocor',"ReplaceableTextures\\CommandButtons\\BTNINV_Hammer_10.blp")
call ItemIconDataBaseSet('lure',"ReplaceableTextures\\CommandButtons\\BTNThoriumMelee.blp")
call ItemIconDataBaseSet('rej5',"ReplaceableTextures\\CommandButtons\\BTNINV_Wand_06.blp")
call ItemIconDataBaseSet('lnrn',"ReplaceableTextures\\CommandButtons\\BTNINV_Wand_06.blp")
call ItemIconDataBaseSet('mlst',"ReplaceableTextures\\CommandButtons\\BTNINV_Wand_06.blp")
call ItemIconDataBaseSet('mnsf',"ReplaceableTextures\\CommandButtons\\BTNINV_Wand_06.blp")
call ItemIconDataBaseSet('rej1',"ReplaceableTextures\\CommandButtons\\BTNINV_Wand_06.blp")
call ItemIconDataBaseSet('wswd',"ReplaceableTextures\\CommandButtons\\BTNINV_Sword_11.blp")
call ItemIconDataBaseSet('rej2',"ReplaceableTextures\\CommandButtons\\BTNStaffofpurification.blp")
call ItemIconDataBaseSet('tbak',"ReplaceableTextures\\CommandButtons\\BTNIceShard.blp")
call ItemIconDataBaseSet('thdm',"ReplaceableTextures\\CommandButtons\\BTNIceShard.blp")
call ItemIconDataBaseSet('spre',"ReplaceableTextures\\CommandButtons\\BTNINV_Sword_09.blp")
call ItemIconDataBaseSet('pdiv',"ReplaceableTextures\\CommandButtons\\BTNGoldGloves.BLP")
call ItemIconDataBaseSet('klmm',"ReplaceableTextures\\CommandButtons\\BTNINV_Helmet_17.blp")
call ItemIconDataBaseSet('kgal',"ReplaceableTextures\\CommandButtons\\BTNHeartOfAszune.blp")
call ItemIconDataBaseSet('rots',"ReplaceableTextures\\CommandButtons\\BTNINV_Helmet_13.blp")
call ItemIconDataBaseSet('kybl',"ReplaceableTextures\\CommandButtons\\BTNOrb of Water.blp")
call ItemIconDataBaseSet('ccmd',"ReplaceableTextures\\CommandButtons\\BTNINV_Axe_16.blp")
call ItemIconDataBaseSet('rnec',"ReplaceableTextures\\CommandButtons\\BTNStormHammer.blp")
call ItemIconDataBaseSet('schl',"ReplaceableTextures\\CommandButtons\\BTNINV_ThrowingAxe_02.blp")
call ItemIconDataBaseSet('horl',"ReplaceableTextures\\CommandButtons\\BTNHelmOfValor.blp")
call ItemIconDataBaseSet('mnst',"ReplaceableTextures\\CommandButtons\\BTNSpellShieldAmulet.blp")
call ItemIconDataBaseSet('rugt',"ReplaceableTextures\\CommandButtons\\BTNINV_Weapon_Halberd_10.blp")
call ItemIconDataBaseSet('sfog',"ReplaceableTextures\\CommandButtons\\BTNThoriumArmor.blp")
call ItemIconDataBaseSet('ches',"ReplaceableTextures\\CommandButtons\\BTNNecromancerMaster.blp")
call ItemIconDataBaseSet('gsou',"ReplaceableTextures\\CommandButtons\\BTNTalisman.tga")
call ItemIconDataBaseSet('soul',"ReplaceableTextures\\CommandButtons\\BTNINV_Mace_10.blp")
call ItemIconDataBaseSet('ratf',"ReplaceableTextures\\CommandButtons\\BTNOrbOfFire.blp")
call ItemIconDataBaseSet('hlst',"ReplaceableTextures\\CommandButtons\\BTNWirtsLeg.blp")
call ItemIconDataBaseSet('ram4',"ReplaceableTextures\\CommandButtons\\BTNTransmute.blp")
call ItemIconDataBaseSet('oven',"ReplaceableTextures\\CommandButtons\\BTNHeartOfSearinox.blp")
call ItemIconDataBaseSet('grsl',"ReplaceableTextures\\CommandButtons\\BTNRingVioletSpider.tga")
call ItemIconDataBaseSet('ram1',"ReplaceableTextures\\CommandButtons\\BTNJapaneseSword.BLP")
call ItemIconDataBaseSet('rnsp',"ReplaceableTextures\\CommandButtons\\BTNSpell_Holy_BlessingOfStrength.blp")
call ItemIconDataBaseSet('bfhr',"ReplaceableTextures\\CommandButtons\\BTNHornOfDoom.blp")
call ItemIconDataBaseSet('oslo',"ReplaceableTextures\\CommandButtons\\BTNPhilosophersStone.blp")
call ItemIconDataBaseSet('tels',"ReplaceableTextures\\CommandButtons\\BTNAbility_Gouge.blp")
call ItemIconDataBaseSet('rde4',"ReplaceableTextures\\CommandButtons\\BTNINV_ThrowingKnife_04.blp")
call ItemIconDataBaseSet('sor9',"ReplaceableTextures\\CommandButtons\\BTNRevenant.blp")
call ItemIconDataBaseSet('rde0',"ReplaceableTextures\\CommandButtons\\BTNINV_Sword_10.blp")
call ItemIconDataBaseSet('pspd',"ReplaceableTextures\\CommandButtons\\BTNINV_Sword_25.blp")
call ItemIconDataBaseSet('bgst',"ReplaceableTextures\\CommandButtons\\BTNBelt.blp")
call ItemIconDataBaseSet('tmmt',"ReplaceableTextures\\CommandButtons\\BTNINV_ThrowingKnife_03.blp")
call ItemIconDataBaseSet('tmsc',"ReplaceableTextures\\CommandButtons\\BTNClawsOfAttack.blp")
call ItemIconDataBaseSet('belv',"ReplaceableTextures\\CommandButtons\\BTNBoots.blp")
call ItemIconDataBaseSet('tgxp',"ReplaceableTextures\\CommandButtons\\BTNBootsOfSpeed.blp")
call ItemIconDataBaseSet('sor2',"ReplaceableTextures\\CommandButtons\\BTNSteelMelee.blp")
call ItemIconDataBaseSet('tbsm',"ReplaceableTextures\\CommandButtons\\BTNINV_Chest_Chain_12.blp")
call ItemIconDataBaseSet('tbar',"ReplaceableTextures\\CommandButtons\\BTNCirclet.blp")
call ItemIconDataBaseSet('sora',"ReplaceableTextures\\CommandButtons\\BTNINV_Sword_19.blp")
call ItemIconDataBaseSet('srtl',"ReplaceableTextures\\CommandButtons\\BTNFrostMourne.blp")
call ItemIconDataBaseSet('srbd',"ReplaceableTextures\\CommandButtons\\BTNINV_Weapon_Bow_06.blp")
call ItemIconDataBaseSet('pgin',"ReplaceableTextures\\CommandButtons\\BTNEnchantedGemstone.blp")
call ItemIconDataBaseSet('stwa',"ReplaceableTextures\\CommandButtons\\BTNGauntletsOfOgrePower.blp")
call ItemIconDataBaseSet('oflg',"ReplaceableTextures\\CommandButtons\\BTNGem.blp")
call ItemIconDataBaseSet('stre',"ReplaceableTextures\\CommandButtons\\BTNGlove.blp")
call ItemIconDataBaseSet('scul',"ReplaceableTextures\\CommandButtons\\BTNHelmutPurple.blp")
call ItemIconDataBaseSet('sprn',"ReplaceableTextures\\CommandButtons\\BTNPeriapt1.blp")
call ItemIconDataBaseSet('iwbr',"ReplaceableTextures\\CommandButtons\\BTNNatureTouchGrow.blp")
call ItemIconDataBaseSet('desc',"ReplaceableTextures\\CommandButtons\\BTNDaggerOfEscape.blp")
call ItemIconDataBaseSet('sbok',"ReplaceableTextures\\CommandButtons\\BTNMantleOfIntelligence.blp")
call ItemIconDataBaseSet('jdrn',"ReplaceableTextures\\CommandButtons\\BTNUndeadShrine.blp")
call ItemIconDataBaseSet('rump',"ReplaceableTextures\\CommandButtons\\BTNSpiritWalkerMasterTraining.blp")
call ItemIconDataBaseSet('flag',"ReplaceableTextures\\CommandButtons\\BTNHammer.blp")
call ItemIconDataBaseSet('ram2',"ReplaceableTextures\\CommandButtons\\BTNStaffOfNegation.blp")
call ItemIconDataBaseSet('sksh',"ReplaceableTextures\\CommandButtons\\BTNSpiritWalkerAdeptTraining.tga")
call ItemIconDataBaseSet('sor1',"ReplaceableTextures\\CommandButtons\\BTNINV_Misc_Cape_08.blp")
call ItemIconDataBaseSet('ram3',"ReplaceableTextures\\CommandButtons\\BTNINV_Chest_Plate13.blp")
call ItemIconDataBaseSet('hbth',"ReplaceableTextures\\CommandButtons\\BTNUsedSoulGem.blp")
call ItemIconDataBaseSet('whwd',"ReplaceableTextures\\CommandButtons\\BTNAlleriaFlute.blp")
call ItemIconDataBaseSet('rej6',"ReplaceableTextures\\CommandButtons\\BTNGoldRing.blp")
call ItemIconDataBaseSet('modt',"ReplaceableTextures\\CommandButtons\\BTNRingGreen.blp")
call ItemIconDataBaseSet('tkno',"ReplaceableTextures\\CommandButtons\\BTNRingSkull.blp")
call ItemIconDataBaseSet('ciri',"ReplaceableTextures\\CommandButtons\\BTNRobeOfTheMagi.blp")
call ItemIconDataBaseSet('shrs',"ReplaceableTextures\\CommandButtons\\BTNStaffOfTeleportation.blp")
call ItemIconDataBaseSet('shdt',"ReplaceableTextures\\CommandButtons\\BTNSlippersOfAgility.blp")
call ItemIconDataBaseSet('shhn',"ReplaceableTextures\\CommandButtons\\BTNSobiMask.blp")
call ItemIconDataBaseSet('shtm',"ReplaceableTextures\\CommandButtons\\BTNWandOfCyclone.blp")
call ItemIconDataBaseSet('rej4',"ReplaceableTextures\\CommandButtons\\BTNImprovedUnholyArmor.blp")
call ItemIconDataBaseSet('gvsm',"ReplaceableTextures\\CommandButtons\\BTNOrbofSlowness.blp")
call ItemIconDataBaseSet('oli2',"ReplaceableTextures\\CommandButtons\\BTNSoulGem.blp")
call ItemIconDataBaseSet('shcw',"ReplaceableTextures\\CommandButtons\\BTNPeriapt.blp")
call ItemIconDataBaseSet('silk',"ReplaceableTextures\\CommandButtons\\BTNAncientOfTheEarth.blp")
call ItemIconDataBaseSet('sman',"ReplaceableTextures\\CommandButtons\\BTNCritterChicken.blp")
call ItemIconDataBaseSet('shea',"ReplaceableTextures\\CommandButtons\\BTNCheese.blp")
call ItemIconDataBaseSet('plcl',"ReplaceableTextures\\CommandButtons\\BTNLesserClarityPotion.blp")
call ItemIconDataBaseSet('sor8',"ReplaceableTextures\\CommandButtons\\BTNPotionBlueBig.blp")
call ItemIconDataBaseSet('sor7',"ReplaceableTextures\\CommandButtons\\BTNSentryWard.blp")
call ItemIconDataBaseSet('stwp',"ReplaceableTextures\\CommandButtons\\BTNScrollUber.blp")
call ItemIconDataBaseSet('tgrh',"ReplaceableTextures\\CommandButtons\\BTNSentryWard.blp")
call ItemIconDataBaseSet('I016',"ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp")
call ItemIconDataBaseSet('I006',"ReplaceableTextures\\CommandButtons\\BTNINV_Wand_05.blp")
call ItemIconDataBaseSet('I00T',"ReplaceableTextures\\CommandButtons\\BTNArcaneRing.blp")
call ItemIconDataBaseSet('I00I',"ReplaceableTextures\\CommandButtons\\BTNBottle1.blp")
call ItemIconDataBaseSet('I00H',"ReplaceableTextures\\CommandButtons\\BTNBottle2.blp")
call ItemIconDataBaseSet('I00J',"ReplaceableTextures\\CommandButtons\\BTNBottle3.blp")
call ItemIconDataBaseSet('I00K',"ReplaceableTextures\\CommandButtons\\BTNBottle4.blp")
call ItemIconDataBaseSet('I00G',"ReplaceableTextures\\CommandButtons\\BTNBottle0.blp")
call ItemIconDataBaseSet('I00Q',"ReplaceableTextures\\CommandButtons\\BTNThunderMallet.blp")
call ItemIconDataBaseSet('I002',"ReplaceableTextures\\CommandButtons\\BTNNecromancerMaster.blp")
call ItemIconDataBaseSet('I001',"ReplaceableTextures\\CommandButtons\\BTNNecromancerMaster.blp")
call ItemIconDataBaseSet('I017',"ReplaceableTextures\\CommandButtons\\BTNOrbOfFrost.blp")
call ItemIconDataBaseSet('I00L',"ReplaceableTextures\\CommandButtons\\BTNAdvancedUnholyArmor.blp")
call ItemIconDataBaseSet('I012',"ReplaceableTextures\\CommandButtons\\BTNCloakOfFlames.blp")
endfunction
function InitTrig_ItemIconDataBase takes nothing returns nothing
endfunction
function Trig_Quests_Actions takes nothing returns nothing
call CreateQuestBJ(0,"Contacts","If you find any bugs or have suggestions or comments, please message me through http://www.getdota.com/contact/n/nIf you need to email, you may send to mailto:IceFrogDota@gmail.com")
call CreateQuestBJ(0,"Useful Information","Game Modes:\n-allpick(-ap), -allrandom(-ar), -leaguemode(-lm), -randomdraft (-rd), -mirrormatch(-mm), -teamrandom(-tr), -deathmatch(-dm), -moderandom(-mr), -voterandom(-vr), -reverse(-rv), -duplicatemode(-du), -shuffleplayers(-sp), -samehero(-sh), -allagility(-aa), -allintelligence(-ai), -allstrength(-as), -itemdrop(-id), -easymode(-em), -nopowerups(-np), -supercreeps(-sc)\n\nGame Commands:\n-ma, -ms, -cs, -cson, -csoff, -disablehelp, -enablehelp, -unstuck, -recreate, -swaphero, -showmsg, -hidemsg, -showdeny, -hidedeny, -weather rain, -weather snow, -weather off, -denyinfo (-di)\n\nFound a bug?\nwww.getdota.com/contact\n\nFor fun modes:\n-wtf","ReplaceableTextures\\CommandButtons\\BTNTome.blp")
call CreateQuestBJ(0,"Credits","First and foremost, thanks to the community for supporting the map for so long. We wouldn't be here without you.\n\nSome people that have helped me in one form or another include, but not limited to: Ki-Hunterkiller, arthur5863, Neichus, coL.Warr1ck, Zetta, Plastic.Angel, TheRandomDude, Naz, IEatDeadPeoples, RodOfNod, DamnNoHtml, Mercurial, Trystero, Cottontop, Minotaar, Switch, Terrorblaze, Ro-Coco, unHOLYdoNUTS, eva00r, TheMantis, Ska_Goblin, ~PGRu-Unexpect3D, PitzerMike, snork, M3Th0dz, War-Mage, Malle, seerTneerGevoLI, Vexorian, MetallibaN, sSerenity and SetzerGabbiani. Many others have contributed in some form or another, thank you.\n\nThis map has been written from scratch. Though the map become something else entirely since, a few of the ideas are to be credited to Eul for the first DotA on ROC and then Meian/Guinsoo on TFT.\n\nDue to space limitations in this window, i cannot list everything here. For various other contributors and resource credits visit getdota.com/MiscCredits.txt","ReplaceableTextures\\CommandButtons\\BTNAmbush.blp")
call CreateQuestBJ(2,"League Rules","TRIGSTR_7232","ReplaceableTextures\\CommandButtons\\BTNBansheeMaster.blp")
call CreateQuestBJ(2,"TDA Rules","TRIGSTR_7244","ReplaceableTextures\\CommandButtons\\BTNBansheeMaster.blp")
endfunction
function StartTrigger_Quests takes nothing returns nothing
set gg_trg_Quests=CreateTrigger()
call TriggerRegisterTimerEventSingle(gg_trg_Quests,.01)
call TriggerAddAction(gg_trg_Quests,function Trig_Quests_Actions)
endfunction
function InitTrig_Quests takes nothing returns nothing
endfunction
function Trig_InitSpellsForHero_Conditions takes nothing returns boolean
return GetUnitTypeId(GetTriggerUnit())!='E01L' and IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO) and IsUnitIllusion(GetTriggerUnit())==false and HaveStoredBoolean(udg_gc_DTAX_Core,H2Tx(GetTriggerUnit()),"EnteredAlready")==false and GetUnitTypeId(GetTriggerUnit())!='H00J'
endfunction
function gfgf takes unit pgF returns nothing
local string lf5=H2Tx(GetOwningPlayer(pgF))
local unit lgg=GetUnit(lf5,"Kobold0")
local unit lgG=GetUnit(lf5,"Kobold1")
local unit lgh=GetUnit(lf5,"Kobold2")
local unit lgH=GetUnit(lf5,"Kobold3")
local unit lgi
set lgi=lgg
if lgi!=null then
call RemoveUnit(lgi)
endif
set lgi=lgG
if lgi!=null then
call RemoveUnit(lgi)
endif
set lgi=lgh
if lgi!=null then
call RemoveUnit(lgi)
endif
set lgi=lgH
if lgi!=null then
call RemoveUnit(lgi)
endif
endfunction
function HmHm takes player pES,string pFg returns nothing
if IsPlayerInForce(GetLocalPlayer(),GetPlayersEnemies(pES))then
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,udg_A6,40,udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(pES)]+GetPlayerName(pES)+"|r "+pFg)
endif
endfunction
function HnHn takes nothing returns boolean
return GetUnitTypeId(GetFilterUnit())=='n00C'
endfunction
function HNHN takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function HoHo takes player pEk returns nothing
local group lEw=CreateGroup()
local boolexpr lEW=Condition(function HnHn)
call GroupEnumUnitsOfPlayer(lEw,pEk,lEW)
call ForGroup(lEw,function HNHN)
call DestroyBoolExpr(lEW)
call DestroyGroup(lEw)
endfunction
function InitSpellsForHero takes unit pWho returns nothing
local integer lgK=GetUnitPointValue(pWho)
local unit lgl
if(lgK==34)then
call ExecuteFunc("StartTrigger_Mana_Void")
elseif(lgK==37)then
call ExecuteFunc("BeastRageInit")
call ExecuteFunc("StartTrigger_Primal_Roar")
call ExecuteFunc("WildAxesInit")
call ExecuteFunc("StartTrigger_Call_of_the_Wild")
elseif(lgK==38)then
call ExecuteFunc("StartTrigger_Dual_Breath")
call ExecuteFunc("StartTrigger_Auto_Fire")
call ExecuteFunc("IcePath_Init")
call ExecuteFunc("Macropyre_Init")
elseif(lgK==32)then
call ExecuteFunc("TrackInit")
call ExecuteFunc("gS")
elseif(lgK==29)then
call ExecuteFunc("WarpathInit")
call ExecuteFunc("Nasal_Goo_Init")
call ExecuteFunc("Bristleback_Init")
call ExecuteFunc("Quill_Spray_Init")
elseif(lgK==31)then
call ExecuteFunc("StartTrigger_Double_Edge")
call ExecuteFunc("Return_Init")
elseif(lgK==24)then
call ExecuteFunc("StartTrigger_Penitence")
call ExecuteFunc("StartTrigger_Hand_of_God")
call ExecuteFunc("StartTrigger_Holy_Persuasion")
call ExecuteFunc("StartTrigger_Test_of_Faith")
elseif(lgK==5)then
call ExecuteFunc("Freezing_Field_Init")
elseif(lgK==8)then
call ExecuteFunc("StartTrigger_Echo_Slam")
call ExecuteFunc("Fissure_Init")
call ExecuteFunc("StartTrigger_Aftershock")
call ExecuteFunc("StartTrigger_Double_Damage_Rune")
call ExecuteFunc("StartTrigger_Double_Damage_End")
elseif(lgK==3)then
call ExecuteFunc("StartTrigger_Enchant")
call ExecuteFunc("StartTrigger_Nature_Attendants")
call ExecuteFunc("StartTrigger_Impetus")
call ExecuteFunc("Untouchable_Init")
elseif(lgK==15)then
call ExecuteFunc("Black_Hole_Init")
call ExecuteFunc("StartTrigger_Malefice")
call ExecuteFunc("StartTrigger_Midnight_Pulse")
call ExecuteFunc("StartTrigger_Conversion")
elseif(lgK==20)then
call ExecuteFunc("Sprout_Init")
call ExecuteFunc("TeleportationFXInit")
elseif(lgK==12)then
call ExecuteFunc("StartTrigger_Healing_Ward")
call ExecuteFunc("StartTrigger_Blade_Fury")
elseif(lgK==16)then
call ExecuteFunc("ManaLeak_Init")
call ExecuteFunc("ManaLeakDrain_Init")
call ExecuteFunc("StartTrigger_Chakra_Magic")
call ExecuteFunc("StartTrigger_Illuminate")
elseif(lgK==25)then
call ExecuteFunc("Eclipse_Init")
call ExecuteFunc("StartTrigger_Moon_Glaive")
elseif(lgK==4)then
call ExecuteFunc("MorphColorShift_Init")
call ExecuteFunc("Waveform_Init")
call ExecuteFunc("Morph_Init")
call ExecuteFunc("Adaptive_Strike_Init")
call ExecuteFunc("Replicate_Init")
call SetUnitPathing(pWho,false)
set lgl=CreateUnit(GetOwningPlayer(pWho),GetUnitTypeId(pWho),GetUnitX(pWho),GetUnitY(pWho),GetUnitFacing(pWho))
call StoreBoolean(udg_gc_DTAX_Core,H2Tx(lgl),"EnteredAlready",true)
set udg_uA_DTAX_player_hero_unit[GetPlayerId(GetOwningPlayer(pWho))]=lgl
call SetUnitPathing(lgl,false)
call SetUnitPosition(lgl,GetUnitX(pWho),GetUnitY(pWho))
if udg_b_DTAX_is_deathmatch_mode then
call SetHeroXP(lgl,GetHeroXP(pWho),false)
call UnitAddItem(lgl,UnitItemInSlot(pWho,0))
call UnitAddItem(lgl,UnitItemInSlot(pWho,1))
call UnitAddItem(lgl,UnitItemInSlot(pWho,2))
call UnitAddItem(lgl,UnitItemInSlot(pWho,3))
call UnitAddItem(lgl,UnitItemInSlot(pWho,4))
call UnitAddItem(lgl,UnitItemInSlot(pWho,5))
endif
call DropUnit(pWho)
call SetUnitPathing(lgl,true)
call ClearSelectionForPlayer(GetOwningPlayer(lgl))
call SelectUnitAddForPlayer(lgl,GetOwningPlayer(lgl))
elseif(lgK==7)then
call ExecuteFunc("SirenSong_Init")
elseif(lgK==18)then
call ExecuteFunc("MulticastLeveling_Init")
call ExecuteFunc("MulticastLust_Init")
call ExecuteFunc("Multicast_Init")
elseif(lgK==36)then
call ExecuteFunc("Purification_Init")
elseif(lgK==21)then
call ExecuteFunc("DropWalkMove_Init")
call ExecuteFunc("StartTrigger_Phantom_Edge")
call ExecuteFunc("StartTrigger_Spirit_Lance")
call ExecuteFunc("DoppelwalkInit")
elseif(lgK==14)then
call ExecuteFunc("OvergrowthInit")
call ExecuteFunc("Guise_Init")
elseif(lgK==13)then
call ExecuteFunc("SilentCurse_Init")
call ExecuteFunc("Glaives_Steal_Init")
call ExecuteFunc("Glaives_Damage_Init")
call ExecuteFunc("StartTrigger_Global_Silence")
call ExecuteFunc("Last_Word_Init")
elseif(lgK==26)then
call ExecuteFunc("StartTrigger_ScatterShot")
call ExecuteFunc("StartTrigger_Assassinate")
call ExecuteFunc("StartTrigger_Take_Aim")
elseif(lgK==9)then
call ExecuteFunc("StartTrigger_Permanent_Invisibility")
call ExecuteFunc("StartTrigger_Backstab")
call ExecuteFunc("Smoke_Screen_Init")
elseif(lgK==10)then
call ExecuteFunc("StartTrigger_Spirit_Bear_AutoReturn")
call ExecuteFunc("SpiritBearSummon_Init")
call ExecuteFunc("StartTrigger_Spirit_Bear_Return")
call ExecuteFunc("StartTrigger_Spirit_Bear_Learn")
call ExecuteFunc("StartTrigger_Synergy")
call ExecuteFunc("StartTrigger_Spirit_Bear_Death")
call ExecuteFunc("StartTrigger_Spirit_KillBear")
elseif(lgK==23)then
call ExecuteFunc("StartTrigger_Remote_Mines")
call ExecuteFunc("StartTrigger_Remote_Mines_Detonate")
call ExecuteFunc("StartTrigger_Goblin_Land_Mine_Counter")
elseif(lgK==19)then
call ExecuteFunc("StartTrigger_March_of_the_Machines")
call ExecuteFunc("StartTrigger_Laser")
call ExecuteFunc("StartTrigger_Rearm")
elseif(lgK==22)then
call ExecuteFunc("GrowInit")
call ExecuteFunc("StartTrigger_Avalanche")
call ExecuteFunc("StartTrigger_Toss")
call ExecuteFunc("StartTrigger_Craggy_Exterior")
elseif(lgK==17)then
call ExecuteFunc("Overpower_Init")
call ExecuteFunc("OverpowerCast_Init")
call ExecuteFunc("StartTrigger_Enrage")
elseif(lgK==1)then
call ExecuteFunc("Nether_Swap_Init")
elseif(lgK==2)then
call ExecuteFunc("Static_Field_Init")
call ExecuteFunc("StartTrigger_Thundergod_Wrath")
call ExecuteFunc("Lightning_Bolt_Init")
elseif(lgK==27)then
call ExecuteFunc("StartTrigger_Berserker_Rage_Cast")
call ExecuteFunc("StartTrigger_Berserker_Rage_Learn")
elseif(lgK==82)then
call ExecuteFunc("StartTrigger_Battle_Hunger_Dispell")
call ExecuteFunc("StartTrigger_Counter_Helix")
call ExecuteFunc("StartTrigger_Berserker_Call")
call ExecuteFunc("StartTrigger_Culling_Blade")
elseif(lgK==75)then
call ExecuteFunc("Nightmare_Init")
call ExecuteFunc("Fiends_Grip_Init")
elseif(lgK==83)then
call ExecuteFunc("StartTrigger_Blood_Bath")
call ExecuteFunc("StartTrigger_Rupture")
call ExecuteFunc("Blood_Seeking_Init")
elseif(lgK==59)then
call ExecuteFunc("Spin_Web_Summon_Init")
call ExecuteFunc("Spin_Web_Hide_Init")
elseif(lgK==57)then
call ExecuteFunc("StartTrigger_Chaos_Bolt")
elseif(lgK==69)then
call ExecuteFunc("StartTrigger_Time_Walk")
call ExecuteFunc("StartTrigger_Backtrack")
call ExecuteFunc("Chronosphere_Init")
elseif(lgK==50)then
call ExecuteFunc("LeshExplosionsInit")
elseif(lgK==51)then
call ExecuteFunc("StartTrigger_Chain_Frost")
elseif(lgK==64)then
call ExecuteFunc("StartTrigger_LVL_Death")
call ExecuteFunc("StartTrigger_Devour")
call ExecuteFunc("StartTrigger_Scorched_Earth")
elseif(lgK==55)then
call ExecuteFunc("StartTrigger_Reverse_Polarity")
elseif(lgK==61)then
call ExecuteFunc("StartTrigger_Split_Shot")
elseif(lgK==76)then
call ExecuteFunc("StartTrigger_Sadist")
call ExecuteFunc("StartTrigger_Death_Pulse")
call ExecuteFunc("LifeReaperInit")
elseif(lgK==80)then
call ExecuteFunc("StartTrigger_Necromastery")
call ExecuteFunc("StartTrigger_Shadowraze")
call ExecuteFunc("StartTrigger_Requiem_of_Souls_Cast")
call ExecuteFunc("StartTrigger_Requiem_of_Souls_Effect")
call ExecuteFunc("StartTrigger_Skills_Learn")
elseif(lgK==62)then
call ExecuteFunc("StartTrigger_Crippling_Fear")
call ExecuteFunc("StartTrigger_Void")
elseif(lgK==60)then
call ExecuteFunc("StartTrigger_Blur")
elseif(lgK==77)then
call ExecuteFunc("RootInit")
call ExecuteFunc("FleshHeapInit")
call ExecuteFunc("StartTrigger_Meat_Hook")
elseif(lgK==73)then
call ExecuteFunc("StartTrigger_Nether_Ward")
elseif(lgK==81)then
call ExecuteFunc("StartTrigger_Burrowstrike")
call ExecuteFunc("StartTrigger_Epicenter")
call ExecuteFunc("StartTrigger_Sand_Storm_Start")
call ExecuteFunc("StartTrigger_Sand_Storm_Finish")
elseif(lgK==66)then
call ExecuteFunc("StartTrigger_Slithereen_Crush")
elseif(lgK==78)then
call ExecuteFunc("Charge_Init")
call ExecuteFunc("HasteInit")
call ExecuteFunc("Greater_Bash_Init")
call ExecuteFunc("Nether_Strike_Init")
elseif(lgK==49)then
call ExecuteFunc("Sunder_Init")
call ExecuteFunc("Conjure_Image_Init")
elseif(lgK==74)then
call ExecuteFunc("StartTrigger_Kraken_Shell")
call ExecuteFunc("StartTrigger_Gush")
call ExecuteFunc("StartTrigger_Ravage")
elseif(lgK==54)then
call ExecuteFunc("StartTrigger_Poison_Nova")
elseif(lgK==70)then
call ExecuteFunc("StartTrigger_Corrosive_Skin")
elseif(lgK==56)then
call ExecuteFunc("StartTrigger_Raise_Revenants")
call ExecuteFunc("StartTrigger_Grave_Chill")
call ExecuteFunc("StartTrigger_Soul_Assumption")
call ExecuteFunc("GravekeeperInit")
elseif(lgK==79)then
call ExecuteFunc("ShukuchiInit")
call ExecuteFunc("h2")
call ExecuteFunc("h3")
elseif(lgK==68)then
call ExecuteFunc("StartTrigger_Searing_Arrows")
elseif(lgK==84)then
call ExecuteFunc("Coil_Init")
call ExecuteFunc("MarkOfTheAbyss_Init")
call ExecuteFunc("Aphotic_Init")
call ExecuteFunc("BurrowTime_Init")
elseif(lgK==85)then
call ExecuteFunc("Spectral_Dagger_Init")
call ExecuteFunc("DesolateInit")
call ExecuteFunc("DispersionInit")
call ExecuteFunc("Haunt_Init")
call ExecuteFunc("Reality_Init")
elseif(lgK==86)then
call ExecuteFunc("CasksInit")
call ExecuteFunc("MaledictInit")
call ExecuteFunc("VoodooInit")
elseif(lgK==87)then
call ExecuteFunc("StartTrigger_Arcane_Orb")
call ExecuteFunc("StartTrigger_Essence_Aura")
call ExecuteFunc("Astral_Imprisonment_Init")
call ExecuteFunc("StartTrigger_Sanity_Eclipse")
elseif(lgK==33)then
call ExecuteFunc("Dragon_Blood_Init")
elseif(lgK==39)then
call ExecuteFunc("GoblinGreedInit")
call ExecuteFunc("ConcoctionInit")
call ExecuteFunc("AcidSprayInit")
elseif(lgK==88)then
call ExecuteFunc("UpheavalInit")
call ExecuteFunc("FatalBoundsInit")
call ExecuteFunc("Hi")
elseif(lgK==40)then
call ExecuteFunc("Moonlight_Shadow_Init")
call ExecuteFunc("Hj")
call ExecuteFunc("HJ")
call ExecuteFunc("Leap_Init")
elseif lgK==89 then
call ExecuteFunc("Poof_Init")
call ExecuteFunc("Earthbind_Init")
call ExecuteFunc("StartTrigger_Duplicates_Levelling")
elseif lgK==90 then
call ExecuteFunc("Shadow_Wave_Init")
call ExecuteFunc("Poison_Touch_Init")
call ExecuteFunc("Weave_Init")
call ExecuteFunc("ShallowGrave_Init")
elseif lgK==71 then
call ExecuteFunc("StartTrigger_Storm_Seeker")
endif
endfunction
function Trig_InitSpellsForHero_Actions takes nothing returns nothing
local unit lfo=GetTriggerUnit()
local player lEk=GetOwningPlayer(lfo)
local real lxx
local real lyy
local region lrr=CreateRegion()
local player lHp=lEk
call RegionAddRect(lrr,gg_rct_SentinelTavernsRect)
call RegionAddRect(lrr,gg_rct_ScourgeTavernsRect)
if udg_b_DTAX_is_Reverse_mode and udg_bd==false then
set udg_bc[GetPlayerId(lEk)]=true
set lEk=GetPlayer("Global|ReverseMode",GetPlayerName(lEk))
call SetUnitOwner(lfo,lEk,true)
call SetPlayerState(lHp,PLAYER_STATE_RESOURCE_FOOD_CAP,6)
endif
if PlayerIsSentinel(GetOwningPlayer(lfo))then
if IsUnitInRegion(lrr,lfo)then
set lxx=GetRandomReal(GetRectMinX(gg_rct_SentinelHeroSpawn),GetRectMaxX(gg_rct_SentinelHeroSpawn))
set lyy=GetRandomReal(GetRectMinY(gg_rct_SentinelHeroSpawn),GetRectMaxY(gg_rct_SentinelHeroSpawn))
else
set lxx=GetUnitX(lfo)
set lyy=GetUnitY(lfo)
endif
else
if IsUnitInRegion(lrr,lfo)then
set lxx=GetRandomReal(GetRectMinX(gg_rct_ScourgeHeroSpawn),GetRectMaxX(gg_rct_ScourgeHeroSpawn))
set lyy=GetRandomReal(GetRectMinY(gg_rct_ScourgeHeroSpawn),GetRectMaxY(gg_rct_ScourgeHeroSpawn))
else
set lxx=GetUnitX(lfo)
set lyy=GetUnitY(lfo)
endif
endif
set udg_bb[GetPlayerId(lEk)]=true
if not udg_b_DTAX_is_Reverse_mode or udg_bd then
call PanCameraToTimedForPlayer(lEk,lxx,lyy,0)
call ClearSelectionForPlayer(lEk)
call SelectUnitAddForPlayer(lfo,lEk)
endif
call SetUnitX(lfo,lxx)
call SetUnitY(lfo,lyy)
set udg_uA_DTAX_player_hero_unit[GetPlayerId(lEk)]=lfo
if udg_b_DTAX_is_Reverse_mode and udg_bd==false then
call HeroDenyForPlayer(lHp)
else
call HeroDenyForPlayer(lEk)
endif
call StoreBoolean(udg_gc_DTAX_Core,H2Tx(lfo),"EnteredAlready",true)
if not udg_b_DTAX_is_dupe_mode then
set udg_bA_DTAX_used_hero_types_SAME1[GetUnitPointValue(lfo)]=true
call HeroDenyAll(GetUnitTypeId(lfo))
endif
if udg_b_DTAX_is_deathmatch_mode then
if PlayerIsSentinel(lEk)then
set udg_iA_UNKNOWN_heroes_count_per_team[0]=udg_iA_UNKNOWN_heroes_count_per_team[0]+1
else
set udg_iA_UNKNOWN_heroes_count_per_team[1]=udg_iA_UNKNOWN_heroes_count_per_team[1]+1
endif
set udg_iA_UNKNOWN_player_death_counter[GetPlayerId(lEk)]=udg_iA_UNKNOWN_player_death_counter[GetPlayerId(lEk)]+1
if udg_iA_UNKNOWN_player_death_counter[GetPlayerId(GetOwningPlayer(lfo))]>1 and lfo!=udg_uA_DTAX_player_died_unit[GetPlayerId(GetOwningPlayer(lfo))]then
call SetHeroXP(lfo,GetHeroXP(udg_uA_DTAX_player_died_unit[GetPlayerId(GetOwningPlayer(lfo))]),false)
call UnitAddItem(lfo,UnitItemInSlot(udg_uA_DTAX_player_died_unit[GetPlayerId(GetOwningPlayer(lfo))],0))
call UnitAddItem(lfo,UnitItemInSlot(udg_uA_DTAX_player_died_unit[GetPlayerId(GetOwningPlayer(lfo))],1))
call UnitAddItem(lfo,UnitItemInSlot(udg_uA_DTAX_player_died_unit[GetPlayerId(GetOwningPlayer(lfo))],2))
call UnitAddItem(lfo,UnitItemInSlot(udg_uA_DTAX_player_died_unit[GetPlayerId(GetOwningPlayer(lfo))],3))
call UnitAddItem(lfo,UnitItemInSlot(udg_uA_DTAX_player_died_unit[GetPlayerId(GetOwningPlayer(lfo))],4))
call UnitAddItem(lfo,UnitItemInSlot(udg_uA_DTAX_player_died_unit[GetPlayerId(GetOwningPlayer(lfo))],5))
if gege(udg_uA_DTAX_player_died_unit[GetPlayerId(GetOwningPlayer(lfo))])then
call gfgf(udg_uA_DTAX_player_died_unit[GetPlayerId(GetOwningPlayer(lfo))])
else
call DropUnit(udg_uA_DTAX_player_died_unit[GetPlayerId(GetOwningPlayer(lfo))])
endif
endif
endif
if udg_b_DTAX_is_Reverse_mode then
if TimerGetElapsed(udg_t_DTAX_game_time)>60 then
call HmHm(lEk,"has been automatically assigned "+GetUnitName(lfo))
elseif udg_bA_DTAX_player_randomed[GetPlayerId(lHp)] then
call HmHm(lEk,"has been randomly given "+GetUnitName(lfo)+" by "+GetPlayerName(lHp))
else
call SetPlayerState(lHp,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(lHp,PLAYER_STATE_RESOURCE_GOLD)+250)
call HmHm(lEk,"has been given "+GetUnitName(lfo)+" by "+GetPlayerName(lHp))
endif
elseif udg_b_DTAX_is_samehero_mode==false or lEk==udg_p_DTAX_Host then
if(udg_bA_DTAX_player_has_repicked_hero[GetPlayerId(GetOwningPlayer(lfo))] and udg_b_DTAX_is_samehero_mode==false)then
call HmHm(lEk,"has repicked into "+GetUnitName(lfo)+".")
elseif((udg_bA_DTAX_player_randomed[GetPlayerId(lEk)] and udg_b_DTAX_is_deathmatch_mode==false)or udg_b_DTAX_is_allrandom_mode or udg_b_DTAX_is_teamrandom_mode or udg_b_DTAX_is_VoteRandom_mode)then
call HmHm(lEk,"has randomed "+GetUnitName(lfo)+".")
else
call HmHm(lEk,"has chosen "+GetUnitName(lfo)+".")
endif
endif
if udg_b_DTAX_is_allpick_mode then
if udg_b_DTAX_is_Reverse_mode then
call HoHo(lHp)
else
call HoHo(lEk)
endif
endif
if udg_b_DTAX_is_RandomDraft_mode then
call HoHo(lEk)
endif
if(GetUnitTypeId(lfo)=='E005')then
call DisplayTimedTextToPlayer(lEk,0,udg_A6,60.," ")
call DisplayTimedTextToPlayer(lEk,0,udg_A6,60.,"|c00ff0303"+"Do not purchase items with Orb Effects (Sange, Stygian Desolator, etc) as they will cause Luna's attack to completely malfunction."+"|r")
endif
if(GetUnitTypeId(lfo)=='E01B')then
call DisplayTimedTextToPlayer(lEk,0,udg_A6,30.," ")
call DisplayTimedTextToPlayer(lEk,0,udg_A6,30.,"|c00ff0303"+"Droppable Items do not drop while phased. Activated items on death (like aegis) will not trigger while phased on unpathable terrain."+"|r")
endif
if(udg_bA_DTAX_player_randomed[GetPlayerId(lEk)]==false)then
if(udg_b_DTAX_bGameStarted)then
call SetPlayerState(lEk,PLAYER_STATE_RESOURCE_GOLD,175+GetPlayerState(lEk,PLAYER_STATE_RESOURCE_GOLD))
endif
endif
if HaveStoredBoolean(udg_gc_DTAX_Core,"HeroInit:"+I2S(GetUnitPointValue(lfo)),"Initialized")==false then
call StoreBoolean(udg_gc_DTAX_Core,"HeroInit:"+I2S(GetUnitPointValue(lfo)),"Initialized",true)
call InitSpellsForHero(lfo)
endif
call RemoveRegion(lrr)
endfunction
function StartTrigger_InitSpellsForHero takes nothing returns nothing
set gg_trg_InitSpellsForHero=CreateTrigger()
call TriggerRegisterEnterRectSimple(gg_trg_InitSpellsForHero,bj_mapInitialPlayableArea)
call TriggerAddCondition(gg_trg_InitSpellsForHero,Condition(function Trig_InitSpellsForHero_Conditions))
call TriggerAddAction(gg_trg_InitSpellsForHero,function Trig_InitSpellsForHero_Actions)
endfunction
function InitTrig_InitSpellsForHero takes nothing returns nothing
endfunction
function Trig_PreloadNeutralCreeps_Actions takes nothing returns nothing
local location liD=GetRectCenter(gg_rct_MapCenter)
call RemoveUnit(CreateUnitAtLoc(udg_p_DTAX_Player12,'nbdo',liD,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(udg_p_DTAX_Player12,'nbds',liD,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(udg_p_DTAX_Player12,'ngst',liD,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(udg_p_DTAX_Player12,'nggr',liD,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(udg_p_DTAX_Player12,'nbdk',liD,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(udg_p_DTAX_Player12,'nbwm',liD,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(udg_p_DTAX_Player12,'nogm',liD,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(udg_p_DTAX_Player12,'nomg',liD,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(udg_p_DTAX_Player12,'nfpc',liD,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(udg_p_DTAX_Player12,'nfpu',liD,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(udg_p_DTAX_Player12,'nsth',liD,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(udg_p_DTAX_Player12,'nstl',liD,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(udg_p_DTAX_Player12,'nsat',liD,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(udg_p_DTAX_Player12,'nwlg',liD,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(udg_p_DTAX_Player12,'nkol',liD,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(udg_p_DTAX_Player12,'nkob',liD,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(udg_p_DTAX_Player12,'nkot',liD,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(udg_p_DTAX_Player12,'ncnk',liD,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(udg_p_DTAX_Player12,'ncen',liD,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(udg_p_DTAX_Player12,'ngns',liD,bj_UNIT_FACING))
call RemoveUnit(CreateUnitAtLoc(udg_p_DTAX_Player12,'nftb',liD,bj_UNIT_FACING))
call RemoveLocation(liD)
endfunction
function StartTrigger_PreloadNeutralCreeps takes nothing returns nothing
set gg_trg_PreloadNeutralCreeps=CreateTrigger()
call TriggerRegisterTimerEventSingle(gg_trg_PreloadNeutralCreeps,75.)
call TriggerAddAction(gg_trg_PreloadNeutralCreeps,function Trig_PreloadNeutralCreeps_Actions)
endfunction
function InitTrig_PreloadNeutralCreeps takes nothing returns nothing
endfunction
function KSKS takes nothing returns nothing
call KsKs(GetEnumUnit())
endfunction
function KtKt takes nothing returns nothing
local integer lxx
local group lgg
set lxx=1
loop
exitwhen lxx>5
call SetPlayerAlliance(udg_pA_DTAX_SEPlayers[0],udg_pA_DTAX_SEPlayers[lxx],ConvertAllianceType(5),false)
call SetPlayerAlliance(udg_pA_DTAX_SCPlayers[0],udg_pA_DTAX_SCPlayers[lxx],ConvertAllianceType(5),false)
set lxx=lxx+1
endloop
set lgg=CreateGroup()
call GroupEnumUnitsOfPlayer(lgg,udg_pA_DTAX_SEPlayers[0],null)
call ForGroup(lgg,function KSKS)
call DestroyGroup(lgg)
set lgg=CreateGroup()
call GroupEnumUnitsOfPlayer(lgg,udg_pA_DTAX_SCPlayers[0],null)
call ForGroup(lgg,function KSKS)
call DestroyGroup(lgg)
endfunction
function KTKT takes nothing returns nothing
local integer lxx
set lxx=0
loop
exitwhen lxx>5
call SetPlayerAlliance(udg_pA_DTAX_SEPlayers[lxx],udg_p_DTAX_Player12,ConvertAllianceType(0),false)
call SetPlayerAlliance(udg_pA_DTAX_SEPlayers[lxx],udg_p_DTAX_Player12,ConvertAllianceType(1),false)
call SetPlayerAlliance(udg_pA_DTAX_SEPlayers[lxx],udg_p_DTAX_Player12,ConvertAllianceType(2),false)
call SetPlayerAlliance(udg_pA_DTAX_SEPlayers[lxx],udg_p_DTAX_Player12,ConvertAllianceType(3),false)
call SetPlayerAlliance(udg_pA_DTAX_SEPlayers[lxx],udg_p_DTAX_Player12,ConvertAllianceType(4),false)
call SetPlayerAlliance(udg_pA_DTAX_SEPlayers[lxx],udg_p_DTAX_Player12,ConvertAllianceType(5),false)
call SetPlayerAlliance(udg_pA_DTAX_SEPlayers[lxx],udg_p_DTAX_Player12,ConvertAllianceType(6),false)
call SetPlayerAlliance(udg_pA_DTAX_SEPlayers[lxx],udg_p_DTAX_Player12,ConvertAllianceType(7),false)
call SetPlayerAlliance(udg_pA_DTAX_SCPlayers[lxx],udg_p_DTAX_Player12,ConvertAllianceType(0),false)
call SetPlayerAlliance(udg_pA_DTAX_SCPlayers[lxx],udg_p_DTAX_Player12,ConvertAllianceType(1),false)
call SetPlayerAlliance(udg_pA_DTAX_SCPlayers[lxx],udg_p_DTAX_Player12,ConvertAllianceType(2),false)
call SetPlayerAlliance(udg_pA_DTAX_SCPlayers[lxx],udg_p_DTAX_Player12,ConvertAllianceType(3),false)
call SetPlayerAlliance(udg_pA_DTAX_SCPlayers[lxx],udg_p_DTAX_Player12,ConvertAllianceType(4),false)
call SetPlayerAlliance(udg_pA_DTAX_SCPlayers[lxx],udg_p_DTAX_Player12,ConvertAllianceType(5),false)
call SetPlayerAlliance(udg_pA_DTAX_SCPlayers[lxx],udg_p_DTAX_Player12,ConvertAllianceType(6),false)
call SetPlayerAlliance(udg_pA_DTAX_SCPlayers[lxx],udg_p_DTAX_Player12,ConvertAllianceType(7),false)
call SetPlayerAlliance(udg_p_DTAX_Player12,udg_pA_DTAX_SEPlayers[lxx],ConvertAllianceType(0),false)
call SetPlayerAlliance(udg_p_DTAX_Player12,udg_pA_DTAX_SEPlayers[lxx],ConvertAllianceType(1),false)
call SetPlayerAlliance(udg_p_DTAX_Player12,udg_pA_DTAX_SEPlayers[lxx],ConvertAllianceType(2),false)
call SetPlayerAlliance(udg_p_DTAX_Player12,udg_pA_DTAX_SEPlayers[lxx],ConvertAllianceType(3),false)
call SetPlayerAlliance(udg_p_DTAX_Player12,udg_pA_DTAX_SEPlayers[lxx],ConvertAllianceType(4),false)
call SetPlayerAlliance(udg_p_DTAX_Player12,udg_pA_DTAX_SEPlayers[lxx],ConvertAllianceType(5),false)
call SetPlayerAlliance(udg_p_DTAX_Player12,udg_pA_DTAX_SEPlayers[lxx],ConvertAllianceType(6),false)
call SetPlayerAlliance(udg_p_DTAX_Player12,udg_pA_DTAX_SEPlayers[lxx],ConvertAllianceType(7),false)
call SetPlayerAlliance(udg_p_DTAX_Player12,udg_pA_DTAX_SCPlayers[lxx],ConvertAllianceType(0),false)
call SetPlayerAlliance(udg_p_DTAX_Player12,udg_pA_DTAX_SCPlayers[lxx],ConvertAllianceType(1),false)
call SetPlayerAlliance(udg_p_DTAX_Player12,udg_pA_DTAX_SCPlayers[lxx],ConvertAllianceType(2),false)
call SetPlayerAlliance(udg_p_DTAX_Player12,udg_pA_DTAX_SCPlayers[lxx],ConvertAllianceType(3),false)
call SetPlayerAlliance(udg_p_DTAX_Player12,udg_pA_DTAX_SCPlayers[lxx],ConvertAllianceType(4),false)
call SetPlayerAlliance(udg_p_DTAX_Player12,udg_pA_DTAX_SCPlayers[lxx],ConvertAllianceType(5),false)
call SetPlayerAlliance(udg_p_DTAX_Player12,udg_pA_DTAX_SCPlayers[lxx],ConvertAllianceType(6),false)
call SetPlayerAlliance(udg_p_DTAX_Player12,udg_pA_DTAX_SCPlayers[lxx],ConvertAllianceType(7),false)
set lxx=lxx+1
endloop
endfunction
function KuKu takes nothing returns boolean
return k9k9(GetTriggerUnit())
endfunction
function KUKU takes nothing returns nothing
call KsKs(GetTriggerUnit())
endfunction
function Trig_Alliances_Actions takes nothing returns nothing
local trigger ltt
if not udg_b_DTAX_observer_slot_used then
return
endif
call KtKt()
call KTKT()
set ltt=CreateTrigger()
call TriggerRegisterEnterRectSimple(ltt,GetWorldBounds())
call TriggerAddCondition(ltt,Condition(function KuKu))
call TriggerAddAction(ltt,function KUKU)
endfunction
function StartTrigger_Alliances takes nothing returns nothing
set gg_trg_Alliances=CreateTrigger()
call TriggerRegisterTimerEvent(gg_trg_Alliances,25,false)
call TriggerAddAction(gg_trg_Alliances,function Trig_Alliances_Actions)
endfunction
function InitTrig_Alliances takes nothing returns nothing
endfunction
function CreateSEBase takes nothing returns nothing
call SetUnitColor(gg_unit_hC95_0001,ConvertPlayerColor(0))
call SetUnitColor(gg_unit_nC38_0003,ConvertPlayerColor(12))
call SetUnitColor(gg_unit_n01K_0002,ConvertPlayerColor(12))
call SetUnitColor(gg_unit_n00V_0005,ConvertPlayerColor(12))
call SetUnitColor(gg_unit_n00W_0006,ConvertPlayerColor(12))
call SetUnitColor(gg_unit_n002_0007,ConvertPlayerColor(12))
call SetUnitColor(gg_unit_n00X_0008,ConvertPlayerColor(12))
call SetUnitColor(gg_unit_n009_0009,ConvertPlayerColor(12))
call SetUnitInvulnerable(gg_unit_e00R_0011,true)
call SetUnitInvulnerable(gg_unit_e00R_0012,true)
call SetUnitInvulnerable(gg_unit_e00R_0013,true)
call SetUnitInvulnerable(gg_unit_e011_0014,true)
call SetUnitInvulnerable(gg_unit_e011_0015,true)
call SetUnitInvulnerable(gg_unit_e011_0016,true)
call SetUnitInvulnerable(gg_unit_e00S_0017,true)
call SetUnitInvulnerable(gg_unit_e00S_0018,true)
call SetUnitInvulnerable(gg_unit_e00S_0019,true)
call SetUnitInvulnerable(gg_unit_e019_0020,true)
call SetUnitInvulnerable(gg_unit_e019_0021,true)
call SetUnitInvulnerable(gg_unit_etol_0010,true)
call SetUnitInvulnerable(gg_unit_eaom_0022,true)
call SetUnitInvulnerable(gg_unit_eaom_0023,true)
call SetUnitInvulnerable(gg_unit_eaom_0024,true)
call SetUnitInvulnerable(gg_unit_eaoe_0025,true)
call SetUnitInvulnerable(gg_unit_eaoe_0026,true)
call SetUnitInvulnerable(gg_unit_eaoe_0027,true)
call SetUnitInvulnerable(gg_unit_eaow_0038,true)
call SetUnitInvulnerable(gg_unit_edob_0039,true)
call SetUnitInvulnerable(gg_unit_emow_0028,true)
call SetUnitInvulnerable(gg_unit_emow_0029,true)
call SetUnitInvulnerable(gg_unit_emow_0030,true)
call SetUnitInvulnerable(gg_unit_emow_0031,true)
call SetUnitInvulnerable(gg_unit_emow_0032,true)
call SetUnitInvulnerable(gg_unit_emow_0033,true)
call SetUnitInvulnerable(gg_unit_emow_0034,true)
call SetUnitInvulnerable(gg_unit_emow_0035,true)
call SetUnitInvulnerable(gg_unit_emow_0036,true)
call SetUnitInvulnerable(gg_unit_emow_0037,true)
endfunction
function CreateSCBase takes nothing returns nothing
call SetUnitColor(gg_unit_u00M_0052,ConvertPlayerColor(6))
call SetUnitColor(gg_unit_u00M_0053,ConvertPlayerColor(6))
call SetUnitColor(gg_unit_u00D_0054,ConvertPlayerColor(6))
call SetUnitColor(gg_unit_u00D_0055,ConvertPlayerColor(6))
call SetUnitColor(gg_unit_u00D_0056,ConvertPlayerColor(6))
call SetUnitColor(gg_unit_u00N_0057,ConvertPlayerColor(6))
call SetUnitColor(gg_unit_u00N_0058,ConvertPlayerColor(6))
call SetUnitColor(gg_unit_u00N_0059,ConvertPlayerColor(6))
call SetUnitColor(gg_unit_u00T_0060,ConvertPlayerColor(6))
call SetUnitColor(gg_unit_u00T_0061,ConvertPlayerColor(6))
call SetUnitColor(gg_unit_nC35_0041,ConvertPlayerColor(6))
call SetUnitColor(gg_unit_nC38_0043,ConvertPlayerColor(12))
call SetUnitColor(gg_unit_n01K_0042,ConvertPlayerColor(12))
call SetUnitColor(gg_unit_n00V_0045,ConvertPlayerColor(12))
call SetUnitColor(gg_unit_n00W_0046,ConvertPlayerColor(12))
call SetUnitColor(gg_unit_n002_0047,ConvertPlayerColor(12))
call SetUnitColor(gg_unit_n00X_0048,ConvertPlayerColor(12))
call SetUnitColor(gg_unit_n009_0049,ConvertPlayerColor(12))
call SetUnitInvulnerable(gg_unit_u00M_0051,true)
call SetUnitInvulnerable(gg_unit_u00M_0052,true)
call SetUnitInvulnerable(gg_unit_u00M_0053,true)
call SetUnitInvulnerable(gg_unit_u00D_0054,true)
call SetUnitInvulnerable(gg_unit_u00D_0055,true)
call SetUnitInvulnerable(gg_unit_u00D_0056,true)
call SetUnitInvulnerable(gg_unit_u00N_0057,true)
call SetUnitInvulnerable(gg_unit_u00N_0058,true)
call SetUnitInvulnerable(gg_unit_u00N_0059,true)
call SetUnitInvulnerable(gg_unit_u00T_0060,true)
call SetUnitInvulnerable(gg_unit_u00T_0061,true)
call SetUnitInvulnerable(gg_unit_unpl_0050,true)
call SetUnitInvulnerable(gg_unit_usep_0062,true)
call SetUnitInvulnerable(gg_unit_usep_0063,true)
call SetUnitInvulnerable(gg_unit_usep_0064,true)
call SetUnitInvulnerable(gg_unit_utod_0065,true)
call SetUnitInvulnerable(gg_unit_utod_0066,true)
call SetUnitInvulnerable(gg_unit_utod_0067,true)
call SetUnitInvulnerable(gg_unit_usap_0078,true)
call SetUnitInvulnerable(gg_unit_uslh_0079,true)
call SetUnitInvulnerable(gg_unit_uzig_0068,true)
call SetUnitInvulnerable(gg_unit_uzig_0069,true)
call SetUnitInvulnerable(gg_unit_uzig_0070,true)
call SetUnitInvulnerable(gg_unit_uzig_0071,true)
call SetUnitInvulnerable(gg_unit_uzig_0072,true)
call SetUnitInvulnerable(gg_unit_uzig_0073,true)
call SetUnitInvulnerable(gg_unit_uzig_0074,true)
call SetUnitInvulnerable(gg_unit_uzig_0075,true)
call SetUnitInvulnerable(gg_unit_uzig_0076,true)
call SetUnitInvulnerable(gg_unit_uzig_0077,true)
endfunction
function CreateMarkers takes nothing returns nothing
call SetUnitColor(gg_unit_n002_0007,ConvertPlayerColor(15))
call SetUnitColor(gg_unit_n002_0047,ConvertPlayerColor(15))
call UnitAddItemToSlotById(gg_unit_ncop_0080,'I015',1)
call UnitAddItemToSlotById(gg_unit_ncop_0081,'I015',1)
call UnitAddItemToSlotById(gg_unit_ncop_0082,'I015',1)
call UnitAddItemToSlotById(gg_unit_ncop_0083,'I015',1)
call UnitAddItemToSlotById(gg_unit_ncop_0084,'I015',1)
call UnitAddItemToSlotById(gg_unit_ncop_0085,'I015',1)
call UnitAddItemToSlotById(gg_unit_ncop_0086,'I015',1)
call UnitAddItemToSlotById(gg_unit_ncop_0087,'I015',1)
call UnitAddItemToSlotById(gg_unit_ncop_0088,'I015',1)
call UnitAddItemToSlotById(gg_unit_ncop_0089,'I015',1)
endfunction
function CreateTawerns takes nothing returns nothing
local player lEk=Player(15)
call SetUnitColor(gg_unit_n008_0090,ConvertPlayerColor(0))
call SetUnitColor(gg_unit_n01D_0091,ConvertPlayerColor(0))
call SetUnitColor(gg_unit_ntav_0092,ConvertPlayerColor(0))
call SetUnitColor(gg_unit_n01N_0093,ConvertPlayerColor(0))
call SetUnitColor(gg_unit_n005_0094,ConvertPlayerColor(0))
call SetUnitColor(gg_unit_n01P_0095,ConvertPlayerColor(0))
call SetUnitColor(gg_unit_n007_0096,ConvertPlayerColor(0))
call SetUnitColor(gg_unit_n01B_0097,ConvertPlayerColor(0))
endfunction
function F9F9 takes nothing returns nothing
set udg_iA_DTAX_ItemSpells[1]='AImt'
set udg_iA_DTAX_ItemSpells[2]='AIda'
set udg_iA_DTAX_ItemSpells[3]='ANtm'
set udg_iA_DTAX_ItemSpells[4]='ACch'
set udg_iA_DTAX_ItemSpells[5]='AIxk'
set udg_iA_DTAX_ItemSpells[6]='A0CK'
set udg_iA_DTAX_ItemSpells[7]='A017'
set udg_iA_DTAX_ItemSpells[8]='A0B8'
set udg_iA_DTAX_ItemSpells[9]='A0HB'
set udg_iA_DTAX_ItemSpells[10]='A0D3'
set udg_iA_DTAX_ItemSpells[10]='A0DF'
set udg_iA_DTAX_ItemSpells[11]='A02W'
set udg_iA_DTAX_ItemSpells[12]='AIpr'
set udg_iA_DTAX_ItemSpells[13]='AIpl'
set udg_iA_DTAX_ItemSpells[14]='A0FO'
set udg_iA_DTAX_ItemSpells[15]='A0H7'
set udg_iA_DTAX_ItemSpells[16]='A0H6'
set udg_iA_DTAX_ItemSpells[17]='A02X'
set udg_iA_DTAX_ItemSpells[18]='AIsw'
set udg_iA_DTAX_ItemSpells[19]='A0CX'
set udg_iA_DTAX_ItemSpells[20]='A0B6'
set udg_iA_DTAX_ItemSpells[21]='Aeat'
set udg_iA_DTAX_ItemSpells[22]='A08L'
set udg_iA_DTAX_ItemSpells[23]='AIcy'
set udg_iA_DTAX_ItemSpells[24]='A05Z'
set udg_iA_DTAX_ItemSpells[25]='AIbk'
set udg_iA_DTAX_ItemSpells[26]='A0DY'
set udg_iA_DTAX_ItemSpells[27]='A0LZ'
set udg_iA_DTAX_ItemSpells[28]='A0OI'
set udg_iA_DTAX_ItemSpells[29]='A0KX'
set udg_iA_DTAX_ItemSpells[30]='A0KW'
set udg_iA_DTAX_ItemSpells[31]='A026'
set udg_iA_DTAX_ItemSpells[32]='A0C4'
set udg_iA_DTAX_ItemSpells[33]='A012'
set udg_iA_DTAX_ItemSpells[34]='A06K'
set udg_iA_DTAX_ItemSpells[35]='A02T'
set udg_iA_DTAX_ItemSpells[36]='AHfa'
set udg_iA_DTAX_ItemSpells[37]='A09V'
set udg_iA_DTAX_ItemSpells[38]='A05Y'
set udg_iA_DTAX_ItemSpells[39]='A0I9'
set udg_iA_DTAX_ItemSpells[40]='A0HA'
set udg_iA_DTAX_ItemSpells[41]='A0K5'
set udg_A3=41
endfunction
function IsSlotsClear takes nothing returns boolean
local integer lxx=0
if GetPlayerSlotState(udg_pA_DTAX_SEPlayers[1])==PLAYER_SLOT_STATE_EMPTY then
set lxx=lxx+1
endif
if GetPlayerSlotState(udg_pA_DTAX_SEPlayers[2])==PLAYER_SLOT_STATE_EMPTY then
set lxx=lxx+1
endif
if GetPlayerSlotState(udg_pA_DTAX_SEPlayers[3])==PLAYER_SLOT_STATE_EMPTY then
set lxx=lxx+1
endif
if GetPlayerSlotState(udg_pA_DTAX_SEPlayers[4])==PLAYER_SLOT_STATE_EMPTY then
set lxx=lxx+1
endif
if GetPlayerSlotState(udg_pA_DTAX_SEPlayers[5])==PLAYER_SLOT_STATE_EMPTY then
set lxx=lxx+1
endif
if GetPlayerSlotState(udg_pA_DTAX_SCPlayers[1])==PLAYER_SLOT_STATE_EMPTY then
set lxx=lxx+1
endif
if GetPlayerSlotState(udg_pA_DTAX_SCPlayers[2])==PLAYER_SLOT_STATE_EMPTY then
set lxx=lxx+1
endif
if GetPlayerSlotState(udg_pA_DTAX_SCPlayers[3])==PLAYER_SLOT_STATE_EMPTY then
set lxx=lxx+1
endif
if GetPlayerSlotState(udg_pA_DTAX_SCPlayers[4])==PLAYER_SLOT_STATE_EMPTY then
set lxx=lxx+1
endif
if GetPlayerSlotState(udg_pA_DTAX_SCPlayers[5])==PLAYER_SLOT_STATE_EMPTY then
set lxx=lxx+1
endif
return lxx==9
endfunction
function jXjX takes nothing returns nothing
local location liD=GetRectCenter(gg_rct_RoshanPlace)
set udg_u_DTAX_GLOBAL_Roshan=CreateUnitAtLoc(Player(12),'n00L',liD,bj_UNIT_FACING)
call RemoveLocation(liD)
call UnitAddItem(udg_u_DTAX_GLOBAL_Roshan,CreateItem('shea',0,0))
set liD=GetRectCenter(gg_rct_CreepSpawnSc6)
call RemoveUnit(CreateUnitAtLoc(udg_p_DTAX_Player12,'u001',liD,0))
call RemoveLocation(liD)
set liD=GetRectCenter(gg_rct_CreepSpawnSe1)
call RemoveUnit(CreateUnitAtLoc(udg_p_DTAX_Player12,'u001',liD,0))
call RemoveLocation(liD)
set liD=GetRectCenter(gg_rct_CreepSpawnSe4)
call RemoveUnit(CreateUnitAtLoc(udg_p_DTAX_Player12,'u001',liD,0))
call RemoveLocation(liD)
set liD=GetRectCenter(gg_rct_CreepSpawnSc1)
call RemoveUnit(CreateUnitAtLoc(udg_p_DTAX_Player12,'u001',liD,0))
call RemoveLocation(liD)
set liD=GetRectCenter(gg_rct_CreepSpawnSc3)
call RemoveUnit(CreateUnitAtLoc(udg_p_DTAX_Player12,'u001',liD,0))
call RemoveLocation(liD)
set liD=GetRectCenter(gg_rct_CreepSpawnSe6)
call RemoveUnit(CreateUnitAtLoc(udg_p_DTAX_Player12,'u001',liD,0))
call RemoveLocation(liD)
set liD=GetRectCenter(gg_rct_CreepSpawnSc2)
call RemoveUnit(CreateUnitAtLoc(udg_p_DTAX_Player12,'u001',liD,0))
call RemoveLocation(liD)
set liD=GetRectCenter(gg_rct_CreepSpawnSe5)
call RemoveUnit(CreateUnitAtLoc(udg_p_DTAX_Player12,'u001',liD,0))
call RemoveLocation(liD)
set liD=GetRectCenter(gg_rct_CreepSpawnSc5)
call RemoveUnit(CreateUnitAtLoc(udg_p_DTAX_Player12,'u001',liD,0))
call RemoveLocation(liD)
set liD=GetRectCenter(gg_rct_CreepSpawnSe2)
call RemoveUnit(CreateUnitAtLoc(udg_p_DTAX_Player12,'u001',liD,0))
call RemoveLocation(liD)
set liD=GetRectCenter(gg_rct_CreepSpawnSc4)
call RemoveUnit(CreateUnitAtLoc(udg_p_DTAX_Player12,'u001',liD,0))
call RemoveLocation(liD)
set liD=GetRectCenter(gg_rct_CreepSpawnSe3)
call RemoveUnit(CreateUnitAtLoc(udg_p_DTAX_Player12,'u001',liD,0))
call RemoveLocation(liD)
endfunction
function dota_main takes nothing returns nothing
local weathereffect we
local player p
local unit u
local integer unitID
local trigger t
local real life
local integer i
set i=0
set i=0
loop
exitwhen(i>16)
set udg_iA_DTAX_revive_time=0
set udg_iA_DTAX_killing_spree_status=0
set udg_iA_DTAX_tripple_kill_status=0
set udg_iA_DTAX_Ulfsaar_overpower_attack_counter=0
set i=i+1
endloop
set i=0
loop
exitwhen(i>100)
set udg_bA_DTAX_used_hero_types_SAME1=false
set udg_iA_DTAX_reciepe_item1_id=0
set udg_iA_DTAX_reciepe_item2_id=0
set udg_iA_DTAX_reciepe_item3_id=0
set udg_iA_DTAX_reciepe_item4_id=0
set udg_iA_DTAX_reciepe_result_id=0
set udg_iA_DTAX_reciepe_lenght=0
set udg_iA_DTAX_selectable_hero_types=0
set i=i+1
endloop
set i=0
loop
exitwhen(i>4)
set udg_iA_DTAX_team_owning_status=0
set i=i+1
endloop
set i=0
loop
exitwhen(i>2)
set udg_bA_DTAX_is_any_item_in_runic_region_REF1=false
set udg_iA_DTAX_force_death_counter=0
set udg_iA_UNKNOWN_heroes_count_per_team=0
set i=i+1
endloop
set i=0
loop
exitwhen(i>12)
set udg_sA_DTAX_player_textcolor_prefixes=""
set udg_tA_DTAX_player_tripple_kill_expiration_timer=CreateTimer()
set udg_iA_DTAX_iA_kill_death_counter=0
set udg_iA_DTAX_kill_counter=0
set i=i+1
endloop
set i=0
loop
exitwhen(i>13)
set udg_bA_DTAX_player_has_repicked_hero=false
set udg_tA_DTAX_hero_revive_timer=CreateTimer()
set udg_bA_DTAX_player_randomed=false
set udg_iA_DTAX_enemy_mobs_killed=0
set udg_iA_DTAX_ally_mobs_killed=0
set udg_iA_UNKNOWN_player_death_counter=0
set udg_bC=false
set i=i+1
endloop
set i=0
loop
exitwhen(i>1)
set udg_iA_DTAX_towers_lost_each_side=0
set udg_rA_DTAX_used_item_cooldown_time_holder_REF2=0
set udg_AZ=""
set udg_A1=false
set udg_iA_DTAX_ItemSpells=0
set udg_bc=false
set i=i+1
endloop
set i=0
loop
exitwhen(i>17)
set udg_uA_DTAX_player_hero_unit=null
set i=i+1
endloop
set i=0
loop
exitwhen(i>40)
set udg_iA_DTAX_agility_hero_types=0
set udg_iA_DTAX_intel_hero_types=0
set udg_iA_DTAX_strenght_hero_types=0
set i=i+1
endloop
set i=0
loop
exitwhen(i>10)
set udg_Ah=0
set i=i+1
endloop
set i=0
loop
exitwhen(i>14)
set udg_bb=false
set i=i+1
endloop
set i=0
loop
exitwhen(i>15)
set udg_bJ="N/A"
set i=i+1
endloop
call GameStart()
call CreateSEBase()
call CreateSCBase()
call CreateMarkers()
call TeamInit()
call HeroDataBase()
call CreateTawerns()
call F8F8()
call ItemIconDataBase()
call F9F9()
call ExecuteFunc("StartTrigger_Quests")
call ExecuteFunc("StartTrigger_Leave")
call ExecuteFunc("StartTrigger_ReviveHero")
call ExecuteFunc("StartTrigger_InitSpellsForHero")
call ExecuteFunc("StartTrigger_NormalGoldIncome")
call ExecuteFunc("StartTrigger_CreepKill")
call ExecuteFunc("StartTrigger_Divided_We_Stand")
call ExecuteFunc("StartTrigger_HeroKill")
call ExecuteFunc("StartTrigger_Roshan_Kill")
call ExecuteFunc("StartTrigger_DenyHero")
call ExecuteFunc("StartTrigger_TripleKill_Dropdown1")
call ExecuteFunc("StartTrigger_TripleKill_Dropdown2")
call ExecuteFunc("StartTrigger_TripleKill_Dropdown3")
call ExecuteFunc("StartTrigger_TripleKill_Dropdown4")
call ExecuteFunc("StartTrigger_TripleKill_Dropdown5")
call ExecuteFunc("StartTrigger_TripleKill_Dropdown7")
call ExecuteFunc("StartTrigger_TripleKill_Dropdown8")
call ExecuteFunc("StartTrigger_TripleKill_Dropdown9")
call ExecuteFunc("StartTrigger_TripleKill_Dropdown10")
call ExecuteFunc("StartTrigger_TripleKill_Dropdown11")
call ExecuteFunc("StartTrigger_NormalModeDefaulted")
call ExecuteFunc("StartTrigger_StartSpawningCreeps")
call ExecuteFunc("StartTrigger_SwapTimeElapsed")
call ExecuteFunc("StartTrigger_RepickTimeElapsed")
call ExecuteFunc("StartTrigger_KD_Show")
call ExecuteFunc("StartTrigger_KD_Update")
call ExecuteFunc("StartTrigger_Ancient_Protectors_Count")
call ExecuteFunc("StartTrigger_Spirit_Towers_Count")
call ExecuteFunc("StartTrigger_KD_Refresh")
call ExecuteFunc("StartTrigger_CS_Board")
if udg_b_DTAX_observer_slot_used then
call ExecuteFunc("StartTrigger_FinalStatBoard_Refresh")
endif
call ExecuteFunc("StartTrigger_Sentienel_Won")
call ExecuteFunc("StartTrigger_Scourge_Won")
call ExecuteFunc("StartTrigger_WT_and_FT_Protection")
call ExecuteFunc("StartTrigger_Restore_Destructables")
call ExecuteFunc("StartTrigger_Roshan_Protection")
call ExecuteFunc("StartTrigger_Roshan_Control")
call ExecuteFunc("StartTrigger_Dummy_Control")
call ExecuteFunc("StartTrigger_Ancient_Protectors_System")
call ExecuteFunc("StartTrigger_Spirit_Towers_System")
if bj_isSinglePlayer and IsSlotsClear()then
call SoloMode()
endif
call ExecuteFunc("StartTrigger_WTF_Mode")
call ExecuteFunc("StartTrigger_NeutralKillsCounter")
call jXjX()
call ExecuteFunc("StartTrigger_Waypoint_Final")
call ExecuteFunc("StartTrigger_IncreaseRangedSpawn")
call ExecuteFunc("StartTrigger_IncreaseMeleeSpawn")
call ExecuteFunc("StartTrigger_Waypoint_MiddleSE")
call ExecuteFunc("StartTrigger_Waypoint_MiddleSC")
call ExecuteFunc("StartTrigger_Waypoint_LeftSE")
call ExecuteFunc("StartTrigger_Waypoint_LeftSC")
call ExecuteFunc("StartTrigger_Waypoint_RightSC")
call ExecuteFunc("StartTrigger_Waypoint_RightSE")
call ExecuteFunc("StartTrigger_SpawnCreeps")
call ExecuteFunc("StartTrigger_Barrack1_Destroyed")
call ExecuteFunc("StartTrigger_Barrack2_Destroyed")
call ExecuteFunc("StartTrigger_Barrack3_Destroyed")
call ExecuteFunc("StartTrigger_Barrack4_Destroyed")
call ExecuteFunc("StartTrigger_Barrack5_Destroyed")
call ExecuteFunc("StartTrigger_Barrack6_Destroyed")
call ExecuteFunc("StartTrigger_Barrack7_Destroyed")
call ExecuteFunc("StartTrigger_Barrack8_Destroyed")
call ExecuteFunc("StartTrigger_Barrack9_Destroyed")
call ExecuteFunc("StartTrigger_Barrack10_Destroyed")
call ExecuteFunc("StartTrigger_Barrack11_Destroyed")
call ExecuteFunc("StartTrigger_Barrack12_Destroyed")
call ExecuteFunc("StartTrigger_Sentinel_MegaCreeps")
call ExecuteFunc("StartTrigger_Scourge_MegaCreeps")
call ExecuteFunc("StartTrigger_IncreaseCreepsLevel")
call ExecuteFunc("StartTrigger_PreloadNeutralCreeps")
call ExecuteFunc("StartTrigger_EnableNeutralCreepsSpawn")
call ExecuteFunc("StartTrigger_SpawnNeutralCreeps")
call ExecuteFunc("StartTrigger_SpawnSuperCreeps")
call ExecuteFunc("StartTrigger_SelledItemsCounter")
call ExecuteFunc("StartTrigger_Disassemble")
call ExecuteFunc("StartTrigger_Mjollnir")
call ExecuteFunc("StartTrigger_Crow_Morph")
call ExecuteFunc("StartTrigger_Perseverance_Split")
call ExecuteFunc("StartTrigger_Teleportation_Item")
call ExecuteFunc("StartTrigger_Mekansm_Armor_Heal")
call ExecuteFunc("StartTrigger_Bottle_Control")
call ExecuteFunc("StartTrigger_Rune_Capture")
call ExecuteFunc("StartTrigger_Aegis")
call ExecuteFunc("StartTrigger_Charges_Connection")
call ExecuteFunc("StartTrigger_Courier_Set_Droppable")
call ExecuteFunc("StartTrigger_Courier_Set_UnDroppable")
call ExecuteFunc("StartTrigger_Helm_of_the_Dominator")
call ExecuteFunc("StartTrigger_Refresher_Orb")
call ExecuteFunc("StartTrigger_Necronomicon_Warrior_1")
call ExecuteFunc("StartTrigger_Necronomicon_Warrior_2")
call ExecuteFunc("StartTrigger_Necronomicon_Warrior_3")
call ExecuteFunc("StartTrigger_Necronomicon")
call ExecuteFunc("StartTrigger_Illusion_Rune")
call ExecuteFunc("StartTrigger_Recreate_Rune")
call ExecuteFunc("StartTrigger_Powerups_Replacements")
call ExecuteFunc("StartTrigger_Try_Apply_Reciepe")
call ExecuteFunc("StartTrigger_RM_Replace_and_Denies")
call ExecuteFunc("StartTrigger_Aghanim_Scepter")
call ExecuteFunc("StartTrigger_Specific_Reciepes")
call ExecuteFunc("StartTrigger_Undroppable_Cooldowns")
call ExecuteFunc("StartTrigger_Reset_Droppable_Status")
call ExecuteFunc("StartTrigger_Observer_Support")
call ExecuteFunc("StartTrigger_HeroAIManager")
call ExecuteFunc("StartTrigger_Waypoint_Init")
call ExecuteFunc("StartTrigger_Alliances")
call ExecuteFunc("StartTrigger_True_Sights")
call ExecuteFunc("StartTrigger_TowerAI")
call ExecuteFunc("StartTrigger_Mechanical_Control")
call ExecuteFunc("StartTrigger_Waypoint_Order")
call ExecuteFunc("StartTrigger_Select_Game_Mode")
call ExecuteFunc("StartTrigger_ProcessCMD")
call ExecuteFunc("StartTrigger_Recreate")
call ExecuteFunc("StartTrigger_Unstuck")
call ExecuteFunc("StartTrigger_Brain_Sap")
call ExecuteFunc("StartTrigger_Teleportation_Deny")
call ExecuteFunc("StartTrigger_Blink_Strike")
call ExecuteFunc("StartTrigger_UniversalDeathPact")
endfunction
function InitTrig_init takes nothing returns nothing
call ExecuteFunc("dota_main")
endfunction
function GoblinGreedCheck takes nothing returns boolean
return GetUnitAbilityLevel(GetKillingUnit(),'A0O3')>0 and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetKillingUnit()))and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function GoblinGreedMain takes nothing returns nothing
local unit lfo=GetKillingUnit()
local unit lih=GetTriggerUnit()
local string lf5=H2Tx(lfo)
local integer lmz=GetInteger(lf5,"PreviousKills")
local integer lmZ=GetUnitAbilityLevel(lfo,'A0O3')
local texttag lm0=CreateTextTag()
local integer lm1=lmz*2
local integer lm2=ReturnMin(lm1+lmZ*2,20)
call SetInteger(lf5,"PreviousKills",lmz+1)
call SetTextTagText(lm0,"+"+I2S(lm2),.023)
call SetTextTagPosUnit(lm0,lih,0)
call SetTextTagColor(lm0,230,214,0,0)
call SetTextTagVelocityBJ(lm0,64,90)
call SetPlayerState(GetOwningPlayer(lfo),PLAYER_STATE_RESOURCE_GOLD,lm2+GetPlayerState(GetOwningPlayer(lfo),PLAYER_STATE_RESOURCE_GOLD))
if(GetLocalPlayer()!=GetOwningPlayer(lfo))then
call SetTextTagVisibility(lm0,false)
endif
call PolledWait(1)
call DestroyTextTag(lm0)
call PolledWait(18)
call SetInteger(lf5,"PreviousKills",GetInteger(lf5,"PreviousKills")-1)
endfunction
function GoblinGreedInit takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(ltt,Condition(function GoblinGreedCheck))
call TriggerAddAction(ltt,function GoblinGreedMain)
endfunction
function InitTrig_Goblin_Greed takes nothing returns nothing
endfunction
function ConcoctionSpell takes nothing returns boolean
return GetSpellAbilityId()=='A0J6'
endfunction
function ConcoctionTimer takes nothing returns nothing
local trigger ltt=GetTriggeringTrigger()
local string lf5
local unit lfU
local unit lFB
local unit lJV
local integer lmZ=ReturnMax(GetTriggerExecCount(ltt)-1,1)
if GetTriggerEventId()==EVENT_UNIT_SPELL_ENDCAST then
set lf5=H2Tx(ltt)
set lfU=GetUnit(lf5,"Hero")
set lFB=GetUnit(lf5,"Target")
call FastFlush(lf5)
set lJV=CreateUnit(GetOwningPlayer(lfU),'e00C',GetUnitX(lfU),GetUnitY(lfU),0)
call UnitAddAbility(lJV,'A0JD')
call SetUnitAbilityLevel(lJV,'A0JD',lmZ)
call IssueTargetOrderById(lJV,OrderId("thunderbolt"),lFB)
call UnitAddAbility(lJV,'Aloc')
call UnitApplyTimedLife(lJV,'BTLF',2)
call DestroyTriggerEx(ltt)
endif
endfunction
function ConcoctionMain takes nothing returns nothing
local unit lfU=GetTriggerUnit()
local unit lFB=GetSpellTargetUnit()
local trigger ltt=CreateTrigger()
local string lf5=H2Tx(ltt)
call TriggerRegisterUnitEvent(ltt,lfU,EVENT_UNIT_SPELL_ENDCAST)
call TriggerRegisterTimerEvent(ltt,.5,true)
call TriggerAddAction(ltt,function ConcoctionTimer)
call SetHandle(lf5,"Hero",lfU)
call SetHandle(lf5,"Target",lFB)
endfunction
function ConcoctionInit takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddAction(ltt,function ConcoctionMain)
call TriggerAddCondition(ltt,Condition(function ConcoctionSpell))
call SpellPreload('A0JD')
endfunction
function InitTrig_Unstable_Concoction takes nothing returns nothing
endfunction
function AcidSpraySpell takes nothing returns boolean
return GetSpellAbilityId()=='A0IL'
endfunction
function AcidSprayFilter takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(udg_u_DTAX_temp))and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0
endfunction
function AcidSprayDamage takes nothing returns nothing
call UnitDamageTarget(udg_u_DTAX_temp,GetEnumUnit(),udg_r_DTAX_necrolyte_reaperscythe_ratio,true,true,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
endfunction
function AcidSprayMain takes nothing returns nothing
local timer ltt=GetExpiredTimer()
local string lf5=H2Tx(ltt)
local unit lfU=GetUnit(lf5,"Hero")
local unit lJV=GetUnit(lf5,"Caster")
local integer lMa=GetInteger(lf5,"Counter")
local real lxx=GetUnitX(lJV)
local real lyy=GetUnitY(lJV)
local boolexpr lEW
local group lEw
if lMa>12 then
call KillUnit(lJV)
call PauseTimer(ltt)
call FastFlush(lf5)
call DestroyTimer(ltt)
else
set udg_u_DTAX_temp=lfU
set udg_r_DTAX_necrolyte_reaperscythe_ratio=GetUnitAbilityLevel(lfU,'A0IL')*8
set lEW=Condition(function AcidSprayFilter)
set lEw=CreateGroup()
call GroupEnumUnitsInRange(lEw,lxx,lyy,700,lEW)
call ForGroup(lEw,function AcidSprayDamage)
call DestroyGroup(lEw)
call DestroyBoolExpr(lEW)
set lMa=lMa+1
call SetInteger(lf5,"Counter",lMa)
endif
endfunction
function AcidSpraySetting takes nothing returns nothing
local unit lfU=GetTriggerUnit()
local location liD=GetSpellTargetLoc()
local real lxx=GetLocationX(liD)
local real lyy=GetLocationY(liD)
local unit lJV=CreateUnit(GetOwningPlayer(lfU),'e01E',lxx,lyy,0)
local timer ltt=CreateTimer()
local string lf5=H2Tx(ltt)
call RemoveLocation(liD)
call UnitAddAbility(lJV,'A0J4')
call SetUnitAbilityLevel(lJV,'A0J4',GetUnitAbilityLevel(lfU,'A0IL'))
call UnitAddAbility(lJV,'Aloc')
call SetHandle(lf5,"Hero",lfU)
call SetHandle(lf5,"Caster",lJV)
call SetInteger(lf5,"Counter",0)
call TimerStart(ltt,1,true,function AcidSprayMain)
endfunction
function AcidSprayInit takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddAction(ltt,function AcidSpraySetting)
call TriggerAddCondition(ltt,Condition(function AcidSpraySpell))
call SpellPreload('A0J4')
endfunction
function InitTrig_Acid_Spray takes nothing returns nothing
endfunction
function Trig_Mana_Void_Conditions takes nothing returns boolean
return GetSpellAbilityId()=='A0E3'
endfunction
function Trig_Mana_Void_Actions takes nothing returns nothing
local unit lfo=GetTriggerUnit()
local unit lFB=GetSpellTargetUnit()
local integer lmZ=GetUnitAbilityLevel(lfo,'A0E3')
local real lf7=(lmZ*.25+.35)*(GetUnitState(lFB,UNIT_STATE_MAX_MANA)-GetUnitState(lFB,UNIT_STATE_MANA))
call UnitDamageTargetBJ(lfo,lFB,lf7,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC)
endfunction
function StartTrigger_Mana_Void takes nothing returns nothing
set gg_trg_Mana_Void=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Mana_Void,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Mana_Void,Condition(function Trig_Mana_Void_Conditions))
call TriggerAddAction(gg_trg_Mana_Void,function Trig_Mana_Void_Actions)
endfunction
function InitTrig_Mana_Void takes nothing returns nothing
endfunction
function BattleHungerDispell_BuffDetect takes nothing returns boolean
if(not(UnitHasBuffBJ(GetKillingUnit(),'B03O')))then
return false
endif
return true
endfunction
function BattleHungerDispell_Check takes nothing returns boolean
if(not(GetUnitAbilityLevelSwapped('A04R',GetKillingUnit())>0))then
return false
endif
return true
endfunction
function BattleHungerDispell_DoRemove takes nothing returns nothing
call UnitRemoveAbility(GetEnumUnit(),'B03O')
endfunction
function Trig_Battle_Hunger_Dispell_Actions takes nothing returns nothing
local group lEw=GetUnitsOfPlayerAll(GetOwningPlayer(GetKillingUnit()))
if(BattleHungerDispell_BuffDetect())then
call UnitRemoveAbility(GetKillingUnit(),'B03O')
endif
if(BattleHungerDispell_Check())then
call ForGroupBJ(lEw,function BattleHungerDispell_DoRemove)
endif
call DestroyGroup(lEw)
endfunction
function StartTrigger_Battle_Hunger_Dispell takes nothing returns nothing
set gg_trg_Battle_Hunger_Dispell=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Battle_Hunger_Dispell,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddAction(gg_trg_Battle_Hunger_Dispell,function Trig_Battle_Hunger_Dispell_Actions)
endfunction
function InitTrig_Battle_Hunger_Dispell takes nothing returns nothing
endfunction
function Trig_Counter_Helix_Conditions takes nothing returns boolean
if(not(UnitHasBuffBJ(GetTriggerUnit(),'B03P')))then
return false
endif
if(not(IsUnitType(GetAttacker(),UNIT_TYPE_STRUCTURE)==false))then
return false
endif
if(not(IsUnitType(GetAttacker(),UNIT_TYPE_MECHANICAL)==false))then
return false
endif
if(GetUnitAbilityLevelSwapped('A04R',GetAttacker())!=0)then
return false
endif
if(IsUnitAlly(GetAttacker(),GetTriggerPlayer()))then
return false
endif
return true
endfunction
function CounterHelix_Check takes nothing returns boolean
if(GetRandomReal(0,100.)<15.)then
return true
endif
return false
endfunction
function CounterHelix_DamageFilter takes nothing returns boolean
if(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))then
return false
endif
if(IsUnitDeadBJ(GetFilterUnit()))then
return false
endif
if(IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))then
return false
endif
if(GetUnitAbilityLevelSwapped('A04R',GetFilterUnit())!=0)then
return false
endif
if(UnitHasBuffBJ(GetFilterUnit(),'B02J'))then
return false
endif
return true
endfunction
function CounterHelix_DoDamage takes nothing returns nothing
local effect lkW=AddSpecialEffectTargetUnitBJ("origin",GetEnumUnit(),"Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl")
call DestroyEffect(lkW)
call UnitDamageTargetBJ(GetTriggerUnit(),GetEnumUnit(),I2R(75+(25*GetUnitAbilityLevelSwapped('A0C6',GetTriggerUnit()))),ATTACK_TYPE_HERO,DAMAGE_TYPE_NORMAL)
endfunction
function Trig_Counter_Helix_Actions takes nothing returns nothing
local group lEw
local location liD
if(CounterHelix_Check())then
set liD=GetUnitLoc(GetTriggerUnit())
set lEw=GetUnitsInRangeOfLocMatching(300.,liD,Condition(function CounterHelix_DamageFilter))
call ForGroupBJ(lEw,function CounterHelix_DoDamage)
call SetUnitAnimation(GetTriggerUnit(),"spin")
call DisableTrigger(GetTriggeringTrigger())
call PolledWait(.6)
call ResetUnitAnimation(GetTriggerUnit())
call EnableTrigger(GetTriggeringTrigger())
call DestroyGroup(lEw)
call RemoveLocation(liD)
endif
endfunction
function StartTrigger_Counter_Helix takes nothing returns nothing
set gg_trg_Counter_Helix=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Counter_Helix,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(gg_trg_Counter_Helix,Condition(function Trig_Counter_Helix_Conditions))
call TriggerAddAction(gg_trg_Counter_Helix,function Trig_Counter_Helix_Actions)
endfunction
function InitTrig_Counter_Helix takes nothing returns nothing
endfunction
function Trig_Berserker_Call_Conditions takes nothing returns boolean
if(not(GetSpellAbilityId()=='A0C7'))then
return false
endif
return true
endfunction
function Berserker_Call_Buff takes nothing returns boolean
return GetUnitAbilityLevel(GetTriggerUnit(),'BHwe')>0
endfunction
function Berserker_Call_Aim takes nothing returns nothing
local unit lMy=GetUnit(H2Tx(GetTriggeringTrigger()),"Axe")
if GetUnitState(lMy,UNIT_STATE_LIFE)>0 then
call DisableTrigger(GetTriggeringTrigger())
call IssueTargetOrderById(GetTriggerUnit(),OrderId("attack"),lMy)
call EnableTrigger(GetTriggeringTrigger())
endif
endfunction
function Berserker_Call_OrderFilter takes nothing returns boolean
if(UnitHasBuffBJ(GetFilterUnit(),'BHwe'))then
if((UnitHasBuffBJ(GetFilterUnit(),'B008')==false)or(UnitHasBuffBJ(GetFilterUnit(),'Bcyc')==false))then
if IsUnitPaused(GetFilterUnit())==false then
return true
endif
endif
endif
return false
endfunction
function Berserker_Call_Caster takes nothing returns nothing
call IssueTargetOrderById(GetEnumUnit(),OrderId("attack"),udg_u_DTAX_temp)
endfunction
function Berserker_Call_CreepVictim takes nothing returns boolean
return GetBooleanAnd((UnitHasBuffBJ(GetFilterUnit(),'BHwe')),GetOwningPlayer(GetFilterUnit())==udg_pA_DTAX_SEPlayers[0]or GetOwningPlayer(GetFilterUnit())==udg_pA_DTAX_SCPlayers[0])
endfunction
function Berserker_Call_CreepAttack takes nothing returns nothing
if(GetOwningPlayer(GetEnumUnit())==udg_pA_DTAX_SEPlayers[0])then
call UnitRemoveAbility(GetEnumUnit(),'BHwe')
call IssuePointOrderByIdLoc(GetEnumUnit(),OrderId("attack"),GetRectCenter(gg_rct_TheFrozenThroneRect))
endif
if(GetOwningPlayer(GetEnumUnit())==udg_pA_DTAX_SCPlayers[0])then
call UnitRemoveAbility(GetEnumUnit(),'BHwe')
call IssuePointOrderByIdLoc(GetEnumUnit(),OrderId("attack"),GetRectCenter(gg_rct_TheWorldTreeRect))
endif
endfunction
function Trig_Berserker_Call_Actions takes nothing returns nothing
local location liD=GetUnitLoc(GetTriggerUnit())
local group lEw
local trigger ltt=CreateTrigger()
local unit lrs=GetSpellAbilityUnit()
call SetHandle(H2Tx(ltt),"Axe",GetTriggerUnit())
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER)
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER)
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_ISSUED_ORDER)
call TriggerAddCondition(ltt,Condition(function Berserker_Call_Buff))
call TriggerAddAction(ltt,function Berserker_Call_Aim)
call PolledWait(.2)
call CreateNUnitsAtLocFacingLocBJ(1,'e00E',GetOwningPlayer(GetTriggerUnit()),liD,liD)
call RemoveLocation(liD)
call UnitAddAbility(bj_lastCreatedUnit,'A0E1')
call SetUnitAbilityLevelSwapped('A0E1',bj_lastCreatedUnit,GetUnitAbilityLevel(lrs,'A0C7'))
call IssueTargetOrderById(bj_lastCreatedUnit,OrderId("innerfire"),GetTriggerUnit())
set liD=GetUnitLoc(lrs)
set lEw=GetUnitsInRangeOfLocMatching(550.,liD,Condition(function Berserker_Call_OrderFilter))
set udg_u_DTAX_temp=lrs
call ForGroupBJ(lEw,function Berserker_Call_Caster)
call RemoveLocation(liD)
call DestroyGroup(lEw)
call PolledWait(1+.5*GetUnitAbilityLevel(lrs,'A0C7'))
set lEw=GetUnitsInRectMatching(bj_mapInitialPlayableArea,Condition(function Berserker_Call_CreepVictim))
call ForGroupBJ(lEw,function Berserker_Call_CreepAttack)
call DestroyGroup(lEw)
call FastFlush(H2Tx(ltt))
call TriggerClearActions(ltt)
call DestroyTriggerEx(ltt)
endfunction
function StartTrigger_Berserker_Call takes nothing returns nothing
set gg_trg_Berserker_Call=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Berserker_Call,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Berserker_Call,Condition(function Trig_Berserker_Call_Conditions))
call TriggerAddAction(gg_trg_Berserker_Call,function Trig_Berserker_Call_Actions)
endfunction
function InitTrig_Berserker_Call takes nothing returns nothing
endfunction
function Trig_Culling_Blade_Conditions takes nothing returns boolean
if(not(GetSpellAbilityId()=='A0E2'))then
return false
endif
return true
endfunction
function Culling_Blade_CheckI takes nothing returns boolean
if(not(GetUnitAbilityLevelSwapped('A0E2',GetSpellAbilityUnit())==1))then
return false
endif
if(not(GetUnitStateSwap(UNIT_STATE_LIFE,GetSpellTargetUnit())<=300.))then
return false
endif
return true
endfunction
function Culling_Blade_CheckII takes nothing returns boolean
if(not(GetUnitAbilityLevelSwapped('A0E2',GetSpellAbilityUnit())==2))then
return false
endif
if(not(GetUnitStateSwap(UNIT_STATE_LIFE,GetSpellTargetUnit())<=450.))then
return false
endif
return true
endfunction
function Culling_Blade_CheckIII takes nothing returns boolean
if(not(GetUnitAbilityLevelSwapped('A0E2',GetSpellAbilityUnit())==3))then
return false
endif
if(not(GetUnitStateSwap(UNIT_STATE_LIFE,GetSpellTargetUnit())<=625.))then
return false
endif
return true
endfunction
function Trig_Culling_Blade_Actions takes nothing returns nothing
local location lnG=GetUnitLoc(GetTriggerUnit())
if(Culling_Blade_CheckI())then
call UnitRemoveBuffsBJ(2,GetSpellTargetUnit())
call CreateNUnitsAtLoc(1,'e00E',GetOwningPlayer(GetTriggerUnit()),lnG,bj_UNIT_FACING)
call UnitDamageTargetBJ(bj_lastCreatedUnit,GetSpellTargetUnit(),100000000.,ATTACK_TYPE_MELEE,DAMAGE_TYPE_NORMAL)
endif
if(Culling_Blade_CheckII())then
call UnitRemoveBuffsBJ(2,GetSpellTargetUnit())
call CreateNUnitsAtLoc(1,'e00E',GetOwningPlayer(GetTriggerUnit()),lnG,bj_UNIT_FACING)
call UnitDamageTargetBJ(bj_lastCreatedUnit,GetSpellTargetUnit(),100000000.,ATTACK_TYPE_MELEE,DAMAGE_TYPE_NORMAL)
endif
if(Culling_Blade_CheckIII())then
call UnitRemoveBuffsBJ(2,GetSpellTargetUnit())
call CreateNUnitsAtLoc(1,'e00E',GetOwningPlayer(GetTriggerUnit()),lnG,bj_UNIT_FACING)
call UnitDamageTargetBJ(bj_lastCreatedUnit,GetSpellTargetUnit(),100000000.,ATTACK_TYPE_MELEE,DAMAGE_TYPE_NORMAL)
endif
call RemoveLocation(lnG)
endfunction
function StartTrigger_Culling_Blade takes nothing returns nothing
set gg_trg_Culling_Blade=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Culling_Blade,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Culling_Blade,Condition(function Trig_Culling_Blade_Conditions))
call TriggerAddAction(gg_trg_Culling_Blade,function Trig_Culling_Blade_Actions)
endfunction
function InitTrig_Culling_Blade takes nothing returns nothing
endfunction
function Nightmare_Spell takes nothing returns boolean
return GetSpellAbilityId()=='A04Y'and GetUnitTypeId(GetSpellTargetUnit())!='n00I'and GetUnitTypeId(GetSpellTargetUnit())!='e01H'
endfunction
function Nightmare_Damage takes nothing returns nothing
local timer ltt=GetExpiredTimer()
local string lf5=H2Tx(ltt)
local unit lFB=GetUnit(lf5,"Target")
local unit lfo=GetUnit(lf5,"UnitVar")
if GetUnitAbilityLevel(lFB,'B02F')>0 then
if(GetUnitState(lFB,UNIT_STATE_LIFE)>20)then
call SetUnitState(lFB,UNIT_STATE_LIFE,ReturnMaxReal(0,GetUnitState(lFB,UNIT_STATE_LIFE)-20))
else
call UnitDamageTargetBJ(lfo,lFB,50,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC)
endif
else
call PauseTimer(ltt)
call FastFlush(H2Tx(GetTrigger(lf5,"Trigger")))
call DestroyTriggerEx(GetTrigger(lf5,"Trigger"))
call PolledWait(1)
call FastFlush(lf5)
call DestroyTimer(ltt)
endif
endfunction
function Nightmare_Buff takes nothing returns boolean
return GetUnitAbilityLevel(GetTriggerUnit(),'B02F')>0
endfunction
function Nightmare_Transfer takes nothing returns nothing
local unit lfo=GetUnit(H2Tx(GetTriggeringTrigger()),"UnitVar")
local integer lmZ=GetUnitAbilityLevel(lfo,'A04Y')
local unit lJV=CreateUnit(GetOwningPlayer(lfo),'e00C',GetUnitX(lfo),GetUnitY(lfo),270)
call UnitRemoveAbility(GetTriggerUnit(),'B02F')
call UnitApplyTimedLife(lJV,'BTLF',10.)
call UnitAddAbility(lJV,'A04Y')
call SetUnitAbilityLevel(lJV,'A04Y',lmZ)
call IssueTargetOrderById(lJV,OrderId("sleep"),GetAttacker())
call SetUnitPathing(lJV,false)
call SetUnitInvulnerable(lJV,true)
call UnitAddAbility(lJV,'Aloc')
endfunction
function Nightmare_Setting takes nothing returns nothing
local unit lfo=GetTriggerUnit()
local unit lFB=GetSpellTargetUnit()
local timer ltt=CreateTimer()
local string lf5=H2Tx(ltt)
local trigger lrY=CreateTrigger()
call SetHandle(lf5,"Target",lFB)
call SetHandle(lf5,"UnitVar",lfo)
call SetHandle(lf5,"Trigger",lrY)
call TimerStart(ltt,1.,true,function Nightmare_Damage)
call SetHandle(H2Tx(lrY),"UnitVar",lfo)
call TriggerRegisterAnyUnitEventBJ(lrY,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(lrY,Condition(function Nightmare_Buff))
call TriggerAddAction(lrY,function Nightmare_Transfer)
call UnitDamageTargetBJ(lfo,lFB,5.,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC)
endfunction
function Nightmare_Init takes nothing returns nothing
local trigger ltt
set udg_triggerl140=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_triggerl140,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(udg_triggerl140,Condition(function Nightmare_Spell))
call TriggerAddAction(udg_triggerl140,function Nightmare_Setting)
endfunction
function InitTrig_Nightmare takes nothing returns nothing
endfunction
function Fiends_Grip_Spell takes nothing returns boolean
return GetSpellAbilityId()=='A02Q'
endfunction
function Fiends_Grip_Main takes nothing returns nothing
local trigger ltt=GetTriggeringTrigger()
local string lf5=H2Tx(ltt)
local unit lfo=GetUnit(H2Tx(ltt),"UnitVar")
if(GetTriggerEventId()==EVENT_UNIT_SPELL_ENDCAST or GetUnitState(lfo,UNIT_STATE_MANA)<=20.)then
call IssueImmediateOrderById(lfo,OrderId("stop"))
call FastFlush(lf5)
call DestroyTriggerEx(ltt)
else
call SetUnitManaBJ(lfo,GetUnitState(lfo,UNIT_STATE_MANA)-4-4*GetUnitAbilityLevel(lfo,'A02Q'))
call UnitDamageTargetBJ(lfo,lfo,4+4*GetUnitAbilityLevel(lfo,'A02Q'),ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MIND)
endif
endfunction
function Fiends_Grip_End takes nothing returns nothing
local unit lfo=GetTriggerUnit()
local trigger ltt=CreateTrigger()
local string lf5=H2Tx(ltt)
call TriggerRegisterTimerEvent(ltt,.2,true)
call TriggerRegisterUnitEvent(ltt,lfo,EVENT_UNIT_SPELL_ENDCAST)
call TriggerAddAction(ltt,function Fiends_Grip_Main)
call SetHandle(lf5,"UnitVar",lfo)
endfunction
function Fiends_Grip_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function Fiends_Grip_Spell))
call TriggerAddAction(ltt,function Fiends_Grip_End)
endfunction
function InitTrig_Fiend_Grip takes nothing returns nothing
endfunction
function Trig_Brain_Sap_Conditions takes nothing returns boolean
return GetSpellAbilityId()=='A0GK'
endfunction
function Trig_Brain_Sap_Actions takes nothing returns nothing
call UnitDamageTargetBJ(GetTriggerUnit(),GetSpellTargetUnit(),75*GetUnitAbilityLevel(GetTriggerUnit(),'A0GK'),ATTACK_TYPE_HERO,DAMAGE_TYPE_MAGIC)
call SetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)+75*GetUnitAbilityLevel(GetTriggerUnit(),'A0GK'))
endfunction
function StartTrigger_Brain_Sap takes nothing returns nothing
set gg_trg_Brain_Sap=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Brain_Sap,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Brain_Sap,Condition(function Trig_Brain_Sap_Conditions))
call TriggerAddAction(gg_trg_Brain_Sap,function Trig_Brain_Sap_Actions)
endfunction
function InitTrig_Brain_Sap takes nothing returns nothing
endfunction
function SafeAddSpell takes unit pEU,integer pfV,integer pfw returns nothing
if GetUnitAbilityLevel(pEU,pfV)==0 then
call UnitAddAbility(pEU,pfV)
endif
call SetUnitAbilityLevel(pEU,pfV,pfw)
endfunction
function BeastRageMain takes nothing returns nothing
local unit lKg=GetAttacker()
local unit lFB=GetTriggerUnit()
local string lf5=H2Tx(lKg)
local unit lMd=GetUnit(lf5,"BeastRage|PreviousTarget")
local integer lMa=ReturnMax(GetInteger(lf5,"BeastRage|Counter"),0)
local integer lmZ=GetUnitAbilityLevel(lKg,'A0O0')
if lMd!=lFB then
set lMa=lMa/2
else
set lMa=ReturnMin(lMa+1,21)
endif
call SafeAddSpell(lKg,'A0NZ',lMa*lmZ)
call SetInteger(lf5,"BeastRage|Counter",lMa)
call SetHandle(lf5,"BeastRage|PreviousTarget",lFB)
call SetBoolean(lf5,"BeastRage|Wait",true)
call PolledWait(.4)
call SetBoolean(lf5,"BeastRage|Wait",false)
endfunction
function BeastRageCheck takes nothing returns boolean
return GetUnitAbilityLevel(GetAttacker(),'A0O0')>0 and GetBoolean(H2Tx(GetAttacker()),"BeastRage|Wait")==false and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false
endfunction
function BeastRageInit takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(ltt,Condition(function BeastRageCheck))
call TriggerAddAction(ltt,function BeastRageMain)
call SpellPreload('A0NZ')
endfunction
function InitTrig_Beast_Rage takes nothing returns nothing
endfunction
function WildAxesSpell takes nothing returns boolean
return GetSpellAbilityId()=='A0O1'
endfunction
function WildAxesTreeCut takes nothing returns nothing
call KillDestructable(GetEnumDestructable())
endfunction
function WildAxesDamage takes unit pWho,real pxx,real pyy,group pVictims returns nothing
local group lGroup=CreateGroup()
local unit lTMP
local rect lMx=Rect(pxx-150,pyy-150,pxx+150,pyy+150)
call GroupEnumUnitsInRange(lGroup,pxx,pyy,150,null)
loop
set lTMP=FirstOfGroup(lGroup)
exitwhen lTMP==null
if(IsUnitInGroup(lTMP,pVictims)==false and IsUnitEnemy(lTMP,GetOwningPlayer(pWho))and IsUnitVisible(lTMP,GetOwningPlayer(pWho)))then
if(GetUnitAbilityLevel(lTMP,'A04R')!=1 and GetUnitState(lTMP,UNIT_STATE_LIFE)>0 and IsUnitType(lTMP,UNIT_TYPE_STRUCTURE)==false)then
call GroupAddUnit(pVictims,lTMP)
call UnitDamageTarget(pWho,lTMP,60+GetUnitAbilityLevel(pWho,'A0O1')*30,true,true,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_METAL_HEAVY_SLICE)
call AddSpecialEffectTarget("Objects\\Spawnmodels\\Human\\HumanBlood\\BloodElfSpellThiefBlood.mdl",lTMP,"overhead")
endif
endif
call GroupRemoveUnit(lGroup,lTMP)
endloop
call EnumDestructablesInRect(lMx,null,function WildAxesTreeCut)
call RemoveRect(lMx)
call DestroyGroup(lGroup)
endfunction
function WildAxesTimer takes nothing returns nothing
local string lTable=H2Tx(GetExpiredTimer())
local unit lAxe=GetUnit(lTable,"Axe")
local unit lCaster=GetUnit(lTable,"Hero")
local real lAx=GetReal(lTable,"Ax")
local real lAy=GetReal(lTable,"Ay")
local real lCx=GetReal(lTable,"Cx")
local real lCy=GetReal(lTable,"Cy")
local real lBx=GetReal(lTable,"Bx")
local real lBy=GetReal(lTable,"By")
local real laa=GetReal(lTable,"a")
local real lbb=1-laa
local boolean lIsPassed=GetBoolean(lTable,"FirstPass")
local group lCheckGroup=GetGroup(lTable,"AlreadyDamaged")
call SetUnitX(lAxe,SafeX(lAx*laa*laa+lBx*2*laa*lbb+lCx*lbb*lbb))
call SetUnitY(lAxe,SafeY(lAy*laa*laa+lBy*2*laa*lbb+lCy*lbb*lbb))
call WildAxesDamage(lCaster,GetUnitX(lAxe),GetUnitY(lAxe),lCheckGroup)
if(lIsPassed)then
call SetReal(lTable,"a",laa-.02)
else
call SetReal(lTable,"a",laa+.02)
call SetReal(lTable,"Ax",GetUnitX(lCaster))
call SetReal(lTable,"Ay",GetUnitY(lCaster))
endif
if(laa<0 and lIsPassed)then
call SetBoolean(lTable,"FirstPass",false)
call SetReal(lTable,"Bx",lAx+300*Cos(Atan2(lCy-lAy,lCx-lAx)+GetReal(lTable,"AngleOffset")))
call SetReal(lTable,"By",lAy+300*Sin(Atan2(lCy-lAy,lCx-lAx)+GetReal(lTable,"AngleOffset")))
endif
if(laa>1 and lIsPassed==false)then
call PauseTimer(GetExpiredTimer())
call DestroyGroup(lCheckGroup)
call FastFlush(lTable)
call RemoveUnit(lAxe)
call DestroyTimer(GetExpiredTimer())
endif
endfunction
function WildAxesSettings takes nothing returns nothing
local unit lCaster=GetTriggerUnit()
local real lCasterX=GetUnitX(lCaster)
local real lCasterY=GetUnitY(lCaster)
local real lTargetX=GetLocationX(GetSpellTargetLoc())
local real lTargetY=GetLocationY(GetSpellTargetLoc())
local unit lAxe1=CreateUnit(GetOwningPlayer(lCaster),'e01T',lCasterX,lCasterY,270.)
local unit lAxe2=CreateUnit(GetOwningPlayer(lCaster),'e01T',lCasterX,lCasterY,270.)
local string lTable1
local string lTable2
local timer lTimer1=CreateTimer()
local timer lTimer2=CreateTimer()
if GetSpellTargetUnit()!=null then
set lTargetX=GetUnitX(GetSpellTargetUnit())
set lTargetY=GetUnitY(GetSpellTargetUnit())
endif
call UnitAddAbility(lAxe1,'Amrf')
call UnitRemoveAbility(lAxe1,'Amrf')
call SetUnitFlyHeight(lAxe1,150,0)
call UnitAddAbility(lAxe2,'Amrf')
call UnitRemoveAbility(lAxe2,'Amrf')
call SetUnitFlyHeight(lAxe2,150,0)
set lTable1=H2Tx(lTimer1)
call SetHandle(lTable1,"Hero",lCaster)
call SetHandle(lTable1,"Axe",lAxe1)
call SetHandle(lTable1,"AlreadyDamaged",CreateGroup())
call SetReal(lTable1,"Ax",lCasterX)
call SetReal(lTable1,"Ay",lCasterY)
call SetReal(lTable1,"Cx",lTargetX)
call SetReal(lTable1,"Cy",lTargetY)
call SetReal(lTable1,"Bx",lCasterX+300*Cos(Atan2(lTargetY-lCasterY,lTargetX-lCasterX)+45))
call SetReal(lTable1,"By",lCasterY+300*Sin(Atan2(lTargetY-lCasterY,lTargetX-lCasterX)+45))
call SetReal(lTable1,"a",1)
call SetReal(lTable1,"AngleOffset",-45)
call SetBoolean(lTable1,"FirstPass",true)
set lTable2=H2Tx(lTimer2)
call SetHandle(lTable2,"Hero",lCaster)
call SetHandle(lTable2,"Axe",lAxe2)
call SetHandle(lTable2,"AlreadyDamaged",CreateGroup())
call SetReal(lTable2,"Ax",lCasterX)
call SetReal(lTable2,"Ay",lCasterY)
call SetReal(lTable2,"Cx",lTargetX)
call SetReal(lTable2,"Cy",lTargetY)
call SetReal(lTable2,"Bx",lCasterX+300*Cos(Atan2(lTargetY-lCasterY,lTargetX-lCasterX)-45))
call SetReal(lTable2,"By",lCasterY+300*Sin(Atan2(lTargetY-lCasterY,lTargetX-lCasterX)-45))
call SetReal(lTable2,"a",1)
call SetReal(lTable2,"AngleOffset",45)
call SetBoolean(lTable2,"FirstPass",true)
call TimerStart(lTimer1,.025,true,function WildAxesTimer)
call TimerStart(lTimer2,.025,true,function WildAxesTimer)
endfunction
function WildAxesInit takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function WildAxesSpell))
call TriggerAddAction(ltt,function WildAxesSettings)
endfunction
function InitTrig_Wild_Axes takes nothing returns nothing
endfunction
function Trig_Call_of_the_Wild_Conditions takes nothing returns boolean
return GetSpellAbilityId()=='A0OO'
endfunction
function WildCallKillExisting takes nothing returns nothing
if(GetUnitTypeId(GetEnumUnit())=='n01Q'or GetUnitTypeId(GetEnumUnit())=='n01M'or GetUnitTypeId(GetEnumUnit())=='n01R'or GetUnitTypeId(GetEnumUnit())=='n01S')then
call KillUnit(GetEnumUnit())
endif
endfunction
function Trig_Call_of_the_Wild_Actions takes nothing returns nothing
local unit lfo=GetTriggerUnit()
local player lEk=GetOwningPlayer(lfo)
local integer lmZ=GetUnitAbilityLevel(lfo,'A0OO')
local real lxx=GetUnitX(lfo)
local real lyy=GetUnitY(lfo)
local group lEw=CreateGroup()
call GroupEnumUnitsOfPlayer(lEw,lEk,null)
call ForGroup(lEw,function WildCallKillExisting)
call DestroyGroup(lEw)
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl",lxx,lyy))
if(lmZ==1)then
call UnitApplyTimedLife(CreateUnit(lEk,'n01Q',lxx,lyy,270),'BTLF',60)
elseif(lmZ==2)then
call UnitApplyTimedLife(CreateUnit(lEk,'n01Q',lxx,lyy,270),'BTLF',70)
call UnitApplyTimedLife(CreateUnit(lEk,'n01M',lxx,lyy,270),'BTLF',70)
elseif(lmZ==3)then
call UnitApplyTimedLife(CreateUnit(lEk,'n01R',lxx,lyy,270),'BTLF',80)
call UnitApplyTimedLife(CreateUnit(lEk,'n01M',lxx,lyy,270),'BTLF',80)
elseif(lmZ==4)then
call UnitApplyTimedLife(CreateUnit(lEk,'n01R',lxx,lyy,270),'BTLF',90)
call UnitApplyTimedLife(CreateUnit(lEk,'n01S',lxx,lyy,270),'BTLF',90)
endif
endfunction
function StartTrigger_Call_of_the_Wild takes nothing returns nothing
set gg_trg_Call_of_the_Wild=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Call_of_the_Wild,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Call_of_the_Wild,Condition(function Trig_Call_of_the_Wild_Conditions))
call TriggerAddAction(gg_trg_Call_of_the_Wild,function Trig_Call_of_the_Wild_Actions)
endfunction
function InitTrig_Call_of_the_Wild takes nothing returns nothing
endfunction
function Trig_Primal_Roar_Conditions takes nothing returns boolean
return(GetSpellAbilityId()=='A0O2')
endfunction
function BeastRoarFilter takes nothing returns boolean
local unit lMj=GetFilterUnit()
if((IsUnitType(lMj,UNIT_TYPE_STRUCTURE)==false)and(IsUnitType(lMj,UNIT_TYPE_DEAD)==false)and(IsUnitType(lMj,UNIT_TYPE_FLYING)==false)and(lMj!=GetSpellTargetUnit())and(lMj!=GetTriggerUnit())and GetUnitAbilityLevel(lMj,'A04R')==0)then
if(IsUnitEnemy(lMj,GetOwningPlayer(GetTriggerUnit())))then
set lMj=null
return true
endif
if(IsUnitType(lMj,UNIT_TYPE_HERO)==false)then
set lMj=null
return true
endif
endif
return false
endfunction
function BeastRoarDamage takes nothing returns nothing
if IsUnitEnemy(GetEnumUnit(),GetOwningPlayer(udg_u_DTAX_temp))then
call UnitDamageTarget(udg_u_DTAX_temp,GetEnumUnit(),udg_r_DTAX_necrolyte_reaperscythe_ratio,true,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
endif
endfunction
function BeastRoarSlide takes nothing returns nothing
local string lf5=H2Tx(GetExpiredTimer())
local group lMk=GetGroup(lf5,"pbgroup")
local group lgg=CreateGroup()
local location lMK=GetLocation(lf5,"castloc")
local real lMl=GetReal(lf5,"castangle")
local unit lML
local location lMm
local real lMn
local location lMN
local effect lee
call GroupAddGroup(lMk,lgg)
set lML=FirstOfGroup(lgg)
loop
exitwhen lML==null
set lMm=GetUnitLoc(lML)
set lMn=AngleBetweenPoints(lMK,lMm)
if(SinBJ(lMn-lMl)<0)then
set lMN=PolarProjectionBJ(lMm,20,lMl-90)
call SetUnitPositionLoc(lML,lMN)
call SetUnitFacingTimed(lML,lMl+90,.3)
else
set lMN=PolarProjectionBJ(lMm,20,lMl+90)
call SetUnitPositionLoc(lML,lMN)
call SetUnitFacingTimed(lML,lMl-90,.3)
endif
set lee=AddSpecialEffectTarget("Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl",lML,"origin")
call DestroyEffect(lee)
call RemoveLocation(lMm)
call RemoveLocation(lMN)
call GroupRemoveUnit(lgg,lML)
set lML=FirstOfGroup(lgg)
endloop
call DestroyGroup(lgg)
endfunction
function Trig_Primal_Roar_Actions takes nothing returns nothing
local unit lMp=GetTriggerUnit()
local integer lMP=GetUnitAbilityLevel(lMp,'A0O2')
local location lMK=GetUnitLoc(lMp)
local unit lfK=GetSpellTargetUnit()
local location lMq=GetUnitLoc(lfK)
local real lMQ=AngleBetweenPoints(lMK,lMq)
local location lMr=PolarProjectionBJ(lMK,50,lMQ)
local unit lMs=CreateUnitAtLoc(GetOwningPlayer(lMp),'o00Y',lMr,lMQ)
local location lMS=PolarProjectionBJ(lMK,250,lMQ)
local unit lMt=CreateUnitAtLoc(GetOwningPlayer(lMp),'o00Y',lMS,lMQ)
local location lMT=PolarProjectionBJ(lMK,450,lMQ)
local unit lMu=CreateUnitAtLoc(GetOwningPlayer(lMp),'o00Y',lMT,lMQ)
local group lgg=GetUnitsInRangeOfLocMatching(250.,lMr,Condition(function BeastRoarFilter))
local group lMU=GetUnitsInRangeOfLocMatching(250.,lMS,Condition(function BeastRoarFilter))
local group lDamagedGroup=CreateGroup()
local timer ltt=CreateTimer()
local string lf5=H2Tx(ltt)
call GroupAddGroup(lMU,lgg)
call GroupClear(lMU)
set lMU=GetUnitsInRangeOfLocMatching(250.,lMT,Condition(function BeastRoarFilter))
call GroupAddGroup(lMU,lgg)
call SetHandle(lf5,"pbgroup",lgg)
call SetReal(lf5,"castangle",lMQ)
call SetHandle(lf5,"castloc",lMK)
set udg_r_DTAX_necrolyte_reaperscythe_ratio=100*lMP
set udg_u_DTAX_temp=lMp
call ForGroup(lgg,function BeastRoarDamage)
call TimerStart(ltt,.05,true,function BeastRoarSlide)
call SetUnitAbilityLevel(lMs,'A0NY',lMP)
call SetUnitAbilityLevel(lMt,'A0NY',lMP)
call SetUnitAbilityLevel(lMu,'A0NY',lMP)
call IssueImmediateOrder(lMs,"thunderclap")
call IssueImmediateOrder(lMt,"thunderclap")
call IssueImmediateOrder(lMu,"thunderclap")
call TriggerSleepAction(.375)
call PauseTimer(ltt)
call FastFlush(lf5)
call TriggerSleepAction(.625)
call DestroyTimer(ltt)
call KillUnit(lMs)
call KillUnit(lMt)
call KillUnit(lMu)
call DestroyGroup(lgg)
call DestroyGroup(lMU)
call RemoveLocation(lMK)
call RemoveLocation(lMq)
call RemoveLocation(lMr)
call RemoveLocation(lMS)
call RemoveLocation(lMT)
endfunction
function StartTrigger_Primal_Roar takes nothing returns nothing
set gg_trg_Primal_Roar=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Primal_Roar,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Primal_Roar,Condition(function Trig_Primal_Roar_Conditions))
call TriggerAddAction(gg_trg_Primal_Roar,function Trig_Primal_Roar_Actions)
endfunction
function InitTrig_Primal_Roar takes nothing returns nothing
endfunction
function Blood_Seeking_Spell takes nothing returns boolean
return GetLearnedSkill()=='A0I8'and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),'A0I8')==1
endfunction
function Blood_Seeking_Filter takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO) and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(udg_u_DTAX_temp))
endfunction
function Blood_Seeking_GetWounded takes nothing returns nothing
local real lFc=FDFD(GetEnumUnit(),udg_u_DTAX_temp)
if udg_i_DTAX_beastmaster_primal_roar_intel_gain_REF3==0 or GetUnitState(udg_u_DTAX_temp,UNIT_STATE_LIFE)<1 then
call UnitShareVision(GetEnumUnit(),GetOwningPlayer(udg_u_DTAX_temp),false)
else
if lFc>=udg_i_DTAX_beastmaster_primal_roar_intel_gain_REF3*1500 or(lFc<udg_i_DTAX_beastmaster_primal_roar_intel_gain_REF3*1500 and GetUnitStatePercent(GetEnumUnit(),UNIT_STATE_LIFE,UNIT_STATE_MAX_LIFE)>40)then
call UnitShareVision(GetEnumUnit(),GetOwningPlayer(udg_u_DTAX_temp),false)
endif
if lFc<udg_i_DTAX_beastmaster_primal_roar_intel_gain_REF3*1500 and GetUnitLifePercent(GetEnumUnit())<=40 then
call UnitShareVision(GetEnumUnit(),GetOwningPlayer(udg_u_DTAX_temp),true)
set udg_b_DTAX_natures_guise_still_near_the_trees=true
endif
endif
endfunction
function Blood_Seeking_Start takes nothing returns nothing
local unit lJV=CreateUnit(GetOwningPlayer(udg_u_DTAX_temp),'e00E',GetUnitX(udg_u_DTAX_temp),GetUnitY(udg_u_DTAX_temp),0)
call UnitAddAbility(lJV,'A0LG')
call SetUnitAbilityLevel(lJV,'A0LG',udg_i_DTAX_beastmaster_primal_roar_intel_gain_REF3)
call IssueTargetOrderById(lJV,OrderId("bloodlust"),udg_u_DTAX_temp)
endfunction
function Blood_Seeking_Stop takes nothing returns nothing
call UnitRemoveAbility(udg_u_DTAX_temp,'B05R')
endfunction
function Blood_Seeking_Check takes nothing returns nothing
local unit lfU=GetUnit(H2Tx(GetExpiredTimer()),"Hero")
local group lEw=CreateGroup()
local boolexpr lEW=Condition(function Blood_Seeking_Filter)
local integer lmZ=GetUnitAbilityLevel(lfU,'A0I8')
set udg_u_DTAX_temp=lfU
set udg_i_DTAX_beastmaster_primal_roar_intel_gain_REF3=lmZ
set udg_b_DTAX_natures_guise_still_near_the_trees=false
call GroupEnumUnitsInRect(lEw,GetWorldBounds(),lEW)
call ForGroup(lEw,function Blood_Seeking_GetWounded)
if udg_b_DTAX_natures_guise_still_near_the_trees then
call Blood_Seeking_Start()
else
call Blood_Seeking_Stop()
endif
call DestroyBoolExpr(lEW)
call DestroyGroup(lEw)
endfunction
function Blood_Seeking_Run takes nothing returns nothing
local unit lfU=GetTriggerUnit()
local timer ltt=CreateTimer()
call SetHandle(H2Tx(ltt),"Hero",lfU)
call TimerStart(ltt,.5,true,function Blood_Seeking_Check)
endfunction
function Blood_Seeking_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(ltt,Condition(function Blood_Seeking_Spell))
call TriggerAddAction(ltt,function Blood_Seeking_Run)
endfunction
function InitTrig_Strygwyr_Thirst takes nothing returns nothing
endfunction
function Trig_Blood_Bath_Conditions takes nothing returns boolean
if(GetUnitTypeId(GetDyingUnit())=='n00L')then
return false
endif
if(IsUnitType(GetDyingUnit(),UNIT_TYPE_STRUCTURE))then
return false
endif
if(GetUnitAbilityLevel(GetKillingUnit(),'A0LE')>0)then
return true
endif
return false
endfunction
function Trig_Blood_Bath_Actions takes nothing returns nothing
local real lr3=.05
local real lr4
local effect lfx
if(IsUnitType(GetDyingUnit(),UNIT_TYPE_HERO))then
set lr3=.1
endif
set lr4=GetUnitAbilityLevel(GetKillingUnit(),'A0LE')*lr3*GetUnitState(GetDyingUnit(),UNIT_STATE_MAX_LIFE)
call SetWidgetLife(GetKillingUnit(),GetUnitState(GetKillingUnit(),UNIT_STATE_LIFE)+lr4)
set lfx=AddSpecialEffectTarget("Objects\\Spawnmodels\\Human\\HumanBlood\\HeroBloodElfBlood.mdl",GetKillingUnit(),"overhead")
call PolledWait(1.)
call DestroyEffect(lfx)
endfunction
function StartTrigger_Blood_Bath takes nothing returns nothing
set gg_trg_Blood_Bath=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Blood_Bath,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(gg_trg_Blood_Bath,Condition(function Trig_Blood_Bath_Conditions))
call TriggerAddAction(gg_trg_Blood_Bath,function Trig_Blood_Bath_Actions)
endfunction
function InitTrig_Blood_Bath takes nothing returns nothing
endfunction
function Trig_Rupture_Conditions takes nothing returns boolean
return GetSpellAbilityId()=='A0LH'
endfunction
function Rupture_Main takes nothing returns nothing
local timer ltt=GetExpiredTimer()
local string lf5=H2Tx(ltt)
local unit lr7=GetUnit(lf5,"RuptureCaster")
local unit lr8=GetUnit(lf5,"RuptureTarget")
local location lr9=GetLocation(lf5,"RuptureOldLoc")
local location lRa=GetUnitLoc(lr8)
local real lQr=.2*GetUnitAbilityLevel(lr7,'A0LH')*DistanceBetweenPoints(lr9,lRa)
if(lQr>200)then
set lQr=0
endif
if(lQr>5)then
call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Human\\HumanBlood\\BloodElfSpellThiefBlood.mdl",lr8,"origin"))
endif
if(lQr>0)then
call UnitDamageTargetBJ(lr7,lr8,lQr,ATTACK_TYPE_HERO,DAMAGE_TYPE_MAGIC)
endif
call RemoveLocation(lr9)
call SetHandle(lf5,"RuptureOldLoc",lRa)
endfunction
function Trig_Rupture_Actions takes nothing returns nothing
local unit lr7=GetTriggerUnit()
local unit lr8=GetSpellTargetUnit()
local location lRb=GetUnitLoc(lr8)
local integer lmZ=GetUnitAbilityLevel(lr7,'A0LH')
local timer ltt=CreateTimer()
local string lf5=H2Tx(ltt)
local unit lqE
call UnitDamageTargetBJ(lr7,lr8,50+100*lmZ,ATTACK_TYPE_HERO,DAMAGE_TYPE_MAGIC)
call SetHandle(lf5,"RuptureCaster",lr7)
call SetHandle(lf5,"RuptureTarget",lr8)
call SetHandle(lf5,"RuptureOldLoc",lRb)
call TimerStart(ltt,.25,true,function Rupture_Main)
set lqE=CreateUnit(GetOwningPlayer(lr8),'e01R',0,0,bj_UNIT_FACING)
call UnitAddAbility(lqE,'A0NH')
call PolledWait(3+(2*lmZ))
call RemoveUnit(lqE)
call UnitRemoveAbility(lr8,'B067')
call PauseTimer(ltt)
call PolledWait(1)
call FastFlush(lf5)
call DestroyTimer(ltt)
endfunction
function StartTrigger_Rupture takes nothing returns nothing
set gg_trg_Rupture=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Rupture,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Rupture,Condition(function Trig_Rupture_Conditions))
call TriggerAddAction(gg_trg_Rupture,function Trig_Rupture_Actions)
endfunction
function InitTrig_Rupture takes nothing returns nothing
endfunction
function Trig_Searing_Arrows_Conditions takes nothing returns boolean
return GetLearnedSkill()=='AHfa'and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function Trig_Searing_Arrows_Actions takes nothing returns nothing
if(UnitHasBuffBJ(GetTriggerUnit(),'BOwk'))then
call UnitRemoveAbility(GetTriggerUnit(),'BOwk')
endif
call DisableTrigger(gg_trg_Searing_Arrows)
endfunction
function StartTrigger_Searing_Arrows takes nothing returns nothing
set gg_trg_Searing_Arrows=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Searing_Arrows,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(gg_trg_Searing_Arrows,Condition(function Trig_Searing_Arrows_Conditions))
call TriggerAddAction(gg_trg_Searing_Arrows,function Trig_Searing_Arrows_Actions)
endfunction
function InitTrig_Searing_Arrows takes nothing returns nothing
endfunction
function TrackSpell takes nothing returns boolean
return GetSpellAbilityId()=='A0B4'
endfunction
function TrackMain takes nothing returns nothing
local location liD=GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc(1,'e00E',GetOwningPlayer(GetTriggerUnit()),liD,bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit,'A0M8')
call IssueTargetOrderById(bj_lastCreatedUnit,OrderId("bloodlust"),GetTriggerUnit())
call RemoveLocation(liD)
endfunction
function TrackInit takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function TrackSpell))
call TriggerAddAction(ltt,function TrackMain)
endfunction
function InitTrig_Track_Cast takes nothing returns nothing
endfunction
function BountyGoldFilter takes nothing returns boolean
return GetUnitAbilityLevel(GetKillingUnit(),'A0B4')>0 and IsUnitType(GetDyingUnit(),UNIT_TYPE_HERO)
endfunction
function BountyGoldMain takes nothing returns nothing
local texttag lgg
local unit lfo=GetKillingUnit()
local integer lfa=GetUnitAbilityLevel(lfo,'A0B4')*50
call SetPlayerState(GetOwningPlayer(lfo),PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(GetOwningPlayer(lfo),PLAYER_STATE_RESOURCE_GOLD)+lfa)
set lgg=CreateTextTagUnitBJ("+"+I2S(lfa),GetDyingUnit(),0,10,90.,84.,.0,0)
call SetTextTagVelocityBJ(lgg,64,90)
call PolledWait(2.)
call DestroyTextTag(lgg)
endfunction
function gS takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(ltt,Condition(function BountyGoldFilter))
call TriggerAddAction(ltt,function BountyGoldMain)
endfunction
function InitTrig_Track_Kill takes nothing returns nothing
endfunction
function ComplexMax takes integer pf1,integer paa,integer pbb returns integer
return ReturnMax(ReturnMin(pf1,pbb),paa)
endfunction
function WarpathLevelFunc takes integer pmZ,integer paa returns integer
if paa==0 then
return 1
else
return(pmZ-1)*4+1+paa
endif
endfunction
function WarpathMain takes nothing returns nothing
local unit lfU=GetTriggerUnit()
local string lf5=H2Tx(lfU)
local unit lJV=GetUnit(lf5,"Warpath|Caster")
local integer lmZ=GetUnitAbilityLevel(lfU,'A0FV')
local integer lnb=ComplexMax(GetInteger(lf5,"Warpath|Level")+1,0,4)
local integer lnB=WarpathLevelFunc(lmZ,lnb)
call SetUnitAbilityLevel(lJV,'A0EF',lnB)
call SetInteger(lf5,"Warpath|Level",lnb)
call PolledWait(10)
set lmZ=GetUnitAbilityLevel(lfU,'A0FV')
set lnb=ComplexMax(GetInteger(lf5,"Warpath|Level")-1,0,4)
set lnB=WarpathLevelFunc(lmZ,lnb)
call SetUnitAbilityLevel(lJV,'A0EF',lnB)
call SetInteger(lf5,"Warpath|Level",lnb)
endfunction
function WarpathSpell takes nothing returns boolean
return GetSpellAbilityId()=='A0GP'or GetSpellAbilityId()=='A0FW'
endfunction
function WarpathSettings takes nothing returns nothing
local unit lfU=GetTriggerUnit()
local integer lmZ=GetUnitAbilityLevel(lfU,'A0FV')
local unit lJV=CreateUnit(GetOwningPlayer(lfU),'e00X',0,0,0)
local trigger ltt=CreateTrigger()
call UnitAddAbility(lJV,'A0EF')
call SetHandle(H2Tx(lfU),"Warpath|Caster",lJV)
call SetUnitInvulnerable(lJV,true)
call UnitAddAbility(lJV,'Aloc')
call TriggerRegisterUnitEvent(ltt,lfU,EVENT_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function WarpathSpell))
call TriggerAddAction(ltt,function WarpathMain)
endfunction
function WarpathSpellII takes nothing returns boolean
return GetLearnedSkill()=='A0FV'and GetUnitAbilityLevel(GetTriggerUnit(),'A0FV')==1 and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function WarpathInit takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(ltt,Condition(function WarpathSpellII))
call TriggerAddAction(ltt,function WarpathSettings)
call SpellPreload('A0EF')
endfunction
function InitTrig_Warpath takes nothing returns nothing
endfunction
function Nasal_Goo_Spell takes nothing returns boolean
if(not(GetSpellAbilityId()=='A0FW'))then
return false
endif
return true
endfunction
function Nasal_Goo_GetSpellCasters takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())=='e00E')
endfunction
function Nasal_Goo_UserData4 takes nothing returns boolean
if(not(GetUnitUserData(GetEnumUnit())==4))then
return false
endif
return true
endfunction
function Nasal_Goo_PushEffect takes nothing returns nothing
local location liD=GetUnitLoc(GetTriggerUnit())
call SetUnitPositionLoc(GetEnumUnit(),liD)
if(Nasal_Goo_UserData4())then
call IssueTargetOrderById(GetEnumUnit(),OrderId("acidbomb"),GetSpellTargetUnit())
else
call IncUnitAbilityLevel(GetEnumUnit(),'A0FZ')
call IssueTargetOrderById(GetEnumUnit(),OrderId("acidbomb"),GetSpellTargetUnit())
call SetUnitUserData(GetEnumUnit(),(GetUnitUserData(GetEnumUnit())+1))
endif
call RemoveLocation(liD)
endfunction
function KilleEnumedDestr takes nothing returns nothing
call KillUnit(GetEnumUnit())
endfunction
function Nasal_Goo_Main takes nothing returns nothing
local location liD=GetUnitLoc(GetTriggerUnit())
local location lng=GetUnitLoc(GetSpellTargetUnit())
local group lnG
if(UnitHasBuffBJ(GetSpellTargetUnit(),'B02U'))then
set lnG=GetUnitsOfPlayerMatching(GetOwningPlayer(GetSpellTargetUnit()),Condition(function Nasal_Goo_GetSpellCasters))
call ForGroupBJ(lnG,function Nasal_Goo_PushEffect)
else
set lnG=GetUnitsOfPlayerMatching(GetOwningPlayer(GetSpellTargetUnit()),Condition(function Nasal_Goo_GetSpellCasters))
call ForGroupBJ(lnG,function KilleEnumedDestr)
call DisableTrigger(gg_trg_Dummy_Control)
call CreateNUnitsAtLocFacingLocBJ(1,'e00E',GetOwningPlayer(GetSpellTargetUnit()),liD,lng)
call EnableTrigger(gg_trg_Dummy_Control)
call UnitAddAbility(bj_lastCreatedUnit,'A0FZ')
call SetUnitAbilityLevelSwapped('A0FZ',bj_lastCreatedUnit,((GetUnitAbilityLevelSwapped('A0FW',GetTriggerUnit())*4)-3))
call IssueTargetOrderById(bj_lastCreatedUnit,OrderId("acidbomb"),GetSpellTargetUnit())
call SetUnitUserData(bj_lastCreatedUnit,1)
endif
call DestroyGroup(lnG)
call RemoveLocation(liD)
call RemoveLocation(lng)
endfunction
function Nasal_Goo_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function Nasal_Goo_Spell))
call TriggerAddAction(ltt,function Nasal_Goo_Main)
endfunction
function InitTrig_Viscous_Nasal_Goo takes nothing returns nothing
endfunction
function Bristleback_Spell takes nothing returns boolean
return GetLearnedSkill()=='A0M3'and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function Bristleback_Filter takes nothing returns boolean
if(IsUnitType(GetEventDamageSource(),UNIT_TYPE_STRUCTURE))then
return false
endif
return true
endfunction
function Bristleback_Spray takes unit pfU returns nothing
local unit lJV=CreateUnit(GetOwningPlayer(pfU),'e00E',GetUnitX(pfU),GetUnitY(pfU),0)
call UnitAddAbility(lJV,'A0GP')
call SetUnitAbilityLevel(lJV,'A0GP',GetUnitAbilityLevel(pfU,'A0GP'))
call IssueImmediateOrderById(lJV,OrderId("fanofknives"))
endfunction
function Bristleback_DamageGet takes unit pfU,real pf7 returns nothing
local string lf5=H2Tx(pfU)
local real lnj=GetReal(lf5,"Bristleback_DamageStack")
if lnj>200 then
call SetReal(lf5,"Bristleback_DamageStack",0)
call Bristleback_Spray(pfU)
else
call SetReal(lf5,"Bristleback_DamageStack",lnj+pf7)
endif
endfunction
function Bristleback_Main takes nothing returns nothing
local unit lnk=GetTriggerUnit()
local unit lKg=GetEventDamageSource()
local real lnK=AngleFromUnits(lKg,lnk)
local real lnl=GetUnitFacing(lnk)
local real lnL
local real lf7=GetEventDamage()
local real lnm
local real lnM
if(lf7>10)then
if((lnl-lnK)<(-180.))then
set lnL=(lnl-lnK+360)
else
if((lnl-lnK)>180.)then
set lnL=(lnl-lnK-360)
else
set lnL=(lnl-lnK)
endif
endif
set lnM=RAbsBJ(lnL)
if lnM<=70 then
set lnm=GetUnitAbilityLevel(lnk,'A0M3')*.1*lf7
call Bristleback_DamageGet(lnk,lf7-lnm)
call SetUnitState(lnk,UNIT_STATE_LIFE,GetUnitState(lnk,UNIT_STATE_LIFE)+lnm)
elseif lnM<='s'then
set lnm=GetUnitAbilityLevel(lnk,'A0M3')*.05*lf7
call SetUnitState(lnk,UNIT_STATE_LIFE,GetUnitState(lnk,UNIT_STATE_LIFE)+lnm)
endif
endif
endfunction
function Bristleback_Setting takes nothing returns nothing
local trigger ltt
if GetUnitAbilityLevel(GetTriggerUnit(),'A0M3')==1 then
set ltt=CreateTrigger()
call TriggerRegisterUnitEvent(ltt,GetTriggerUnit(),EVENT_UNIT_DAMAGED)
call TriggerAddCondition(ltt,Condition(function Bristleback_Filter))
call TriggerAddAction(ltt,function Bristleback_Main)
endif
endfunction
function Bristleback_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(ltt,Condition(function Bristleback_Spell))
call TriggerAddAction(ltt,function Bristleback_Setting)
endfunction
function InitTrig_Bristleback takes nothing returns nothing
endfunction
function Quill_Spray_Spell takes nothing returns boolean
return GetSpellAbilityId()=='A0GP'
endfunction
function Quill_Spray_Filter takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))and GetUnitAbilityLevel(GetFilterUnit(),'A04R')!=1
endfunction
function Quill_Spray_Damage takes nothing returns nothing
local string lnp=H2Tx(GetEnumUnit())
local integer lnP=GetInteger(udg_AX,lnp)
call UnitDamageTarget(udg_u_DTAX_temp,GetEnumUnit(),udg_r_DTAX_necrolyte_reaperscythe_ratio+lnP*30,false,true,ATTACK_TYPE_HERO,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
call SetInteger(udg_AX,lnp,lnP+1)
endfunction
function Quill_Spray_DropDamageMod takes nothing returns nothing
local string lnp=H2Tx(GetEnumUnit())
local integer lnP=GetInteger(udg_AX,lnp)
call SetInteger(udg_AX,lnp,lnP-1)
endfunction
function Quill_Spray_Main takes nothing returns nothing
local unit lfo=GetTriggerUnit()
local group lEw=CreateGroup()
local boolexpr lEW=Condition(function Quill_Spray_Filter)
if IsUnitType(lfo,UNIT_TYPE_HERO)==false then
set lfo=udg_uA_DTAX_player_hero_unit[GetPlayerId(GetOwningPlayer(lfo))]
endif
call GroupEnumUnitsInRange(lEw,GetUnitX(lfo),GetUnitY(lfo),650,lEW)
call DestroyBoolExpr(lEW)
set udg_u_DTAX_temp=lfo
set udg_r_DTAX_necrolyte_reaperscythe_ratio=GetUnitAbilityLevel(lfo,'A0GP')*20
set udg_AX=H2Tx(lfo)
call ForGroup(lEw,function Quill_Spray_Damage)
call PolledWait(10)
set udg_AX=H2Tx(lfo)
call ForGroup(lEw,function Quill_Spray_DropDamageMod)
call DestroyGroup(lEw)
endfunction
function Quill_Spray_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function Quill_Spray_Spell))
call TriggerAddAction(ltt,function Quill_Spray_Main)
endfunction
function InitTrig_Quill_Spray takes nothing returns nothing
endfunction
function HWHW takes nothing returns boolean
if GetUnitTypeId(GetFilterUnit())=='o003'then
call KillUnit(GetFilterUnit())
return true
endif
return false
endfunction
function HxHx takes nothing returns nothing
local boolexpr lEW=Condition(function HWHW)
local group lEw=GetUnitsInRectMatching(bj_mapInitialPlayableArea,lEW)
call DestroyBoolExpr(lEW)
call DestroyGroup(lEw)
endfunction
function InitTrig_Spin_Web_Functions takes nothing returns nothing
endfunction
function Spin_Web_Summon_Spell takes nothing returns boolean
return GetUnitTypeId(GetSummonedUnit())=='o003'
endfunction
function Spin_Web_Summon_Main takes nothing returns nothing
local unit lRG=GetSummonedUnit()
local unit lRh=GetSummoningUnit()
local string lf5=H2Tx(lRh)
local integer lmZ=GetUnitAbilityLevel(lRh,'A0BG')
local integer lRH=GetInteger(lf5,"TotalWebs")
local unit lRi=GetUnit(lf5,"Web1")
local integer lxx=1
set lRH=lRH+1
call SetUnitVertexColorBJ(lRG,100,100,100,70)
call PolledWait(.1)
call UnitAddAbility(lRG,'Aloc')
call SetHandle(lf5,"Web"+I2S(lRH),lRG)
if(lRH>lmZ*2)then
call KillUnit(lRi)
loop
exitwhen lxx==lRH
call SetHandle(lf5,"Web"+I2S(lxx),GetUnit(lf5,"Web"+I2S(lxx+1)))
set lxx=lxx+1
endloop
set lRH=lRH-1
endif
call SetInteger(lf5,"TotalWebs",lRH)
call SetUnitAbilityLevel(lRG,'A0BF',lmZ)
endfunction
function Spin_Web_Summon_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SUMMON)
call TriggerAddCondition(ltt,Condition(function Spin_Web_Summon_Spell))
call TriggerAddAction(ltt,function Spin_Web_Summon_Main)
endfunction
function InitTrig_Spin_Web takes nothing returns nothing
endfunction
function Spin_Web_AddWeb takes unit pRh returns nothing
local string lf5=H2Tx(pRh)
local integer lmZ=GetUnitAbilityLevel(pRh,'A0BG')
local integer lRH=GetInteger(lf5,"TotalWebs")
local integer lxx=1
local unit lo3
loop
exitwhen lxx>lRH
set lo3=GetUnit(lf5,"Web"+I2S(lxx))
call SetUnitAbilityLevel(lo3,'A0BF',lmZ)
set lxx=lxx+1
endloop
endfunction
function Spin_Web_Hide_Main takes nothing returns nothing
local unit lRh=GetUnit(H2Tx(GetTriggeringTrigger()),"Spider")
if GetUnitAbilityLevel(lRh,'B01C')>0 then
call UnitAddAbility(lRh,'A021')
else
call UnitRemoveAbility(lRh,'A021')
endif
endfunction
function Spin_Web_Hide_Run takes nothing returns nothing
local unit lfo=GetTriggerUnit()
local trigger ltt
if(GetUnitAbilityLevel(lfo,'A0BG')==1)then
set ltt=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(ltt,1.5)
call TriggerAddAction(ltt,function Spin_Web_Hide_Main)
call SetHandle(H2Tx(ltt),"Spider",lfo)
else
call Spin_Web_AddWeb(lfo)
endif
endfunction
function Spin_Web_Hide_Spell takes nothing returns boolean
return GetLearnedSkill()=='A0BG'and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function Spin_Web_Hide_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(ltt,Condition(function Spin_Web_Hide_Spell))
call TriggerAddAction(ltt,function Spin_Web_Hide_Run)
endfunction
function InitTrig_Spin_Web_Learn takes nothing returns nothing
endfunction
function RotSpell takes nothing returns boolean
return GetUnitAbilityLevel(GetTriggerUnit(),'A06K')>0
endfunction
function RootMain takes nothing returns nothing
if(GetIssuedOrderId()==OrderId("immolation"))then
call UnitAddAbility(GetTriggerUnit(),'A0AZ')
endif
if(GetIssuedOrderId()==OrderId("unimmolation"))then
call UnitRemoveAbility(GetTriggerUnit(),'A0AZ')
endif
endfunction
function RootInit takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_ISSUED_ORDER)
call TriggerAddCondition(ltt,Condition(function RotSpell))
call TriggerAddAction(ltt,function RootMain)
endfunction
function InitTrig_Rot takes nothing returns nothing
endfunction
function FleshHeapSpell takes nothing returns boolean
return GetUnitAbilityLevel(GetKillingUnit(),'A06D')>0
endfunction
function FleshHeepMain takes nothing returns nothing
local string lf5=H2Tx(GetKillingUnit())
local real lTI=GetReal(lf5,"FleshHeap")
if(IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO))then
set lTI=lTI+.3*GetUnitAbilityLevel(GetKillingUnit(),'A06D')
else
set lTI=lTI+.03*GetUnitAbilityLevel(GetKillingUnit(),'A06D')
endif
if(lTI>=1.)then
set lTI=lTI-1
call ModifyHeroStat(0,GetKillingUnit(),0,1)
endif
call SetReal(lf5,"FleshHeap",lTI)
endfunction
function FleshHeapInit takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(ltt,Condition(function FleshHeapSpell))
call TriggerAddAction(ltt,function FleshHeepMain)
endfunction
function InitTrig_Flesh_Heap takes nothing returns nothing
endfunction
function Trig_Meat_Hook_Conditions takes nothing returns boolean
return GetSpellAbilityId()=='A06I'
endfunction
function MeetHookFilter takes nothing returns boolean
if(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE) or GetUnitAbilityLevel(GetFilterUnit(),'A04R')==1)or GetFilterUnit()==udg_u_DTAX_temp then
return false
endif
if GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)<=0 or GetUnitTypeId(GetFilterUnit())=='u00H'or GetUnitTypeId(GetFilterUnit())=='u00F'or IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)then
return false
endif
return true
endfunction
function MeetHookTimer takes nothing returns nothing
local timer ltt=GetExpiredTimer()
local timer lTk=GetTimer(H2Tx(ltt),"ExtendCache")
local string lf5=H2Tx(lTk)
local integer lTK=GetInteger(lf5,"ChainLinkNumber")
local unit lFB=GetUnit(lf5,"Target")
local unit lTl=GetUnit(lf5,"Pudge")
local unit lgl=GetUnit(lf5,"ChainLinks"+I2S(lTK))
if(lFB!=null)then
call SetUnitX(lFB,GetUnitX(lgl))
call SetUnitY(lFB,GetUnitY(lgl))
endif
call RemoveUnit(lgl)
call SetInteger(lf5,"ChainLinkNumber",lTK-1)
if(lTK==1)then
call PauseTimer(ltt)
call FastFlush(lf5)
call FastFlush(H2Tx(ltt))
call PolledWait(1)
call DestroyTimer(ltt)
call DestroyTimer(lTk)
endif
endfunction
function MeetHookMain takes nothing returns nothing
local timer ltt=GetExpiredTimer()
local string lf5=H2Tx(ltt)
local integer lTK=GetInteger(lf5,"ChainLinkNumber")
local unit lTl=GetUnit(lf5,"Pudge")
local real lnM=GetReal(lf5,"Angle")
local integer lmZ=GetUnitAbilityLevel(lTl,'A06I')
local unit lgl
local group lEw
local real lxx
local real lyy
local boolexpr lTM
local timer lTn
local string lCache2
if(lTK<5+6*lmZ)then
set lTK=lTK+1
set lxx=GetUnitX(lTl)+lTK*40*Cos(lnM*bj_DEGTORAD)
set lyy=GetUnitY(lTl)+lTK*40*Sin(lnM*bj_DEGTORAD)
set lgl=CreateUnit(GetOwningPlayer(lTl),'u00H',lxx,lyy,lnM)
call SetHandle(lf5,"ChainLinks"+I2S(lTK),lgl)
call SetInteger(lf5,"ChainLinkNumber",lTK)
set lEw=CreateGroup()
set udg_u_DTAX_temp=lTl
set lTM=Condition(function MeetHookFilter)
call GroupEnumUnitsInRange(lEw,lxx,lyy,'}',lTM)
call DestroyBoolExpr(lTM)
set lgl=FirstOfGroup(lEw)
call DestroyGroup(lEw)
if(lgl!=null)then
call SetHandle(lf5,"Target",lgl)
if IsUnitEnemy(lgl,GetOwningPlayer(lTl))then
call UnitDamageTargetBJ(lTl,lgl,lmZ*100,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_ENHANCED)
call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Human\\HumanBlood\\BloodElfSpellThiefBlood.mdl",lgl,"origin"))
endif
call PauseTimer(ltt)
set lTn=CreateTimer()
call SetHandle(H2Tx(lTn),"ExtendCache",ltt)
call TimerStart(lTn,.03,true,function MeetHookTimer)
endif
else
call PauseTimer(ltt)
set lTn=CreateTimer()
call SetHandle(H2Tx(lTn),"ExtendCache",ltt)
call TimerStart(lTn,.03,true,function MeetHookTimer)
endif
endfunction
function Trig_Meat_Hook_Actions takes nothing returns nothing
local location lTo=GetUnitLoc(GetSpellAbilityUnit())
local location lng=GetSpellTargetLoc()
local timer ltt=CreateTimer()
local unit lTl=GetTriggerUnit()
local real lnM=AngleBetweenPoints(lTo,lng)
local string lf5=H2Tx(ltt)
call SetHandle(lf5,"Pudge",lTl)
call SetReal(lf5,"Angle",lnM)
call TimerStart(ltt,.03,true,function MeetHookMain)
call RemoveLocation(lTo)
call RemoveLocation(lng)
endfunction
function StartTrigger_Meat_Hook takes nothing returns nothing
set gg_trg_Meat_Hook=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Meat_Hook,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Meat_Hook,Condition(function Trig_Meat_Hook_Conditions))
call TriggerAddAction(gg_trg_Meat_Hook,function Trig_Meat_Hook_Actions)
endfunction
function InitTrig_Meat_Hook takes nothing returns nothing
endfunction
function Return_Check takes nothing returns boolean
return GetUnitAbilityLevel(GetTriggerUnit(),'A00V')>0 and GetUnitAbilityLevel(GetAttacker(),'A04R')!=1
endfunction
function Return_Damage takes nothing returns nothing
call UnitDamageTargetBJ(GetTriggerUnit(),GetAttacker(),5.*GetUnitAbilityLevel(GetTriggerUnit(),'A00V'),ATTACK_TYPE_HERO,DAMAGE_TYPE_NORMAL)
endfunction
function Return_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(ltt,Condition(function Return_Check))
call TriggerAddAction(ltt,function Return_Damage)
endfunction
function InitTrig_Return takes nothing returns nothing
endfunction
function Trig_Double_Edge_Conditions takes nothing returns boolean
return GetSpellAbilityId()=='A00L'
endfunction
function Trig_Double_Edge_Actions takes nothing returns nothing
if(GetUnitStateSwap(UNIT_STATE_LIFE,GetTriggerUnit())>=(100.*I2R(GetUnitAbilityLevelSwapped('A00L',GetTriggerUnit()))))then
call SetWidgetLife(GetTriggerUnit(),(GetUnitStateSwap(UNIT_STATE_LIFE,GetTriggerUnit())-(100.*I2R(GetUnitAbilityLevelSwapped('A00L',GetTriggerUnit())))))
else
call SetWidgetLife(GetTriggerUnit(),1.)
endif
endfunction
function StartTrigger_Double_Edge takes nothing returns nothing
set gg_trg_Double_Edge=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Double_Edge,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Double_Edge,Condition(function Trig_Double_Edge_Conditions))
call TriggerAddAction(gg_trg_Double_Edge,function Trig_Double_Edge_Actions)
endfunction
function InitTrig_Double_Edge takes nothing returns nothing
endfunction
function Trig_Chaos_Bolt_Conditions takes nothing returns boolean
return GetSpellAbilityId()=='A055'
endfunction
function Trig_Chaos_Bolt_Actions takes nothing returns nothing
local location liD=GetUnitLoc(GetSpellTargetUnit())
local integer lmZ=GetUnitAbilityLevel(GetTriggerUnit(),'A055')
local integer lRL=GetRandomInt(1,lmZ)
local unit lfo=GetTriggerUnit()
local unit lFB=GetSpellTargetUnit()
local real lf7=GetRandomReal(1,200)
if(lmZ==4)then
set lRL=GetRandomInt(2,4)
endif
call CreateNUnitsAtLoc(1,'e00E',GetOwningPlayer(lfo),liD,bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit,'A04U')
call SetUnitAbilityLevel(bj_lastCreatedUnit,'A04U',lRL)
call IssueTargetOrderById(bj_lastCreatedUnit,OrderId("thunderbolt"),lFB)
call UnitDamageTargetBJ(lfo,lFB,lf7,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC)
endfunction
function StartTrigger_Chaos_Bolt takes nothing returns nothing
set gg_trg_Chaos_Bolt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Chaos_Bolt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Chaos_Bolt,Condition(function Trig_Chaos_Bolt_Conditions))
call TriggerAddAction(gg_trg_Chaos_Bolt,function Trig_Chaos_Bolt_Actions)
endfunction
function InitTrig_Chaos_Bolt takes nothing returns nothing
endfunction
function Freezing_Field_Spell takes nothing returns boolean
return GetSpellAbilityId()=='A03R'or GetSpellAbilityId()=='A0AV'
endfunction
function Freezing_Field_Timer takes nothing returns nothing
local trigger ltt=GetTriggeringTrigger()
local string lf5=H2Tx(ltt)
local unit lfo
local unit lJV
local integer lmZ
if(GetTriggerEventId()==EVENT_UNIT_SPELL_ENDCAST)then
if(GetSpellAbilityId()=='A03R'or GetSpellAbilityId()=='A0AV')then
call DisableTrigger(ltt)
call PolledWait(1)
call TriggerRemoveAction(ltt,GetTrigAction(lf5,"TriggerAction"))
call FastFlush(lf5)
call DestroyTriggerEx(ltt)
endif
else
set lmZ=GetInteger(lf5,"Level")
set lfo=GetUnit(lf5,"UnitVar")
set lJV=CreateUnit(GetOwningPlayer(lfo),'e00C',GetUnitX(lfo)+GetRandomReal('}',635)*Cos(GetRandomReal(0,360)*bj_DEGTORAD),GetUnitY(lfo)+GetRandomReal('}',635)*Sin(GetRandomReal(0,360)*bj_DEGTORAD),270)
call UnitAddAbility(lJV,'A03X')
call SetUnitAbilityLevel(lJV,'A03X',lmZ)
call SetUnitPathing(lJV,false)
call IssueTargetOrderById(lJV,OrderId("frostnova"),lJV)
call UnitApplyTimedLife(lJV,'BTLF',.25)
endif
endfunction
function Freezing_Field_Main takes nothing returns nothing
local unit lfo=GetTriggerUnit()
local trigger ltt=CreateTrigger()
local string lf5=H2Tx(ltt)
local integer lmZ
if(GetSpellAbilityId()=='A03R')then
set lmZ=GetUnitAbilityLevel(lfo,'A03R')
else
set lmZ=GetUnitAbilityLevel(lfo,'A0AV')+1
endif
call TriggerRegisterTimerEvent(ltt,.1,true)
call TriggerRegisterUnitEvent(ltt,lfo,EVENT_UNIT_SPELL_ENDCAST)
call SetHandle(lf5,"TriggerAction",TriggerAddAction(ltt,function Freezing_Field_Timer))
call SetHandle(lf5,"UnitVar",lfo)
call SetInteger(lf5,"Level",lmZ)
endfunction
function Freezing_Field_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function Freezing_Field_Spell))
call TriggerAddAction(ltt,function Freezing_Field_Main)
call SpellPreload('A03X')
endfunction
function InitTrig_Freezing_Field takes nothing returns nothing
endfunction
function Trig_LVL_Death_Conditions takes nothing returns boolean
return GetSpellAbilityId()=='A094'
endfunction
function LvlXDeathCheck takes nothing returns boolean
if(not(ModuloReal(I2R(GetHeroLevel(GetSpellTargetUnit())),(7.-I2R(GetUnitAbilityLevelSwapped('A094',GetTriggerUnit()))))==.0))then
return false
endif
return true
endfunction
function Trig_LVL_Death_Actions takes nothing returns nothing
if(LvlXDeathCheck())then
call UnitDamageTargetBJ(GetTriggerUnit(),GetSpellTargetUnit(),250.,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL)
endif
endfunction
function StartTrigger_LVL_Death takes nothing returns nothing
set gg_trg_LVL_Death=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_LVL_Death,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_LVL_Death,Condition(function Trig_LVL_Death_Conditions))
call TriggerAddAction(gg_trg_LVL_Death,function Trig_LVL_Death_Actions)
endfunction
function InitTrig_LVL_Death takes nothing returns nothing
endfunction
function Trig_Devour_Conditions takes nothing returns boolean
if(not(GetUnitTypeId(GetTransportUnit())=='UC42'))then
return false
endif
return true
endfunction
function DevourCheck takes nothing returns boolean
if(not(IsUnitInTransport(GetTriggerUnit(),GetTransportUnit())))then
return false
endif
return true
endfunction
function Trig_Devour_Actions takes nothing returns nothing
local texttag lgg
call PolledWait(((GetUnitStateSwap(UNIT_STATE_LIFE,GetTriggerUnit())-20.)/20.))
if(DevourCheck())then
call SetPlayerStateBJ(GetOwningPlayer(GetTransportUnit()),PLAYER_STATE_RESOURCE_GOLD,(GetPlayerState(GetOwningPlayer(GetTransportUnit()),PLAYER_STATE_RESOURCE_GOLD)+(10*GetUnitAbilityLevelSwapped('A05Y',GetTransportUnit()))))
set lgg=CreateTextTagUnitBJ(("+"+I2S((GetUnitAbilityLevelSwapped('A05Y',GetTransportUnit())*10))),GetTransportUnit(),0,10,90.,84.,.0,0)
call SetTextTagVelocityBJ(lgg,64,90)
call PolledWait(2.)
call DestroyTextTag(lgg)
endif
endfunction
function StartTrigger_Devour takes nothing returns nothing
set gg_trg_Devour=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Devour,EVENT_PLAYER_UNIT_LOADED)
call TriggerAddCondition(gg_trg_Devour,Condition(function Trig_Devour_Conditions))
call TriggerAddAction(gg_trg_Devour,function Trig_Devour_Actions)
endfunction
function InitTrig_Devour takes nothing returns nothing
endfunction
function Trig_Scorched_Earth_Conditions takes nothing returns boolean
if(not(GetSpellAbilityId()=='A0FE'))then
return false
endif
return true
endfunction
function Trig_Scorched_Earth_Actions takes nothing returns nothing
local location liD=GetSpellTargetLoc()
call CreateNUnitsAtLoc(1,'e00E',GetOwningPlayer(GetTriggerUnit()),liD,bj_UNIT_FACING)
call ShowUnitHide(bj_lastCreatedUnit)
call UnitApplyTimedLifeBJ(20.,'BTLF',bj_lastCreatedUnit)
call UnitAddAbility(bj_lastCreatedUnit,'A0FF')
call SetUnitAbilityLevelSwapped('A0FF',bj_lastCreatedUnit,GetUnitAbilityLevelSwapped('A0FE',GetTriggerUnit()))
call UnitAddAbility(bj_lastCreatedUnit,'A0FG')
call SetUnitAbilityLevelSwapped('A0FG',bj_lastCreatedUnit,GetUnitAbilityLevelSwapped('A0FE',GetTriggerUnit()))
call RemoveLocation(liD)
endfunction
function StartTrigger_Scorched_Earth takes nothing returns nothing
set gg_trg_Scorched_Earth=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Scorched_Earth,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Scorched_Earth,Condition(function Trig_Scorched_Earth_Conditions))
call TriggerAddAction(gg_trg_Scorched_Earth,function Trig_Scorched_Earth_Actions)
endfunction
function InitTrig_Scorched_Earth takes nothing returns nothing
endfunction
function Dragon_Blood_Spell takes nothing returns boolean
return GetLearnedSkill()=='A0CL'and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function Dragon_Blood_Main takes nothing returns nothing
local unit lfU=GetTriggerUnit()
call SetPlayerTechResearched(GetOwningPlayer(lfU),'R006',GetPlayerTechCount(GetOwningPlayer(lfU),'R006',true)+1)
endfunction
function Dragon_Blood_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(ltt,Condition(function Dragon_Blood_Spell))
call TriggerAddAction(ltt,function Dragon_Blood_Main)
endfunction
function InitTrig_Dragon_Blood takes nothing returns nothing
endfunction
function Trig_ScatterShot_Conditions takes nothing returns boolean
return GetSpellAbilityId()=='A064'
endfunction
function Trig_ScatterShot_Actions takes nothing returns nothing
local location lll=GetSpellTargetLoc()
local location lmm
local location luu=GetUnitLoc(GetTriggerUnit())
local integer lcc=4+4*GetUnitAbilityLevelSwapped('A064',GetTriggerUnit())
local unit ltt=GetTriggerUnit()
local unit lpp
loop
exitwhen lcc<=0
set lpp=CreateUnit(GetOwningPlayer(ltt),'e00J',GetUnitX(ltt),GetUnitY(ltt),90)
set lmm=PolarProjectionBJ(lll,GetRandomReal(0,360),GetRandomReal(0,360))
call IssuePointOrderByIdLoc(lpp,OrderId("attackground"),lmm)
call UnitApplyTimedLifeBJ(.5,'BTLF',lpp)
call RemoveLocation(lmm)
set lcc=lcc-1
endloop
call RemoveLocation(luu)
call RemoveLocation(lll)
endfunction
function StartTrigger_ScatterShot takes nothing returns nothing
set gg_trg_ScatterShot=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_ScatterShot,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_ScatterShot,Condition(function Trig_ScatterShot_Conditions))
call TriggerAddAction(gg_trg_ScatterShot,function Trig_ScatterShot_Actions)
endfunction
function InitTrig_ScatterShot takes nothing returns nothing
endfunction
function Trig_Assassinate_Conditions takes nothing returns boolean
if(not(GetUnitTypeId(GetOrderedUnit())=='Usyl'))then
return false
endif
if(not(GetIssuedOrderId()==OrderId("thunderbolt")))then
return false
endif
return true
endfunction
function Trig_Assassinate_Actions takes nothing returns nothing
local player lEk=GetOwningPlayer(GetOrderedUnit())
local unit lfo=GetOrderTargetUnit()
local unit lqE
call UnitShareVision(lfo,lEk,true)
set lqE=CreateUnit(GetOwningPlayer(GetOrderTargetUnit()),'e01R',0,0,bj_UNIT_FACING)
call UnitAddAbility(lqE,'A0NI')
call PolledWait(3.)
call UnitShareVision(lfo,lEk,false)
call RemoveUnit(lqE)
call UnitRemoveAbility(lfo,'B06H')
endfunction
function StartTrigger_Assassinate takes nothing returns nothing
set gg_trg_Assassinate=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Assassinate,EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER)
call TriggerAddCondition(gg_trg_Assassinate,Condition(function Trig_Assassinate_Conditions))
call TriggerAddAction(gg_trg_Assassinate,function Trig_Assassinate_Actions)
endfunction
function InitTrig_Assassinate takes nothing returns nothing
endfunction
function Trig_Take_Aim_Conditions takes nothing returns boolean
return GetLearnedSkill()=='A03U'
endfunction
function Trig_Take_Aim_Actions takes nothing returns nothing
call SetPlayerTechResearchedSwap('R005',GetUnitAbilityLevelSwapped('A03U',GetTriggerUnit()),GetOwningPlayer(GetLearningUnit()))
endfunction
function StartTrigger_Take_Aim takes nothing returns nothing
set gg_trg_Take_Aim=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Take_Aim,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(gg_trg_Take_Aim,Condition(function Trig_Take_Aim_Conditions))
call TriggerAddAction(gg_trg_Take_Aim,function Trig_Take_Aim_Actions)
endfunction
function InitTrig_Take_Aim takes nothing returns nothing
endfunction
function Fissure_Spell takes nothing returns boolean
return GetSpellAbilityId()=='A0M0'
endfunction
function Fissure_Main takes nothing returns nothing
local location ln3=GetSpellTargetLoc()
local location lNf=GetUnitLoc(GetTriggerUnit())
local location liD
local effect lfx
local destructable array lNF
local player lEk=GetOwningPlayer(GetTriggerUnit())
local real lNg=AngleBetweenPoints(lNf,ln3)
local integer lk2=20
local integer lNG=R2I(1200/lk2)
local integer lEq=1
local integer lEQ=lk2
loop
exitwhen lEq>lEQ
set liD=PolarProjectionBJ(lNf,lEq*lNG,lNg)
call MoveLocation(liD,SafeX(GetLocationX(liD)),SafeY(GetLocationY(liD)))
set lNF[lEq]=CreateDestructableLoc('B000',liD,GetRandomReal(0,360),.5,GetRandomInt(0,2))
set lfx=AddSpecialEffectLoc("Abilities\\Spells\\Other\\Volcano\\VolcanoDeath.mdl",liD)
call RemoveLocation(liD)
call DestroyEffect(lfx)
set lEq=lEq+1
endloop
call PolledWait(8.)
set lEq=1
loop
exitwhen lEq>lEQ
call RemoveDestructable(lNF[lEq])
set lEq=lEq+1
endloop
call RemoveLocation(ln3)
call RemoveLocation(lNf)
endfunction
function Fissure_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function Fissure_Spell))
call TriggerAddAction(ltt,function Fissure_Main)
endfunction
function InitTrig_Fissure takes nothing returns nothing
endfunction
function Trig_Echo_Slam_Conditions takes nothing returns boolean
if(not(GetSpellAbilityId()=='A0DH'))then
return false
endif
return true
endfunction
function Echo_Slam_FilterII takes nothing returns boolean
return GetBooleanAnd((IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))),GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false),(GetUnitAbilityLevelSwapped('A04R',GetFilterUnit())!=1)))
endfunction
function Echo_Slam_Main takes nothing returns nothing
local location lnG=GetUnitLoc(GetEnumUnit())
call CreateNUnitsAtLoc(1,'e00E',GetOwningPlayer(GetTriggerUnit()),lnG,bj_UNIT_FACING)
call SetUnitScalePercent(bj_lastCreatedUnit,25.,25.,25.)
call UnitAddAbility(bj_lastCreatedUnit,'A0DM')
call SetUnitAbilityLevelSwapped('A0DM',bj_lastCreatedUnit,GetUnitAbilityLevelSwapped('A0DH',GetTriggerUnit()))
call IssueImmediateOrderById(bj_lastCreatedUnit,OrderId("fanofknives"))
call RemoveLocation(lnG)
endfunction
function Trig_Echo_Slam_Actions takes nothing returns nothing
local location lnG=GetUnitLoc(GetTriggerUnit())
local group lND=GetUnitsInRangeOfLocMatching(500.,lnG,Condition(function Echo_Slam_FilterII))
call PolledWait(.3)
call ForGroupBJ(lND,function Echo_Slam_Main)
call RemoveLocation(lnG)
call DestroyGroup(lND)
endfunction
function StartTrigger_Echo_Slam takes nothing returns nothing
set gg_trg_Echo_Slam=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Echo_Slam,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Echo_Slam,Condition(function Trig_Echo_Slam_Conditions))
call TriggerAddAction(gg_trg_Echo_Slam,function Trig_Echo_Slam_Actions)
endfunction
function InitTrig_Echo_Slam takes nothing returns nothing
endfunction
function Aftershock_Roll takes nothing returns boolean
if((GetSpellAbilityId()=='A0M0'))then
return true
endif
if((GetSpellAbilityId()=='A0DL'))then
return true
endif
if((GetSpellAbilityId()=='A0DH'))then
return true
endif
return false
endfunction
function Trig_Aftershock_Conditions takes nothing returns boolean
if(not(GetUnitAbilityLevelSwapped('A0DJ',GetSpellAbilityUnit())>0))then
return false
endif
if(not Aftershock_Roll())then
return false
endif
return true
endfunction
function Trig_Aftershock_Actions takes nothing returns nothing
local location lnG=GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc(1,'e00E',GetOwningPlayer(GetTriggerUnit()),lnG,bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit,'A0DI')
call SetUnitAbilityLevelSwapped('A0DI',bj_lastCreatedUnit,GetUnitAbilityLevelSwapped('A0DJ',GetSpellAbilityUnit()))
call IssueImmediateOrderById(bj_lastCreatedUnit,OrderId("stomp"))
call RemoveLocation(lnG)
endfunction
function StartTrigger_Aftershock takes nothing returns nothing
set gg_trg_Aftershock=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Aftershock,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Aftershock,Condition(function Trig_Aftershock_Conditions))
call TriggerAddAction(gg_trg_Aftershock,function Trig_Aftershock_Actions)
endfunction
function InitTrig_Aftershock takes nothing returns nothing
endfunction
function Untouchable_Spell takes nothing returns boolean
return GetUnitAbilityLevel(GetTriggerUnit(),'A0DW')>0
endfunction
function Untouchable_Main takes nothing returns nothing
local unit lJV=CreateUnit(GetOwningPlayer(GetTriggerUnit()),'e00E',GetUnitX(GetAttacker()),GetUnitY(GetAttacker()),0)
call UnitAddAbility(lJV,'A0B0')
call SetUnitAbilityLevel(lJV,'A0B0',GetUnitAbilityLevel(GetTriggerUnit(),'A0DW'))
call IssueTargetOrderById(lJV,OrderId("acidbomb"),GetAttacker())
endfunction
function Untouchable_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(ltt,Condition(function Untouchable_Spell))
call TriggerAddAction(ltt,function Untouchable_Main)
endfunction
function InitTrig_Untouchable takes nothing returns nothing
endfunction
function Trig_Enchant_Conditions takes nothing returns boolean
return GetSpellAbilityId()=='A0DX'
endfunction
function Enchant_Check takes nothing returns boolean
return GetBooleanAnd((GetOwningPlayer(GetFilterUnit())==GetOwningPlayer(GetTriggerUnit())),(UnitHasBuffBJ(GetFilterUnit(),'Bslo')))
endfunction
function Enchant_Filter takes nothing returns boolean
if(not(IsUnitType(GetSpellTargetUnit(),UNIT_TYPE_HERO)==false))then
return false
endif
if(not(IsUnitType(GetSpellTargetUnit(),UNIT_TYPE_ANCIENT)==false))then
return false
endif
if(GetUnitTypeId(GetSpellTargetUnit())=='n01E')then
return false
endif
if(GetUnitTypeId(GetSpellTargetUnit())=='n019')then
return false
endif
return true
endfunction
function Enchant_RemoveSlow takes nothing returns nothing
call UnitRemoveAbility(GetEnumUnit(),'Bslo')
endfunction
function Trig_Enchant_Actions takes nothing returns nothing
local group lnG=GetUnitsInRectMatching(bj_mapInitialPlayableArea,Condition(function Enchant_Check))
if(Enchant_Filter())then
call UnitRemoveAbility(GetSpellTargetUnit(),'Bslo')
call SetUnitOwner(GetSpellTargetUnit(),GetOwningPlayer(GetSpellAbilityUnit()),true)
call UnitApplyTimedLifeBJ(120.,'BTLF',GetSpellTargetUnit())
call MaxMana(GetSpellTargetUnit())
call UnitRemoveAbility(GetSpellTargetUnit(),'Bslo')
endif
call PolledWait(.5)
call ForGroupBJ(lnG,function Enchant_RemoveSlow)
call DestroyGroup(lnG)
endfunction
function StartTrigger_Enchant takes nothing returns nothing
set gg_trg_Enchant=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Enchant,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Enchant,Condition(function Trig_Enchant_Conditions))
call TriggerAddAction(gg_trg_Enchant,function Trig_Enchant_Actions)
endfunction
function InitTrig_Enchant takes nothing returns nothing
endfunction
function Trig_Nature_Attendants_Conditions takes nothing returns boolean
if(not(GetSpellAbilityId()=='A01B'))then
return false
endif
return true
endfunction
function Attendants_Filter takes nothing returns boolean
if(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))then
return false
endif
if(GetUnitLifePercent(GetFilterUnit())==100)then
return false
endif
if(IsUnitAliveBJ(GetFilterUnit())==false)then
return false
endif
if(GetUnitAbilityLevelSwapped('A04R',GetFilterUnit())>0)then
return false
endif
if(IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))==false)then
return false
endif
return true
endfunction
function Trig_Nature_Attendants_Actions takes nothing returns nothing
local location liD
local group lEw
local integer lEq=1
local integer lEQ=10
local integer lNR
local integer lNs=1+2*GetUnitAbilityLevel(GetTriggerUnit(),'A01B')
local unit lNS
loop
exitwhen lEq>lEQ
set liD=GetUnitLoc(GetTriggerUnit())
set lEw=GetUnitsInRangeOfLocMatching(350.,liD,Condition(function Attendants_Filter))
set lNR=1
loop
exitwhen lNR>lNs
set lNS=GroupPickRandomUnit(lEw)
if(lNS!=null)then
call SetWidgetLife(lNS,GetUnitState(lNS,UNIT_STATE_LIFE)+10)
endif
set lNR=lNR+1
endloop
call PolledWait(1.)
call DestroyGroup(lEw)
call RemoveLocation(liD)
set lEq=lEq+1
endloop
endfunction
function StartTrigger_Nature_Attendants takes nothing returns nothing
set gg_trg_Nature_Attendants=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Nature_Attendants,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Nature_Attendants,Condition(function Trig_Nature_Attendants_Conditions))
call TriggerAddAction(gg_trg_Nature_Attendants,function Trig_Nature_Attendants_Actions)
endfunction
function InitTrig_Nature_Attendants takes nothing returns nothing
endfunction
function Trig_Impetus_Conditions takes nothing returns boolean
if(GetLearnedSkill()!='A0DY'and IsUnitIllusion(GetTriggerUnit())==false)then
return false
endif
return true
endfunction
function Impetus_OnOff takes nothing returns boolean
if GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED then
if GetUnitAbilityLevel(GetAttacker(),'A0DY')==0 then
return false
elseif GetBoolean(H2Tx(GetTriggeringTrigger()),"OrbOn")then
if IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and GetAttacker()==GetUnit(H2Tx(GetTriggeringTrigger()),"Enchantress")then
return true
endif
else
return false
endif
elseif GetTriggerEventId()==EVENT_UNIT_ISSUED_ORDER then
if GetIssuedOrderId()==852255then
call SetBoolean(H2Tx(GetTriggeringTrigger()),"OrbOn",true)
elseif GetIssuedOrderId()==852256then
call SetBoolean(H2Tx(GetTriggeringTrigger()),"OrbOn",false)
endif
elseif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT then
if GetSpellAbilityId()=='A0DY'then
return true
else
return false
endif
endif
return false
endfunction
function Impetus_Range takes real px1,real py1,real px2,real py2 returns real
return SquareRoot(((px1-px2)*(px1-px2))+((py1-py2)*(py1-py2)))
endfunction
function Impetus_Main takes nothing returns nothing
local texttag lgg
local real ldd
if UnitHasBuffBJ(GetTriggerUnit(),'B03U') and GetUnitAbilityLevel(GetEventDamageSource(),'A0DY')>0 and GetUnit(H2Tx(GetTriggeringTrigger()),"Source")==GetEventDamageSource()then
call DisableTrigger(GetTriggeringTrigger())
set ldd=.04*I2R(GetUnitAbilityLevel(GetEventDamageSource(),'A0DY'))*Impetus_Range(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),GetUnitX(GetEventDamageSource()),GetUnitY(GetEventDamageSource()))
if(ldd>400)then
set ldd=400
endif
set lgg=CreateTextTagUnitBJ("+"+I2S(R2I(ldd)),GetTriggerUnit(),64,10,1,85,86,15)
call SetTextTagVelocityBJ(lgg,64,90)
call UnitDamageTargetBJ(GetEventDamageSource(),GetTriggerUnit(),ldd,ATTACK_TYPE_HERO,DAMAGE_TYPE_DIVINE)
call PolledWait(1)
call DestroyTextTag(lgg)
call DisableTrigger(GetTriggeringTrigger())
endif
endfunction
function Impetus_Event takes nothing returns nothing
local trigger ltt=CreateTrigger()
local unit lFB
local unit lFb
if(GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT)then
set lFB=GetSpellTargetUnit()
set lFb=GetTriggerUnit()
else
set lFB=GetTriggerUnit()
set lFb=GetAttacker()
endif
if IsUnitIllusion(lFb)==false then
call SetHandle(H2Tx(ltt),"Source",lFb)
call TriggerRegisterUnitEvent(ltt,lFB,EVENT_UNIT_DAMAGED)
call TriggerAddAction(ltt,function Impetus_Main)
endif
call PolledWait(2)
call DisableTrigger(ltt)
endfunction
function Trig_Impetus_Actions takes nothing returns nothing
local unit lfo=GetTriggerUnit()
local trigger ltt
local integer lmZ=GetUnitAbilityLevel(lfo,'A0DY')
if(lmZ==1)then
set ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerRegisterUnitEvent(ltt,lfo,EVENT_UNIT_SPELL_EFFECT)
call TriggerRegisterUnitEvent(ltt,lfo,EVENT_UNIT_ISSUED_ORDER)
call TriggerAddCondition(ltt,Condition(function Impetus_OnOff))
call TriggerAddAction(ltt,function Impetus_Event)
call SetHandle(H2Tx(ltt),"Enchantress",lfo)
endif
endfunction
function StartTrigger_Impetus takes nothing returns nothing
set gg_trg_Impetus=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Impetus,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(gg_trg_Impetus,Condition(function Trig_Impetus_Conditions))
call TriggerAddAction(gg_trg_Impetus,function Trig_Impetus_Actions)
endfunction
function InitTrig_Impetus takes nothing returns nothing
endfunction
function Black_Hole_Check takes nothing returns boolean
return GetUnitTypeId(GetSummonedUnit())=='u004'
endfunction
function Black_Hole_IsBear takes unit pEU returns boolean
local integer lNY=GetUnitTypeId(pEU)
return lNY=='n004'or lNY=='n01G'or lNY=='n01C'or lNY=='n018'
endfunction
function Black_Hole_Filter takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or Black_Hole_IsBear(GetFilterUnit()))and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetUnit(H2Tx(GetTriggeringTrigger()),"g8")))
endfunction
function Black_Hole_Moving takes nothing returns nothing
local location lN0=GetUnitLoc(GetEnumUnit())
local location lN1=GetUnitLoc(GetUnit(H2Tx(GetTriggeringTrigger()),"g8"))
local location lN2=PolarProjectionBJ(lN1,DistanceBetweenPoints(lN1,lN0)-2,AngleBetweenPoints(lN1,lN0))
call SetUnitPositionLoc(GetEnumUnit(),lN2)
call RemoveLocation(lN0)
call RemoveLocation(lN1)
call RemoveLocation(lN2)
endfunction
function Black_Hole_Main takes nothing returns nothing
local trigger ltt=GetTriggeringTrigger()
local group lEw
local unit lBlack_Hole_Init
local string lf5=H2Tx(ltt)
if GetTriggerEventId()==EVENT_UNIT_DEATH then
call DisableTrigger(ltt)
call PolledWait(1)
call TriggerRemoveAction(ltt,GetTrigAction(lf5,"TriggerAction"))
call FastFlush(lf5)
call DestroyTriggerEx(ltt)
else
set lBlack_Hole_Init=GetUnit(lf5,"g8")
set lEw=CreateGroup()
call GroupEnumUnitsInRange(lEw,GetUnitX(lBlack_Hole_Init),GetUnitY(lBlack_Hole_Init),400,Condition(function Black_Hole_Filter))
call ForGroup(lEw,function Black_Hole_Moving)
call DestroyGroup(lEw)
endif
endfunction
function Black_Hole_Setting takes nothing returns nothing
local unit lfo=GetSummoningUnit()
local unit lBlack_Hole_Init=GetSummonedUnit()
local trigger ltt=CreateTrigger()
local string lf5=H2Tx(ltt)
call SetHandle(lf5,"g8",lBlack_Hole_Init)
call TriggerRegisterUnitEvent(ltt,lBlack_Hole_Init,EVENT_UNIT_DEATH)
call TriggerRegisterTimerEvent(ltt,.05,true)
call SetHandle(lf5,"TriggerAction",TriggerAddAction(ltt,function Black_Hole_Main))
call SetUnitAbilityLevel(lBlack_Hole_Init,'A0C0',GetUnitAbilityLevel(lfo,'A0BY'))
endfunction
function Black_Hole_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SUMMON)
call TriggerAddAction(ltt,function Black_Hole_Setting)
call TriggerAddCondition(ltt,Condition(function Black_Hole_Check))
call SpellPreload('A0C0')
endfunction
function InitTrig_Black_Hole takes nothing returns nothing
endfunction
function Trig_Malefice_Conditions takes nothing returns boolean
if(not(GetSpellAbilityId()=='A0B3'))then
return false
endif
return true
endfunction
function Trig_Malefice_Actions takes nothing returns nothing
local location lnG=GetUnitLoc(GetTriggerUnit())
local unit lMalefice_Init=GetSpellTargetUnit()
call CreateNUnitsAtLoc(1,'e00E',GetOwningPlayer(GetTriggerUnit()),lnG,bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit,'A01A')
call IssueTargetOrderById(bj_lastCreatedUnit,OrderId("thunderbolt"),lMalefice_Init)
call PolledWait(2)
call RemoveLocation(lnG)
set lnG=GetUnitLoc(lMalefice_Init)
if(GetUnitAbilityLevelSwapped('A0B3',GetTriggerUnit())>1)then
call CreateNUnitsAtLoc(1,'e00E',GetOwningPlayer(GetTriggerUnit()),lnG,bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit,'A01A')
call IssueTargetOrderById(bj_lastCreatedUnit,OrderId("thunderbolt"),lMalefice_Init)
call PolledWait(2)
endif
call RemoveLocation(lnG)
set lnG=GetUnitLoc(lMalefice_Init)
if(GetUnitAbilityLevelSwapped('A0B3',GetTriggerUnit())>3)then
call CreateNUnitsAtLoc(1,'e00E',GetOwningPlayer(GetTriggerUnit()),lnG,bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit,'A01A')
call IssueTargetOrderById(bj_lastCreatedUnit,OrderId("thunderbolt"),lMalefice_Init)
call PolledWait(2)
endif
call RemoveLocation(lnG)
endfunction
function StartTrigger_Malefice takes nothing returns nothing
set gg_trg_Malefice=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Malefice,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Malefice,Condition(function Trig_Malefice_Conditions))
call TriggerAddAction(gg_trg_Malefice,function Trig_Malefice_Actions)
endfunction
function InitTrig_Malefice takes nothing returns nothing
endfunction
function Trig_Midnight_Pulse_Conditions takes nothing returns boolean
if(not(GetSpellAbilityId()=='A0B1'))then
return false
endif
return true
endfunction
function Trig_Midnight_Pulse_Actions takes nothing returns nothing
local location lnG=GetUnitLoc(GetTriggerUnit())
local location lND=GetSpellTargetLoc()
call CreateNUnitsAtLocFacingLocBJ(1,'e00E',GetOwningPlayer(GetTriggerUnit()),lnG,lND)
call ShowUnitHide(bj_lastCreatedUnit)
call UnitApplyTimedLifeBJ(8.,'BTLF',bj_lastCreatedUnit)
call UnitAddAbility(bj_lastCreatedUnit,'A0B2')
call SetUnitAbilityLevelSwapped('A0B2',bj_lastCreatedUnit,GetUnitAbilityLevelSwapped('A0B1',GetTriggerUnit()))
call IssuePointOrderByIdLoc(bj_lastCreatedUnit,OrderId("deathanddecay"),lND)
call RemoveLocation(lnG)
call RemoveLocation(lND)
endfunction
function StartTrigger_Midnight_Pulse takes nothing returns nothing
set gg_trg_Midnight_Pulse=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Midnight_Pulse,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Midnight_Pulse,Condition(function Trig_Midnight_Pulse_Conditions))
call TriggerAddAction(gg_trg_Midnight_Pulse,function Trig_Midnight_Pulse_Actions)
endfunction
function InitTrig_Midnight_Pulse takes nothing returns nothing
endfunction
function Trig_Conversion_Conditions takes nothing returns boolean
if(not(GetSpellAbilityId()=='A0B7'))then
return false
endif
return true
endfunction
function Trig_Conversion_Actions takes nothing returns nothing
local integer lMP=GetUnitAbilityLevelSwapped('A0B7',GetTriggerUnit())
local location liD=GetUnitLoc(GetSpellTargetUnit())
local integer lkY
if(lMP==1)then
set lkY='hwat'
endif
if(lMP==2)then
set lkY='hwt2'
endif
if(lMP==3)then
set lkY='hwt3'
endif
if(lMP==4)then
set lkY='h006'
endif
call RemoveUnit(GetSpellTargetUnit())
call UnitApplyTimedLifeBJ(30,'BTLF',CreateUnitAtLoc(GetOwningPlayer(GetTriggerUnit()),lkY,liD,bj_UNIT_FACING))
call UnitApplyTimedLifeBJ(30,'BTLF',CreateUnitAtLoc(GetOwningPlayer(GetTriggerUnit()),lkY,liD,bj_UNIT_FACING))
call UnitApplyTimedLifeBJ(30,'BTLF',CreateUnitAtLoc(GetOwningPlayer(GetTriggerUnit()),lkY,liD,bj_UNIT_FACING))
call RemoveLocation(liD)
endfunction
function StartTrigger_Conversion takes nothing returns nothing
set gg_trg_Conversion=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Conversion,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Conversion,Condition(function Trig_Conversion_Conditions))
call TriggerAddAction(gg_trg_Conversion,function Trig_Conversion_Actions)
endfunction
function InitTrig_Conversion takes nothing returns nothing
endfunction
function Chronosphere_Spell takes nothing returns boolean
return GetSpellAbilityId()=='A0J1'
endfunction
function Chronosphere_FX takes nothing returns nothing
local timer ltt=GetExpiredTimer()
local string lf5=H2Tx(ltt)
local unit lsA=GetUnit(lf5,"Caster")
call SetUnitTimeScale(lsA,0)
call PauseTimer(ltt)
call FastFlush(lf5)
call DestroyTimer(ltt)
endfunction
function Chronosphere_InvalidUnit takes unit pEU returns boolean
local integer lID=GetUnitTypeId(pEU)
return lID=='osp4'or lID=='o008'or lID=='o009'or lID=='umtw'or lID=='ebal'
endfunction
function Chronosphere_Check takes nothing returns boolean
return GetOwningPlayer(GetFilterUnit())!=GetOwningPlayer(udg_u_DTAX_temp)and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 or Chronosphere_InvalidUnit(GetFilterUnit()))
endfunction
function Chronosphere_EndStasis takes nothing returns nothing
call PauseUnit(GetEnumUnit(),false)
call SetUnitTimeScale(GetEnumUnit(),1)
endfunction
function Chronosphere_Stasis takes nothing returns nothing
call PauseUnit(GetEnumUnit(),true)
call SetUnitTimeScale(GetEnumUnit(),0)
call UnitRemoveAbility(GetEnumUnit(),'BUsl')
call UnitRemoveAbility(GetEnumUnit(),'BUsp')
call UnitRemoveAbility(GetEnumUnit(),'BUst')
endfunction
function Chronosphere_Main takes nothing returns nothing
local timer ltt=GetExpiredTimer()
local string lf5=H2Tx(ltt)
local unit lsA=GetUnit(lf5,"Caster")
local unit lfU=GetUnit(lf5,"Hero")
local integer lmZ=GetUnitAbilityLevel(lfU,'A0J1')
local group lsD=GetGroup(lf5,"Group")
local integer lMa=GetInteger(lf5,"Counter")
local real lEv=GetUnitX(lsA)
local real lEV=GetUnitY(lsA)
local boolexpr lEW=Condition(function Chronosphere_Check)
local group lse=CreateGroup()
call ForGroup(lsD,function Chronosphere_EndStasis)
set udg_u_DTAX_temp=lfU
call GroupEnumUnitsInRange(lse,lEv,lEV,425,lEW)
call GroupClear(lsD)
call GroupAddGroup(lse,lsD)
call ForGroup(lse,function Chronosphere_Stasis)
call DestroyGroup(lse)
call DestroyBoolExpr(lEW)
set lMa=lMa+1
call SetInteger(lf5,"Counter",lMa)
if lMa>15+lmZ*15 then
if udg_A5==false then
call ForGroup(lsD,function Chronosphere_EndStasis)
endif
call RemoveUnit(lsA)
call DestroyGroup(lsD)
call PauseTimer(ltt)
call FastFlush(lf5)
call DestroyTimer(ltt)
endif
endfunction
function Chronosphere_Setting takes nothing returns nothing
local unit lfU=GetTriggerUnit()
local integer lmZ=GetUnitAbilityLevel(lfU,'A0J1')
local location lFB=GetSpellTargetLoc()
local real lEv=GetLocationX(lFB)
local real lEV=GetLocationY(lFB)
local unit lsA=CreateUnit(GetOwningPlayer(lfU),'u00L',lEv,lEV,0)
local timer ltt=CreateTimer()
local string lf5=H2Tx(ltt)
local group lsD=CreateGroup()
call SetHandle(H2Tx(ltt),"Caster",lsA)
call TimerStart(ltt,.8,false,function Chronosphere_FX)
set ltt=CreateTimer()
set lf5=H2Tx(ltt)
call SetHandle(lf5,"Caster",lsA)
call SetHandle(lf5,"Hero",lfU)
call SetHandle(lf5,"Group",lsD)
call SetInteger(lf5,"Counter",0)
call TimerStart(ltt,.1,true,function Chronosphere_Main)
call RemoveLocation(lFB)
endfunction
function Chronosphere_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function Chronosphere_Spell))
call TriggerAddAction(ltt,function Chronosphere_Setting)
endfunction
function InitTrig_Chronosphere takes nothing returns nothing
endfunction
function Trig_Time_Walk_Conditions takes nothing returns boolean
return GetSpellAbilityId()=='A0LK'
endfunction
function TimeWalk_Move takes nothing returns nothing
local timer ltt=GetExpiredTimer()
local string lf5=H2Tx(ltt)
local unit lfo=GetUnit(lf5,"TimeWalkUnit")
local real lpT=GetUnitX(lfo)
local real lpu=GetUnitY(lfo)
local real lEv=GetReal(lf5,"TimeWalkTargetX")
local real lEV=GetReal(lf5,"TimeWalkTargetY")
local real lFc=GetReal(lf5,"TimeWalkDistance")
local real lnM=GetReal(lf5,"Angle")
local real lR3=GetReal(lf5,"TimeWalkElapsed")
call SetUnitPosition(lfo,lpT+lFc/40*Cos(lnM),lpu+lFc/40*Sin(lnM))
call SetReal(lf5,"TimeWalkElapsed",lR3+.01)
if((lpT-lEv)*(lpT-lEv)+(lpu-lEV)*(lpu-lEV)<25 or lR3>.6)then
set bj_lastCreatedUnit=CreateUnit(GetOwningPlayer(lfo),'e00E',GetUnitX(lfo),GetUnitY(lfo),270)
call UnitAddAbility(bj_lastCreatedUnit,'A0LA')
call SetUnitAbilityLevel(bj_lastCreatedUnit,'A0LA',GetUnitAbilityLevel(lfo,'A0LK'))
call UnitApplyTimedLife(bj_lastCreatedUnit,'BTLF',2.)
call SetUnitPathing(bj_lastCreatedUnit,false)
call SetUnitInvulnerable(bj_lastCreatedUnit,true)
call IssueImmediateOrderById(bj_lastCreatedUnit,OrderId("thunderclap"))
call SetUnitPathing(lfo,true)
call SetUnitAnimation(lfo,"stand")
call SetUnitInvulnerable(lfo,false)
call SetUnitVertexColorBJ(lfo,0,255,150,.0)
call ClearSelectionForPlayer(GetOwningPlayer(lfo))
call SelectUnitAddForPlayer(lfo,GetOwningPlayer(lfo))
call PauseTimer(ltt)
endif
endfunction
function Trig_Time_Walk_Actions takes nothing returns nothing
local unit lfo=GetTriggerUnit()
local location ln3
local location lR5=GetUnitLoc(lfo)
local timer ltt=CreateTimer()
local string lf5=H2Tx(ltt)
if GetSpellTargetUnit()==null then
set ln3=GetSpellTargetLoc()
else
set ln3=GetUnitLoc(GetSpellTargetUnit())
endif
if((lfo!=null)and(ln3!=null)and(lR5!=null))then
call SetUnitAnimationByIndex(lfo,0)
call SetUnitPathing(lfo,false)
call SetUnitInvulnerable(lfo,true)
call SetUnitVertexColorBJ(lfo,0,0,0,25.)
call SetReal(lf5,"TimeWalkDistance",DistanceBetweenPoints(lR5,ln3))
call SetHandle(lf5,"TimeWalkUnit",lfo)
call SetReal(lf5,"TimeWalkTargetX",GetLocationX(ln3))
call SetReal(lf5,"TimeWalkTargetY",GetLocationY(ln3))
call SetReal(lf5,"TimeWalkElapsed",0)
call SetReal(lf5,"Angle",AngleBetweenPoints(lR5,ln3)*bj_DEGTORAD)
call TimerStart(ltt,.01,true,function TimeWalk_Move)
endif
call PolledWait(2.)
call PauseTimer(ltt)
call SetUnitPathing(lfo,true)
call ResetUnitAnimation(lfo)
call SetUnitInvulnerable(lfo,false)
call SetUnitVertexColorBJ(lfo,0,255,150,.0)
call ClearSelectionForPlayer(GetOwningPlayer(lfo))
call SelectUnitAddForPlayer(lfo,GetOwningPlayer(lfo))
call PolledWait(1)
call FastFlush(lf5)
call DestroyTimer(ltt)
call RemoveLocation(ln3)
call RemoveLocation(lR5)
endfunction
function StartTrigger_Time_Walk takes nothing returns nothing
set gg_trg_Time_Walk=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Time_Walk,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Time_Walk,Condition(function Trig_Time_Walk_Conditions))
call TriggerAddAction(gg_trg_Time_Walk,function Trig_Time_Walk_Actions)
endfunction
function InitTrig_Time_Walk takes nothing returns nothing
endfunction
function Trig_Backtrack_Conditions takes nothing returns boolean
return GetLearnedSkill()=='A0CZ'and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function Backtrack_Main takes nothing returns nothing
local unit lfo=GetTriggerUnit()
local real lf7=GetEventDamage()
if(lf7>0)then
if(GetRandomInt(1,100)<=(5+(5*GetUnitAbilityLevel(lfo,'A0CZ'))))then
call SetUnitState(lfo,UNIT_STATE_LIFE,GetUnitState(lfo,UNIT_STATE_LIFE)+lf7)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\WingedSerpentMissile\\WingedSerpentMissile.mdl",lfo,"hand,left"))
endif
endif
endfunction
function Trig_Backtrack_Actions takes nothing returns nothing
local trigger ltt
if GetUnitAbilityLevel(GetTriggerUnit(),'A0CZ')==1 then
set ltt=CreateTrigger()
call TriggerRegisterUnitEvent(ltt,GetTriggerUnit(),EVENT_UNIT_DAMAGED)
call TriggerAddAction(ltt,function Backtrack_Main)
endif
endfunction
function StartTrigger_Backtrack takes nothing returns nothing
set gg_trg_Backtrack=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Backtrack,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(gg_trg_Backtrack,Condition(function Trig_Backtrack_Conditions))
call TriggerAddAction(gg_trg_Backtrack,function Trig_Backtrack_Actions)
endfunction
function InitTrig_Backtrack takes nothing returns nothing
endfunction
function Poof_SpellII takes nothing returns boolean
return GetSpellAbilityId()=='A0N8'
endfunction
function Poof_Spell takes nothing returns boolean
return GetSpellAbilityId()=='A0N8'
endfunction
function Poof_AnimPlay takes nothing returns nothing
call SetUnitAnimationByIndex(GetUnit(H2Tx(GetExpiredTimer()),"UnitVar"),2)
endfunction
function Poof_Animation takes nothing returns nothing
local timer ltt=CreateTimer()
call SetUnitAnimationByIndex(GetTriggerUnit(),2)
call SetHandle(H2Tx(ltt),"UnitVar",GetTriggerUnit())
call TimerStart(ltt,1.334,false,function Poof_AnimPlay)
endfunction
function Poof_IsGeoForFilter takes nothing returns boolean
return Poof_IsGeomancer(GetFilterUnit())
endfunction
function sGsG takes nothing returns nothing
local unit lmT=GetEnumUnit()
local real lsh=ReturnTrueRange(lmT,udg_bG)
if lsh<udg_r_DTAX_necrolyte_reaperscythe_ratio then
set udg_r_DTAX_necrolyte_reaperscythe_ratio=lsh
set udg_u_DTAX_temp=lmT
endif
endfunction
function Poof_Filter takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0
endfunction
function Poof_Damage takes nothing returns nothing
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\Feedback\\ArcaneTowerAttack.mdl",GetEnumUnit(),"origin"))
call UnitDamageTarget(GetTriggerUnit(),GetEnumUnit(),udg_r_DTAX_necrolyte_reaperscythe_ratio,true,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_FIRE,WEAPON_TYPE_WHOKNOWS)
endfunction
function Poof_Main takes nothing returns nothing
local unit lFb=GetTriggerUnit()
local unit lFB=GetSpellTargetUnit()
local location ln3
local real lxx
local real lyy
local real lFC=GetUnitX(lFb)
local real lFd=GetUnitY(lFb)
local group lEw
local boolexpr lEW
local boolean lsj=false
if lFB!=null and Poof_IsGeomancer(lFB)then
set lxx=GetUnitX(lFB)
set lyy=GetUnitY(lFB)
set lsj=true
elseif lFB==null then
set lEW=Condition(function Poof_IsGeoForFilter)
set lEw=CreateGroup()
call GroupEnumUnitsInRange(lEw,0,0,999999,lEW)
set ln3=GetSpellTargetLoc()
set udg_u_DTAX_temp=FirstOfGroup(lEw)
if udg_u_DTAX_temp!=null then
set lsj=true
call GroupRemoveUnit(lEw,udg_u_DTAX_temp)
set udg_r_DTAX_necrolyte_reaperscythe_ratio=ReturnTrueRange(udg_u_DTAX_temp,ln3)
set udg_bG=ln3
call ForGroup(lEw,function sGsG)
set lFB=udg_u_DTAX_temp
set lxx=GetUnitX(lFB)
set lyy=GetUnitY(lFB)
endif
call DestroyGroup(lEw)
call DestroyBoolExpr(lEW)
call RemoveLocation(ln3)
endif
if lsj then
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Other\\ToonBoom\\ToonBoom.mdl",lFC,lFd))
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Other\\ToonBoom\\ToonBoom.mdl",lxx,lyy))
call SetUnitX(lFb,lxx)
call SetUnitY(lFb,lyy)
set udg_r_DTAX_necrolyte_reaperscythe_ratio=GetUnitAbilityLevel(GetTriggerUnit(),'A0N8')*40
set lEW=Condition(function Poof_Filter)
set lEw=CreateGroup()
call GroupEnumUnitsInRange(lEw,lFC,lFd,400,lEW)
call ForGroup(lEw,function Poof_Damage)
call DestroyGroup(lEw)
set lEw=CreateGroup()
call GroupEnumUnitsInRange(lEw,lxx,lyy,400,lEW)
call ForGroup(lEw,function Poof_Damage)
call DestroyGroup(lEw)
call DestroyBoolExpr(lEW)
endif
endfunction
function Poof_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_CHANNEL)
call TriggerAddCondition(ltt,Condition(function Poof_Spell))
call TriggerAddAction(ltt,function Poof_Animation)
set ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function Poof_SpellII))
call TriggerAddAction(ltt,function Poof_Main)
endfunction
function InitTrig_Poof takes nothing returns nothing
endfunction
function Earthbind_Spell takes nothing returns boolean
return GetSpellAbilityId()=='A0NB'
endfunction
function Earthbind_Filter takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(udg_u_DTAX_temp))and IsUnitVisible(GetFilterUnit(),GetOwningPlayer(udg_u_DTAX_temp)) and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>.5 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and GetUnitTypeId(GetFilterUnit())!='n00L'
endfunction
function Earthbind_Net takes nothing returns nothing
local unit lJV=CreateUnit(GetOwningPlayer(udg_u_DTAX_temp),'e00E',udg_r_DTAX_necrolyte_reaperscythe_ratio,udg_bh,0)
call UnitAddAbility(lJV,'A0NC')
call IssueTargetOrderById(lJV,OrderId("ensnare"),GetEnumUnit())
endfunction
function Earthbind_OnLand takes unit ppc,real pxx,real pyy returns nothing
local boolexpr lEW=Condition(function Earthbind_Filter)
local group lEw=CreateGroup()
set udg_u_DTAX_temp=ppc
call GroupEnumUnitsInRange(lEw,pxx,pyy,245,lEW)
set udg_r_DTAX_necrolyte_reaperscythe_ratio=pxx
set udg_bh=pyy
call ForGroup(lEw,function Earthbind_Net)
call DestroyGroup(lEw)
call DestroyBoolExpr(lEW)
endfunction
function Earthbind_Move takes nothing returns nothing
local timer ltt=GetExpiredTimer()
local string lf5=H2Tx(ltt)
local unit lpc=GetUnit(lf5,"Projectile")
local real lEv=GetReal(lf5,"TargetX")
local real lEV=GetReal(lf5,"TargetY")
local real lnM=GetReal(lf5,"Angle")
local real lFC=GetUnitX(lpc)
local real lFd=GetUnitY(lpc)
local real lpC=GetUnitX(lpc)+30*Cos(lnM)
local real lpd=GetUnitY(lpc)+30*Sin(lnM)
if(lpC-lEv)*(lpC-lEv)+(lpd-lEV)*(lpd-lEV)<1200 then
call SetUnitX(lpc,lEv)
call SetUnitY(lpc,lEV)
call Earthbind_OnLand(lpc,lEv,lEV)
call PauseTimer(ltt)
call FastFlush(lf5)
call KillUnit(lpc)
call DestroyTimer(ltt)
else
call SetUnitX(lpc,lpC)
call SetUnitY(lpc,lpd)
endif
endfunction
function Earthbind_Setting takes nothing returns nothing
local unit lfU=GetTriggerUnit()
local location ln3=GetSpellTargetLoc()
local real lEv=SafeX(GetLocationX(ln3))
local real lEV=SafeY(GetLocationY(ln3))
local real lFC=SafeX(GetUnitX(lfU))
local real lFd=SafeY(GetUnitY(lfU))
local unit lpc=CreateUnit(GetOwningPlayer(lfU),'h00C',lFC,lFd,0)
local real lnM=Atan2(lEV-lFd,lEv-lFC)
local timer ltt=CreateTimer()
local string lf5=H2Tx(ltt)
call SetUnitScale(lpc,2,2,2)
call SetHandle(lf5,"Projectile",lpc)
call SetReal(lf5,"TargetX",lEv)
call SetReal(lf5,"TargetY",lEV)
call SetReal(lf5,"Angle",lnM)
call TimerStart(ltt,.035,true,function Earthbind_Move)
call RemoveLocation(ln3)
endfunction
function Earthbind_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddAction(ltt,function Earthbind_Setting)
call TriggerAddCondition(ltt,Condition(function Earthbind_Spell))
endfunction
function InitTrig_Earthbind takes nothing returns nothing
endfunction
function Divided_We_Stand_SyncSkillsLevels takes unit pgG,unit pgh,integer pSd,integer ps8,integer ps9 returns nothing
if ps8>ps9 then
call SelectHeroSkill(pgh,pSd)
elseif ps9>ps8 then
call SelectHeroSkill(pgG,pSd)
endif
endfunction
function Divided_We_Stand_SyncExp takes unit pgG,unit pgh returns nothing
local integer lsX=GetHeroXP(pgG)
local integer lsy=GetHeroXP(pgh)
local string lsR=H2Tx(pgG)
local string lss=H2Tx(pgh)
local integer lsU=GetInteger(lsR,"XPGiven")
local integer lsV=GetInteger(lss,"XPGiven")
local integer lo3
if lsX>lsy then
set lo3=lsX-lsy
call AddHeroXP(pgh,lo3,true)
if lsy!=GetHeroXP(pgh)then
call SetInteger(lss,"XPGiven",lsV+lo3)
endif
elseif lsX<lsy then
set lo3=lsy-lsX
call AddHeroXP(pgG,lo3,true)
if lsX!=GetHeroXP(pgG)then
call SetInteger(lsR,"XPGiven",lsU+lo3)
endif
endif
endfunction
function Divided_We_Stand_SyncSkills takes unit pgG,unit pgh returns nothing
local integer lSh=GetUnitAbilityLevel(pgG,'A0N8')
local integer lSi=GetUnitAbilityLevel(pgG,'A0NB')
local integer lSI=GetUnitAbilityLevel(pgG,'A0N7')
local integer lSj=GetUnitAbilityLevel(pgG,'A0MW')
local integer lSJ=GetUnitAbilityLevel(pgG,'Aamk')
local integer lSk=GetUnitAbilityLevel(pgh,'A0N8')
local integer lSK=GetUnitAbilityLevel(pgh,'A0NB')
local integer lSl=GetUnitAbilityLevel(pgh,'A0N7')
local integer lSL=GetUnitAbilityLevel(pgh,'A0MW')
local integer lSm=GetUnitAbilityLevel(pgh,'Aamk')
call Divided_We_Stand_SyncExp(pgG,pgh)
call Divided_We_Stand_SyncSkillsLevels(pgG,pgh,'A0N8',lSh,lSk)
call Divided_We_Stand_SyncSkillsLevels(pgG,pgh,'A0NB',lSi,lSK)
call Divided_We_Stand_SyncSkillsLevels(pgG,pgh,'A0N7',lSI,lSl)
call Divided_We_Stand_SyncSkillsLevels(pgG,pgh,'A0MW',lSj,lSL)
call Divided_We_Stand_SyncSkillsLevels(pgG,pgh,'Aamk',lSJ,lSm)
endfunction
function Divided_We_Stand_SkillsParser takes unit pgG,unit pgh returns nothing
if pgG!=null and pgh!=null then
call Divided_We_Stand_SyncSkills(pgG,pgh)
endif
endfunction
function Divided_We_Stand_ShareSkills takes nothing returns nothing
local string lsQ=H2Tx(GetPlayer(H2Tx(GetTriggeringTrigger()),"PlayerVar"))
local unit lgg=GetUnit(lsQ,"Kobold0")
local unit lgG=GetUnit(lsQ,"Kobold1")
local unit lgh=GetUnit(lsQ,"Kobold2")
local unit lgH=GetUnit(lsQ,"Kobold3")
call DisableTrigger(gg_trg_Duplicates_Levelling)
call Divided_We_Stand_SkillsParser(lgg,lgG)
call Divided_We_Stand_SkillsParser(lgg,lgh)
call Divided_We_Stand_SkillsParser(lgg,lgH)
call Divided_We_Stand_SkillsParser(lgG,lgh)
call Divided_We_Stand_SkillsParser(lgG,lgH)
call Divided_We_Stand_SkillsParser(lgh,lgH)
call EnableTrigger(gg_trg_Duplicates_Levelling)
endfunction
function Divided_We_Stand_SavePlayerData takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterTimerEvent(ltt,.2,true)
call TriggerAddAction(ltt,function Divided_We_Stand_ShareSkills)
call SetHandle(H2Tx(ltt),"PlayerVar",GetOwningPlayer(GetTriggerUnit()))
endfunction
function InitTrig_Duplicates_Periodic takes nothing returns nothing
endfunction
function HRHR takes unit pgE returns boolean
local integer lii=0
local string lf5=H2Tx(GetOwningPlayer(pgE))
local unit lgF=GetUnit(lf5,"Kobold0")
loop
exitwhen lii>5
if GetItemTypeId(UnitItemInSlot(lgF,lii))=='olig'and GetItemCharges(UnitItemInSlot(lgF,lii))>0 then
return true
endif
set lii=lii+1
endloop
return false
endfunction
function Trig_Divided_We_Stand_Conditions takes nothing returns boolean
if IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)then
if GetUnitTypeId(GetTriggerUnit())=='H00J'and HRHR(GetTriggerUnit())then
return false
endif
return true
endif
return false
endfunction
function HQHQ takes unit pgE returns boolean
return GetUnitTypeId(pgE)=='H00I'or GetUnitTypeId(pgE)=='H00J'
endfunction
function HrHr takes unit pgE returns boolean
local string lf5=H2Tx(GetOwningPlayer(pgE))
local unit lgg=GetUnit(lf5,"Kobold0")
local unit lgG=GetUnit(lf5,"Kobold1")
local unit lgh=GetUnit(lf5,"Kobold2")
local unit lgH=GetUnit(lf5,"Kobold3")
if GetUnitAbilityLevel(lgg,'A0OV')!=0 or GetUnitAbilityLevel(lgG,'A0OV')!=0 or GetUnitAbilityLevel(lgh,'A0OV')!=0 or GetUnitAbilityLevel(lgH,'A0OV')!=0 then
return true
endif
return false
endfunction
function HUHU takes player pHT,integer pHu returns nothing
local integer lEq=1
local integer lgB
if PlayerIsSentinel(pHT)then
set lgB=ForceActivePlayers(udg_f_DTAX_SEPlayers)
else
set lgB=ForceActivePlayers(udg_f_DTAX_SCPlayers)
endif
if PlayerIsSentinel(pHT)then
loop
exitwhen lEq>5
if PlayerIsActive(udg_pA_DTAX_SEPlayers[lEq])then
call BountyOverUnitForPlayer(udg_pA_DTAX_SEPlayers[lEq],pHu/lgB,udg_uA_DTAX_player_hero_unit[GetPlayerId(udg_pA_DTAX_SEPlayers[lEq])])
endif
set lEq=lEq+1
endloop
else
loop
exitwhen lEq>5
if PlayerIsActive(udg_pA_DTAX_SCPlayers[lEq])then
call BountyOverUnitForPlayer(udg_pA_DTAX_SCPlayers[lEq],pHu/lgB,udg_uA_DTAX_player_hero_unit[GetPlayerId(udg_pA_DTAX_SCPlayers[lEq])])
endif
set lEq=lEq+1
endloop
endif
endfunction
function HvHv takes unit pgE,integer pHV returns nothing
local player lHw=GetOwningPlayer(pgE)
call SetPlayerState(lHw,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(lHw,PLAYER_STATE_RESOURCE_GOLD)-pHV)
endfunction
function HXHX takes unit pfU returns nothing
local string lf5=H2Tx(GetOwningPlayer(pfU))
local unit lHy=GetUnit(lf5,"BearItemHolder")
local location lHS
if PlayerIsSentinel(GetOwningPlayer(pfU))then
set lHS=GetRectCenter(gg_rct_SentinelHeroSpawn)
else
set lHS=GetRectCenter(gg_rct_ScourgeHeroSpawn)
endif
if lHy!=null then
call SetItemPositionLoc(UnitRemoveItemFromSlot(lHy,0),lHS)
call SetItemPositionLoc(UnitRemoveItemFromSlot(lHy,1),lHS)
call SetItemPositionLoc(UnitRemoveItemFromSlot(lHy,2),lHS)
call SetItemPositionLoc(UnitRemoveItemFromSlot(lHy,3),lHS)
call SetItemPositionLoc(UnitRemoveItemFromSlot(lHy,4),lHS)
call SetItemPositionLoc(UnitRemoveItemFromSlot(lHy,5),lHS)
endif
endfunction
function Trig_Divided_We_Stand_Actions takes nothing returns nothing
local boolean lH1=false
local unit lgE=GetDyingUnit()
local unit lH2=GetKillingUnit()
local player lHT=GetOwningPlayer(lH2)
local player lHw=GetOwningPlayer(lgE)
local location lHS
local integer lHu=0
local integer lHV=0
local boolean lH3=false
local string lH4=""
local string lH5=""
local string lMidText
local integer lxx
local string lH6
local string lH7
local string lH8
local string lH9
local boolean lia=false
if GetUnitAbilityLevel(lgE,'A0OV')!=0 or(HQHQ(lgE)and HrHr(lgE))then
set lia=true
call UnitRemoveAbility(lgE,'A0OV')
set udg_u_DTAX_temp=lgE
set udg_u_DTAX_temp_target=lH2
if IsUnitType(lH2,UNIT_TYPE_STRUCTURE)==false then
call ExecuteFunc("ShallowGrave_ReturnDamage")
endif
endif
if lHT==null then
set lHT=lHw
endif
if udg_b_DTAX_is_itemdrop_mode and GetUnitTypeId(lgE)!='H00J'then
set udg_AY=UnitRemoveItemFromSlot(lgE,GetRandomInt(0,5))
if GetItemTypeId(udg_AY)=='I00K'then
call CreateItem('I00G',GetItemX(udg_AY),GetItemY(udg_AY))
call RemoveItem(udg_AY)
endif
endif
if PlayerIsSentinel(lHw)then
if PlayerIsSentinel(lHT)then
set lH1=true
if(lHT==lHw)then
call MultyEcho(udg_for_DTAX_NonComputerPlayers,10.,(udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(lHw)]+GetPlayerName(lHw)+"|r has killed himself!"))
else
call MultyEcho(udg_for_DTAX_NonComputerPlayers,10.,(udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(lHw)]+GetPlayerName(lHw)+"|r has been killed by his teammate"))
endif
elseif PlayerIsScourge(lHT)then
set lH3=true
set udg_iA_DTAX_kill_counter[GetPlayerId(udg_pA_DTAX_SEPlayers[0])]=udg_iA_DTAX_kill_counter[GetPlayerId(udg_pA_DTAX_SEPlayers[0])]+1
set udg_iA_DTAX_iA_kill_death_counter[GetPlayerId(udg_pA_DTAX_SCPlayers[0])]=udg_iA_DTAX_iA_kill_death_counter[GetPlayerId(udg_pA_DTAX_SCPlayers[0])]+1
set udg_iA_DTAX_team_owning_status[2]=udg_iA_DTAX_team_owning_status[2]+1
set udg_iA_DTAX_team_owning_status[1]=0
if lHT!=udg_pA_DTAX_SCPlayers[0]then
set udg_iA_DTAX_iA_kill_death_counter[GetPlayerId(lHT)]=udg_iA_DTAX_iA_kill_death_counter[GetPlayerId(lHT)]+1
set udg_iA_DTAX_killing_spree_status[GetPlayerId(lHT)]=udg_iA_DTAX_killing_spree_status[GetPlayerId(lHT)]+1
endif
endif
endif
if PlayerIsScourge(lHw)then
if PlayerIsScourge(lHT)then
set lH1=true
if(lHT==lHw)then
call MultyEcho(udg_for_DTAX_NonComputerPlayers,10.,(udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(lHw)]+GetPlayerName(lHw)+"|r has killed himself!"))
else
call MultyEcho(udg_for_DTAX_NonComputerPlayers,10.,(udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(lHw)]+GetPlayerName(lHw)+"|r has been killed by his teammate"))
endif
elseif PlayerIsSentinel(lHT)then
set lH3=true
set udg_iA_DTAX_kill_counter[GetPlayerId(udg_pA_DTAX_SCPlayers[0])]=udg_iA_DTAX_kill_counter[GetPlayerId(udg_pA_DTAX_SCPlayers[0])]+1
set udg_iA_DTAX_iA_kill_death_counter[GetPlayerId(udg_pA_DTAX_SEPlayers[0])]=udg_iA_DTAX_iA_kill_death_counter[GetPlayerId(udg_pA_DTAX_SEPlayers[0])]+1
set udg_iA_DTAX_team_owning_status[1]=udg_iA_DTAX_team_owning_status[1]+1
set udg_iA_DTAX_team_owning_status[2]=0
if lHT!=udg_pA_DTAX_SEPlayers[0]then
set udg_iA_DTAX_iA_kill_death_counter[GetPlayerId(lHT)]=udg_iA_DTAX_iA_kill_death_counter[GetPlayerId(lHT)]+1
set udg_iA_DTAX_killing_spree_status[GetPlayerId(lHT)]=udg_iA_DTAX_killing_spree_status[GetPlayerId(lHT)]+1
endif
endif
endif
if lHT==udg_p_DTAX_Player12 then
set lH3=false
if GetUnitTypeId(lH2)=='n00L'then
call MultyEcho(udg_for_DTAX_NonComputerPlayers,10.,(udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(lHw)]+GetPlayerName(lHw)+"|r has been killed by Roshan"))
else
call MultyEcho(udg_for_DTAX_NonComputerPlayers,10.,(udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(lHw)]+GetPlayerName(lHw)+"|r has been killed by Neutral Creeps"))
endif
set lH1=true
endif
if GetUnitTypeId(GetKillingUnit())=='e01H'then
call ExecuteFunc("HzHz")
endif
set lxx=udg_iA_DTAX_killing_spree_status[GetPlayerId(lHw)]
if lxx>2 and lH1==false then
if lxx==3 then
set lHu=50
set lH4="|c0000ff40killing spree|r"
elseif lxx==4 then
set lHu=100
set lH4="|c00400080dominating|r"
elseif lxx==5 then
set lHu=150
set lH4="|c00ff0080mega kill|r"
elseif lxx==6 then
set lHu=200
set lH4="|c00ff8000unstoppable|r"
elseif lxx==7 then
set lHu=250
set lH4="|c00808000wicked sick|r"
elseif lxx==8 then
set lHu=300
set lH4="|c00ff80ffmonster kill|r"
elseif lxx==9 then
set lHu=350
set lH4="|c00ff0000GODLIKE|r"
else
set lHu=400
set lH4="|c00ff8000beyond GODLIKE|r"
endif
endif
set lxx=udg_iA_DTAX_killing_spree_status[GetPlayerId(lHT)]
if lxx>udg_Stat_SomeChainKillsPoints[GetPlayerId(lHT)]then
set udg_Stat_SomeChainKillsPoints[GetPlayerId(lHT)]=lxx
endif
if lxx>2 and lH1==false then
if lxx==3 then
call PlaySoundBJ(gg_snd_KillingSpree)
set lH5=" is on a |c0000ff40killing spree|r!"
elseif lxx==4 then
call PlaySoundBJ(gg_snd_Dominating)
set lH5=" is |c00400080dominating|r!"
elseif lxx==5 then
call PlaySoundBJ(gg_snd_MegaKill)
set lH5=" has a |c00ff0080mega kill|r!"
elseif lxx==6 then
call PlaySoundBJ(gg_snd_Unstoppable)
set lH5=" is |c00ff8000unstoppable|r!!"
elseif lxx==7 then
call PlaySoundBJ(gg_snd_WhickedSick)
set lH5=" is |c00808000wicked Sick|r!!"
elseif lxx==8 then
call PlaySoundBJ(gg_snd_MonsterKill)
set lH5=" has a |c00ff80ffmonster kill|r!!"
elseif lxx==9 then
call PlaySoundBJ(gg_snd_GodLike)
set lH5=" is |c00ff0000GODLIKE|r!!!"
else
call PlaySoundBJ(gg_snd_HolyShit)
set lH5=" is |c00ff8000beyond GODLIKE|r. Someone KILL HIM!!!"
endif
endif
if lH1==false then
set lHu=lHu+100+GetHeroLevel(lgE)*5+100
set lH6=udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(lHw)]+GetPlayerName(lHw)+"|r"
set lH7=udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(lHT)]+GetPlayerName(lHT)+"|r"
set lH9="|c00FFDC00"+I2S(lHu)+"|r"
if lHT==udg_pA_DTAX_SEPlayers[0]then
set lH8=lH7+" pawned "+lH6+"'s head! "+lH9+" gold is split."
call HUHU(lHT,lHu)
elseif lHT==udg_pA_DTAX_SCPlayers[0]then
set lH8=lH7+" pawned "+lH6+"'s head! "+lH9+" gold is split."
call HUHU(lHT,lHu)
elseif lH4==""and lH5==""then
set lH8=lH7+" pawned "+lH6+"'s head for "+lH9+" gold!"
elseif lH4==""and lH5!=""then
set lH8=lH7+" pawned "+lH6+"'s head for "+lH9+" gold!"
elseif lH4!=""and lH5==""then
set lH8=lH7+" has just ended "+lH6+"'s "+lH4+" streak for "+lH9+" gold!"
elseif lH4!=""and lH5!=""then
set lH8=lH7+" has just ended "+lH6+"'s "+lH4+" streak for "+lH9+" gold! "
endif
call MultyEcho(udg_for_DTAX_NonComputerPlayers,10,lH8)
if lH5!=""then
call MultyEcho(udg_for_DTAX_NonComputerPlayers,10,lH7+lH5)
endif
call BountyOverUnitForPlayer(lHT,lHu,lgE)
set udg_Stat_SomeStat4[GetPlayerId(lHT)]=udg_Stat_SomeStat4[GetPlayerId(lHT)]+lHu
if udg_iA_DTAX_team_owning_status[1]>4 then
call PolledWait(1.5)
call MultyEcho(udg_for_DTAX_NonComputerPlayers,10.,udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(udg_pA_DTAX_SEPlayers[0])]+"The Sentinel|r are "+udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(udg_pA_DTAX_SEPlayers[0])]+"OWNING!!!|r")
call PlaySoundBJ(gg_snd_Ownage)
endif
if udg_iA_DTAX_team_owning_status[2]>4 then
call PolledWait(1.5)
call MultyEcho(udg_for_DTAX_NonComputerPlayers,10.,udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(udg_pA_DTAX_SCPlayers[0])]+"The Scourge|r are "+udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(udg_pA_DTAX_SCPlayers[0])]+"OWNING!!!|r")
call PlaySoundBJ(gg_snd_Ownage)
endif
endif
set lHV=GetHeroLevel(lgE)*30
if lia==false then
set udg_Stat_SomeHeroKillPoints[GetPlayerId(lHw)]=udg_Stat_SomeHeroKillPoints[GetPlayerId(lHw)]+lHV
call HvHv(lgE,lHV)
endif
call SetInteger("Stats"+I2S(GetPlayerId(lHT)),"Killed "+I2S(GetPlayerId(lHw)),GetInteger("Stats"+I2S(GetPlayerId(lHT)),"Killed "+I2S(GetPlayerId(lHw)))+1)
call SetInteger("Stats"+I2S(GetPlayerId(lHw)),"Died To "+I2S(GetPlayerId(lHT)),GetInteger("Stats"+I2S(GetPlayerId(lHw)),"Died To "+I2S(GetPlayerId(lHT)))+1)
call StartTimerBJ(udg_tA_DTAX_player_tripple_kill_expiration_timer[GetPlayerId(lHT)],false,11.5)
if lH1==false then
if lHT!=udg_pA_DTAX_SEPlayers[0]then
if lHT!=udg_pA_DTAX_SCPlayers[0]then
if lHT!=udg_p_DTAX_Player12 then
call PolledWait(1.5)
set udg_iA_DTAX_tripple_kill_status[GetPlayerId(lHT)]=udg_iA_DTAX_tripple_kill_status[GetPlayerId(lHT)]+1
if udg_iA_DTAX_tripple_kill_status[GetPlayerId(lHT)]==2 then
call PlaySoundBJ(gg_snd_DoubleKill)
set udg_Stat_SomeStat1[GetPlayerId(lHT)]=udg_Stat_SomeStat1[GetPlayerId(lHT)]+1
call MultyEcho(udg_for_DTAX_NonComputerPlayers,10.,udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(lHT)]+GetPlayerName(lHT)+"|r just got a |c000000ffDouble Kill|r!")
endif
if udg_iA_DTAX_tripple_kill_status[GetPlayerId(lHT)]>2 then
call PlaySoundBJ(gg_snd_TripleKill)
set udg_Stat_SomeStat2[GetPlayerId(lHT)]=udg_Stat_SomeStat2[GetPlayerId(lHT)]+1
call MultyEcho(udg_for_DTAX_NonComputerPlayers,10.,udg_sA_DTAX_player_textcolor_prefixes[GetPlayerId(lHT)]+GetPlayerName(lHT)+"|r just got a |c0000ff40Triple Kill|r!!!")
endif
endif
endif
endif
endif
if(lH1==false)then
set udg_iA_DTAX_killing_spree_status[GetPlayerId(lHw)]=0
endif
set udg_iA_DTAX_killing_spree_status[0]=0
set udg_iA_DTAX_killing_spree_status[6]=0
set udg_iA_DTAX_kill_counter[GetPlayerId(lHw)]=udg_iA_DTAX_kill_counter[GetPlayerId(lHw)]+1
if lia then
set udg_Stat_SomeStat3[GetPlayerId(lHw)]=udg_Stat_SomeStat3[GetPlayerId(lHw)]+GetHeroLevel(lgE)*1
call TimerStart(udg_tA_DTAX_hero_revive_timer[GetPlayerId(lHw)],GetHeroLevel(lgE)*1,false,null)
else
set udg_Stat_SomeStat3[GetPlayerId(lHw)]=udg_Stat_SomeStat3[GetPlayerId(lHw)]+GetHeroLevel(lgE)*4
call TimerStart(udg_tA_DTAX_hero_revive_timer[GetPlayerId(lHw)],GetHeroLevel(lgE)*4,false,null)
endif
call TriggerExecute(gg_trg_KD_Update)
if udg_b_DTAX_is_deathmatch_mode==false then
if lia then
set udg_iA_DTAX_revive_time[GetPlayerId(lHw)]=GetHeroLevel(lgE)*1
else
set udg_iA_DTAX_revive_time[GetPlayerId(lHw)]=GetHeroLevel(lgE)*4
endif
loop
call PolledWait(1.85)
set udg_iA_DTAX_revive_time[GetPlayerId(lHw)]=udg_iA_DTAX_revive_time[GetPlayerId(lHw)]-2
exitwhen udg_iA_DTAX_revive_time[GetPlayerId(lHw)]<1
endloop
if(PlayerIsScourge(lHw))then
set lHS=GetRectCenter(gg_rct_ScourgeHeroSpawn)
else
set lHS=GetRectCenter(gg_rct_SentinelHeroSpawn)
endif
if GetUnitState(lgE,UNIT_STATE_LIFE)<1 and udg_A5==false then
call PanCameraToTimedLocForPlayer(lHw,lHS,1.)
endif
if udg_A5==false then
if HQHQ(lgE)==false or GetUnitAbilityLevel(lgE,'A0MW')==0 then
call ReviveHeroLoc(lgE,lHS,true)
else
call HsHs(lgE,lHS)
endif
if lia then
call SetUnitState(lgE,UNIT_STATE_MANA,GetUnitState(lgE,UNIT_STATE_MAX_MANA))
endif
endif
call RemoveLocation(lHS)
else
if(PlayerIsSentinel(lHw))then
set udg_iA_DTAX_force_death_counter[0]=udg_iA_DTAX_force_death_counter[0]+1
endif
if PlayerIsScourge(lHw)then
set udg_iA_DTAX_force_death_counter[1]=udg_iA_DTAX_force_death_counter[1]+1
endif
set udg_uA_DTAX_player_died_unit[GetPlayerId(lHw)]=lgE
if GetUnitTypeId(lgE)=='H00J'then
set udg_uA_DTAX_player_died_unit[GetPlayerId(lHw)]=GetUnit(H2Tx(GetOwningPlayer(lgE)),"Kobold0")
endif
call SetPlayerStateBJ(GetOwningPlayer(GetTriggerUnit()),PLAYER_STATE_RESOURCE_FOOD_CAP,5)
if udg_iA_DTAX_force_death_counter[0]==ReturnMin(udg_i_DTAX_LastSEHero,udg_i_DTAX_LastSCHero-udg_i_DTAX_FirstSCHero+1)then
call TriggerExecute(gg_trg_Scourge_Won)
endif
if udg_iA_DTAX_force_death_counter[1]==ReturnMin(udg_i_DTAX_LastSEHero,udg_i_DTAX_LastSCHero-udg_i_DTAX_FirstSCHero+1)then
call TriggerExecute(gg_trg_Sentienel_Won)
endif
call PolledWait((GetHeroLevel(lgE)*4)-1)
if(GetUnitTypeId(lgE)=='U006')then
call ExecuteFunc("HxHx")
endif
if(GetUnitTypeId(lgE)=='N01O')or(GetUnitTypeId(lgE)=='N015')or(GetUnitTypeId(lgE)=='N014')or(GetUnitTypeId(lgE)=='N013')then
call HXHX(lgE)
endif
endif
endfunction
function StartTrigger_Divided_We_Stand takes nothing returns nothing
set gg_trg_Divided_We_Stand=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Divided_We_Stand,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(gg_trg_Divided_We_Stand,Condition(function Trig_Divided_We_Stand_Conditions))
call TriggerAddAction(gg_trg_Divided_We_Stand,function Trig_Divided_We_Stand_Actions)
endfunction
function InitTrig_Divided_We_Stand takes nothing returns nothing
endfunction
function Divided_We_Stand_ShareExp takes nothing returns nothing
local string lsq=H2Tx(GetTriggeringTrigger())
local player lEk=GetPlayer(lsq,"PlayerVar")
local string lsQ=H2Tx(lEk)
local unit lgg=GetUnit(lsQ,"Kobold0")
local unit lgG=GetUnit(lsQ,"Kobold1")
local unit lgh=GetUnit(lsQ,"Kobold2")
local unit lgH=GetUnit(lsQ,"Kobold3")
local string lsr=H2Tx(lgg)
local string lsR=H2Tx(lgG)
local string lss=H2Tx(lgh)
local string lsS=H2Tx(lgH)
local integer lst=GetInteger(lsr,"XPEarned")
local integer lsT=GetInteger(lsr,"XPGiven")
local integer lsu=GetInteger(lsR,"XPEarned")
local integer lsU=GetInteger(lsR,"XPGiven")
local integer lsv=GetInteger(lss,"XPEarned")
local integer lsV=GetInteger(lss,"XPGiven")
local integer lsw=GetInteger(lsS,"XPEarned")
local integer lsW=GetInteger(lsS,"XPGiven")
local integer lsx=GetHeroXP(lgg)
local integer lsX=GetHeroXP(lgG)
local integer lsy=GetHeroXP(lgh)
local integer lsY=GetHeroXP(lgH)
local integer lsz=lsx-lst-lsT
local integer lsZ=lsX-lsu-lsU
local integer ls0=lsy-lsv-lsV
local integer ls1=lsY-lsw-lsW
set lst=lst+lsz
set lsu=lsu+lsZ
set lsv=lsv+ls0
set lsw=lsw+ls1
if lgg!=null then
call AddHeroXP(lgG,lsz,false)
if GetHeroXP(lgG)!=lsX then
set lsU=lsU+lsz
endif
call AddHeroXP(lgh,lsz,false)
if GetHeroXP(lgh)!=lsy then
set lsV=lsV+lsz
endif
call AddHeroXP(lgH,lsz,false)
if GetHeroXP(lgH)!=lsY then
set lsW=lsW+lsz
endif
endif
if lgG!=null then
call AddHeroXP(lgg,lsZ,false)
if GetHeroXP(lgg)!=lsx then
set lsT=lsT+lsZ
endif
call AddHeroXP(lgh,lsZ,false)
if GetHeroXP(lgh)!=lsy then
set lsV=lsV+lsZ
endif
call AddHeroXP(lgH,lsZ,false)
if GetHeroXP(lgH)!=lsY then
set lsW=lsW+lsZ
endif
endif
if lgh!=null then
call AddHeroXP(lgG,ls0,false)
if GetHeroXP(lgG)!=lsX then
set lsU=lsU+ls0
endif
call AddHeroXP(lgg,ls0,false)
if GetHeroXP(lgg)!=lsx then
set lsT=lsT+ls0
endif
call AddHeroXP(lgH,ls0,false)
if GetHeroXP(lgH)!=lsY then
set lsW=lsW+ls0
endif
endif
if lgH!=null then
call AddHeroXP(lgG,ls1,false)
if GetHeroXP(lgG)!=lsX then
set lsU=lsU+ls1
endif
call AddHeroXP(lgh,ls1,false)
if GetHeroXP(lgh)!=lsy then
set lsV=lsV+ls1
endif
call AddHeroXP(lgg,ls1,false)
if GetHeroXP(lgg)!=lsx then
set lsT=lsT+ls1
endif
endif
call SetInteger(lsr,"XPEarned",lst)
call SetInteger(lsr,"XPGiven",lsT)
call SetInteger(lsR,"XPEarned",lsu)
call SetInteger(lsR,"XPGiven",lsU)
call SetInteger(lss,"XPEarned",lsv)
call SetInteger(lss,"XPGiven",lsV)
call SetInteger(lsS,"XPEarned",lsw)
call SetInteger(lsS,"XPGiven",lsW)
endfunction
function Divided_We_Stand_KillEveryOne takes nothing returns nothing
local unit lgE=GetTriggerUnit()
local string lf5=H2Tx(GetOwningPlayer(lgE))
local unit lgg=GetUnit(lf5,"Kobold0")
local unit lgG=GetUnit(lf5,"Kobold1")
local unit lgh=GetUnit(lf5,"Kobold2")
local unit lgH=GetUnit(lf5,"Kobold3")
local boolean lia=false
call DisableTrigger(udg_triggerl004)
if lgg!=null and lgg!=lgE then
call KillUnit(lgg)
endif
if lgG!=null and lgG!=lgE then
call KillUnit(lgG)
endif
if lgh!=null and lgh!=lgE then
call KillUnit(lgh)
endif
if lgH!=null and lgH!=lgE then
call KillUnit(lgH)
endif
call EnableTrigger(udg_triggerl004)
endfunction
function Divided_We_Stand_NotIlluGeo takes nothing returns boolean
return Divided_We_Stand_IsGeomancer(GetTriggerUnit())and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function Divided_We_Stand_Boots takes nothing returns nothing
local unit lgi=GetTriggerUnit()
local integer lii=0
local boolean lF3=false
local boolean lF4=false
local boolean lF5=false
local string lsQ=H2Tx(GetOwningPlayer(lgi))
local unit lgg=GetUnit(lsQ,"Kobold0")
local unit lgG=GetUnit(lsQ,"Kobold1")
local unit lgh=GetUnit(lsQ,"Kobold2")
local unit lgH=GetUnit(lsQ,"Kobold3")
local integer lkf
local boolean ls7=false
local integer ls8=0
local integer ls9=0
local integer lSa=0
call DisableTrigger(GetTriggeringTrigger())
if GetUnitTypeId(lgi)=='H00J'then
call UnitRemoveItemFromSlot(lgi,0)
call EnableTrigger(GetTriggeringTrigger())
return
endif
if not(GetItemTypeId(GetManipulatedItem())=='tgxp'or GetItemTypeId(GetManipulatedItem())=='hlst'or GetItemTypeId(GetManipulatedItem())=='tlum')then
call EnableTrigger(GetTriggeringTrigger())
return
endif
if GetTriggerEventId()==EVENT_PLAYER_UNIT_DROP_ITEM then
set ls7=true
endif
loop
exitwhen lii>5
set lkf=GetItemTypeId(UnitItemInSlot(lgi,lii))
if lkf=='tgxp'then
set ls8=ls8+1
if(not(ls7 and lkf==GetItemTypeId(GetManipulatedItem())))or(ls8>1 and lkf==GetItemTypeId(GetManipulatedItem()))then
set lF3=true
endif
endif
if lkf=='hlst'then
set ls9=ls9+1
if(not(ls7 and lkf==GetItemTypeId(GetManipulatedItem())))or(ls9>1 and lkf==GetItemTypeId(GetManipulatedItem()))then
set lF4=true
endif
endif
if lkf=='tlum'then
set lSa=lSa+1
if(not(ls7 and lkf==GetItemTypeId(GetManipulatedItem())))or(lSa>1 and lkf==GetItemTypeId(GetManipulatedItem()))then
set lF5=true
endif
endif
set lii=lii+1
endloop
call RemoveItem(UnitRemoveItemFromSlot(lgG,0))
if lgh!=null then
call RemoveItem(UnitRemoveItemFromSlot(lgh,0))
endif
if lgh!=null then
call RemoveItem(UnitRemoveItemFromSlot(lgH,0))
endif
if lF5 then
call UnitAddItem(lgG,CreateItem('tlum',0,0))
if lgh!=null then
call UnitAddItem(lgh,CreateItem('tlum',0,0))
endif
if lgH!=null then
call UnitAddItem(lgH,CreateItem('tlum',0,0))
endif
elseif lF4 then
call UnitAddItem(lgG,CreateItem('hlst',0,0))
if lgh!=null then
call UnitAddItem(lgh,CreateItem('hlst',0,0))
endif
if lgH!=null then
call UnitAddItem(lgH,CreateItem('hlst',0,0))
endif
elseif lF3 then
call UnitAddItem(lgG,CreateItem('tgxp',0,0))
if lgh!=null then
call UnitAddItem(lgh,CreateItem('tgxp',0,0))
endif
if lgH!=null then
call UnitAddItem(lgH,CreateItem('tgxp',0,0))
endif
endif
call EnableTrigger(GetTriggeringTrigger())
endfunction
function Divided_We_Stand_GeomancerNotIllusion takes nothing returns boolean
return Divided_We_Stand_IsGeomancer(GetTriggerUnit())and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function Divided_We_Stand_EventsHandle takes nothing returns nothing
local trigger ltt
set ltt=CreateTrigger()
call TriggerRegisterTimerEvent(ltt,.1,true)
call TriggerAddAction(ltt,function Divided_We_Stand_ShareExp)
call SetHandle(H2Tx(ltt),"PlayerVar",GetOwningPlayer(GetTriggerUnit()))
call SetHandle(H2Tx(GetOwningPlayer(GetTriggerUnit())),"Kobold|XPTrigger",ltt)
set ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddAction(ltt,function Divided_We_Stand_KillEveryOne)
call TriggerAddCondition(ltt,Condition(function Divided_We_Stand_NotIlluGeo))
set ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_DROP_ITEM)
call TriggerAddAction(ltt,function Divided_We_Stand_Boots)
call TriggerAddCondition(ltt,Condition(function Divided_We_Stand_GeomancerNotIllusion))
call SetHandle(H2Tx(GetOwningPlayer(GetTriggerUnit())),"Kobold|ItemTrigger",ltt)
call ExecuteFunc("Divided_We_Stand_SavePlayerData")
endfunction
function Divided_We_Stand_CloneSkils takes integer pmR,unit pms,unit pmS returns nothing
local integer lEq=1
local integer lEQ=GetUnitAbilityLevel(pms,pmR)
loop
exitwhen lEq>lEQ
call SelectHeroSkill(pmS,pmR)
set lEq=lEq+1
endloop
endfunction
function Divided_We_Stand_CloneKobold takes unit plU,unit pSE returns nothing
call AddHeroXP(plU,GetHeroXP(pSE),false)
call SetInteger(H2Tx(plU),"XPGiven",GetHeroXP(pSE))
call SetInteger(H2Tx(plU),"XPEarned",0)
call Divided_We_Stand_CloneSkils('A0N8',pSE,plU)
call Divided_We_Stand_CloneSkils('A0NB',pSE,plU)
call Divided_We_Stand_CloneSkils('A0N7',pSE,plU)
call Divided_We_Stand_CloneSkils('Aamk',pSE,plU)
call Divided_We_Stand_CloneSkils('A0MW',pSE,plU)
endfunction
function Divided_We_Stand_BootsHelper takes unit plU,unit pfU returns nothing
local trigger ltt=GetTrigger(H2Tx(GetOwningPlayer(pfU)),"Kobold|ItemTrigger")
local integer lii=0
local boolean lF3=false
local boolean lF4=false
local boolean lF5=false
call DisableTrigger(ltt)
loop
exitwhen lii>5
if GetItemTypeId(UnitItemInSlot(pfU,lii))=='tgxp'then
set lF3=true
endif
if GetItemTypeId(UnitItemInSlot(pfU,lii))=='hlst'then
set lF4=true
endif
if GetItemTypeId(UnitItemInSlot(pfU,lii))=='tlum'then
set lF5=true
endif
set lii=lii+1
endloop
if lF5 then
call UnitAddItem(plU,CreateItem('tlum',0,0))
elseif lF4 then
call UnitAddItem(plU,CreateItem('hlst',0,0))
elseif lF3 then
call UnitAddItem(plU,CreateItem('tgxp',0,0))
endif
call EnableTrigger(ltt)
endfunction
function Divided_We_Stand_KoboldNew takes nothing returns nothing
local unit lfU=GetTriggerUnit()
local player lEk=GetOwningPlayer(lfU)
local string lf5=H2Tx(lEk)
local unit llU
call Divided_We_Stand_CloneSkillBySkill(lfU,'A0MW')
set llU=CreateUnit(GetOwningPlayer(lfU),'H00J',GetUnitX(lfU),GetUnitY(lfU),0)
call Divided_We_Stand_CloneKobold(llU,lfU)
call Divided_We_Stand_BootsHelper(llU,lfU)
call SetHandle(lf5,"Kobold"+I2S(GetUnitAbilityLevel(lfU,'A0MW')),llU)
endfunction
function Trig_Duplicates_Levelling_Actions takes nothing returns nothing
local integer lSd=GetLearnedSkill()
if IsUnitIllusion(GetTriggerUnit())or Divided_We_Stand_IsGeomancer(GetTriggerUnit())==false then
return
endif
if lSd=='A0MW'and GetUnitAbilityLevel(GetTriggerUnit(),lSd)==1 then
call TriggerExecute(GetTrigger(H2Tx(GetOwningPlayer(GetTriggerUnit())),"Kobold|XPTrigger"))
call SetHandle(H2Tx(GetOwningPlayer(GetTriggerUnit())),"Kobold0",GetTriggerUnit())
call SetInteger(H2Tx(GetTriggerUnit()),"XPEarned",GetHeroXP(GetTriggerUnit()))
call SetInteger(H2Tx(GetTriggerUnit()),"XPGiven",0)
call DisableTrigger(GetTriggeringTrigger())
call Divided_We_Stand_EventsHandle()
call EnableTrigger(GetTriggeringTrigger())
endif
if lSd=='A0MW'then
call TriggerExecute(GetTrigger(H2Tx(GetOwningPlayer(GetTriggerUnit())),"Kobold|XPTrigger"))
call DisableTrigger(GetTriggeringTrigger())
call Divided_We_Stand_KoboldNew()
call EnableTrigger(GetTriggeringTrigger())
endif
if lSd=='A0N8'or lSd=='A0NB'or lSd=='A0N7'or lSd=='Aamk'then
call TriggerExecute(GetTrigger(H2Tx(GetOwningPlayer(GetTriggerUnit())),"Kobold|XPTrigger"))
call DisableTrigger(GetTriggeringTrigger())
call Divided_We_Stand_CloneSkillBySkill(GetTriggerUnit(),lSd)
call EnableTrigger(GetTriggeringTrigger())
endif
endfunction
function StartTrigger_Duplicates_Levelling takes nothing returns nothing
set gg_trg_Duplicates_Levelling=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Duplicates_Levelling,EVENT_PLAYER_HERO_SKILL)
call TriggerAddAction(gg_trg_Duplicates_Levelling,function Trig_Duplicates_Levelling_Actions)
endfunction
function InitTrig_Duplicates_Levelling takes nothing returns nothing
endfunction
function Trig_Remote_Mines_Conditions takes nothing returns boolean
return GetLearnedSkill()=='A0AK'and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function Trig_Remote_Mines_Actions takes nothing returns nothing
if(GetUnitAbilityLevel(GetTriggerUnit(),'A0AK')==1)then
call UnitAddAbility(GetTriggerUnit(),'A02T')
endif
endfunction
function StartTrigger_Remote_Mines takes nothing returns nothing
set gg_trg_Remote_Mines=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Remote_Mines,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(gg_trg_Remote_Mines,Condition(function Trig_Remote_Mines_Conditions))
call TriggerAddAction(gg_trg_Remote_Mines,function Trig_Remote_Mines_Actions)
endfunction
function InitTrig_Remote_Mines takes nothing returns nothing
endfunction
function RemoteMine_DamageFilter takes nothing returns boolean
if(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))then
if(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false)then
if(GetUnitAbilityLevelSwapped('A04R',GetFilterUnit())==0)then
return true
endif
endif
endif
return false
endfunction
function RemoteMine_Damage300 takes nothing returns nothing
call UnitDamageTargetBJ(GetTriggerUnit(),GetEnumUnit(),300.,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_FIRE)
endfunction
function RemoteMine_Damage450 takes nothing returns nothing
call UnitDamageTargetBJ(GetTriggerUnit(),GetEnumUnit(),450.,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_FIRE)
endfunction
function RemoteMine_Damage600 takes nothing returns nothing
call UnitDamageTargetBJ(GetTriggerUnit(),GetEnumUnit(),600.,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_FIRE)
endfunction
function RemoteMine_PerMineExplode takes nothing returns nothing
call IssueImmediateOrderById(GetEnumUnit(),OrderId("locustswarm"))
endfunction
function Trig_Remote_Mines_Detonate_Actions takes nothing returns nothing
local group lEw
local location liD=GetUnitLoc(GetTriggerUnit())
local effect lfx
if(GetSpellAbilityId()=='A0AM')then
set lEw=GetUnitsInRangeOfLocMatching(425.,liD,Condition(function RemoteMine_DamageFilter))
call ForGroupBJ(lEw,function RemoteMine_Damage300)
set lfx=AddSpecialEffectLocBJ(liD,"Abilities\\Spells\\Human\\FlameStrike\\FlameStrike1.mdl")
call KillUnit(GetTriggerUnit())
call DestroyGroup(lEw)
endif
if(GetSpellAbilityId()=='A0A3')then
set lEw=GetUnitsInRangeOfLocMatching(435.,liD,Condition(function RemoteMine_DamageFilter))
call ForGroupBJ(lEw,function RemoteMine_Damage450)
set lfx=AddSpecialEffectLocBJ(liD,"Abilities\\Spells\\Human\\FlameStrike\\FlameStrike1.mdl")
call KillUnit(GetTriggerUnit())
call DestroyGroup(lEw)
endif
if(GetSpellAbilityId()=='A0A4')then
set lEw=GetUnitsInRangeOfLocMatching(450.,liD,Condition(function RemoteMine_DamageFilter))
call ForGroupBJ(lEw,function RemoteMine_Damage600)
set lfx=AddSpecialEffectLocBJ(liD,"Abilities\\Spells\\Human\\FlameStrike\\FlameStrike1.mdl")
call KillUnit(GetTriggerUnit())
call DestroyGroup(lEw)
endif
if(GetSpellAbilityId()=='A02T')then
set lEw=GetUnitsOfPlayerAndTypeId(GetOwningPlayer(GetTriggerUnit()),'o018')
call ForGroupBJ(lEw,function RemoteMine_PerMineExplode)
call DestroyGroup(lEw)
set lEw=GetUnitsOfPlayerAndTypeId(GetOwningPlayer(GetTriggerUnit()),'o002')
call ForGroupBJ(lEw,function RemoteMine_PerMineExplode)
call DestroyGroup(lEw)
set lEw=GetUnitsOfPlayerAndTypeId(GetOwningPlayer(GetTriggerUnit()),'o00B')
call ForGroupBJ(lEw,function RemoteMine_PerMineExplode)
call DestroyGroup(lEw)
endif
call PolledWait(5.01)
call DestroyEffect(lfx)
call RemoveLocation(liD)
endfunction
function Trig_Remote_Mines_Detonate_Conditions takes nothing returns boolean
if(GetSpellAbilityId()=='A0AM'or GetSpellAbilityId()=='A0A3'or GetSpellAbilityId()=='A0A4'or GetSpellAbilityId()=='A02T')then
return true
endif
return false
endfunction
function StartTrigger_Remote_Mines_Detonate takes nothing returns nothing
set gg_trg_Remote_Mines_Detonate=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Remote_Mines_Detonate,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddAction(gg_trg_Remote_Mines_Detonate,function Trig_Remote_Mines_Detonate_Actions)
call TriggerAddCondition(gg_trg_Remote_Mines_Detonate,Condition(function Trig_Remote_Mines_Detonate_Conditions))
endfunction
function InitTrig_Remote_Mines_Detonate takes nothing returns nothing
endfunction
function Trig_Goblin_Land_Mine_Counter_Conditions takes nothing returns boolean
if((GetUnitTypeId(GetTriggerUnit())=='n00O'))then
return true
endif
if((GetUnitTypeId(GetTriggerUnit())=='n00P'))then
return true
endif
if((GetUnitTypeId(GetTriggerUnit())=='n00Q'))then
return true
endif
if((GetUnitTypeId(GetTriggerUnit())=='n00N'))then
return true
endif
return false
endfunction
function LandMinesCount_Filter takes nothing returns boolean
if GetOwningPlayer(GetFilterUnit())==GetOwningPlayer(GetTriggerUnit())then
if((GetUnitTypeId(GetFilterUnit())=='n00O'))then
return true
endif
if((GetUnitTypeId(GetFilterUnit())=='n00P'))then
return true
endif
if((GetUnitTypeId(GetFilterUnit())=='n00Q'))then
return true
endif
if((GetUnitTypeId(GetFilterUnit())=='n00N'))then
return true
endif
endif
return false
endfunction
function Trig_Goblin_Land_Mine_Counter_Actions takes nothing returns nothing
local string lf5=H2Tx(GetOwningPlayer(GetTriggerUnit()))
local group lEw=GetUnitsInRectMatching(bj_mapInitialPlayableArea,Condition(function LandMinesCount_Filter))
local integer lq3=GetInteger(lf5,"GMCount")
local integer lq4=0
local unit lq5
local integer lq6
local unit lgl
local integer lq7
local integer lEq
local integer lEQ
set lq3=(lq3+1)
call StartTimerBJ(GetTimer(lf5,"MineTimer"+I2S(lq3)),false,15000.)
call SetHandle(lf5,"GMUnit"+I2S(lq3),GetTriggerUnit())
set lq4=CountUnitsInGroup(lEw)
if(lq4>15)then
set lq6=99999
set lEq=1
set lEQ=lq3
loop
exitwhen lEq>lEQ
set lgl=GetUnit(lf5,"GMUnit"+I2S(lEq))
set lq7=R2I(TimerGetRemaining(GetTimer(lf5,"MineTimer"+I2S(lEq))))
if(GetUnitState(lgl,UNIT_STATE_LIFE)>0 and lq7<lq6)then
set lq5=lgl
set lq6=lq7
endif
set lEq=lEq+1
endloop
call ExplodeUnitBJ(lq5)
endif
call SetInteger(lf5,"GMCount",lq3)
call DestroyGroup(lEw)
endfunction
function StartTrigger_Goblin_Land_Mine_Counter takes nothing returns nothing
set gg_trg_Goblin_Land_Mine_Counter=CreateTrigger()
call TriggerRegisterEnterRectSimple(gg_trg_Goblin_Land_Mine_Counter,GetWorldBounds())
call TriggerAddCondition(gg_trg_Goblin_Land_Mine_Counter,Condition(function Trig_Goblin_Land_Mine_Counter_Conditions))
call TriggerAddAction(gg_trg_Goblin_Land_Mine_Counter,function Trig_Goblin_Land_Mine_Counter_Actions)
endfunction
function InitTrig_Goblin_Land_Mine_Counter takes nothing returns nothing
endfunction
function SplitShotDeath takes nothing returns boolean
if(not(GetUnitAbilityLevelSwapped('A012',GetDyingUnit())>0))then
return false
endif
return true
endfunction
function SplitShotOn takes nothing returns boolean
if(not(GetUnitAbilityLevelSwapped('A012',GetTriggerUnit())>0))then
return false
endif
if(not(GetIssuedOrderId()==OrderId("defend")))then
return false
endif
return true
endfunction
function SplitShotOff takes nothing returns boolean
if(not(GetUnitAbilityLevelSwapped('A012',GetTriggerUnit())>0))then
return false
endif
if(not(GetIssuedOrderId()==OrderId("undefend")))then
return false
endif
return true
endfunction
function Trig_Split_Shot_Actions takes nothing returns nothing
if(SplitShotDeath())then
call UnitRemoveAbility(GetDyingUnit(),'A09J')
endif
if(SplitShotOn())then
call UnitAddAbility(GetTriggerUnit(),'A09J')
endif
if(SplitShotOff())then
call UnitRemoveAbility(GetTriggerUnit(),'A09J')
endif
endfunction
function StartTrigger_Split_Shot takes nothing returns nothing
set gg_trg_Split_Shot=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Split_Shot,EVENT_PLAYER_UNIT_ISSUED_ORDER)
call TriggerRegisterAnyUnitEventBJ(gg_trg_Split_Shot,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddAction(gg_trg_Split_Shot,function Trig_Split_Shot_Actions)
endfunction
function InitTrig_Split_Shot takes nothing returns nothing
endfunction
function Trig_Penitence_Conditions takes nothing returns boolean
return GetSpellAbilityId()=='A0KM'
endfunction
function Penitence_Damage takes nothing returns nothing
local trigger ltt=GetTriggeringTrigger()
local unit lKg=GetEventDamageSource()
local unit lke=GetTriggerUnit()
local unit lnu=GetUnit(H2Tx(ltt),"Chen")
local real lnU=GetEventDamage()*.07*GetUnitAbilityLevel(lnu,'A0KM')
if(GetEventDamage()>10)then
call DisableTrigger(ltt)
call UnitDamageTargetBJ(lKg,lke,lnU,ATTACK_TYPE_HERO,DAMAGE_TYPE_NORMAL)
call EnableTrigger(ltt)
endif
endfunction
function Trig_Penitence_Actions takes nothing returns nothing
local trigger lnV=CreateTrigger()
local effect lfx
local unit lfo=GetTriggerUnit()
call TriggerRegisterUnitEvent(lnV,GetSpellTargetUnit(),EVENT_UNIT_DAMAGED)
call TriggerAddAction(lnV,function Penitence_Damage)
call SetHandle(H2Tx(lnV),"Chen",lfo)
set lfx=AddSpecialEffectTargetUnitBJ("chest",lfo,"Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl")
call DestroyEffect(lfx)
call PolledWait(7.)
call DisableTrigger(lnV)
endfunction
function StartTrigger_Penitence takes nothing returns nothing
set gg_trg_Penitence=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Penitence,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Penitence,Condition(function Trig_Penitence_Conditions))
call TriggerAddAction(gg_trg_Penitence,function Trig_Penitence_Actions)
endfunction
function InitTrig_Penitence takes nothing returns nothing
endfunction
function Trig_Hand_of_God_Conditions takes nothing returns boolean
if(not(GetSpellAbilityId()=='A0LT'))then
return false
endif
return true
endfunction
function Hand_of_God_Check takes nothing returns boolean
if(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))then
return false
endif
if(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))then
return true
endif
return false
endfunction
function Trig_Hand_of_God_Actions takes nothing returns nothing
local unit lfo=GetTriggerUnit()
local integer lMP=GetUnitAbilityLevel(lfo,'A0LT')
local group lEw=GetUnitsInRectMatching(bj_mapInitialPlayableArea,Condition(function Hand_of_God_Check))
local unit lnX
loop
set lnX=FirstOfGroup(lEw)
exitwhen lnX==null
if(IsUnitAlly(lnX,GetOwningPlayer(lfo)))then
call SetWidgetLife(lnX,(GetUnitStateSwap(UNIT_STATE_LIFE,lnX)+100+(100*lMP)))
call DestroyEffect(AddSpecialEffectTargetUnitBJ("chest",lnX,"Abilities\\Spells\\Human\\Resurrect\\ResurrectTarget.mdl"))
endif
call GroupRemoveUnit(lEw,lnX)
endloop
call DestroyGroup(lEw)
set lEw=GetUnitsInRectOfPlayer(bj_mapInitialPlayableArea,GetOwningPlayer(lfo))
loop
set lnX=FirstOfGroup(lEw)
exitwhen lnX==null
if(IsUnitType(lnX,UNIT_TYPE_HERO)==false and GetUnitTypeId(lnX)!='n00C')then
call SetUnitLifePercentBJ(lnX,100)
call DestroyEffect(AddSpecialEffectTargetUnitBJ("chest",lnX,"Abilities\\Spells\\Human\\Resurrect\\ResurrectTarget.mdl"))
endif
call GroupRemoveUnit(lEw,lnX)
endloop
call DestroyGroup(lEw)
endfunction
function StartTrigger_Hand_of_God takes nothing returns nothing
set gg_trg_Hand_of_God=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Hand_of_God,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Hand_of_God,Condition(function Trig_Hand_of_God_Conditions))
call TriggerAddAction(gg_trg_Hand_of_God,function Trig_Hand_of_God_Actions)
endfunction
function InitTrig_Hand_of_God takes nothing returns nothing
endfunction
function Trig_Holy_Persuasion_Conditions takes nothing returns boolean
if(not(GetSpellAbilityId()=='A069'))then
return false
endif
return true
endfunction
function Holy_Persuasion_Filter takes nothing returns boolean
if(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==false)then
if(IsUnitAliveBJ(GetFilterUnit()))then
if GetUnitTypeId(GetFilterUnit())!='n00I'and GetUnitTypeId(GetFilterUnit())!='e01H'then
if(GetUnitTypeId(GetFilterUnit())!='ncop')then
if(GetUnitAbilityLevel(GetFilterUnit(),'Aeth')==1)then
if((GetUnitAbilityLevel(GetFilterUnit(),'A0KO')==1)or(GetUnitAbilityLevel(GetFilterUnit(),'A0KQ')==1)or(GetUnitAbilityLevel(GetFilterUnit(),'A0KR')==1)or(GetUnitAbilityLevel(GetFilterUnit(),'A0KP')==1))then
return true
endif
endif
endif
endif
endif
endif
return false
endfunction
function Trig_Holy_Persuasion_Actions takes nothing returns nothing
local unit lnZ=GetSpellTargetUnit()
local unit lnu=GetTriggerUnit()
local integer lMP=GetUnitAbilityLevel(lnu,'A069')
local integer ln0=1
local unit lnX
local integer lplayerid=GetPlayerId(GetOwningPlayer(lnu))
local group lEw
call MaxMana(lnZ)
if(lMP==1)then
call UnitAddAbility(lnZ,'A0KO')
endif
if(lMP==2)then
call UnitAddAbility(lnZ,'A0KQ')
endif
if(lMP==3)then
set ln0=2
call UnitAddAbility(lnZ,'A0KR')
endif
if(lMP==4)then
set ln0=3
call UnitAddAbility(lnZ,'A0KP')
endif
call UnitAddAbility(lnZ,'Aeth')
call PolledWait(.01)
set lEw=GetUnitsOfPlayerMatching(GetOwningPlayer(lnu),Condition(function Holy_Persuasion_Filter))
loop
exitwhen(CountUnitsInGroup(lEw)<=ln0)
set lnX=GroupPickRandomUnit(lEw)
call GroupRemoveUnit(lEw,lnX)
call RemoveUnit(lnX)
endloop
call DestroyGroup(lEw)
endfunction
function StartTrigger_Holy_Persuasion takes nothing returns nothing
set gg_trg_Holy_Persuasion=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Holy_Persuasion,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Holy_Persuasion,Condition(function Trig_Holy_Persuasion_Conditions))
call TriggerAddAction(gg_trg_Holy_Persuasion,function Trig_Holy_Persuasion_Actions)
endfunction
function InitTrig_Holy_Persuasion takes nothing returns nothing
endfunction
function Trig_Test_of_Faith_Conditions takes nothing returns boolean
if(not(GetSpellAbilityId()=='A0LV'))then
return false
endif
return true
endfunction
function Trig_Test_of_Faith_Actions takes nothing returns nothing
local unit lFB=GetSpellTargetUnit()
local unit lnu=GetTriggerUnit()
local location liD=GetUnitLoc(lnu)
local unit lJV
local integer lMP=GetUnitAbilityLevel(lnu,'A0LV')
local location ln3
local effect lfx
if(PlayerIsSentinel(GetOwningPlayer(lnu)))then
set ln3=GetRectCenter(gg_rct_SentinelHeroSpawn)
else
set ln3=GetRectCenter(gg_rct_ScourgeHeroSpawn)
endif
if(IsUnitAlly(lFB,GetOwningPlayer(lnu))==false)then
call UnitDamageTargetBJ(lnu,lFB,GetRandomInt(50*lMP,100*lMP),ATTACK_TYPE_HERO,DAMAGE_TYPE_MAGIC)
set lfx=AddSpecialEffectTargetUnitBJ("chest",lFB,"Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl")
call DestroyEffect(lfx)
else
if(IsUnitType(lFB,UNIT_TYPE_HERO))then
if(GetBoolean(H2Tx(GetOwningPlayer(lFB)),"L6")==false)then
set lfx=AddSpecialEffectTargetUnitBJ("origin",lFB,"Abilities\\Spells\\NightElf\\Starfall\\StarfallCaster.mdl")
call PolledWait(7-lMP)
call DestroyEffect(lfx)
call SetUnitPositionLoc(lFB,ln3)
endif
elseif(IsUnitOwnedByPlayer(lFB,GetOwningPlayer(lnu)))then
call SetUnitPositionLoc(lFB,ln3)
endif
endif
call RemoveLocation(liD)
call RemoveLocation(ln3)
endfunction
function StartTrigger_Test_of_Faith takes nothing returns nothing
set gg_trg_Test_of_Faith=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Test_of_Faith,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Test_of_Faith,Condition(function Trig_Test_of_Faith_Conditions))
call TriggerAddAction(gg_trg_Test_of_Faith,function Trig_Test_of_Faith_Actions)
endfunction
function InitTrig_Test_of_Faith takes nothing returns nothing
endfunction
function Trig_Healing_Ward_Conditions takes nothing returns boolean
return GetUnitTypeId(GetSummonedUnit())=='o00C'
endfunction
function Trig_Healing_Ward_Actions takes nothing returns nothing
call SetUnitAbilityLevelSwapped('A058',GetSummonedUnit(),GetUnitAbilityLevelSwapped('A047',GetSummoningUnit()))
endfunction
function StartTrigger_Healing_Ward takes nothing returns nothing
set gg_trg_Healing_Ward=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Healing_Ward,EVENT_PLAYER_UNIT_SUMMON)
call TriggerAddCondition(gg_trg_Healing_Ward,Condition(function Trig_Healing_Ward_Conditions))
call TriggerAddAction(gg_trg_Healing_Ward,function Trig_Healing_Ward_Actions)
endfunction
function InitTrig_Healing_Ward takes nothing returns nothing
endfunction
function Trig_Blade_Fury_Conditions takes nothing returns boolean
return GetSpellAbilityId()=='A0M1'
endfunction
function Omnislash_IsJugg takes nothing returns boolean
return GetUnitTypeId(GetTriggerUnit())=='Nbbc'
endfunction
function Omnislash_AntiSelect takes nothing returns nothing
call SelectUnitRemoveForPlayer(GetTriggerUnit(),GetOwningPlayer(GetTriggerUnit()))
endfunction
function Omnislash_Damage takes unit pOd,unit pFB returns nothing
local location ln3=GetUnitLoc(pFB)
local location lOD=GetUnitLoc(pOd)
local location liD=PolarProjectionBJ(ln3,50,GetRandomReal(0,360))
local effect lfx
call SetUnitPositionLocFacingBJ(pOd,liD,AngleBetweenPoints(lOD,ln3))
call SetUnitAnimation(pOd,"Attack")
call UnitDamageTargetBJ(pOd,pFB,GetRandomReal(150,250),ATTACK_TYPE_HERO,DAMAGE_TYPE_NORMAL)
set lfx=AddSpecialEffectTargetUnitBJ("chest",pOd,"Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl")
call RemoveLocation(ln3)
call RemoveLocation(lOD)
call RemoveLocation(liD)
call DestroyEffect(lfx)
endfunction
function Omnislash_Filter takes nothing returns boolean
if(GetUnitTypeId(GetFilterUnit())!='o003')then
if(GetUnitTypeId(GetFilterUnit())!='e00C')then
if(IsUnitAliveBJ(GetFilterUnit()))then
if(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false)then
if(GetUnitAbilityLevelSwapped('A04R',GetFilterUnit())!=1)then
return true
endif
endif
endif
endif
endif
return false
endfunction
function Omnislash_Strike takes unit pOd returns unit
local player lOf=GetOwningPlayer(pOd)
local unit lFB
local group lEw
local location lOD=GetUnitLoc(pOd)
local boolean lOF=false
set lEw=GetUnitsInRangeOfLocMatching(575,lOD,Condition(function Omnislash_Filter))
loop
exitwhen lOF
set lFB=GroupPickRandomUnit(lEw)
if(IsUnitVisible(lFB,lOf))then
if(IsUnitEnemy(lFB,lOf))then
set lOF=true
endif
endif
call GroupRemoveUnit(lEw,lFB)
if(IsUnitGroupEmptyBJ(lEw))then
if(lOF==false)then
set lFB=null
endif
set lOF=true
endif
endloop
call RemoveLocation(lOD)
call DestroyGroup(lEw)
set udg_u_DTAX_temp=lFB
return udg_u_DTAX_temp
endfunction
function Trig_Blade_Fury_Actions takes nothing returns nothing
local trigger lOG=CreateTrigger()
local unit lOd=GetTriggerUnit()
local player lOf=GetOwningPlayer(lOd)
local unit lFB=GetSpellTargetUnit()
local integer lMP=GetUnitAbilityLevel(lOd,'A0M1')
local integer lEq=2
local integer lEQ=3
local integer lOh=GetUnitAbilityLevel(lOd,'A05G')
if(lMP==2)then
set lEQ=5
endif
if(lMP==3)then
set lEQ=8
endif
if(lOh>0)then
call SetPlayerAbilityAvailable(lOf,'A05G',false)
endif
call SelectUnitRemoveForPlayer(lOd,lOf)
call SetUnitVertexColorBJ(lOd,100,100,100,50)
call SetUnitPathing(lOd,false)
call SetUnitInvulnerable(lOd,true)
call PolledWait(.01)
call TriggerRegisterPlayerSelectionEventBJ(lOG,lOf,true)
call TriggerAddCondition(lOG,Condition(function Omnislash_IsJugg))
call TriggerAddAction(lOG,function Omnislash_AntiSelect)
if(IsUnitAliveBJ(lOd))then
call Omnislash_Damage(lOd,lFB)
call PolledWait(.25)
loop
exitwhen lEq>lEQ
set lFB=Omnislash_Strike(lOd)
if(lFB!=null)then
if(IsUnitAliveBJ(lOd))then
call Omnislash_Damage(lOd,lFB)
call PolledWait(.25)
endif
else
set lEq=lEQ+1
endif
set lEq=lEq+1
endloop
endif
call DisableTrigger(lOG)
call SetUnitPathing(lOd,true)
call SetUnitInvulnerable(lOd,false)
call SetUnitScalePercent(lOd,100.,100.,100.)
call SetUnitVertexColorBJ(lOd,100,100,100,.0)
call SelectUnitAddForPlayer(lOd,lOf)
if(lOh>0)then
call UnitAddAbility(lOd,'A05G')
call SetUnitAbilityLevel(lOd,'A05G',lOh)
endif
call PolledWait(.01)
if(lOh>0)then
call SetPlayerAbilityAvailable(lOf,'A05G',true)
endif
endfunction
function StartTrigger_Blade_Fury takes nothing returns nothing
set gg_trg_Blade_Fury=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Blade_Fury,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Blade_Fury,Condition(function Trig_Blade_Fury_Conditions))
call TriggerAddAction(gg_trg_Blade_Fury,function Trig_Blade_Fury_Actions)
endfunction
function InitTrig_Blade_Fury takes nothing returns nothing
endfunction
function ManaLeak_Spell takes nothing returns boolean
return GetSpellAbilityId()=='A07Y'
endfunction
function ManaLeak_Main takes nothing returns nothing
call SetInteger(H2Tx(GetSpellTargetUnit()),"ManaLeakLevel",GetUnitAbilityLevel(GetTriggerUnit(),'A07Y'))
endfunction
function ManaLeak_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function ManaLeak_Spell))
call TriggerAddAction(ltt,function ManaLeak_Main)
endfunction
function InitTrig_Mana_Leak takes nothing returns nothing
endfunction
function ManaLeakDrain_Check takes nothing returns boolean
return GetUnitAbilityLevel(GetTriggerUnit(),'B03V')>0
endfunction
function ManaLeakDrain_Main takes nothing returns nothing
local unit lfo=GetTriggerUnit()
local integer lmZ=GetInteger(H2Tx(lfo),"ManaLeakLevel")
call SetUnitManaBJ(GetTriggerUnit(),(GetUnitStateSwap(UNIT_STATE_MANA,GetTriggerUnit())*(.2*(5.-I2R(lmZ)))))
endfunction
function ManaLeakDrain_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function ManaLeakDrain_Check))
call TriggerAddAction(ltt,function ManaLeakDrain_Main)
endfunction
function InitTrig_Mana_Leak_Effect takes nothing returns nothing
endfunction
function Trig_Chakra_Magic_Conditions takes nothing returns boolean
return GetSpellAbilityId()=='A07N'
endfunction
function Trig_Chakra_Magic_Actions takes nothing returns nothing
local unit lJV=GetTriggerUnit()
local unit lFB=GetSpellTargetUnit()
call PolledWait(.01)
call SetUnitManaBJ(lFB,(GetUnitStateSwap(UNIT_STATE_MANA,lFB)+(75.*I2R(GetUnitAbilityLevelSwapped('A07N',lJV)))))
endfunction
function StartTrigger_Chakra_Magic takes nothing returns nothing
set gg_trg_Chakra_Magic=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Chakra_Magic,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Chakra_Magic,Condition(function Trig_Chakra_Magic_Conditions))
call TriggerAddAction(gg_trg_Chakra_Magic,function Trig_Chakra_Magic_Actions)
endfunction
function InitTrig_Chakra_Magic takes nothing returns nothing
endfunction
function Trig_Illuminate_Conditions takes nothing returns boolean
return GetSpellAbilityId()=='A085'
endfunction
function Illuminate_Run takes nothing returns nothing
local string lf5=H2Tx(GetTriggeringTrigger())
local timer ltt=GetTimer(lf5,"Timer")
local string lOn=H2Tx(ltt)
local unit lJV=GetUnit(lOn,"Caster")
local integer lOL=GetInteger(lOn,"Stage")
local real lON=GetReal(lOn,"Direction")
local location liD=GetUnitLoc(lJV)
call CreateNUnitsAtLoc(1,'e00E',GetOwningPlayer(lJV),liD,bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit,'A087')
call SetUnitAbilityLevel(bj_lastCreatedUnit,'A087',lOL)
call IssuePointOrderByIdLoc(bj_lastCreatedUnit,OrderId("breathoffire"),PolarProjectionBJ(liD,200.,lON))
call KillUnit(lJV)
call RemoveLocation(liD)
call PauseTimer(ltt)
call TriggerRemoveAction(GetTriggeringTrigger(),GetTrigAction(lf5,"TriggerAction"))
call FastFlush(lf5)
call FastFlush(lOn)
call PolledWait(1)
call DestroyTimer(ltt)
call DestroyTriggerEx(GetTriggeringTrigger())
endfunction
function Illuminate_FX takes nothing returns nothing
local timer ltt=GetExpiredTimer()
local string lf5=H2Tx(ltt)
local integer lOL=GetInteger(lf5,"Stage")
local integer lOm=GetInteger(lf5,"MaxStage")
local unit lJV=GetUnit(lf5,"Caster")
set lOL=lOL+1
if(lOL>lOm)then
set lOL=lOm
endif
call SetUnitScalePercent(lJV,(100.+(15.*I2R(lOL))),(100.+(15.*I2R(lOL))),(100.+(15.*I2R(lOL))))
call SetInteger(lf5,"Stage",lOL)
endfunction
function Trig_Illuminate_Actions takes nothing returns nothing
local location liD=GetUnitLoc(GetTriggerUnit())
local timer ltt=CreateTimer()
local real lOO=.5
local trigger lOp=CreateTrigger()
local string lf5=H2Tx(ltt)
call TriggerRegisterUnitEvent(lOp,GetTriggerUnit(),EVENT_UNIT_SPELL_ENDCAST)
call SetHandle(H2Tx(lOp),"TriggerAction",TriggerAddAction(lOp,function Illuminate_Run))
call CreateNUnitsAtLoc(1,'u00J',GetOwningPlayer(GetTriggerUnit()),PolarProjectionBJ(liD,150.,GetUnitFacing(GetTriggerUnit())),GetUnitFacing(GetTriggerUnit()))
call RemoveLocation(liD)
call SetHandle(lf5,"OQ",lOp)
call SetInteger(lf5,"Stage",0)
call SetInteger(lf5,"MaxStage",2+GetUnitAbilityLevel(GetTriggerUnit(),'A085')*2)
call SetReal(lf5,"Direction",GetUnitFacing(GetTriggerUnit()))
call SetHandle(lf5,"Caster",bj_lastCreatedUnit)
call SetHandle(H2Tx(lOp),"Timer",ltt)
call TimerStart(ltt,lOO,true,function Illuminate_FX)
endfunction
function StartTrigger_Illuminate takes nothing returns nothing
set gg_trg_Illuminate=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Illuminate,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Illuminate,Condition(function Trig_Illuminate_Conditions))
call TriggerAddAction(gg_trg_Illuminate,function Trig_Illuminate_Actions)
endfunction
function InitTrig_Illuminate takes nothing returns nothing
endfunction
function ChainFrostSpell takes nothing returns boolean
if((GetSpellAbilityId()=='A05T'))then
return true
endif
if((GetSpellAbilityId()=='A08H'))then
return true
endif
return false
endfunction
function Trig_Chain_Frost_Conditions takes nothing returns boolean
if(not ChainFrostSpell())then
return false
endif
return true
endfunction
function ChainFrostSpellII takes nothing returns boolean
if(not(GetSpellAbilityId()=='A05T'))then
return false
endif
return true
endfunction
function ChainFrostFilter takes nothing returns boolean
if(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))then
return false
endif
if(GetUnitAbilityLevelSwapped('A04R',GetFilterUnit())==1)then
return false
endif
if(IsUnitAliveBJ(GetFilterUnit())==false)then
return false
endif
if(GetUnitTypeId(GetFilterUnit())=='o003')then
return false
endif
return true
endfunction
function Trig_Chain_Frost_Actions takes nothing returns nothing
local player lSU=GetOwningPlayer(GetTriggerUnit())
local integer lSv=0
local integer lSV
local unit lSw
local unit lSW
local unit loK
local integer lEq
local integer lEQ
local group lSx=CreateGroup()
local group lSX=CreateGroup()
local unit lnX
local location lSy
local location lSY
local location lnG=GetUnitLoc(GetSpellAbilityUnit())
if(ChainFrostSpellII())then
set lSV=GetUnitAbilityLevelSwapped('A05T',GetTriggerUnit())
else
set lSV=(GetUnitAbilityLevelSwapped('A08H',GetTriggerUnit())+1)
endif
set lSw=GetSpellTargetUnit()
set lSy=GetUnitLoc(lSw)
set lSW=CreateUnitAtLoc(lSU,'e009',lnG,bj_UNIT_FACING)
call IssuePointOrderByIdLoc(lSW,OrderId("move"),lSy)
call SetUnitPathing(lSW,false)
call UnitAddAbility(lSW,'Aloc')
call SetUnitInvulnerable(lSW,true)
set lSY=GetUnitLoc(lSW)
call PolledWait(((DistanceBetweenPoints(lSY,lSy)-90.)/575.))
loop
exitwhen lSv>5
set lSv=(lSv+1)
call RemoveLocation(lSy)
set lSy=GetUnitLoc(lSw)
set loK=CreateUnitAtLoc(lSU,'e00C',lSy,bj_UNIT_FACING)
call UnitAddAbility(loK,'A091')
call SetUnitAbilityLevelSwapped('A091',loK,lSV)
call IssueTargetOrderById(loK,OrderId("frostnova"),lSw)
call SetUnitInvulnerable(loK,true)
call SetUnitPathing(loK,false)
call UnitAddAbility(loK,'Aloc')
call UnitApplyTimedLifeBJ(2.,'BTLF',loK)
call RemoveUnit(lSW)
if(lSv<6)then
call GroupClear(lSx)
call DestroyGroup(lSX)
set lSX=GetUnitsInRangeOfLocMatching(600.,lSy,Condition(function ChainFrostFilter))
loop
set lnX=FirstOfGroup(lSX)
exitwhen lnX==null
if(IsUnitEnemy(lnX,lSU))then
if(lnX!=lSw)then
if(IsUnitVisible(lnX,lSU))then
call GroupAddUnit(lSx,lnX)
endif
endif
endif
call GroupRemoveUnit(lSX,lnX)
endloop
if(IsUnitGroupEmptyBJ(lSx)==false)then
call RemoveLocation(lSy)
set lSy=GetUnitLoc(lSw)
set lSW=CreateUnitAtLoc(lSU,'e009',lSy,bj_UNIT_FACING)
call RemoveLocation(lSY)
set lSY=GetUnitLoc(lSW)
call RemoveLocation(lSy)
set lSw=GroupPickRandomUnit(lSx)
set lSy=GetUnitLoc(lSw)
call IssuePointOrderByIdLoc(lSW,OrderId("move"),lSy)
call SetUnitPathing(lSW,false)
call UnitAddAbility(lSW,'Aloc')
call SetUnitInvulnerable(lSW,true)
call PolledWait(((DistanceBetweenPoints(lSY,lSy)-90.)/575.))
else
set lSv=99
endif
endif
endloop
call RemoveLocation(lSY)
call RemoveLocation(lSy)
call RemoveLocation(lnG)
call DestroyGroup(lSx)
call DestroyGroup(lSX)
endfunction
function StartTrigger_Chain_Frost takes nothing returns nothing
set gg_trg_Chain_Frost=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Chain_Frost,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Chain_Frost,Condition(function Trig_Chain_Frost_Conditions))
call TriggerAddAction(gg_trg_Chain_Frost,function Trig_Chain_Frost_Actions)
endfunction
function InitTrig_Chain_Frost takes nothing returns nothing
endfunction
function Trig_Storm_Seeker_Actions takes nothing returns nothing
local unit fw=GetTriggerUnit()
local unit Jz=CreateUnit(GetOwningPlayer(fw),'e00E',GetUnitX(fw),GetUnitY(fw),0)
call UnitAddAbility(Jz,'A0PG')
call IssueTargetOrderById(Jz,OrderId("hex"),fw)
endfunction
function Trig_Storm_Seeker_Conditions takes nothing returns boolean
return GetLearnedSkill()=='A04B'and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function StartTrigger_Storm_Seeker takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddAction(t,function Trig_Storm_Seeker_Actions)
call TriggerAddCondition(t,Condition(function Trig_Storm_Seeker_Conditions))
endfunction
function InitTrig_Storm_Seeker takes nothing returns nothing
endfunction
function SpiritBearSummon_Spell takes nothing returns boolean
return GetSpellAbilityId()=='A0A5'
endfunction
function SpiritBearSummon_Check takes nothing returns boolean
if((GetUnitTypeId(GetFilterUnit())=='n01G'))then
return true
endif
if((GetUnitTypeId(GetFilterUnit())=='n01C'))then
return true
endif
if((GetUnitTypeId(GetFilterUnit())=='n018'))then
return true
endif
if((GetUnitTypeId(GetFilterUnit())=='n004'))then
return true
endif
return false
endfunction
function SpiritBearSummon_Items takes nothing returns nothing
local string lf5=H2Tx(GetOwningPlayer(GetTriggerUnit()))
local unit lHy=GetUnit(lf5,"BearItemHolder")
local unit lqL=GetUnit(lf5,"MyBear")
if lHy!=null then
call UnitAddItem(lqL,UnitRemoveItemFromSlot(lHy,0))
call UnitAddItem(lqL,UnitRemoveItemFromSlot(lHy,1))
call UnitAddItem(lqL,UnitRemoveItemFromSlot(lHy,2))
call UnitAddItem(lqL,UnitRemoveItemFromSlot(lHy,3))
call UnitAddItem(lqL,UnitRemoveItemFromSlot(lHy,4))
call UnitAddItem(lqL,UnitRemoveItemFromSlot(lHy,5))
endif
endfunction
function SpiritBearSummon_Main takes nothing returns nothing
local unit lfo=GetTriggerUnit()
local player lEk=GetOwningPlayer(lfo)
local location liD=GetUnitLoc(lfo)
local boolexpr lEW=Condition(function SpiritBearSummon_Check)
local group lEw=CreateGroup()
local integer lmZ=GetUnitAbilityLevel(lfo,'A0A5')
local string lf5=H2Tx(lEk)
local boolean lqM
call GroupEnumUnitsOfPlayer(lEw,GetOwningPlayer(lfo),lEW)
call DestroyBoolExpr(lEW)
set lqM=CountUnitsInGroup(lEw)==0
if(lmZ==1 and lqM)then
call CreateNUnitsAtLoc(1,'n004',GetOwningPlayer(GetTriggerUnit()),liD,bj_UNIT_FACING)
call SetHandle(lf5,"MyBear",bj_lastCreatedUnit)
call AddSpecialEffectTargetUnitBJ("chest",bj_lastCreatedUnit,"Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl")
elseif(lmZ==2 and lqM)then
call CreateNUnitsAtLoc(1,'n018',GetOwningPlayer(GetTriggerUnit()),liD,bj_UNIT_FACING)
call SetHandle(lf5,"MyBear",bj_lastCreatedUnit)
call AddSpecialEffectTargetUnitBJ("chest",bj_lastCreatedUnit,"Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl")
elseif(lmZ==3 and lqM)then
call CreateNUnitsAtLoc(1,'n01C',GetOwningPlayer(GetTriggerUnit()),liD,bj_UNIT_FACING)
call SetHandle(lf5,"MyBear",bj_lastCreatedUnit)
call AddSpecialEffectTargetUnitBJ("chest",bj_lastCreatedUnit,"Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl")
elseif(lmZ==4 and lqM)then
call CreateNUnitsAtLoc(1,'n01G',GetOwningPlayer(GetTriggerUnit()),liD,bj_UNIT_FACING)
call SetHandle(lf5,"MyBear",bj_lastCreatedUnit)
call SpiritBearSummon_Items()
call AddSpecialEffectTargetUnitBJ("chest",bj_lastCreatedUnit,"Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl")
endif
call SetUnitAbilityLevel(bj_lastCreatedUnit,'A09Y',lmZ)
call DestroyGroup(lEw)
call RemoveLocation(liD)
endfunction
function SpiritBearSummon_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function SpiritBearSummon_Spell))
call TriggerAddAction(ltt,function SpiritBearSummon_Main)
endfunction
function InitTrig_Spirit_Bear_Cast takes nothing returns nothing
endfunction
function Trig_Spirit_Bear_Learn_Conditions takes nothing returns boolean
return GetLearnedSkill()=='A0A5'and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function SpiritBearCreate_Check takes nothing returns boolean
if((GetUnitTypeId(GetFilterUnit())=='n01C'))then
return true
endif
if((GetUnitTypeId(GetFilterUnit())=='n018'))then
return true
endif
if((GetUnitTypeId(GetFilterUnit())=='n004'))then
return true
endif
return false
endfunction
function Trig_Spirit_Bear_Learn_Actions takes nothing returns nothing
local unit lfo=GetTriggerUnit()
local player lEk=GetOwningPlayer(lfo)
local location liD=GetUnitLoc(lfo)
local boolexpr lEW=Condition(function SpiritBearCreate_Check)
local group lEw=CreateGroup()
local integer lmZ=GetUnitAbilityLevel(lfo,'A0A5')
local string lf5=H2Tx(lEk)
local integer lqO
local unit lqL
local real lqp
call GroupEnumUnitsOfPlayer(lEw,GetOwningPlayer(lfo),lEW)
call DestroyBoolExpr(lEW)
set lqO=CountUnitsInGroup(lEw)
if(lqO>1)then
call BJDebugMsg("Bug with learn bear")
elseif(lqO==1)then
set lqL=FirstOfGroup(lEw)
set lqp=GetUnitLifePercent(lqL)
set liD=GetUnitLoc(lqL)
call RemoveUnit(lqL)
if(lmZ==2)then
call CreateNUnitsAtLoc(1,'n018',GetOwningPlayer(GetTriggerUnit()),liD,bj_UNIT_FACING)
call AddSpecialEffectTargetUnitBJ("chest",bj_lastCreatedUnit,"Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl")
elseif(lmZ==3)then
call CreateNUnitsAtLoc(1,'n01C',GetOwningPlayer(GetTriggerUnit()),liD,bj_UNIT_FACING)
call AddSpecialEffectTargetUnitBJ("chest",bj_lastCreatedUnit,"Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl")
elseif(lmZ==4)then
call CreateNUnitsAtLoc(1,'n01G',GetOwningPlayer(GetTriggerUnit()),liD,bj_UNIT_FACING)
call AddSpecialEffectTargetUnitBJ("chest",bj_lastCreatedUnit,"Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl")
endif
call SetUnitLifePercentBJ(bj_lastCreatedUnit,lqp)
call SetHandle(lf5,"MyBear",bj_lastCreatedUnit)
endif
call DestroyGroup(lEw)
endfunction
function StartTrigger_Spirit_Bear_Learn takes nothing returns nothing
set gg_trg_Spirit_Bear_Learn=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Spirit_Bear_Learn,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(gg_trg_Spirit_Bear_Learn,Condition(function Trig_Spirit_Bear_Learn_Conditions))
call TriggerAddAction(gg_trg_Spirit_Bear_Learn,function Trig_Spirit_Bear_Learn_Actions)
endfunction
function InitTrig_Spirit_Bear_Learn takes nothing returns nothing
endfunction
function Trig_Spirit_Bear_AutoReturn_Conditions takes nothing returns boolean
return GetUnitTypeId(GetAttacker())=='n01G'or GetUnitTypeId(GetAttacker())=='n01C'or GetUnitTypeId(GetAttacker())=='n018'or GetUnitTypeId(GetAttacker())=='n004'
endfunction
function Trig_Spirit_Bear_AutoReturn_Actions takes nothing returns nothing
local unit lqL=GetAttacker()
local unit lqQ=udg_uA_DTAX_player_hero_unit[GetPlayerId(GetOwningPlayer(lqL))]
if((GetUnitX(lqQ)-GetUnitX(lqL))*(GetUnitX(lqQ)-GetUnitX(lqL))+(GetUnitY(lqQ)-GetUnitY(lqL))*(GetUnitY(lqQ)-GetUnitY(lqL))>=2250000)then
call SetUnitX(lqL,GetUnitX(lqQ)+GetRandomReal(25,50)*Cos(GetRandomReal(0,360)))
call SetUnitY(lqL,GetUnitY(lqQ)+GetRandomReal(25,50)*Sin(GetRandomReal(0,360)))
endif
endfunction
function StartTrigger_Spirit_Bear_AutoReturn takes nothing returns nothing
set gg_trg_Spirit_Bear_AutoReturn=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Spirit_Bear_AutoReturn,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(gg_trg_Spirit_Bear_AutoReturn,Condition(function Trig_Spirit_Bear_AutoReturn_Conditions))
call TriggerAddAction(gg_trg_Spirit_Bear_AutoReturn,function Trig_Spirit_Bear_AutoReturn_Actions)
endfunction
function InitTrig_Spirit_Bear_AutoReturn takes nothing returns nothing
endfunction
function Trig_Spirit_Bear_Return_Conditions takes nothing returns boolean
return GetSpellAbilityId()=='A0A7'
endfunction
function Trig_Spirit_Bear_Return_Actions takes nothing returns nothing
local unit lqL=GetTriggerUnit()
local unit lqQ=udg_uA_DTAX_player_hero_unit[GetPlayerId(GetOwningPlayer(lqL))]
call SetUnitX(lqL,GetUnitX(lqQ)+GetRandomReal(25,50)*Cos(GetRandomReal(0,360)))
call SetUnitY(lqL,GetUnitY(lqQ)+GetRandomReal(25,50)*Sin(GetRandomReal(0,360)))
endfunction
function StartTrigger_Spirit_Bear_Return takes nothing returns nothing
set gg_trg_Spirit_Bear_Return=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Spirit_Bear_Return,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Spirit_Bear_Return,Condition(function Trig_Spirit_Bear_Return_Conditions))
call TriggerAddAction(gg_trg_Spirit_Bear_Return,function Trig_Spirit_Bear_Return_Actions)
endfunction
function InitTrig_Spirit_Bear_Return takes nothing returns nothing
endfunction
function Trig_Synergy_Conditions takes nothing returns boolean
return GetLearnedSkill()=='A0A8'and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function Trig_Synergy_Actions takes nothing returns nothing
call SetPlayerTechResearched(GetOwningPlayer(GetTriggerUnit()),'R000',GetPlayerTechCount(GetOwningPlayer(GetTriggerUnit()),'R000',true)+1)
call SetPlayerTechResearched(GetOwningPlayer(GetTriggerUnit()),'R001',GetPlayerTechCount(GetOwningPlayer(GetTriggerUnit()),'R001',true)+1)
endfunction
function StartTrigger_Synergy takes nothing returns nothing
set gg_trg_Synergy=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Synergy,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(gg_trg_Synergy,Condition(function Trig_Synergy_Conditions))
call TriggerAddAction(gg_trg_Synergy,function Trig_Synergy_Actions)
endfunction
function InitTrig_Synergy takes nothing returns nothing
endfunction
function Trig_Spirit_Bear_Death_Conditions takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='n01G'or GetUnitTypeId(GetTriggerUnit())=='n01C'or GetUnitTypeId(GetTriggerUnit())=='n018'or GetUnitTypeId(GetTriggerUnit())=='n004')and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function SpiritBearDeath_SafeItems takes nothing returns nothing
local string lf5=H2Tx(GetOwningPlayer(GetTriggerUnit()))
local unit lHy=GetUnit(lf5,"BearItemHolder")
local unit lqL=GetUnit(lf5,"MyBear")
local integer lxx
local integer lyy
if lHy==null then
if PlayerIsSentinel(GetOwningPlayer(lqL))then
set lxx=-6390
set lyy=-5615
else
set lxx=5875
set lyy=5000
endif
set lHy=CreateUnit(GetOwningPlayer(GetTriggerUnit()),'e01F',lxx,lyy,0)
call SetHandle(lf5,"BearItemHolder",lHy)
endif
if(GetItemTypeId(GetEnumItem())!='pspd'and GetItemTypeId(GetEnumItem())!='oflg')then
call UnitAddItem(lHy,GetEnumItem())
endif
call ShowUnit(lHy,true)
endfunction
function Trig_Spirit_Bear_Death_Actions takes nothing returns nothing
local location liD=GetUnitLoc(GetTriggerUnit())
local rect lMx=RectFromCenterSizeBJ(liD,300.,150.)
local unit lqQ=udg_uA_DTAX_player_hero_unit[GetPlayerId(GetOwningPlayer(GetTriggerUnit()))]
call SetHeroXP(lqQ,(GetHeroXP(lqQ)-(GetHeroXP(lqQ)/('}'-(25*GetUnitAbilityLevel(lqQ,'A0A5'))))),false)
call UnitDamageTargetBJ(GetKillingUnit(),lqQ,(100.*I2R(GetUnitAbilityLevel(lqQ,'A0A5'))),ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL)
call EnumItemsInRectBJ(lMx,function SpiritBearDeath_SafeItems)
call RemoveLocation(liD)
call RemoveRect(lMx)
endfunction
function StartTrigger_Spirit_Bear_Death takes nothing returns nothing
set gg_trg_Spirit_Bear_Death=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Spirit_Bear_Death,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(gg_trg_Spirit_Bear_Death,Condition(function Trig_Spirit_Bear_Death_Conditions))
call TriggerAddAction(gg_trg_Spirit_Bear_Death,function Trig_Spirit_Bear_Death_Actions)
endfunction
function InitTrig_Spirit_Bear_Death takes nothing returns nothing
endfunction
function Trig_Spirit_KillBear_Conditions takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='N013'or GetUnitTypeId(GetTriggerUnit())=='N01O'or GetUnitTypeId(GetTriggerUnit())=='N015'or GetUnitTypeId(GetTriggerUnit())=='N014')and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function Trig_Spirit_KillBear_Actions takes nothing returns nothing
local unit lqL=GetUnit(H2Tx(GetOwningPlayer(GetTriggerUnit())),"MyBear")
call KillUnit(lqL)
endfunction
function StartTrigger_Spirit_KillBear takes nothing returns nothing
set gg_trg_Spirit_KillBear=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Spirit_KillBear,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(gg_trg_Spirit_KillBear,Condition(function Trig_Spirit_KillBear_Conditions))
call TriggerAddAction(gg_trg_Spirit_KillBear,function Trig_Spirit_KillBear_Actions)
endfunction
function InitTrig_Spirit_KillBear takes nothing returns nothing
endfunction
function Coil_Spell takes nothing returns boolean
return GetSpellAbilityId()=='A0I3'
endfunction
function Coil_Damage takes nothing returns nothing
local timer ltt=GetExpiredTimer()
local string lf5=H2Tx(ltt)
local unit lfU=GetUnit(lf5,"Hero")
local real lf7=GetReal(lf5,"Damage")
call UnitDamageTarget(lfU,lfU,lf7,false,true,ATTACK_TYPE_HERO,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)
call FastFlush(lf5)
call PauseTimer(ltt)
call DestroyTimer(ltt)
endfunction
function Coil_Main takes nothing returns nothing
local unit lfU=GetTriggerUnit()
local unit lFB=GetSpellTargetUnit()
local real lf7=25+25*GetUnitAbilityLevel(lfU,'A0I3')
local timer ltt=CreateTimer()
local string lf5=H2Tx(ltt)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",lFB,"origin"))
if IsUnitAlly(lFB,GetOwningPlayer(lfU))then
call SetUnitState(lFB,UNIT_STATE_LIFE,GetUnitState(lFB,UNIT_STATE_LIFE)+2*lf7)
else
call UnitDamageTarget(lfU,lFB,2*lf7,false,true,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)
endif
call SetHandle(lf5,"Hero",lfU)
call SetReal(lf5,"Damage",lf7)
call TimerStart(ltt,0,false,function Coil_Damage)
endfunction
function Coil_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function Coil_Spell))
call TriggerAddAction(ltt,function Coil_Main)
endfunction
function InitTrig_Death_Coil takes nothing returns nothing
endfunction
function Aphotic_Spell takes nothing returns boolean
return GetSpellAbilityId()=='A0MF'
endfunction
function Aphotic_SpellII takes nothing returns boolean
return GetSpellAbilityId()=='A0MF'
endfunction
function Aphotic_AntiDoom takes nothing returns nothing
if GetUnitAbilityLevel(GetSpellTargetUnit(),'BNdo')!=0 then
call DropOrder(GetTriggerUnit())
call SimError(GetOwningPlayer(GetTriggerUnit()),"Cannot use Aphotic Shield on Doomed Unit")
endif
endfunction
function Aphotic_Filter takes nothing returns boolean
if(IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))then
return false
endif
if(GetUnitAbilityLevelSwapped('A04R',GetFilterUnit())!=0)then
return false
endif
if(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))then
return false
endif
return true
endfunction
function Aphotic_ExplodeDamage takes nothing returns nothing
set bj_lastCreatedUnit=CreateUnit(GetOwningPlayer(udg_u_DTAX_temp),'e00E',GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit,'A0MJ')
call SetUnitAbilityLevel(bj_lastCreatedUnit,'A0MJ',GetUnitAbilityLevel(udg_u_DTAX_temp,'A0MF'))
call IssueTargetOrderById(bj_lastCreatedUnit,OrderId("forkedlightning"),GetEnumUnit())
endfunction
function Aphotic_Explode takes nothing returns nothing
local location liD=GetUnitLoc(GetTriggerUnit())
local group lEw=GetUnitsInRangeOfLocMatching(700,liD,Condition(function Aphotic_Filter))
call ForGroup(lEw,function Aphotic_ExplodeDamage)
call DestroyGroup(lEw)
call RemoveLocation(liD)
endfunction
function Aphotic_Heal takes nothing returns nothing
local string lf5=H2Tx(GetTriggeringTrigger())
local real lrc=GetReal(lf5,"AphoticLife")
if(lrc<GetEventDamage())then
call DelayedDamageCheck(GetTriggerUnit(),lrc)
call DestroyEffect(GetFX(lf5,"AphoticFX"))
call DisableTrigger(GetTriggeringTrigger())
call SetBoolean(lf5,"AphoticDone",true)
set udg_u_DTAX_temp=GetUnit(lf5,"AphoticOwner")
call Aphotic_Explode()
elseif(GetEventDamage()>0)then
call DelayedDamageCheck(GetTriggerUnit(),GetEventDamage())
call SetReal(lf5,"AphoticLife",lrc-GetEventDamage())
endif
endfunction
function Aphotic_Setting takes nothing returns nothing
local trigger ltt=CreateTrigger()
local string lf5=H2Tx(ltt)
local triggeraction lta=TriggerAddAction(ltt,function Aphotic_Heal)
call TriggerRegisterUnitEvent(ltt,GetSpellTargetUnit(),EVENT_UNIT_DAMAGED)
call UnitRemoveBuffsBJ(1,GetSpellTargetUnit())
call SetReal(lf5,"AphoticLife",75+50*GetUnitAbilityLevel(GetTriggerUnit(),'A0MF'))
call SetHandle(lf5,"AphoticFX",AddSpecialEffectTarget("war3mapImported\\Defensive Barrier big.mdx",GetSpellTargetUnit(),"chest"))
call SetHandle(lf5,"AphoticOwner",GetTriggerUnit())
call SetBoolean(lf5,"AphoticDone",false)
call PolledWait(20)
if(GetBoolean(lf5,"AphoticDone")==false)then
call DestroyEffect(GetFX(lf5,"AphoticFX"))
endif
call FastFlush(lf5)
call TriggerRemoveAction(ltt,lta)
call DestroyTriggerEx(ltt)
endfunction
function Aphotic_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(ltt,Condition(function Aphotic_SpellII))
call TriggerAddAction(ltt,function Aphotic_AntiDoom)
set udg_triggerl134=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_triggerl134,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(udg_triggerl134,Condition(function Aphotic_Spell))
call TriggerAddAction(udg_triggerl134,function Aphotic_Setting)
endfunction
function InitTrig_Aphotic_Shield takes nothing returns nothing
endfunction
function BurrowTime_Spell takes nothing returns boolean
return GetLearnedSkill()=='A0NS'and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function BurrowTime_Main takes nothing returns nothing
local string lf5=H2Tx(GetTriggeringTrigger())
local boolean lrF=GetBoolean(lf5,"BTOn")
local boolean lrg=GetBoolean(lf5,"BTDuration")
if(lrg)then
call DelayedDamageCheck(GetTriggerUnit(),GetEventDamage())
elseif(lrF==false and((GetTriggerEventId()==EVENT_UNIT_DAMAGED and GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)<400)or(GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT)))then
call UnitRemoveBuffsBJ(1,GetTriggerUnit())
if(GetTriggerEventId()==EVENT_UNIT_DAMAGED)then
call DisableTrigger(GetTriggeringTrigger())
call IssueImmediateOrderById(GetTriggerUnit(),OrderId("windwalk"))
call EnableTrigger(GetTriggeringTrigger())
endif
set lrF=true
set lrg=true
call SetBoolean(lf5,"BTOn",lrF)
call SetBoolean(lf5,"BTDuration",lrg)
call SetHandle(lf5,"BTFX",AddSpecialEffectTarget("Abilities\\Spells\\Undead\\Unsummon\\UnsummonTarget.mdl",GetTriggerUnit(),"origin"))
call ExecuteFunc("EndDuration"+I2S(2+GetUnitAbilityLevel(GetTriggerUnit(),'A0NS')))
call ExecuteFunc("BurrowTime_Off")
endif
endfunction
function BurrowTime_Event takes nothing returns boolean
if(GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT)then
if(GetSpellAbilityId()=='A0NS')then
return true
endif
endif
if(GetTriggerEventId()==EVENT_UNIT_DAMAGED)then
if GetEventDamage()>1 then
return true
endif
endif
return false
endfunction
function BurrowTime_Run takes nothing returns nothing
local trigger ltt
if(GetUnitAbilityLevel(GetTriggerUnit(),'A0NS')==1)then
set ltt=CreateTrigger()
call SetBoolean(H2Tx(ltt),"BTOn",false)
call TriggerRegisterUnitEvent(ltt,GetTriggerUnit(),EVENT_UNIT_DAMAGED)
call TriggerRegisterUnitEvent(ltt,GetTriggerUnit(),EVENT_UNIT_SPELL_EFFECT)
call TriggerAddAction(ltt,function BurrowTime_Main)
call TriggerAddCondition(ltt,Condition(function BurrowTime_Event))
endif
endfunction
function BurrowTime_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(ltt,Condition(function BurrowTime_Spell))
call TriggerAddAction(ltt,function BurrowTime_Run)
endfunction
function InitTrig_Borrowed_Time takes nothing returns nothing
endfunction
function MarkOfTheAbyss_Check takes nothing returns boolean
return GetUnitAbilityLevel(GetTriggerUnit(),'B066')>0
endfunction
function MarkOfTheAbyss_Main takes nothing returns nothing
local unit lKg=GetAttacker()
local unit lFB=GetTriggerUnit()
local unit lSourceHero
local integer lmZ=GetUnitAbilityLevel(lKg,'A0MG')
local unit lJV=CreateUnit(GetOwningPlayer(lKg),'e00E',GetUnitX(lKg),GetUnitY(lKg),0)
if lmZ>0 then
call SetInteger(H2Tx(lFB),"MarkOfTheAbyss|Level",lmZ)
else
set lmZ=GetInteger(H2Tx(lFB),"MarkOfTheAbyss|Level")
endif
call UnitAddAbility(lJV,'A0MH')
call SetUnitAbilityLevel(lJV,'A0MH',lmZ)
call IssueTargetOrderById(lJV,OrderId("bloodlust"),lKg)
endfunction
function MarkOfTheAbyss_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(ltt,Condition(function MarkOfTheAbyss_Check))
call TriggerAddAction(ltt,function MarkOfTheAbyss_Main)
endfunction
function InitTrig_Frostmourne takes nothing returns nothing
endfunction
function Static_Field_Roll takes nothing returns boolean
return(GetSpellAbilityId()=='A0JC'or GetSpellAbilityId()=='A020'or GetSpellAbilityId()=='A07C'or GetSpellAbilityId()=='A06L')and GetUnitAbilityLevel(GetTriggerUnit(),'A0N5')>0
endfunction
function Static_Field_Filter takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO) and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))and IsUnitVisible(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))
endfunction
function Static_Field_Damage takes nothing returns nothing
local real lQw=.96-.02*GetUnitAbilityLevel(GetTriggerUnit(),'A0N5')
local real lQW=GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)
local real lf7=lQW-lQW*lQw
call UnitDamageTarget(GetTriggerUnit(),GetEnumUnit(),lf7,true,true,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Orc\\Purge\\PurgeBuffTarget.mdl",GetEnumUnit(),"origin"))
endfunction
function Static_Field_Main takes nothing returns nothing
local location liD=GetUnitLoc(GetTriggerUnit())
local group lEw=CreateGroup()
local real lxx=GetLocationX(liD)
local real lyy=GetLocationY(liD)
local boolexpr lEW=Condition(function Static_Field_Filter)
call GroupEnumUnitsInRange(lEw,lxx,lyy,800,lEW)
call ForGroup(lEw,function Static_Field_Damage)
call RemoveLocation(liD)
call DestroyGroup(lEw)
call DestroyBoolExpr(lEW)
endfunction
function Static_Field_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function Static_Field_Roll))
call TriggerAddAction(ltt,function Static_Field_Main)
endfunction
function InitTrig_Static_Field takes nothing returns nothing
endfunction
function Lightning_Bolt_Spell takes nothing returns boolean
return GetSpellAbilityId()=='A0JC'
endfunction
function Lightning_Bolt_Main takes nothing returns nothing
local unit lfU=GetTriggerUnit()
local unit lFB=GetSpellTargetUnit()
local unit lJV=CreateUnit(GetOwningPlayer(lfU),'e000',GetUnitX(lFB),GetUnitY(lFB),0)
call UnitAddAbility(lJV,'A05S')
call SetUnitAbilityLevel(lJV,'A05S',GetUnitAbilityLevel(lfU,'A0JC'))
call IssueTargetOrderById(lJV,OrderId("chainlightning"),lFB)
call UnitApplyTimedLife(lJV,'BTLF',3)
call SetUnitPathing(lJV,false)
call UnitAddAbility(lJV,'Aloc')
endfunction
function Lightning_Bolt_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function Lightning_Bolt_Spell))
call TriggerAddAction(ltt,function Lightning_Bolt_Main)
endfunction
function InitTrig_Lightning_Bolt takes nothing returns nothing
endfunction
function Thundergod_Spell takes nothing returns boolean
if((GetSpellAbilityId()=='A07C'))then
return true
endif
if((GetSpellAbilityId()=='A06L'))then
return true
endif
return false
endfunction
function Trig_Thundergod_Wrath_Conditions takes nothing returns boolean
if(not Thundergod_Spell())then
return false
endif
return true
endfunction
function Thundergod_Valid takes nothing returns boolean
return GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))and GetUnitTypeId(GetFilterUnit())!='H00J',(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))))
endfunction
function Thundergod_NoAganim takes nothing returns boolean
if(not(GetSpellAbilityId()=='A07C'))then
return false
endif
return true
endfunction
function Thundergod_Main takes nothing returns nothing
local location liD=GetUnitLoc(GetEnumUnit())
if(Thundergod_NoAganim())then
call CreateNUnitsAtLoc(1,'e000',GetOwningPlayer(GetTriggerUnit()),liD,bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit,'A05S')
call SetUnitAbilityLevelSwapped('A05S',bj_lastCreatedUnit,(4+GetUnitAbilityLevelSwapped('A07C',GetTriggerUnit())))
call IssueTargetOrderById(bj_lastCreatedUnit,OrderId("chainlightning"),GetEnumUnit())
call UnitApplyTimedLifeBJ(3.,'BTLF',bj_lastCreatedUnit)
call SetUnitPathing(bj_lastCreatedUnit,false)
call SetUnitInvulnerable(bj_lastCreatedUnit,true)
call UnitAddAbility(bj_lastCreatedUnit,'Aloc')
else
call CreateNUnitsAtLoc(1,'e000',GetOwningPlayer(GetTriggerUnit()),liD,bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit,'A05S')
call SetUnitAbilityLevelSwapped('A05S',bj_lastCreatedUnit,(5+GetUnitAbilityLevelSwapped('A06L',GetTriggerUnit())))
call IssueTargetOrderById(bj_lastCreatedUnit,OrderId("chainlightning"),GetEnumUnit())
call UnitApplyTimedLifeBJ(3.,'BTLF',bj_lastCreatedUnit)
call SetUnitPathing(bj_lastCreatedUnit,false)
call SetUnitInvulnerable(bj_lastCreatedUnit,true)
call UnitAddAbility(bj_lastCreatedUnit,'Aloc')
endif
call RemoveLocation(liD)
endfunction
function Trig_Thundergod_Wrath_Actions takes nothing returns nothing
local group lEw=GetUnitsInRectMatching(bj_mapInitialPlayableArea,Condition(function Thundergod_Valid))
call ForGroupBJ(lEw,function Thundergod_Main)
call DestroyGroup(lEw)
endfunction
function StartTrigger_Thundergod_Wrath takes nothing returns nothing
set gg_trg_Thundergod_Wrath=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Thundergod_Wrath,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Thundergod_Wrath,Condition(function Trig_Thundergod_Wrath_Conditions))
call TriggerAddAction(gg_trg_Thundergod_Wrath,function Trig_Thundergod_Wrath_Actions)
endfunction
function InitTrig_Thundergod_Wrath takes nothing returns nothing
endfunction
function Trig_Reverse_Polarity_Conditions takes nothing returns boolean
if(not(GetSpellAbilityId()=='A06F'))then
return false
endif
return true
endfunction
function ReversePolarityNotRoshan takes nothing returns boolean
if(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false)then
if(GetUnitTypeId(GetFilterUnit())!='n00L')then
return true
endif
endif
return false
endfunction
function ReversePolarityCheck takes nothing returns boolean
return GetBooleanAnd(GetBooleanAnd(ReversePolarityNotRoshan(),(GetUnitAbilityLevelSwapped('A04R',GetFilterUnit())!=1)),GetBooleanAnd((IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))),(IsUnitDeadBJ(GetFilterUnit())==false)))
endfunction
function ReversePolarityMove takes nothing returns nothing
local location liD=GetUnitLoc(GetSpellAbilityUnit())
local location lng=PolarProjectionBJ(liD,GetRandomReal(20.,70.),GetRandomReal(0,360))
call SetUnitPositionLoc(GetEnumUnit(),lng)
call RemoveLocation(liD)
call RemoveLocation(lng)
endfunction
function Trig_Reverse_Polarity_Actions takes nothing returns nothing
local location liD=GetUnitLoc(GetTriggerUnit())
local group lEw=GetUnitsInRangeOfLocMatching(480.,liD,Condition(function ReversePolarityCheck))
call ForGroupBJ(lEw,function ReversePolarityMove)
call DestroyGroup(lEw)
call RemoveLocation(liD)
endfunction
function StartTrigger_Reverse_Polarity takes nothing returns nothing
set gg_trg_Reverse_Polarity=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Reverse_Polarity,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Reverse_Polarity,Condition(function Trig_Reverse_Polarity_Conditions))
call TriggerAddAction(gg_trg_Reverse_Polarity,function Trig_Reverse_Polarity_Actions)
endfunction
function InitTrig_Reverse_Polarity takes nothing returns nothing
endfunction
function Eclipse_Spell takes nothing returns boolean
return GetSpellAbilityId()=='A054'or GetSpellAbilityId()=='A00U'
endfunction
function Eclipse_Filter takes nothing returns boolean
local unit lOQ=GetFilterUnit()
if IsUnitType(lOQ,UNIT_TYPE_STRUCTURE)==false and GetUnitAbilityLevel(lOQ,'A04R')==0 then
if GetUnitState(lOQ,UNIT_STATE_LIFE)>0 and IsUnitVisible(lOQ,GetOwningPlayer(udg_u_DTAX_temp))and IsUnitEnemy(lOQ,GetOwningPlayer(udg_u_DTAX_temp))then
if GetInteger(H2Tx(udg_triggerl000),H2Tx(lOQ))<udg_i_DTAX_beastmaster_primal_roar_intel_gain_REF3 then
return true
endif
endif
endif
return false
endfunction
function Eclipse_Main takes nothing returns nothing
local trigger ltt=GetTriggeringTrigger()
local string lf5=H2Tx(ltt)
local unit lOs=GetUnit(lf5,"Luna")
local integer lOS=GetInteger(lf5,"Limit")
local integer lOt
local integer lOT
local integer lOu=GetUnitAbilityLevel(lOs,'A042')
local group lEw=CreateGroup()
local boolexpr lEW=Condition(function Eclipse_Filter)
local unit lFB
local unit lJV
if GetUnitAbilityLevel(lOs,'A054')>0 then
set lOt=4
else
set lOt=5
endif
if lOu==2 then
set lOT='A031'
elseif lOu==3 then
set lOT='A032'
elseif lOu==4 then
set lOT='A033'
else
set lOT='A05O'
endif
set udg_u_DTAX_temp=lOs
set udg_i_DTAX_beastmaster_primal_roar_intel_gain_REF3=lOt
set udg_triggerl000=ltt
call GroupEnumUnitsInRange(lEw,GetUnitX(lOs),GetUnitY(lOs),700,lEW)
call DestroyBoolExpr(lEW)
set lFB=GroupPickRandomUnit(lEw)
call DestroyGroup(lEw)
if lFB!=null then
call SetInteger(lf5,H2Tx(lFB),GetInteger(lf5,H2Tx(lFB))+1)
set lJV=CreateUnit(GetOwningPlayer(lOs),'e00C',GetUnitX(lOs),GetUnitY(lOs),0)
call UnitAddAbility(lJV,lOT)
call IssueTargetOrderById(lJV,OrderId("firebolt"),lFB)
call UnitApplyTimedLife(lJV,'BTLF',2.)
call SetUnitPathing(lJV,false)
call SetUnitInvulnerable(lJV,true)
call UnitAddAbility(lJV,'Aloc')
endif
set lOS=lOS-1
if lOS==0 then
call FastFlush(lf5)
call DestroyTrigger(ltt)
else
call SetInteger(lf5,"Limit",lOS)
endif
endfunction
function Eclipse_Set takes nothing returns nothing
local unit lOs=GetTriggerUnit()
local trigger ltt=CreateTrigger()
local string lf5=H2Tx(ltt)
local integer lOS
if GetSpellAbilityId()=='A054'then
set lOS=1+3*GetUnitAbilityLevel(lOs,'A054')
else
set lOS=4*GetUnitAbilityLevel(lOs,'A00U')
endif
call SetHandle(lf5,"Luna",lOs)
call SetInteger(lf5,"Limit",lOS)
call TriggerAddAction(ltt,function Eclipse_Main)
call TriggerExecute(ltt)
call TriggerRegisterTimerEvent(ltt,.5,true)
endfunction
function Eclipse_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function Eclipse_Spell))
call TriggerAddAction(ltt,function Eclipse_Set)
endfunction
function InitTrig_Lucent_Beam takes nothing returns nothing
endfunction
function Trig_Moon_Glaive_Conditions takes nothing returns boolean
if(not(GetLearnedSkill()=='A041'))then
return false
endif
return true
endfunction
function Trig_Moon_Glaive_Actions takes nothing returns nothing
local unit lOs=GetTriggerUnit()
local player lOw=GetOwningPlayer(lOs)
local integer lMP=GetUnitAbilityLevelSwapped('A041',GetTriggerUnit())
call SetPlayerTechResearchedSwap('Remg',lMP,lOw)
endfunction
function StartTrigger_Moon_Glaive takes nothing returns nothing
set gg_trg_Moon_Glaive=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Moon_Glaive,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(gg_trg_Moon_Glaive,Condition(function Trig_Moon_Glaive_Conditions))
call TriggerAddAction(gg_trg_Moon_Glaive,function Trig_Moon_Glaive_Actions)
endfunction
function InitTrig_Moon_Glaive takes nothing returns nothing
endfunction
function MorphColorShift_Main takes nothing returns nothing
local unit lfo=GetUnit(H2Tx(GetTriggeringTrigger()),"Morphling")
if GetUnitTypeId(lfo)!='O00P'then
call DisableTrigger(GetTriggeringTrigger())
elseif(GetUnitState(lfo,UNIT_STATE_LIFE)>0)then
call SetUnitVertexColorBJ(lfo,GetRandomReal(.0,255.),GetRandomReal(.0,255.),GetRandomReal(.0,255.),GetRandomReal(.0,10.))
endif
endfunction
function MorphColorShift_Run takes nothing returns nothing
local trigger ltt
if(GetBoolean(H2Tx(GetTriggerUnit()),"HasMorphling")==false)then
set ltt=CreateTrigger()
call SetHandle(H2Tx(ltt),"Morphling",GetTriggerUnit())
call SetHandle(H2Tx(GetTriggerUnit()),"ColorTrigger",ltt)
call TriggerAddAction(ltt,function MorphColorShift_Main)
call TriggerRegisterTimerEvent(ltt,2.,true)
call SetBoolean(H2Tx(GetTriggerUnit()),"HasMorphling",true)
call UnitAddItem(GetTriggerUnit(),CreateItem('I00E',GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit())))
endif
endfunction
function MorphColorShift_Check takes nothing returns boolean
return GetUnitTypeId(GetTriggerUnit())=='O00P'and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function MorphColorShift_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterEnterRectSimple(ltt,bj_mapInitialPlayableArea)
call TriggerAddCondition(ltt,Condition(function MorphColorShift_Check))
call TriggerAddAction(ltt,function MorphColorShift_Run)
endfunction
function InitTrig_VertexColorChanges takes nothing returns nothing
endfunction
function Morph_PushAgi takes nothing returns nothing
local unit lpV=GetUnit(H2Tx(GetTriggeringTrigger()),"Morphling")
if(GetHeroStatBJ(1,lpV,false)>2*GetUnitAbilityLevel(lpV,'A0KX')and GetUnitState(lpV,UNIT_STATE_MANA)>=20.)then
call SetUnitManaBJ(lpV,GetUnitState(lpV,UNIT_STATE_MANA)-20)
call ModifyHeroStat(1,lpV,1,2*GetUnitAbilityLevel(lpV,'A0KX'))
call ModifyHeroStat(0,lpV,0,2*GetUnitAbilityLevel(lpV,'A0KX'))
endif
endfunction
function Morph_PushStr takes nothing returns nothing
local unit lpV=GetUnit(H2Tx(GetTriggeringTrigger()),"Morphling")
if(GetHeroStatBJ(0,lpV,false)>2*GetUnitAbilityLevel(lpV,'A0KX')and GetUnitState(lpV,UNIT_STATE_MANA)>=20.)then
call SetUnitManaBJ(lpV,GetUnitState(lpV,UNIT_STATE_MANA)-20)
call ModifyHeroStat(0,lpV,1,2*GetUnitAbilityLevel(lpV,'A0KX'))
call ModifyHeroStat(1,lpV,0,2*GetUnitAbilityLevel(lpV,'A0KX'))
endif
endfunction
function Morph_OrderForMorph takes nothing returns boolean
if GetIssuedOrderId()==852549or GetIssuedOrderId()==852546then
if GetTriggerUnit()==GetUnit(H2Tx(GetTriggeringTrigger()),"Morphling")then
return true
endif
endif
return false
endfunction
function Morph_OrdersControl takes nothing returns nothing
local string lf5=H2Tx(GetTriggeringTrigger())
local trigger lpX=GetTrigger(lf5,"MorphStr")
local trigger lpy=GetTrigger(lf5,"MorphAgi")
if(GetIssuedOrderId()==OrderId("replenishlifeon"))then
call EnableTrigger(lpX)
call DisableTrigger(lpy)
endif
if(GetIssuedOrderId()==OrderId("replenishmanaon"))then
call DisableTrigger(lpX)
call EnableTrigger(lpy)
endif
endfunction
function Morph_OrderForMorphValid takes nothing returns boolean
if GetIssuedOrderId()==852550or GetIssuedOrderId()==852547then
if GetTriggerUnit()==GetUnit(H2Tx(GetTriggeringTrigger()),"Morphling")then
return true
endif
endif
return false
endfunction
function Morph_DisableOneOfMorphs takes nothing returns nothing
local string lf5=H2Tx(GetTriggeringTrigger())
local trigger lpX=GetTrigger(lf5,"MorphStr")
local trigger lpy=GetTrigger(lf5,"MorphAgi")
if(GetIssuedOrderId()==OrderId("replenishlifeoff"))then
call DisableTrigger(lpX)
endif
if(GetIssuedOrderId()==OrderId("replenishmanaoff"))then
call DisableTrigger(lpy)
endif
endfunction
function Morph_AddButtons takes nothing returns nothing
local unit lpV=GetTriggerUnit()
local trigger lp1
local trigger lp2
local trigger lpX
local trigger lpy
if(GetUnitAbilityLevel(lpV,'A0KX')==1)then
call UnitAddAbility(lpV,'A0KW')
set lpy=CreateTrigger()
call DisableTrigger(lpy)
call TriggerRegisterTimerEventPeriodic(lpy,1.)
call TriggerAddAction(lpy,function Morph_PushStr)
call SetHandle(H2Tx(lpy),"Morphling",lpV)
set lpX=CreateTrigger()
call DisableTrigger(lpX)
call TriggerRegisterTimerEventPeriodic(lpX,1.)
call TriggerAddAction(lpX,function Morph_PushAgi)
call SetHandle(H2Tx(lpX),"Morphling",lpV)
set lp1=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(lp1,EVENT_PLAYER_UNIT_ISSUED_ORDER)
call TriggerAddCondition(lp1,Condition(function Morph_OrderForMorph))
call TriggerAddAction(lp1,function Morph_OrdersControl)
call SetHandle(H2Tx(lp1),"MorphAgi",lpy)
call SetHandle(H2Tx(lp1),"MorphStr",lpX)
call SetHandle(H2Tx(lp1),"Morphling",lpV)
set lp2=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(lp2,EVENT_PLAYER_UNIT_ISSUED_ORDER)
call TriggerAddCondition(lp2,Condition(function Morph_OrderForMorphValid))
call TriggerAddAction(lp2,function Morph_DisableOneOfMorphs)
call SetHandle(H2Tx(lp2),"MorphAgi",lpy)
call SetHandle(H2Tx(lp2),"MorphStr",lpX)
call SetHandle(H2Tx(lp2),"Morphling",lpV)
else
call SetUnitAbilityLevel(lpV,'A0KW',GetUnitAbilityLevel(lpV,'A0KX'))
endif
endfunction
function Morph_Spell takes nothing returns boolean
return GetLearnedSkill()=='A0KX'and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function Morph_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(ltt,Condition(function Morph_Spell))
call TriggerAddAction(ltt,function Morph_AddButtons)
endfunction
function InitTrig_Morph takes nothing returns nothing
endfunction
function Adaptive_Strike_Spell takes nothing returns boolean
return GetSpellAbilityId()=='A0G6'and GetUnitTypeId(GetSpellTargetUnit())!='n00L'
endfunction
function Adaptive_Strike_Main takes nothing returns nothing
local unit lfo=GetTriggerUnit()
local unit lFB=GetSpellTargetUnit()
local integer lmZ=GetUnitAbilityLevel(lfo,'A0G6')
local unit lJV
local location lp5
local real lnM
if GetHeroAgi(lfo,true)>GetHeroStr(lfo,true)then
call UnitDamageTarget(lfo,lFB,(lmZ*.4+1)*GetHeroAgi(lfo,true)+(30*lmZ),true,true,ATTACK_TYPE_HERO,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
else
set lnM=Atan2(GetUnitY(lFB)-GetUnitY(lfo),GetUnitX(lFB)-GetUnitX(lfo))
set lp5=Location(GetUnitX(lFB)+200*Cos(lnM),GetUnitY(lFB)+200*Sin(lnM))
call SetUnitPositionLoc(lFB,lp5)
call EnumDestructablesInCircleBJ(200,lp5,function KillDestructableEnum)
call RemoveLocation(lp5)
set lJV=CreateUnit(GetOwningPlayer(lfo),'e00C',GetUnitX(lFB),GetUnitY(lFB),0)
call UnitAddAbility(lJV,'A0DU')
call SetUnitAbilityLevel(lJV,'A0DU',lmZ)
call IssueTargetOrderById(lJV,OrderId("firebolt"),lFB)
call UnitApplyTimedLife(lJV,'BTLF',1)
call SetUnitPathing(lJV,false)
call SetUnitInvulnerable(lJV,true)
call UnitAddAbility(lJV,'Aloc')
if GetHeroAgi(lfo,true)==GetHeroStr(lfo,true)then
call UnitDamageTarget(lfo,lFB,(lmZ*.4+1)*GetHeroAgi(lfo,true)+(30*lmZ),true,true,ATTACK_TYPE_HERO,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
endif
endif
endfunction
function Adaptive_Strike_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function Adaptive_Strike_Spell))
call TriggerAddAction(ltt,function Adaptive_Strike_Main)
endfunction
function InitTrig_Adaptive_Strike takes nothing returns nothing
endfunction
function Morph_Replicate_OnDeath takes nothing returns nothing
local trigger ltt=GetTriggeringTrigger()
local unit lfU=GetUnit(H2Tx(ltt),"Hero")
local unit lp7=GetUnit(H2Tx(lfU),"Replicate")
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl",GetUnitX(lp7),GetUnitY(lp7)))
call RemoveUnit(lp7)
call UnitRemoveAbility(lfU,'A0GC')
call SetPlayerAbilityAvailable(GetOwningPlayer(lfU),'A0G8',true)
call FastFlush(H2Tx(ltt))
call DestroyTriggerEx(ltt)
endfunction
function Replicate_BoundClonToCaster takes nothing returns nothing
local unit lfU=GetSummoningUnit()
local string lf5=H2Tx(lfU)
local unit lFB=GetUnit(lf5,"ReplicateTarget")
local unit lp7=GetSummonedUnit()
local trigger ltt
call SetPlayerAbilityAvailable(GetOwningPlayer(lfU),'A0G8',false)
call UnitAddAbility(lfU,'A0GC')
call SetUnitColor(lp7,GetPlayerColor(GetOwningPlayer(lFB)))
call SetHandle(lf5,"Replicate",lp7)
set ltt=CreateTrigger()
call TriggerRegisterUnitEvent(ltt,lfU,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(ltt,lp7,EVENT_UNIT_DEATH)
call TriggerAddAction(ltt,function Morph_Replicate_OnDeath)
call SetHandle(H2Tx(ltt),"Hero",lfU)
endfunction
function Replicate_Spell takes nothing returns boolean
return GetSpellAbilityId()=='A0G8'
endfunction
function Replicate_SaveTarget takes nothing returns nothing
local unit lfU=GetTriggerUnit()
local unit lFB=GetSpellTargetUnit()
call SetHandle(H2Tx(lfU),"ReplicateTarget",lFB)
endfunction
function Replicate_ClonCheck takes nothing returns boolean
return GetUnitAbilityLevel(GetSummonedUnit(),'B030')>0
endfunction
function Morph_Replicate_Spell takes nothing returns boolean
if GetSpellAbilityId()=='A0GC'then
return true
endif
return false
endfunction
function Morph_Replicate_Main takes nothing returns nothing
local unit lfU=GetTriggerUnit()
local string lf5=H2Tx(lfU)
local unit lp7=GetUnit(lf5,"Replicate")
local real lxx=GetUnitX(lp7)
local real lyy=GetUnitY(lp7)
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl",GetUnitX(lfU),GetUnitY(lfU)))
call KillUnit(lp7)
if not EuEu(lfU,lxx,lyy)then
call SetUnitX(lfU,lxx)
call SetUnitY(lfU,lyy)
call PanCameraToTimedForPlayer(GetOwningPlayer(lfU),lxx,lyy,0)
call IssueImmediateOrderById(lfU,OrderId("stop"))
else
call SimError(GetOwningPlayer(lfU),"Unable to Morph Replicate")
endif
endfunction
function Replicate_Init takes nothing returns nothing
local trigger ltt
set ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function Replicate_Spell))
call TriggerAddAction(ltt,function Replicate_SaveTarget)
set ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SUMMON)
call TriggerAddCondition(ltt,Condition(function Replicate_ClonCheck))
call TriggerAddAction(ltt,function Replicate_BoundClonToCaster)
set ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function Morph_Replicate_Spell))
call TriggerAddAction(ltt,function Morph_Replicate_Main)
endfunction
function InitTrig_Replicate takes nothing returns nothing
endfunction
function SirenSong_Sleep takes nothing returns nothing
local unit lfo=GetTriggerUnit()
local unit lJV=CreateUnit(GetOwningPlayer(lfo),'e00C',GetUnitX(lfo),GetUnitY(lfo),270)
call UnitAddAbility(lJV,'A07T')
call SetUnitAbilityLevel(lJV,'A07T',GetUnitAbilityLevel(lfo,'A07U'))
call UnitApplyTimedLife(lJV,'BTLF',1.)
call IssueTargetOrderById(lJV,OrderId("sleep"),GetEnumUnit())
call SetUnitPathing(lJV,false)
call SetUnitInvulnerable(lJV,true)
call UnitAddAbility(lJV,'Aloc')
endfunction
function SirenSong_Filter takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false
endfunction
function SirenSong_Main takes nothing returns nothing
local unit lfo=GetTriggerUnit()
local integer lmZ=GetUnitAbilityLevel(lfo,'A07U')
local group lEw=CreateGroup()
local boolexpr lPe=Condition(function SirenSong_Filter)
call GroupEnumUnitsInRange(lEw,GetUnitX(lfo),GetUnitY(lfo),500+500*lmZ,lPe)
call ForGroup(lEw,function SirenSong_Sleep)
call DestroyGroup(lEw)
call DestroyBoolExpr(lPe)
endfunction
function SirenSong_Spell takes nothing returns boolean
return GetSpellAbilityId()=='A07U'
endfunction
function SirenSong_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function SirenSong_Spell))
call TriggerAddAction(ltt,function SirenSong_Main)
endfunction
function InitTrig_Song_of_the_Siren takes nothing returns nothing
endfunction
function GravekeeperSpell takes nothing returns boolean
return GetLearnedSkill()=='A0MD'and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function GravekeeperDoDamage takes nothing returns nothing
if GetUnitAbilityLevel(GetEnumUnit(),'B064')>0 and GetEventDamage()>10 and IsUnitEnemy(GetEnumUnit(),GetOwningPlayer(GetTriggerUnit()))then
call UnitDamageTargetBJ(GetTriggerUnit(),GetEnumUnit(),.05*(GetUnitAbilityLevel(GetTriggerUnit(),'A0MD'))*GetEventDamage(),ATTACK_TYPE_HERO,DAMAGE_TYPE_MAGIC)
endif
endfunction
function GravekeeperMain takes nothing returns nothing
local group lEw
local unit lfo=GetTriggerUnit()
local real lf7=.05*(GetUnitAbilityLevel(lfo,'A0MD'))*GetEventDamage()
if(GetEventDamage()<1400)then
call SetWidgetLife(lfo,GetUnitStateSwap(UNIT_STATE_LIFE,lfo)+lf7)
set lEw=CreateGroup()
call GroupEnumUnitsInRange(lEw,GetUnitX(lfo),GetUnitY(lfo),600,null)
call ForGroup(lEw,function GravekeeperDoDamage)
call DestroyGroup(lEw)
endif
endfunction
function GravekeeperInitII takes nothing returns nothing
local trigger ltt
if GetUnitAbilityLevel(GetTriggerUnit(),'A0MD')==1 then
set ltt=CreateTrigger()
call TriggerRegisterUnitEvent(ltt,GetTriggerUnit(),EVENT_UNIT_DAMAGED)
call TriggerAddAction(ltt,function GravekeeperMain)
endif
endfunction
function GravekeeperInit takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(ltt,Condition(function GravekeeperSpell))
call TriggerAddAction(ltt,function GravekeeperInitII)
endfunction
function InitTrig_Gravekeeper_Cloak takes nothing returns nothing
endfunction
function RevenantSummon_DB takes nothing returns boolean
if((GetUnitTypeId(GetSummonedUnit())=='u003'))then
return true
endif
if((GetUnitTypeId(GetSummonedUnit())=='u005'))then
return true
endif
if((GetUnitTypeId(GetSummonedUnit())=='u009'))then
return true
endif
return false
endfunction
function Trig_Raise_Revenants_Conditions takes nothing returns boolean
if(not RevenantSummon_DB())then
return false
endif
return true
endfunction
function Trig_Raise_Revenants_Actions takes nothing returns nothing
call SetUnitAbilityLevel(GetSummonedUnit(),'A0E0',GetUnitAbilityLevel(GetSummoningUnit(),'A07K'))
endfunction
function StartTrigger_Raise_Revenants takes nothing returns nothing
set gg_trg_Raise_Revenants=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Raise_Revenants,EVENT_PLAYER_UNIT_SUMMON)
call TriggerAddCondition(gg_trg_Raise_Revenants,Condition(function Trig_Raise_Revenants_Conditions))
call TriggerAddAction(gg_trg_Raise_Revenants,function Trig_Raise_Revenants_Actions)
endfunction
function InitTrig_Raise_Revenants takes nothing returns nothing
endfunction
function Trig_Grave_Chill_Conditions takes nothing returns boolean
return GetSpellAbilityId()=='A08X'
endfunction
function Trig_Grave_Chill_Actions takes nothing returns nothing
local location liD=GetUnitLoc(GetSpellAbilityUnit())
call CreateNUnitsAtLocFacingLocBJ(1,'e00E',GetOwningPlayer(GetSpellAbilityUnit()),liD,liD)
call RemoveLocation(liD)
call UnitAddAbility(bj_lastCreatedUnit,'A09C')
call SetUnitAbilityLevelSwapped('A09C',bj_lastCreatedUnit,GetUnitAbilityLevelSwapped('A08X',GetSpellAbilityUnit()))
call IssueTargetOrderById(bj_lastCreatedUnit,OrderId("bloodlust"),GetSpellAbilityUnit())
endfunction
function StartTrigger_Grave_Chill takes nothing returns nothing
set gg_trg_Grave_Chill=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Grave_Chill,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Grave_Chill,Condition(function Trig_Grave_Chill_Conditions))
call TriggerAddAction(gg_trg_Grave_Chill,function Trig_Grave_Chill_Actions)
endfunction
function InitTrig_Grave_Chill takes nothing returns nothing
endfunction
function Trig_Soul_Assumption_Conditions takes nothing returns boolean
if(not(GetUnitTypeId(GetEnteringUnit())=='ndr1'))then
return false
endif
return true
endfunction
function Soul_Assumption_Spell takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A0C4',GetFilterUnit())!=0)
endfunction
function Soul_Assumption_Heal takes nothing returns nothing
call SetWidgetLife(GetEnumUnit(),((10.*I2R(GetUnitAbilityLevelSwapped('A0C4',GetEnumUnit())))+GetUnitStateSwap(UNIT_STATE_LIFE,GetEnumUnit())))
endfunction
function Trig_Soul_Assumption_Actions takes nothing returns nothing
local group lnG=GetUnitsOfPlayerMatching(GetOwningPlayer(GetEnteringUnit()),Condition(function Soul_Assumption_Spell))
call ForGroupBJ(lnG,function Soul_Assumption_Heal)
call DestroyGroup(lnG)
endfunction
function StartTrigger_Soul_Assumption takes nothing returns nothing
set gg_trg_Soul_Assumption=CreateTrigger()
call TriggerRegisterEnterRectSimple(gg_trg_Soul_Assumption,bj_mapInitialPlayableArea)
call TriggerAddCondition(gg_trg_Soul_Assumption,Condition(function Trig_Soul_Assumption_Conditions))
call TriggerAddAction(gg_trg_Soul_Assumption,function Trig_Soul_Assumption_Actions)
endfunction
function InitTrig_Soul_Assumption takes nothing returns nothing
endfunction
function LifeReaperSpell takes nothing returns boolean
return GetSpellAbilityId()=='A067'or GetSpellAbilityId()=='A08P'
endfunction
function LifeReaperMain takes nothing returns nothing
local integer ltI=GetUnitAbilityLevel(GetTriggerUnit(),'A067')
local integer ltj=GetUnitAbilityLevel(GetTriggerUnit(),'A08P')
if ltI==1 then
set udg_r_DTAX_necrolyte_reaperscythe_ratio=.4
endif
if ltI==2 or ltj==1 then
set udg_r_DTAX_necrolyte_reaperscythe_ratio=.6
endif
if ltI==3 or ltj==2 then
set udg_r_DTAX_necrolyte_reaperscythe_ratio=.9
endif
if ltj==3 then
set udg_r_DTAX_necrolyte_reaperscythe_ratio=1.1
endif
call UnitDamageTargetBJ(GetTriggerUnit(),GetSpellTargetUnit(),(udg_r_DTAX_necrolyte_reaperscythe_ratio*(GetUnitStateSwap(UNIT_STATE_MAX_LIFE,GetSpellTargetUnit())-GetUnitStateSwap(UNIT_STATE_LIFE,GetSpellTargetUnit()))),ATTACK_TYPE_NORMAL,DAMAGE_TYPE_FIRE)
endfunction
function LifeReaperInit takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function LifeReaperSpell))
call TriggerAddAction(ltt,function LifeReaperMain)
endfunction
function InitTrig_Reaper_Scythe takes nothing returns nothing
endfunction
function Trig_Sadist_Conditions takes nothing returns boolean
if(not(UnitHasBuffBJ(GetKillingUnit(),'B02R')))then
return false
endif
return true
endfunction
function Trig_Sadist_Actions takes nothing returns nothing
call SetUnitManaBJ(GetKillingUnit(),(GetUnitStateSwap(UNIT_STATE_MANA,GetKillingUnit())+(12.*I2R(GetUnitAbilityLevelSwapped('A060',GetKillingUnit())))))
endfunction
function StartTrigger_Sadist takes nothing returns nothing
set gg_trg_Sadist=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Sadist,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(gg_trg_Sadist,Condition(function Trig_Sadist_Conditions))
call TriggerAddAction(gg_trg_Sadist,function Trig_Sadist_Actions)
endfunction
function InitTrig_Sadist takes nothing returns nothing
endfunction
function Trig_Death_Pulse_Conditions takes nothing returns boolean
if(not(GetSpellAbilityId()=='A05V'))then
return false
endif
return true
endfunction
function Trig_Death_Pulse_Actions takes nothing returns nothing
local location liD=GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc(1,'e00E',GetOwningPlayer(GetTriggerUnit()),liD,bj_UNIT_FACING)
call RemoveLocation(liD)
call UnitAddAbility(bj_lastCreatedUnit,'A05W')
call SetUnitAbilityLevelSwapped('A05W',bj_lastCreatedUnit,GetUnitAbilityLevelSwapped('A05V',GetTriggerUnit()))
call IssueImmediateOrderById(bj_lastCreatedUnit,OrderId("fanofknives"))
endfunction
function StartTrigger_Death_Pulse takes nothing returns nothing
set gg_trg_Death_Pulse=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Death_Pulse,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Death_Pulse,Condition(function Trig_Death_Pulse_Conditions))
call TriggerAddAction(gg_trg_Death_Pulse,function Trig_Death_Pulse_Actions)
endfunction
function InitTrig_Death_Pulse takes nothing returns nothing
endfunction
function ShukuchiCheck takes nothing returns boolean
return GetSpellAbilityId()=='A0CA'
endfunction
function ShukuchiMain takes nothing returns nothing
local unit lfU=GetTriggerUnit()
call UnitAddAbility(lfU,'A0C9')
call SetUnitAbilityLevel(lfU,'A0C9',GetUnitAbilityLevel(lfU,'A0CA'))
call PolledWait(.1)
loop
exitwhen GetUnitAbilityLevel(lfU,'BHfs')==0
call PolledWait(.1)
endloop
call UnitRemoveAbility(lfU,'A0C9')
endfunction
function ShukuchiInit takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function ShukuchiCheck))
call TriggerAddAction(ltt,function ShukuchiMain)
endfunction
function InitTrig_Shukuchi takes nothing returns nothing
endfunction
function TimeLapseCastCheck takes nothing returns boolean
return GetSpellAbilityId()=='A0CT'
endfunction
function TimeLapseCast takes nothing returns nothing
local string lf5=H2Tx(GetTriggerUnit())
local real lvt=ReturnMaxReal(GetReal(lf5,"TLLife1"),1)
local real lvT=ReturnMaxReal(GetReal(lf5,"TLMana1"),1)
local location lp5=GetLocation(lf5,"TLPoint1")
local unit lfo=GetTriggerUnit()
if GetReal(lf5,"TLLife1")>1 then
call AddSpecialEffect("Abilities\\Spells\\NightElf\\Blink\\BlinkTarget.mdl",GetUnitX(lfo),GetUnitY(lfo))
call SetUnitX(lfo,GetLocationX(lp5))
call SetUnitY(lfo,GetLocationY(lp5))
call SetUnitState(lfo,UNIT_STATE_LIFE,lvt)
call SetUnitState(lfo,UNIT_STATE_MANA,lvT)
call UnitRemoveBuffs(lfo,false,true)
call RemoveLocation(lp5)
call TriggerSleepAction(0)
call SetUnitState(lfo,UNIT_STATE_MANA,lvT)
endif
endfunction
function h2 takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function TimeLapseCastCheck))
call TriggerAddAction(ltt,function TimeLapseCast)
endfunction
function InitTrig_Time_Lapse_Cast takes nothing returns nothing
endfunction
function TimeLapsSaving takes nothing returns nothing
local trigger ltt=GetTriggeringTrigger()
local unit lfo=GetUnit(H2Tx(ltt),"UnitVar")
local string lf5=H2Tx(lfo)
local integer lEq=1
local integer lEQ=10
call RemoveLocation(GetLocation(lf5,"TLPoint0"))
loop
exitwhen lEq>lEQ
call SetHandle(lf5,"TLPoint"+I2S(lEq-1),GetLocation(lf5,"TLPoint"+I2S(lEq)))
call SetReal(lf5,"TLLife"+I2S(lEq-1),GetReal(lf5,"TLLife"+I2S(lEq)))
call SetReal(lf5,"TLMana"+I2S(lEq-1),GetReal(lf5,"TLMana"+I2S(lEq)))
set lEq=lEq+1
endloop
call SetHandle(lf5,"TLPoint10",GetUnitLoc(lfo))
call SetReal(lf5,"TLLife10",GetUnitState(lfo,UNIT_STATE_LIFE))
call SetReal(lf5,"TLMana10",GetUnitState(lfo,UNIT_STATE_MANA))
endfunction
function TimeLapsInitSave takes nothing returns nothing
local unit lfo=GetTriggerUnit()
local integer lmZ=GetUnitAbilityLevel(lfo,'A0CT')
local trigger ltt
if lmZ==1 then
set ltt=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(ltt,.5)
call TriggerAddAction(ltt,function TimeLapsSaving)
call SetHandle(H2Tx(ltt),"UnitVar",lfo)
endif
endfunction
function TimeLapsLearnCheck takes nothing returns boolean
return GetLearnedSkill()=='A0CT'and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function h3 takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(ltt,Condition(function TimeLapsLearnCheck))
call TriggerAddAction(ltt,function TimeLapsInitSave)
endfunction
function InitTrig_Time_Lapse_Learn takes nothing returns nothing
endfunction
function Trig_Corrosive_Skin_Conditions takes nothing returns boolean
if(GetUnitAbilityLevelSwapped('A0MM',GetTriggerUnit())>0)then
if(GetUnitAbilityLevelSwapped('A04R',GetAttacker())==0)then
if(IsUnitType(GetAttacker(),UNIT_TYPE_STRUCTURE)==false)then
if(IsUnitEnemy(GetAttacker(),GetTriggerPlayer()))then
return true
endif
endif
endif
endif
return false
endfunction
function Trig_Corrosive_Skin_Actions takes nothing returns nothing
local location liD=GetUnitLoc(GetAttacker())
call CreateNUnitsAtLoc(1,'o00S',GetOwningPlayer(GetTriggerUnit()),liD,bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit,'A0KI')
call SetUnitAbilityLevelSwapped('A0KI',bj_lastCreatedUnit,GetUnitAbilityLevelSwapped('A0MM',GetTriggerUnit()))
call UnitApplyTimedLifeBJ(1.,'BTLF',bj_lastCreatedUnit)
call IssueTargetOrderById(bj_lastCreatedUnit,OrderId("attack"),GetAttacker())
call SetUnitPathing(bj_lastCreatedUnit,false)
call SetUnitInvulnerable(bj_lastCreatedUnit,true)
call UnitAddAbility(bj_lastCreatedUnit,'Aloc')
call RemoveLocation(liD)
endfunction
function StartTrigger_Corrosive_Skin takes nothing returns nothing
set gg_trg_Corrosive_Skin=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Corrosive_Skin,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(gg_trg_Corrosive_Skin,Condition(function Trig_Corrosive_Skin_Conditions))
call TriggerAddAction(gg_trg_Corrosive_Skin,function Trig_Corrosive_Skin_Actions)
endfunction
function InitTrig_Corrosive_Skin takes nothing returns nothing
endfunction
function Trig_Void_Conditions takes nothing returns boolean
return GetSpellAbilityId()=='A02H'
endfunction
function Trig_Void_Actions takes nothing returns nothing
local unit lJV
if(IsDay()==false)then
set lJV=CreateUnit(GetOwningPlayer(GetTriggerUnit()),'e00E',GetUnitX(GetSpellTargetUnit()),GetUnitY(GetSpellTargetUnit()),bj_UNIT_FACING)
call UnitAddAbility(lJV,'A02R')
call IssueTargetOrderById(lJV,OrderId("slow"),GetSpellTargetUnit())
endif
endfunction
function StartTrigger_Void takes nothing returns nothing
set gg_trg_Void=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Void,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Void,Condition(function Trig_Void_Conditions))
call TriggerAddAction(gg_trg_Void,function Trig_Void_Actions)
endfunction
function InitTrig_Void takes nothing returns nothing
endfunction
function Trig_Crippling_Fear_Conditions takes nothing returns boolean
return(GetLearnedSkill()=='A086'or GetLearnedSkill()=='A08E')and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function NightStalkMain takes nothing returns nothing
local unit lTD=GetUnit(H2Tx(GetTriggeringTrigger()),"NightStalker")
if(lTD!=null and IsDay()and GetUnitState(lTD,UNIT_STATE_LIFE)>1)then
call SetUnitAbilityLevel(lTD,'S00A',5)
call SetUnitAbilityLevel(lTD,'A08C',5)
elseif(lTD!=null and IsDay()==false and GetUnitState(lTD,UNIT_STATE_LIFE)>1)then
call SetUnitAbilityLevel(lTD,'S00A',GetUnitAbilityLevel(lTD,'A086'))
call SetUnitAbilityLevel(lTD,'A08C',GetUnitAbilityLevel(lTD,'A08E'))
endif
endfunction
function Trig_Crippling_Fear_Actions takes nothing returns nothing
local string lf5=H2Tx(GetTriggerUnit())
local trigger ltt
if(GetBoolean(lf5,"NightStalkerAlreadyLearned")==false)then
call SetBoolean(lf5,"NightStalkerAlreadyLearned",true)
set ltt=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(ltt,2.)
call TriggerRegisterGameStateEventTimeOfDay(ltt,LESS_THAN,6.)
call TriggerRegisterGameStateEventTimeOfDay(ltt,GREATER_THAN,18.)
call TriggerAddAction(ltt,function NightStalkMain)
call SetHandle(H2Tx(ltt),"NightStalker",GetTriggerUnit())
endif
if(GetLearnedSkill()=='A086')then
call UnitAddAbility(GetTriggerUnit(),'S00A')
if(IsDay())then
call SetUnitAbilityLevel(GetTriggerUnit(),'S00A',5)
else
call SetUnitAbilityLevel(GetTriggerUnit(),'S00A',GetUnitAbilityLevel(GetTriggerUnit(),'A086'))
endif
endif
if(GetLearnedSkill()=='A08E')then
call UnitAddAbility(GetTriggerUnit(),'A08C')
if(IsDay())then
call SetUnitAbilityLevel(GetTriggerUnit(),'A08C',5)
else
call SetUnitAbilityLevel(GetTriggerUnit(),'A08C',GetUnitAbilityLevel(GetTriggerUnit(),'A08E'))
endif
endif
endfunction
function StartTrigger_Crippling_Fear takes nothing returns nothing
set gg_trg_Crippling_Fear=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Crippling_Fear,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(gg_trg_Crippling_Fear,Condition(function Trig_Crippling_Fear_Conditions))
call TriggerAddAction(gg_trg_Crippling_Fear,function Trig_Crippling_Fear_Actions)
endfunction
function InitTrig_Crippling_Fear takes nothing returns nothing
endfunction
function Trig_Nether_Ward_Conditions takes nothing returns boolean
if(GetUnitTypeId(GetSummonedUnit())=='o00L')then
return true
endif
if(GetUnitTypeId(GetSummonedUnit())=='o00M')then
return true
endif
if(GetUnitTypeId(GetSummonedUnit())=='o00N')then
return true
endif
if(GetUnitTypeId(GetSummonedUnit())=='o00O')then
return true
endif
return false
endfunction
function Trig_Nether_Ward_Actions takes nothing returns nothing
call SetUnitAbilityLevelSwapped('A08T',GetSummonedUnit(),GetUnitAbilityLevelSwapped('A09D',GetSummoningUnit()))
call SetUnitAbilityLevelSwapped('A0CF',GetSummonedUnit(),GetUnitAbilityLevelSwapped('A09D',GetSummoningUnit()))
call IssueImmediateOrderById(GetSummonedUnit(),OrderId("manaflareon"))
endfunction
function StartTrigger_Nether_Ward takes nothing returns nothing
set gg_trg_Nether_Ward=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Nether_Ward,EVENT_PLAYER_UNIT_SUMMON)
call TriggerAddCondition(gg_trg_Nether_Ward,Condition(function Trig_Nether_Ward_Conditions))
call TriggerAddAction(gg_trg_Nether_Ward,function Trig_Nether_Ward_Actions)
endfunction
function InitTrig_Nether_Ward takes nothing returns nothing
endfunction
function Astral_Imprisonment_Spell takes nothing returns boolean
return GetSpellAbilityId()=='A0OJ'
endfunction
function Astral_Imprisonment_Main takes nothing returns nothing
local unit lfo=GetTriggerUnit()
local unit lFB=GetSpellTargetUnit()
local integer lMP=GetUnitAbilityLevel(lfo,'A0OJ')
local integer lRT=ReturnMin(GetHeroInt(lFB,false),lMP*2)
local integer lEq=1
local effect lfx=AddSpecialEffect("Abilities\\Spells\\Demon\\DarkConversion\\ZombifyTarget.mdl",GetUnitX(lFB),GetUnitY(lFB))
if(IsUnitEnemy(lFB,GetOwningPlayer(lfo)))then
call SetHeroInt(lFB,GetHeroInt(lFB,false)-lRT,true)
endif
call SelectUnitRemoveForPlayer(lFB,GetOwningPlayer(lFB))
call SetUnitInvulnerable(lFB,true)
call PauseUnit(lFB,true)
call ShowUnit(lFB,false)
if(GetHeroInt(lFB,false)<lMP*2)then
call SetHeroInt(lfo,GetHeroInt(lfo,false)+lRT,true)
call PolledWait(lMP)
else
loop
exitwhen lEq>lMP
if(IsUnitEnemy(lFB,GetOwningPlayer(lfo)))then
call SetHeroInt(lfo,GetHeroInt(lfo,false)+(lRT/lMP),true)
endif
set lEq=lEq+1
call PolledWait(.85)
endloop
endif
call DestroyEffect(lfx)
call SetUnitInvulnerable(lFB,false)
call PauseUnit(lFB,false)
call ShowUnit(lFB,true)
call ClearSelectionForPlayer(GetOwningPlayer(lFB))
call SelectUnitAddForPlayer(lFB,GetOwningPlayer(lFB))
if(IsUnitEnemy(lFB,GetOwningPlayer(lfo)))then
call PolledWait(60)
if GetUnitState(lFB,UNIT_STATE_LIFE)>1 then
call SetHeroInt(lFB,GetHeroInt(lFB,false)+lRT,true)
else
set udg_u_DTAX_temp=lFB
set udg_i_DTAX_beastmaster_primal_roar_intel_gain_REF3=lRT
call ExecuteFunc("Astral_Imprisonment_AddInt")
endif
if GetUnitState(lfo,UNIT_STATE_LIFE)>1 then
call SetHeroInt(lfo,GetHeroInt(lfo,false)-lRT,true)
else
set udg_u_DTAX_temp=lfo
set udg_i_DTAX_beastmaster_primal_roar_intel_gain_REF3=lRT
call ExecuteFunc("Astral_Imprisonment_RemoveInt")
endif
endif
endfunction
function Astral_Imprisonment_CheckHelp takes nothing returns nothing
if GetSpellAbilityId()=='A0OJ'and IsUnitAlly(GetSpellTargetUnit(),GetOwningPlayer(GetTriggerUnit()))and GetBoolean(H2Tx(GetOwningPlayer(GetSpellTargetUnit())),"L6")and GetSpellTargetUnit()!=GetTriggerUnit()then
call DropOrder(GetTriggerUnit())
call SimError(GetOwningPlayer(GetTriggerUnit()),"This target has disablehelp on")
endif
endfunction
function Astral_Imprisonment_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function Astral_Imprisonment_Spell))
call TriggerAddAction(ltt,function Astral_Imprisonment_Main)
set ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddAction(ltt,function Astral_Imprisonment_CheckHelp)
endfunction
function InitTrig_Astral_Imprisonment takes nothing returns nothing
endfunction
function Trig_Arcane_Orb_Conditions takes nothing returns boolean
return(GetLearnedSkill()=='A0OG')and(IsUnitIllusion(GetTriggerUnit())==false)
endfunction
function Essence_Aura_BuffCheck takes nothing returns boolean
return GetUnitAbilityLevel(GetTriggerUnit(),'B06X')>0 and(E7E7(GetSpellAbilityId())or GetSpellAbilityId()=='A0OI')
endfunction
function AuraInRange takes unit pFb,unit pFB,real pFc returns boolean
local real lFC=GetUnitX(pFb)
local real lFd=GetUnitY(pFb)
local real lEv=GetUnitX(pFB)
local real lEV=GetUnitY(pFB)
if((lFC-lEv)*(lFC-lEv)+(lFd-lEV)*(lFd-lEV))<pFc*pFc then
return true
else
return false
endif
endfunction
function Essence_Aura_Main takes nothing returns nothing
local string lf5=H2Tx(GetTriggeringTrigger())
local unit lfo=GetTriggerUnit()
local unit lRO=GetUnit(lf5,"Destroyer")
local integer lMP=GetUnitAbilityLevel(lRO,'A0OG')
if GetRandomInt(1,100)<=lMP*10 and AuraInRange(lfo,lRO,1400)then
call SetUnitState(lfo,UNIT_STATE_MANA,GetUnitState(lfo,UNIT_STATE_MANA)+.25*GetUnitState(lfo,UNIT_STATE_MAX_MANA))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\ReplenishMana\\ReplenishManaCasterOverhead.mdl",lfo,"overhead"))
endif
endfunction
function Trig_Arcane_Orb_Actions takes nothing returns nothing
local unit lfo=GetTriggerUnit()
local integer lMP=GetUnitAbilityLevel(lfo,'A0OG')
local trigger ltt
if(lMP==1)then
set ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function Essence_Aura_BuffCheck))
call TriggerAddAction(ltt,function Essence_Aura_Main)
call SetHandle(H2Tx(ltt),"Destroyer",lfo)
endif
if(lMP==1)then
call UnitAddAbility(lfo,'A0OL')
elseif(lMP==2)then
call UnitAddAbility(lfo,'A0OM')
elseif(lMP==3)then
call UnitAddAbility(lfo,'A0ON')
elseif(lMP==4)then
call UnitAddAbility(lfo,'A0OH')
endif
endfunction
function StartTrigger_Arcane_Orb takes nothing returns nothing
set gg_trg_Arcane_Orb=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Arcane_Orb,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(gg_trg_Arcane_Orb,Condition(function Trig_Arcane_Orb_Conditions))
call TriggerAddAction(gg_trg_Arcane_Orb,function Trig_Arcane_Orb_Actions)
endfunction
function InitTrig_Arcane_Orb takes nothing returns nothing
endfunction
function Trig_Essence_Aura_Conditions takes nothing returns boolean
return GetLearnedSkill()=='A0OI'
endfunction
function Arcane_Orb_OnOff takes nothing returns boolean
if GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED then
if GetUnitAbilityLevel(GetAttacker(),'A0OI')==0 then
return false
elseif GetBoolean(H2Tx(GetTriggeringTrigger()),"OrbOn")then
if IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and GetAttacker()==GetUnit(H2Tx(GetTriggeringTrigger()),"Destroyer")then
return true
endif
else
return false
endif
elseif GetTriggerEventId()==EVENT_UNIT_ISSUED_ORDER then
if GetIssuedOrderId()==852255then
call SetBoolean(H2Tx(GetTriggeringTrigger()),"OrbOn",true)
elseif GetIssuedOrderId()==852256then
call SetBoolean(H2Tx(GetTriggeringTrigger()),"OrbOn",false)
endif
elseif GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT then
if GetSpellAbilityId()=='A0OI'then
return true
else
return false
endif
endif
return false
endfunction
function Arcane_Orb_Main takes nothing returns nothing
local texttag lgg
local real ldd
local effect lfx
local unit lfo
local unit lFB=GetTriggerUnit()
if UnitHasBuffBJ(lFB,'B06Y') and GetUnitAbilityLevel(GetEventDamageSource(),'A0OI')>0 and GetUnit(H2Tx(GetTriggeringTrigger()),"Source")==GetEventDamageSource()then
call DisableTrigger(GetTriggeringTrigger())
set lfo=GetEventDamageSource()
set ldd=.01*(5+GetUnitAbilityLevel(lfo,'A0OI'))*(GetUnitState(lfo,UNIT_STATE_MANA)+100)
if(IsUnitType(lFB,UNIT_TYPE_SUMMONED) or IsUnitIllusion(lFB))and GetUnitTypeId(lFB)!='n004'and GetUnitTypeId(lFB)!='n018'and GetUnitTypeId(lFB)!='n01C'and GetUnitTypeId(lFB)!='n01G'then
set ldd=ldd+100*GetUnitAbilityLevel(lfo,'A0OI')
endif
set lgg=CreateTextTagUnitBJ("+"+I2S(R2I(ldd)),lFB,64,10,75,25,100,15)
call SetTextTagVelocityBJ(lgg,64,90)
call UnitDamageTargetBJ(lfo,lFB,ldd,ATTACK_TYPE_HERO,DAMAGE_TYPE_MAGIC)
if((GetRandomInt(1,100)<=GetUnitAbilityLevel(lfo,'A0OG')*5)and(GetBoolean(H2Tx(GetTriggeringTrigger()),"DoneViaSpell")==false))then
call SetUnitState(lfo,UNIT_STATE_MANA,GetUnitState(lfo,UNIT_STATE_MANA)+.25*GetUnitState(lfo,UNIT_STATE_MAX_MANA))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\ReplenishMana\\ReplenishManaCasterOverhead.mdl",lfo,"overhead"))
endif
call PolledWait(1)
call DestroyTextTag(lgg)
call DisableTrigger(GetTriggeringTrigger())
endif
endfunction
function Arcane_Orb_Order takes nothing returns nothing
local trigger ltt=CreateTrigger()
local unit lFB
local unit lFb
if(GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT)then
set lFB=GetSpellTargetUnit()
set lFb=GetTriggerUnit()
call SetBoolean(H2Tx(ltt),"DoneViaSpell",true)
else
set lFB=GetTriggerUnit()
set lFb=GetAttacker()
call SetBoolean(H2Tx(ltt),"DoneViaSpell",false)
endif
if IsUnitIllusion(lFb)==false then
call SetHandle(H2Tx(ltt),"Source",lFb)
call TriggerRegisterUnitEvent(ltt,lFB,EVENT_UNIT_DAMAGED)
call TriggerAddAction(ltt,function Arcane_Orb_Main)
endif
call PolledWait(2)
call DisableTrigger(ltt)
endfunction
function Trig_Essence_Aura_Actions takes nothing returns nothing
local unit lfo=GetTriggerUnit()
local integer lMP=GetUnitAbilityLevel(lfo,'A0OI')
local trigger ltt
if(lMP==1)then
set ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerRegisterUnitEvent(ltt,GetLearningUnit(),EVENT_UNIT_SPELL_EFFECT)
call TriggerRegisterUnitEvent(ltt,GetLearningUnit(),EVENT_UNIT_ISSUED_ORDER)
call TriggerAddCondition(ltt,Condition(function Arcane_Orb_OnOff))
call TriggerAddAction(ltt,function Arcane_Orb_Order)
call SetHandle(H2Tx(ltt),"Destroyer",lfo)
endif
endfunction
function StartTrigger_Essence_Aura takes nothing returns nothing
set gg_trg_Essence_Aura=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Essence_Aura,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(gg_trg_Essence_Aura,Condition(function Trig_Essence_Aura_Conditions))
call TriggerAddAction(gg_trg_Essence_Aura,function Trig_Essence_Aura_Actions)
endfunction
function InitTrig_Essence_Aura takes nothing returns nothing
endfunction
function Trig_Sanity_Eclipse_Conditions takes nothing returns boolean
return GetSpellAbilityId()=='A0OK'
endfunction
function Sanity_Filter takes nothing returns boolean
if(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))then
if(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))then
return true
endif
endif
return false
endfunction
function Sanity_Damage takes nothing returns nothing
local unit lFB=GetEnumUnit()
local unit lRO=GetTriggerUnit()
local integer lRx=GetHeroInt(lRO,true)-GetHeroInt(lFB,true)
local integer array lRX
local integer lRy=8+2*GetUnitAbilityLevel(lRO,'A0OK')
set lRX[1]=10
set lRX[2]=30
set lRX[3]=50
if(lRx>0)then
call UnitDamageTarget(lRO,lFB,lRx*lRy,true,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)
if(lRx<lRX[GetUnitAbilityLevel(lRO,'A0OK')])then
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\Feedback\\SpellBreakerAttack.mdl",lFB,"overhead"))
call SetUnitState(lFB,UNIT_STATE_MANA,GetUnitState(lFB,UNIT_STATE_MANA)*.25)
endif
endif
endfunction
function Trig_Sanity_Eclipse_Actions takes nothing returns nothing
local unit lfo=GetTriggerUnit()
local integer lMP=GetUnitAbilityLevel(lfo,'A0OK')
local real lxx=GetLocationX(GetSpellTargetLoc())
local real lyy=GetLocationY(GetSpellTargetLoc())
local boolexpr lRZ=Condition(function Sanity_Filter)
local group lEw=CreateGroup()
local integer lR0=0
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosTarget.mdl",lxx,lyy))
loop
exitwhen lR0>=360
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosTarget.mdl",lxx+(200+lMP*50)*Cos(lR0*bj_DEGTORAD),lyy+(200+lMP*50)*Sin(lR0*bj_DEGTORAD)))
set lR0=lR0+45
endloop
call GroupEnumUnitsInRange(lEw,lxx,lyy,300+lMP*100,lRZ)
call ForGroup(lEw,function Sanity_Damage)
call PolledWait(1)
call DestroyGroup(lEw)
call DestroyBoolExpr(lRZ)
endfunction
function StartTrigger_Sanity_Eclipse takes nothing returns nothing
set gg_trg_Sanity_Eclipse=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Sanity_Eclipse,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Sanity_Eclipse,Condition(function Trig_Sanity_Eclipse_Conditions))
call TriggerAddAction(gg_trg_Sanity_Eclipse,function Trig_Sanity_Eclipse_Actions)
endfunction
function InitTrig_Sanity_Eclipse takes nothing returns nothing
endfunction
function MulticastLeveling_Spell takes nothing returns boolean
return GetLearnedSkill()=='A088'and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function MulticastLeveling_Main takes nothing returns nothing
local unit lfo=GetTriggerUnit()
local player lEk=GetOwningPlayer(lfo)
local string lf5=H2Tx(lfo)
call SetInteger(lf5,"MulticastLevel",GetInteger(lf5,"MulticastLevel")+1)
endfunction
function MulticastLeveling_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(ltt,Condition(function MulticastLeveling_Spell))
call TriggerAddAction(ltt,function MulticastLeveling_Main)
endfunction
function InitTrig_Multi_Cast takes nothing returns nothing
endfunction
function AliveCreepOrHero takes nothing returns boolean
local unit lOQ=GetFilterUnit()
local unit lfo=GetTriggerUnit()
if IsUnitAlly(lOQ,GetOwningPlayer(lfo))and GetUnitState(lOQ,UNIT_STATE_LIFE)>0 and GetUnitAbilityLevel(lOQ,'Bblo')==0 then
if(GetOwningPlayer(lOQ)==udg_pA_DTAX_SEPlayers[0]or GetOwningPlayer(lOQ)==udg_pA_DTAX_SCPlayers[0])then
if(GetUnitTypeId(lOQ)=='ugho'or GetUnitTypeId(lOQ)=='u001'or GetUnitTypeId(lOQ)=='unec'or GetUnitTypeId(lOQ)=='u002')then
return true
endif
if(GetUnitTypeId(lOQ)=='esen'or GetUnitTypeId(lOQ)=='e00V'or GetUnitTypeId(lOQ)=='edry'or GetUnitTypeId(lOQ)=='e00W')then
return true
endif
return false
elseif IsUnitType(lOQ,UNIT_TYPE_HERO)then
return true
endif
endif
return false
endfunction
function MulticastLust_Main takes nothing returns nothing
local unit lfo=GetTriggerUnit()
local integer lmZ=GetInteger(H2Tx(lfo),"MulticastLevel")
local texttag lxx
local group lEw=CreateGroup()
local boolexpr lEW=Condition(function AliveCreepOrHero)
local unit lJV
local unit lgl
local integer lE8=GetSpellAbilityId()
local integer lEq=1
set lxx=CreateTextTagUnitBJ("MULTICAST!",GetTriggerUnit(),5.,10,100.,.0,.0,25.)
call SetTextTagVelocityBJ(lxx,64,90)
call GroupEnumUnitsInRange(lEw,GetUnitX(lfo),GetUnitY(lfo),600,lEW)
if lfo!=GetSpellTargetUnit()then
call GroupAddUnit(lEw,lfo)
endif
call DestroyBoolExpr(lEW)
loop
exitwhen lEq>lmZ
set lEq=lEq+1
set lJV=CreateUnit(GetOwningPlayer(lfo),'e00C',GetUnitX(lfo),GetUnitY(lfo),270)
call UnitAddAbility(lJV,lE8)
call SetUnitAbilityLevel(lJV,lE8,GetUnitAbilityLevel(lfo,lE8))
call UnitApplyTimedLife(lJV,'BTLF',1.)
set lgl=GroupPickRandomUnit(lEw)
call IssueTargetOrderById(lJV,OrderId("bloodlust"),lgl)
call SetUnitPathing(lJV,false)
call SetUnitInvulnerable(lJV,true)
call UnitAddAbility(lJV,'Aloc')
call GroupRemoveUnit(lEw,lgl)
endloop
call DestroyGroup(lEw)
call PolledWait(1.5)
call DestroyTextTag(lxx)
endfunction
function MulticastLust_Roll takes nothing returns boolean
local integer lEY=GetRandomInt(1,100)
return lEY<=20 or(lEY<=30 and GetUnitAbilityLevel(GetTriggerUnit(),'A088')<GetInteger(H2Tx(GetTriggerUnit()),"MulticastLevel"))
endfunction
function MulticastLust_Spell takes nothing returns boolean
if GetUnitAbilityLevel(GetTriggerUnit(),'A088')>0 and(GetSpellAbilityId()=='A083'or GetSpellAbilityId()=='A08I'or GetSpellAbilityId()=='A08G'or GetSpellAbilityId()=='A08F')then
return MulticastLust_Roll()
endif
return false
endfunction
function MulticastLust_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function MulticastLust_Spell))
call TriggerAddAction(ltt,function MulticastLust_Main)
endfunction
function InitTrig_Bloodlust takes nothing returns nothing
endfunction
function Multicast_Roll takes nothing returns boolean
local integer lEY=GetRandomInt(1,100)
return lEY<=20 or(lEY<=30 and GetUnitAbilityLevel(GetTriggerUnit(),'A088')<GetInteger(H2Tx(GetTriggerUnit()),"MulticastLevel"))
endfunction
function Multicast_Spell takes nothing returns boolean
if GetUnitAbilityLevel(GetTriggerUnit(),'A088')>0 and(GetSpellAbilityId()=='A04W'or GetSpellAbilityId()=='A08D'or GetSpellAbilityId()=='A08A'or GetSpellAbilityId()=='A089')then
return Multicast_Roll()
endif
return false
endfunction
function Multicast_Main takes nothing returns nothing
local texttag lxx
local location liD
local integer lPj=GetSpellAbilityId()
local unit lPJ=GetSpellTargetUnit()
local integer lmZ=GetInteger(H2Tx(GetTriggerUnit()),"MulticastLevel")
call CreateTextTagUnitBJ("MULTICAST!",GetTriggerUnit(),5.,10,100.,.0,.0,25.)
set lxx=bj_lastCreatedTextTag
call SetTextTagVelocityBJ(lxx,64,90)
set liD=GetUnitLoc(lPJ)
call PolledWait(.05)
call CreateNUnitsAtLoc(1,'e00C',GetOwningPlayer(GetTriggerUnit()),liD,bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit,lPj)
call SetUnitAbilityLevelSwapped(lPj,bj_lastCreatedUnit,GetUnitAbilityLevelSwapped(lPj,GetTriggerUnit()))
call UnitApplyTimedLifeBJ(1.,'BTLF',bj_lastCreatedUnit)
call IssueTargetOrderById(bj_lastCreatedUnit,OrderId("thunderbolt"),lPJ)
call SetUnitPathing(bj_lastCreatedUnit,false)
call SetUnitInvulnerable(bj_lastCreatedUnit,true)
call UnitAddAbility(bj_lastCreatedUnit,'Aloc')
if(lmZ>1)then
call PolledWait(.05)
call CreateNUnitsAtLoc(1,'e00C',GetOwningPlayer(GetTriggerUnit()),liD,bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit,lPj)
call SetUnitAbilityLevelSwapped(lPj,bj_lastCreatedUnit,GetUnitAbilityLevelSwapped(lPj,GetTriggerUnit()))
call UnitApplyTimedLifeBJ(1.,'BTLF',bj_lastCreatedUnit)
call IssueTargetOrderById(bj_lastCreatedUnit,OrderId("thunderbolt"),lPJ)
call SetUnitPathing(bj_lastCreatedUnit,false)
call SetUnitInvulnerable(bj_lastCreatedUnit,true)
call UnitAddAbility(bj_lastCreatedUnit,'Aloc')
endif
if(lmZ>2)then
call PolledWait(.05)
call CreateNUnitsAtLoc(1,'e00C',GetOwningPlayer(GetTriggerUnit()),liD,bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit,lPj)
call SetUnitAbilityLevelSwapped(lPj,bj_lastCreatedUnit,GetUnitAbilityLevelSwapped(lPj,GetTriggerUnit()))
call UnitApplyTimedLifeBJ(1.,'BTLF',bj_lastCreatedUnit)
call IssueTargetOrderById(bj_lastCreatedUnit,OrderId("thunderbolt"),lPJ)
call SetUnitPathing(bj_lastCreatedUnit,false)
call SetUnitInvulnerable(bj_lastCreatedUnit,true)
call UnitAddAbility(bj_lastCreatedUnit,'Aloc')
endif
if(lmZ>3)then
call PolledWait(.05)
call CreateNUnitsAtLoc(1,'e00C',GetOwningPlayer(GetTriggerUnit()),liD,bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit,lPj)
call SetUnitAbilityLevelSwapped(lPj,bj_lastCreatedUnit,GetUnitAbilityLevelSwapped(lPj,GetTriggerUnit()))
call UnitApplyTimedLifeBJ(1.,'BTLF',bj_lastCreatedUnit)
call IssueTargetOrderById(bj_lastCreatedUnit,OrderId("thunderbolt"),lPJ)
call SetUnitPathing(bj_lastCreatedUnit,false)
call SetUnitInvulnerable(bj_lastCreatedUnit,true)
call UnitAddAbility(bj_lastCreatedUnit,'Aloc')
endif
call PolledWait(1.5)
call DestroyTextTag(lxx)
call RemoveLocation(liD)
endfunction
function Multicast_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function Multicast_Spell))
call TriggerAddAction(ltt,function Multicast_Main)
endfunction
function InitTrig_Fireblast takes nothing returns nothing
endfunction
function Purification_Spell takes nothing returns boolean
return GetSpellAbilityId()=='A08N'
endfunction
function Purification_Filter takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and GetUnitAbilityLevel(GetFilterUnit(),'A04R')!=1 and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))
endfunction
function Purification_Damage takes nothing returns nothing
call UnitDamageTarget(GetTriggerUnit(),GetEnumUnit(),udg_r_DTAX_necrolyte_reaperscythe_ratio,true,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
endfunction
function Purification_Main takes nothing returns nothing
local boolexpr lEW=Condition(function Purification_Filter)
local group lEw=CreateGroup()
local real lxx=GetUnitX(GetSpellTargetUnit())
local real lyy=GetUnitY(GetSpellTargetUnit())
set udg_r_DTAX_necrolyte_reaperscythe_ratio=90*GetUnitAbilityLevel(GetTriggerUnit(),'A08N')
call GroupEnumUnitsInRange(lEw,lxx,lyy,250,lEW)
call ForGroup(lEw,function Purification_Damage)
call SetUnitState(GetSpellTargetUnit(),UNIT_STATE_LIFE,GetUnitState(GetSpellTargetUnit(),UNIT_STATE_LIFE)+udg_r_DTAX_necrolyte_reaperscythe_ratio)
call DestroyGroup(lEw)
call DestroyBoolExpr(lEW)
endfunction
function Purification_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function Purification_Spell))
call TriggerAddAction(ltt,function Purification_Main)
endfunction
function InitTrig_Purification takes nothing returns nothing
endfunction
function Trig_Blur_Conditions takes nothing returns boolean
return GetLearnedSkill()=='A03P'and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function PhantomRefresh takes nothing returns nothing
local unit lTf=GetUnit(H2Tx(GetTriggeringTrigger()),"PhantomAssassin")
local integer lMP=GetUnitAbilityLevel(lTf,'A03P')
if(GetUnitState(lTf,UNIT_STATE_LIFE)>1)then
if(lMP==1)then
call SetUnitVertexColorBJ(lTf,100,100,100,40.)
endif
if(lMP==2)then
call SetUnitVertexColorBJ(lTf,100,100,100,60.)
endif
if(lMP==3)then
call SetUnitVertexColorBJ(lTf,100,100,100,80.)
endif
if(lMP==4)then
call SetUnitVertexColorBJ(lTf,100,100,100,98.)
endif
endif
endfunction
function Trig_Blur_Actions takes nothing returns nothing
local integer lMP=GetUnitAbilityLevelSwapped('A03P',GetTriggerUnit())
local trigger ltt
local unit lTf=GetTriggerUnit()
if(lMP==1)then
call SetUnitVertexColorBJ(lTf,100,100,100,40.)
set ltt=CreateTrigger()
call TriggerAddAction(ltt,function PhantomRefresh)
call TriggerRegisterTimerEventPeriodic(ltt,2.)
call SetHandle(H2Tx(ltt),"PhantomAssassin",lTf)
endif
if(lMP==2)then
call SetUnitVertexColorBJ(lTf,100,100,100,60.)
endif
if(lMP==3)then
call SetUnitVertexColorBJ(lTf,100,100,100,80.)
endif
if(lMP==4)then
call SetUnitVertexColorBJ(lTf,100,100,100,98.)
endif
endfunction
function StartTrigger_Blur takes nothing returns nothing
set gg_trg_Blur=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Blur,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(gg_trg_Blur,Condition(function Trig_Blur_Conditions))
call TriggerAddAction(gg_trg_Blur,function Trig_Blur_Actions)
endfunction
function InitTrig_Blur takes nothing returns nothing
endfunction
function Trig_Blink_Strike_Conditions takes nothing returns boolean
return GetSpellAbilityId()=='A0K9'
endfunction
function Trig_Blink_Strike_Actions takes nothing returns nothing
local unit lfo=GetTriggerUnit()
local unit lFB=GetSpellTargetUnit()
local real lf7=30*GetUnitAbilityLevel(lfo,GetSpellAbilityId())
call SetUnitX(lfo,GetUnitX(lFB))
call SetUnitY(lfo,GetUnitY(lFB))
if IsUnitEnemy(lFB,GetOwningPlayer(lfo))then
call UnitDamageTargetBJ(lfo,lFB,lf7,ATTACK_TYPE_MELEE,DAMAGE_TYPE_NORMAL)
call IssueTargetOrderById(lfo,OrderId("attack"),lFB)
endif
endfunction
function StartTrigger_Blink_Strike takes nothing returns nothing
set gg_trg_Blink_Strike=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Blink_Strike,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Blink_Strike,Condition(function Trig_Blink_Strike_Conditions))
call TriggerAddAction(gg_trg_Blink_Strike,function Trig_Blink_Strike_Actions)
endfunction
function InitTrig_Blink_Strike takes nothing returns nothing
endfunction
function DropWalkMove_Check takes nothing returns boolean
return UnitHasBuffBJ(GetTriggerUnit(),'B03A')
endfunction
function DropWalkMove_Main takes nothing returns nothing
local location liD=GetUnitLoc(udg_uA_DTAX_player_hero_unit[GetPlayerId(GetOwningPlayer(GetTriggerUnit()))])
call SetUnitPositionLoc(GetTriggerUnit(),liD)
call RemoveLocation(liD)
endfunction
function DropWalkMove_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterEnterRectSimple(ltt,bj_mapInitialPlayableArea)
call TriggerAddCondition(ltt,Condition(function DropWalkMove_Check))
call TriggerAddAction(ltt,function DropWalkMove_Main)
endfunction
function InitTrig_Doppelwalk_Illusion takes nothing returns nothing
endfunction
function DoppelwalkSpell takes nothing returns boolean
return GetSpellAbilityId()=='A0D7'
endfunction
function DoppelwalkMain takes nothing returns nothing
local location lnG=GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLocFacingLocBJ(1,'e00E',GetOwningPlayer(GetTriggerUnit()),lnG,lnG)
call UnitAddItemByIdSwapped('I010',bj_lastCreatedUnit)
call UnitUseItemTarget(bj_lastCreatedUnit,bj_lastCreatedItem,GetTriggerUnit())
call RemoveLocation(lnG)
endfunction
function DoppelwalkInit takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function DoppelwalkSpell))
call TriggerAddAction(ltt,function DoppelwalkMain)
endfunction
function InitTrig_Doppelwalk takes nothing returns nothing
endfunction
function Trig_Phantom_Edge_Conditions takes nothing returns boolean
if(not(IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetAttacker()))))then
return false
endif
if(not(IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false))then
return false
endif
if(not(UnitHasBuffBJ(GetAttacker(),'B03B')))then
return false
endif
if(not(IsUnitType(GetTriggerUnit(),UNIT_TYPE_ANCIENT)==false))then
return false
endif
return true
endfunction
function Juxtropose_Check takes nothing returns boolean
return GetUnitAbilityLevel(GetFilterUnit(),'B03B')>0
endfunction
function Trig_Phantom_Edge_Actions takes nothing returns nothing
local unit lfo=GetAttacker()
local group lEw=CreateGroup()
local boolexpr lEW=Condition(function Juxtropose_Check)
local integer lPp=GetRandomInt(1,100)
local integer lPP=GetUnitAbilityLevel(lfo,'A0DB')
local integer lPq=GetUnitAbilityLevel(lfo,'A0D9')
call GroupEnumUnitsOfPlayer(lEw,GetOwningPlayer(lfo),lEW)
call DestroyBoolExpr(lEW)
if(CountUnitsInGroup(lEw)<9)then
if(IsUnitIllusion(lfo)==false and lPp<=(3*lPP+2*lPq))then
set bj_lastCreatedUnit=CreateUnit(GetOwningPlayer(lfo),'e00E',GetUnitX(lfo),GetUnitY(lfo),270)
set bj_lastCreatedItem=UnitAddItemById(bj_lastCreatedUnit,'I023')
call UnitUseItemTarget(bj_lastCreatedUnit,bj_lastCreatedItem,lfo)
endif
if(IsUnitIllusion(lfo) and lPp<=(1+2*lPq))then
set bj_lastCreatedUnit=CreateUnit(GetOwningPlayer(lfo),'e00E',GetUnitX(lfo),GetUnitY(lfo),270)
set bj_lastCreatedItem=UnitAddItemById(bj_lastCreatedUnit,'I023')
call UnitUseItemTarget(bj_lastCreatedUnit,bj_lastCreatedItem,lfo)
endif
endif
call DestroyGroup(lEw)
endfunction
function StartTrigger_Phantom_Edge takes nothing returns nothing
set gg_trg_Phantom_Edge=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Phantom_Edge,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(gg_trg_Phantom_Edge,Condition(function Trig_Phantom_Edge_Conditions))
call TriggerAddAction(gg_trg_Phantom_Edge,function Trig_Phantom_Edge_Actions)
endfunction
function InitTrig_Phantom_Edge takes nothing returns nothing
endfunction
function Trig_Spirit_Lance_Conditions takes nothing returns boolean
return GetSpellAbilityId()=='A0DA'
endfunction
function Trig_Spirit_Lance_Actions takes nothing returns nothing
local location liD=GetUnitLoc(GetSpellTargetUnit())
call CreateNUnitsAtLoc(1,'e00E',GetOwningPlayer(GetTriggerUnit()),liD,bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit,'A0D1')
call SetUnitAbilityLevelSwapped('A0D1',bj_lastCreatedUnit,GetUnitAbilityLevelSwapped('A0DA',GetTriggerUnit()))
call IssueTargetOrderById(bj_lastCreatedUnit,OrderId("cripple"),GetSpellTargetUnit())
call RemoveLocation(liD)
endfunction
function StartTrigger_Spirit_Lance takes nothing returns nothing
set gg_trg_Spirit_Lance=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Spirit_Lance,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Spirit_Lance,Condition(function Trig_Spirit_Lance_Conditions))
call TriggerAddAction(gg_trg_Spirit_Lance,function Trig_Spirit_Lance_Actions)
endfunction
function InitTrig_Spirit_Lance takes nothing returns nothing
endfunction
function Moonlight_Shadow_Spell takes nothing returns boolean
return GetSpellAbilityId()=='A0KU'
endfunction
function Moonlight_Shadow_Filter takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO) and IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))
endfunction
function Moonlight_Shadow_Start takes nothing returns nothing
call UnitAddAbility(GetEnumUnit(),'A0KT')
call SetUnitAbilityLevel(GetEnumUnit(),'A0KT',udg_i_DTAX_beastmaster_primal_roar_intel_gain_REF3)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\Invisibility\\InvisibilityTarget.mdl",GetEnumUnit(),"chest"))
endfunction
function Moonlight_Shadow_EndEffect takes nothing returns nothing
call UnitRemoveAbility(GetEnumUnit(),'A0KT')
endfunction
function Moonlight_Shadow_End takes nothing returns nothing
local timer ltt=GetExpiredTimer()
local string lf5=H2Tx(ltt)
local group lEw=GetGroup(lf5,"Group")
call ForGroup(lEw,function Moonlight_Shadow_EndEffect)
call DestroyGroup(lEw)
call KillTimer(ltt)
endfunction
function Moonlight_Shadow_Set takes nothing returns nothing
local unit lfU=GetTriggerUnit()
local boolexpr lEW=Condition(function Moonlight_Shadow_Filter)
local group lEw=CreateGroup()
local timer ltt=CreateTimer()
local string lf5=H2Tx(ltt)
local integer lmZ=GetUnitAbilityLevel(lfU,'A0KU')
local real lOZ=5+2*lmZ
set udg_i_DTAX_beastmaster_primal_roar_intel_gain_REF3=lmZ
call GroupEnumUnitsInRange(lEw,0,0,9999,lEW)
call ForGroup(lEw,function Moonlight_Shadow_Start)
call DestroyBoolExpr(lEW)
call SetHandle(lf5,"Group",lEw)
call TimerStart(ltt,lOZ,false,function Moonlight_Shadow_End)
endfunction
function Moonlight_Shadow_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function Moonlight_Shadow_Spell))
call TriggerAddAction(ltt,function Moonlight_Shadow_Set)
endfunction
function InitTrig_Moonlight_Shadow takes nothing returns nothing
endfunction
function Starfall_Spell takes nothing returns boolean
return GetSpellAbilityId()=='A0KV'
endfunction
function Starfall_Filter takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))and IsUnitVisible(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))and GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>1
endfunction
function Starfall_Roll takes nothing returns nothing
local real lFc=FDFD(GetTriggerUnit(),GetEnumUnit())
if lFc>600 then
if GetRandomInt(1,100)<61 then
call GroupAddUnit(udg_g_UNKNOWN_some_defenders_group,GetEnumUnit())
endif
elseif lFc<200 and udg_b_DTAX_natures_guise_still_near_the_trees==false then
call GroupAddUnit(udg_g_UNKNOWN_some_defenders_group,GetEnumUnit())
set udg_u_DTAX_temp=GetEnumUnit()
set udg_b_DTAX_natures_guise_still_near_the_trees=true
else
call GroupAddUnit(udg_g_UNKNOWN_some_defenders_group,GetEnumUnit())
endif
endfunction
function Starfall_FX takes nothing returns nothing
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\NightElf\\Starfall\\StarfallTarget.mdl",GetEnumUnit(),"origin"))
endfunction
function Starfall_Damage takes nothing returns nothing
call UnitDamageTarget(udg_u_DTAX_temp,GetEnumUnit(),udg_r_DTAX_necrolyte_reaperscythe_ratio,true,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)
endfunction
function Starfall_Main takes nothing returns nothing
local unit lfU=GetTriggerUnit()
local boolexpr lEW=Condition(function Starfall_Filter)
local group lEw=CreateGroup()
local integer lmZ=GetUnitAbilityLevel(lfU,'A0KV')
local group lO6=CreateGroup()
local unit lO7
local effect lFX=AddSpecialEffectTarget("Abilities\\Spells\\NightElf\\Starfall\\StarfallCaster.mdl",lfU,"origin")
set udg_u_DTAX_temp=null
set udg_b_DTAX_natures_guise_still_near_the_trees=false
set udg_g_UNKNOWN_some_defenders_group=lO6
call GroupEnumUnitsInRange(lEw,GetUnitX(lfU),GetUnitY(lfU),900,lEW)
call ForGroup(lEw,function Starfall_Roll)
call DestroyBoolExpr(lEW)
call DestroyGroup(lEw)
set lO7=udg_u_DTAX_temp
call ForGroup(lO6,function Starfall_FX)
call PolledWait(.3)
set udg_r_DTAX_necrolyte_reaperscythe_ratio=lmZ*75
set udg_u_DTAX_temp=lfU
call ForGroup(lO6,function Starfall_Damage)
call DestroyGroup(lO6)
call PolledWait(.5)
if lO7!=null and GetUnitState(lO7,UNIT_STATE_LIFE)>1 then
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\NightElf\\Starfall\\StarfallTarget.mdl",lO7,"origin"))
call PolledWait(.3)
call UnitDamageTarget(lfU,lO7,lmZ*75/2,true,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)
endif
call PolledWait(2)
call DestroyEffect(lFX)
endfunction
function Hj takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function Starfall_Spell))
call TriggerAddAction(ltt,function Starfall_Main)
endfunction
function InitTrig_Starfall takes nothing returns nothing
endfunction
function EluneArrowCheck takes nothing returns boolean
return GetSpellAbilityId()=='A0L8'
endfunction
function EluneArrowFilter takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(udg_u_DTAX_temp))and GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>1 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false
endfunction
function EluneArrowStunCalc takes real pX1,real pY1,real pX2,real pY2 returns integer
local real lDistance=SquareRoot((pX2-pX1)*(pX2-pX1)+(pY2-pY1)*(pY2-pY1))
return ReturnMin(R2I(lDistance/150),10)
endfunction
function EluneArrowTimer takes nothing returns nothing
local timer lMove=GetExpiredTimer()
local string lTable=H2Tx(lMove)
local unit lCaster=GetUnit(lTable,"Hero")
local unit lBolt=GetUnit(lTable,"Projectile")
local real lXL=GetReal(lTable,"TargetX")
local real lYL=GetReal(lTable,"TargetY")
local real lAngle=GetReal(lTable,"Angle")
local real lXX=GetUnitX(lBolt)
local real lYY=GetUnitY(lBolt)
local real lXN=SafeX(GetUnitX(lBolt)+30*Cos(lAngle))
local real lYN=SafeY(GetUnitY(lBolt)+30*Sin(lAngle))
local boolexpr lCheck=Condition(function EluneArrowFilter)
local group lEnumGroup=CreateGroup()
local unit lTemp
local unit lFirst
local real lXF
local real lYF
call SetUnitX(lBolt,lXN)
call SetUnitY(lBolt,lYN)
set udg_u_DTAX_temp=lCaster
call GroupEnumUnitsInRange(lEnumGroup,lXN,lYN,150,lCheck)
set lFirst=FirstOfGroup(lEnumGroup)
call DestroyGroup(lEnumGroup)
call DestroyBoolExpr(lCheck)
if lFirst!=null then
set lXF=GetReal(lTable,"OriginalX")
set lYF=GetReal(lTable,"OriginalY")
set lTemp=CreateUnit(GetOwningPlayer(lCaster),'e00E',lXX,lYY,0)
call UnitAddAbility(lTemp,'A0L7')
call SetUnitAbilityLevel(lTemp,'A0L7',EluneArrowStunCalc(lXF,lYF,lXX,lYY))
call IssueTargetOrderById(lTemp,OrderId("thunderbolt"),lFirst)
call UnitDamageTarget(lCaster,lFirst,90*GetUnitAbilityLevel(lCaster,'A0L8'),true,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)
call KillUnit(lBolt)
call KillTimer(lMove)
elseif(lXN-lXL)*(lXN-lXL)+(lYN-lYL)*(lYN-lYL)<1600 then
call KillUnit(lBolt)
call KillTimer(lMove)
endif
endfunction
function EluneArrowAction takes nothing returns nothing
local unit lCaster=GetTriggerUnit()
local real lXX=SafeX(GetUnitX(lCaster))
local real lYY=SafeY(GetUnitY(lCaster))
local location lCastLoc=GetSpellTargetLoc()
local real lXL=GetLocationX(lCastLoc)
local real lYL=GetLocationY(lCastLoc)
local real lAngle=Atan2(lYL-lYY,lXL-lXX)
local timer lMove=CreateTimer()
local string lTable=H2Tx(lMove)
local unit lBolt=CreateUnit(GetOwningPlayer(lCaster),'h005',lXX,lYY,lAngle*bj_RADTODEG)
call RemoveLocation(lCastLoc)
call SetUnitFacing(lBolt,lAngle*bj_RADTODEG)
call SetUnitPathing(lBolt,false)
set lXL=SafeX(lXX+3000*Cos(lAngle))
set lYL=SafeY(lYY+3000*Sin(lAngle))
call SetReal(lTable,"OriginalX",lXX)
call SetReal(lTable,"OriginalY",lYY)
call SetReal(lTable,"TargetX",lXL)
call SetReal(lTable,"TargetY",lYL)
call SetReal(lTable,"Angle",lAngle)
call SetHandle(lTable,"Hero",lCaster)
call SetHandle(lTable,"Projectile",lBolt)
call TimerStart(lMove,.035,true,function EluneArrowTimer)
endfunction
function HJ takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function EluneArrowCheck))
call TriggerAddAction(ltt,function EluneArrowAction)
call SpellPreload('A0L7')
endfunction
function InitTrig_Elune_Arrow takes nothing returns nothing
endfunction
function Leap_Spell takes nothing returns boolean
return GetSpellAbilityId()=='A0LN'
endfunction
function Leap_ReturnOrder takes unit pfU returns nothing
local string lf5=H2Tx(pfU)
local string lpG=GetString(lf5,"OrderType")
local string lph=OrderId2String(GetInteger(lf5,"OrderId"))
local real lEv
local real lEV
local unit lFB
local trigger ltt=GetTrigger(lf5,"Trigger_TrackOrder")
local boolean lpH=not GetBoolean(lf5,"Idle")
local boolean lpi=GetBoolean(lf5,"SuperOrder")
call DisableTrigger(ltt)
call IssueImmediateOrderById(pfU,OrderId("stop"))
if lpG=="Target"and(lpH or lpi)then
set lFB=GetUnit(lf5,"OrderTarget")
call IssueTargetOrder(pfU,lph,lFB)
elseif lpG=="Point"and(lpH or lpi)then
set lEv=GetReal(lf5,"OrderPointX")
set lEV=GetReal(lf5,"OrderPointY")
call IssuePointOrder(pfU,lph,lEv,lEV)
elseif(lpH or lpi)then
call IssueImmediateOrder(pfU,"OrderString")
endif
call SetBoolean(lf5,"SuperOrder",false)
call EnableTrigger(ltt)
endfunction
function Leap_SpeedBonusCheck takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO) and IsUnitAlly(GetFilterUnit(),GetOwningPlayer(udg_u_DTAX_temp))
endfunction
function Leap_DoSpeedBonus takes nothing returns nothing
local unit lfU=GetEnumUnit()
local unit lJV=CreateUnit(GetOwningPlayer(lfU),'e01R',0,0,0)
call UnitAddAbility(lJV,'A0LO')
call SetUnitAbilityLevel(lJV,'A0LO',GetUnitAbilityLevel(udg_u_DTAX_temp,'A0LN'))
call UnitApplyTimedLife(lJV,'BTLF',10)
endfunction
function Leap_EndRoar takes unit pfU returns nothing
local group lEw=CreateGroup()
local boolexpr lEW=Condition(function Leap_SpeedBonusCheck)
set udg_u_DTAX_temp=pfU
call GroupEnumUnitsInRange(lEw,GetUnitX(pfU),GetUnitY(pfU),800,lEW)
call ForGroup(lEw,function Leap_DoSpeedBonus)
call DestroyBoolExpr(lEW)
call DestroyGroup(lEw)
endfunction
function Leap_JumpMoving takes nothing returns nothing
local timer ltt=GetExpiredTimer()
local string lf5=H2Tx(ltt)
local unit lfU=GetUnit(lf5,"Hero")
local real lpj=GetReal(lf5,"DistanceRemaining")
local real lpJ=GetReal(lf5,"OriginalDistance")
local real lnM=GetReal(lf5,"Angle")
local real lpC=GetUnitX(lfU)+30*Cos(lnM*bj_DEGTORAD)
local real lpd=GetUnitY(lfU)+30*Sin(lnM*bj_DEGTORAD)
local real lpk=200
local real lpK=(1-lpj/lpJ)*lpk*2
if lpK>lpk then
set lpK=lpk*2-lpK
endif
call SetUnitFlyHeight(lfU,ReturnMaxReal(lpK,0),0)
call SetUnitX(lfU,SafeX(lpC))
call SetUnitY(lfU,SafeY(lpd))
call SetUnitFacing(lfU,lnM)
call SetReal(lf5,"DistanceRemaining",lpj-20)
if lpK<1 and lpj-lpJ!=0 then
call SetBoolean(H2Tx(lfU),"InAir",false)
call SetUnitFacing(lfU,lnM)
call SetUnitAnimation(lfU,"stand")
call SetUnitPathing(lfU,true)
call SetUnitInvulnerable(lfU,false)
call Leap_ReturnOrder(lfU)
call Leap_EndRoar(lfU)
call PauseTimer(ltt)
call FastFlush(lf5)
call DestroyTimer(ltt)
endif
endfunction
function Leap_JumpSetting takes nothing returns nothing
local unit lfU=GetTriggerUnit()
local integer lmZ=GetUnitAbilityLevel(lfU,'A0LN')
local real lFc=350+50*lmZ
local real lnM=GetUnitFacing(lfU)
local real lFC=GetUnitX(lfU)
local real lFd=GetUnitY(lfU)
local real lEv=SafeX(lFC+lFc*Cos(lnM*bj_DEGTORAD))
local real lEV=SafeY(lFd+lFc*Sin(lnM*bj_DEGTORAD))
local timer ltt=CreateTimer()
local string lf5=H2Tx(ltt)
local trigger lpL=GetTrigger(H2Tx(lfU),"Trigger_TrackOrder")
set lFc=SquareRoot((lFC-lEv)*(lFC-lEv)+(lFd-lEV)*(lFd-lEV))
if lFc>100 then
call UnitAddAbility(lfU,'Amrf')
call UnitRemoveAbility(lfU,'Amrf')
call SetUnitPathing(lfU,false)
call SetUnitInvulnerable(lfU,true)
call SetUnitAnimationByIndex(lfU,6)
call DisableTrigger(lpL)
call IssueImmediateOrderById(lfU,OrderId("stop"))
call EnableTrigger(lpL)
call SetReal(lf5,"DistanceRemaining",lFc)
call SetReal(lf5,"OriginalDistance",lFc)
call SetReal(lf5,"Angle",lnM)
call SetHandle(lf5,"Hero",lfU)
call TimerStart(ltt,.025,true,function Leap_JumpMoving)
call SetBoolean(H2Tx(lfU),"Leap_InAir",true)
call SetBoolean(H2Tx(lfU),"SuperOrder",false)
endif
call PolledWait(5)
call SetUnitPathing(lfU,true)
call SetUnitInvulnerable(lfU,false)
endfunction
function Leap_DoNothing takes nothing returns nothing
endfunction
function Leap_SaveOrders takes nothing returns nothing
local unit lfU=GetTriggerUnit()
local string lf5=H2Tx(lfU)
local boolean lpN=GetBoolean(lf5,"Leap_InAir")
call SetInteger(lf5,"OrderId",GetIssuedOrderId())
call SetBoolean(lf5,"Idle",false)
if GetTriggerEventId()==EVENT_UNIT_ISSUED_TARGET_ORDER then
call SetString(lf5,"OrderType","Target")
call SetHandle(lf5,"OrderTarget",GetOrderTarget())
elseif GetTriggerEventId()==EVENT_UNIT_ISSUED_POINT_ORDER then
if lpN or GetRange(GetUnitX(lfU),GetUnitY(lfU),GetOrderPointX(),GetOrderPointY())>800 then
call SetString(lf5,"OrderType","Point")
call SetReal(lf5,"OrderPointX",GetOrderPointX())
call SetReal(lf5,"OrderPointY",GetOrderPointY())
else
call SetBoolean(lf5,"Idle",true)
endif
else
call SetString(lf5,"OrderType","Instant")
endif
if lpN then
call SetBoolean(lf5,"SuperOrder",true)
endif
endfunction
function Leap_SpellOrder takes nothing returns boolean
return OrderId2String(GetIssuedOrderId())!="windwalk"
endfunction
function Leap_IsHeroMoves takes nothing returns nothing
local unit lfU=GetUnit(H2Tx(GetExpiredTimer()),"Hero")
local string lf5=H2Tx(lfU)
local real lxx=GetUnitX(lfU)
local real lyy=GetUnitY(lfU)
local string lpG=GetString(lf5,"OrderType")
if lpG=="Point"and GetRange(GetUnitX(lfU),GetUnitY(lfU),GetReal(lf5,"OrderPointX"),GetReal(lf5,"OrderPointY"))<100 then
call SetBoolean(lf5,"Idle",true)
endif
endfunction
function Leap_TrackOrdersStart takes nothing returns nothing
local unit lfU=GetTriggerUnit()
local trigger ltt=CreateTrigger()
local timer lt2
call TriggerRegisterUnitEvent(ltt,lfU,EVENT_UNIT_ISSUED_TARGET_ORDER)
call TriggerRegisterUnitEvent(ltt,lfU,EVENT_UNIT_ISSUED_POINT_ORDER)
call TriggerRegisterUnitEvent(ltt,lfU,EVENT_UNIT_ISSUED_ORDER)
call TriggerAddAction(ltt,function Leap_SaveOrders)
call TriggerAddCondition(ltt,Condition(function Leap_SpellOrder))
call SetHandle(H2Tx(lfU),"Trigger_TrackOrder",ltt)
set lt2=CreateTimer()
call SetHandle(H2Tx(lt2),"Hero",lfU)
call TimerStart(lt2,.3,true,function Leap_IsHeroMoves)
call SetHandle(H2Tx(lfU),"Timer_CheckIdle",lt2)
endfunction
function Leap_LearnFirst takes nothing returns nothing
if GetUnitAbilityLevel(GetTriggerUnit(),'A0LN')==1 then
call Leap_TrackOrdersStart()
endif
endfunction
function Leap_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function Leap_Spell))
call TriggerAddAction(ltt,function Leap_JumpSetting)
set ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(ltt,Condition(function Leap_Spell))
call TriggerAddAction(ltt,function Leap_DoNothing)
set ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_HERO_SKILL)
call TriggerAddAction(ltt,function Leap_LearnFirst)
endfunction
function InitTrig_Leap takes nothing returns nothing
endfunction
function Sprout_Spell takes nothing returns boolean
return GetSpellAbilityId()=='A06Q'
endfunction
function Sprout_Main takes nothing returns nothing
local destructable array ldx
local integer lEq
local integer lEQ
local fogmodifier loB
local unit lJV=GetTriggerUnit()
local unit lFB=GetSpellTargetUnit()
local location ln3=GetUnitLoc(lFB)
set loB=CreateFogModifierRadiusLocBJ(true,GetOwningPlayer(lJV),FOG_OF_WAR_VISIBLE,ln3,1000.)
set lEq=1
set lEQ=8
loop
exitwhen lEq>lEQ
set ldx[lEq]=CreateDestructableLoc('LTlt',PolarProjectionBJ(ln3,150.,(I2R(lEq)*45.)),GetRandomReal(0,360),1,0)
set lEq=lEq+1
endloop
call PolledWait((2.25+(.75*I2R(GetUnitAbilityLevelSwapped('A06Q',lJV)))))
set lEq=1
set lEQ=8
loop
exitwhen lEq>lEQ
call KillDestructable(ldx[lEq])
set lEq=lEq+1
endloop
call DestroyFogModifier(loB)
call PolledWait(4.)
set lEq=1
set lEQ=8
loop
exitwhen lEq>lEQ
call RemoveDestructable(ldx[lEq])
set lEq=lEq+1
endloop
call RemoveLocation(ln3)
endfunction
function Sprout_CheckHelp takes nothing returns nothing
if GetSpellAbilityId()=='A06Q'and IsUnitAlly(GetSpellTargetUnit(),GetOwningPlayer(GetTriggerUnit()))and GetBoolean(H2Tx(GetOwningPlayer(GetSpellTargetUnit())),"L6")then
call DropOrder(GetTriggerUnit())
call SimError(GetOwningPlayer(GetTriggerUnit()),"This target has disablehelp on")
endif
endfunction
function Sprout_Init takes nothing returns nothing
local trigger ltt
set udg_triggerl097=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_triggerl097,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(udg_triggerl097,Condition(function Sprout_Spell))
call TriggerAddAction(udg_triggerl097,function Sprout_Main)
set ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddAction(ltt,function Sprout_CheckHelp)
endfunction
function InitTrig_Sprout takes nothing returns nothing
endfunction
function TeleportationFXSpell takes nothing returns boolean
return GetSpellAbilityId()=='A01O'
endfunction
function TeleportationFXMain takes nothing returns nothing
local location liD=GetSpellTargetLoc()
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Undead\\DeathPact\\DeathPactTarget.mdl",GetLocationX(liD),GetLocationY(liD)))
call RemoveLocation(liD)
endfunction
function TeleportationFXInit takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_CHANNEL)
call TriggerAddCondition(ltt,Condition(function TeleportationFXSpell))
call TriggerAddAction(ltt,function TeleportationFXMain)
endfunction
function InitTrig_Teleportation takes nothing returns nothing
endfunction
function Trig_Teleportation_Deny_Conditions takes nothing returns boolean
return GetSpellAbilityId()=='A01O'or GetSpellAbilityId()=='A07W'
endfunction
function Trig_Teleportation_Deny_Actions takes nothing returns nothing
local unit lfo=GetTriggerUnit()
local location liD=GetSpellTargetLoc()
if EuEu(lfo,GetLocationX(liD),GetLocationY(liD))then
call DropOrder(lfo)
call SimError(GetOwningPlayer(lfo),"You cannot teleport there.")
endif
call RemoveLocation(liD)
endfunction
function StartTrigger_Teleportation_Deny takes nothing returns nothing
set gg_trg_Teleportation_Deny=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Teleportation_Deny,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(gg_trg_Teleportation_Deny,Condition(function Trig_Teleportation_Deny_Conditions))
call TriggerAddAction(gg_trg_Teleportation_Deny,function Trig_Teleportation_Deny_Actions)
endfunction
function InitTrig_Teleportation_Deny takes nothing returns nothing
endfunction
function Trig_Burrowstrike_Conditions takes nothing returns boolean
if(not(GetSpellAbilityId()=='A06O'))then
return false
endif
if(GetUnitTypeId(GetTriggerUnit())=='U00I')then
return false
endif
return true
endfunction
function Trig_Burrowstrike_Actions takes nothing returns nothing
local unit lTQ=GetTriggerUnit()
local integer lTr=GetUnitAbilityLevelSwapped('A06O',GetTriggerUnit())
local real liD
local location lnM=GetUnitLoc(lTQ)
local location lMP=GetSpellTargetLoc()
if GetSpellTargetUnit()!=null then
call RemoveLocation(lMP)
set lMP=GetUnitLoc(GetSpellTargetUnit())
endif
set liD=AngleBetweenPoints(lnM,lMP)
if(lTr==1)then
call CreateNUnitsAtLoc(1,'e00E',GetOwningPlayer(GetTriggerUnit()),PolarProjectionBJ(lnM,-100.,liD),GetUnitFacing(GetTriggerUnit()))
call UnitAddAbility(bj_lastCreatedUnit,'A075')
call SetUnitAbilityLevelSwapped('A075',bj_lastCreatedUnit,(R2I(DistanceBetweenPoints(lnM,lMP))/100))
call IssuePointOrderByIdLoc(bj_lastCreatedUnit,OrderId("impale"),lMP)
call PolledWait((DistanceBetweenPoints(lnM,lMP)/4000.))
call SetUnitPositionLoc(lTQ,lMP)
call SetUnitAnimation(lTQ,"morph ALTERNATE")
endif
if(lTr==2)then
call CreateNUnitsAtLoc(1,'e00E',GetOwningPlayer(GetTriggerUnit()),PolarProjectionBJ(lnM,-100.,liD),GetUnitFacing(GetTriggerUnit()))
call UnitAddAbility(bj_lastCreatedUnit,'A070')
call SetUnitAbilityLevelSwapped('A070',bj_lastCreatedUnit,(R2I(DistanceBetweenPoints(lnM,lMP))/100))
call IssuePointOrderByIdLoc(bj_lastCreatedUnit,OrderId("impale"),lMP)
call PolledWait((DistanceBetweenPoints(lnM,lMP)/4000.))
call SetUnitPositionLoc(lTQ,lMP)
call SetUnitAnimation(lTQ,"morph ALTERNATE")
endif
if(lTr==3)then
call CreateNUnitsAtLoc(1,'e00E',GetOwningPlayer(GetTriggerUnit()),PolarProjectionBJ(lnM,-100.,liD),GetUnitFacing(GetTriggerUnit()))
call UnitAddAbility(bj_lastCreatedUnit,'A06Z')
call SetUnitAbilityLevelSwapped('A06Z',bj_lastCreatedUnit,(R2I(DistanceBetweenPoints(lnM,lMP))/100))
call IssuePointOrderByIdLoc(bj_lastCreatedUnit,OrderId("impale"),lMP)
call PolledWait((DistanceBetweenPoints(lnM,lMP)/4000.))
call SetUnitPositionLoc(lTQ,lMP)
call SetUnitAnimation(lTQ,"morph ALTERNATE")
endif
if(lTr==4)then
call CreateNUnitsAtLoc(1,'e00E',GetOwningPlayer(GetTriggerUnit()),PolarProjectionBJ(lnM,-100.,liD),GetUnitFacing(GetTriggerUnit()))
call UnitAddAbility(bj_lastCreatedUnit,'A077')
call SetUnitAbilityLevelSwapped('A077',bj_lastCreatedUnit,(R2I(DistanceBetweenPoints(lnM,lMP))/100))
call IssuePointOrderByIdLoc(bj_lastCreatedUnit,OrderId("impale"),lMP)
call PolledWait((DistanceBetweenPoints(lnM,lMP)/4000.))
call SetUnitPositionLoc(lTQ,lMP)
call SetUnitAnimation(lTQ,"morph ALTERNATE")
endif
call RemoveLocation(lnM)
call RemoveLocation(lMP)
endfunction
function StartTrigger_Burrowstrike takes nothing returns nothing
set gg_trg_Burrowstrike=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Burrowstrike,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Burrowstrike,Condition(function Trig_Burrowstrike_Conditions))
call TriggerAddAction(gg_trg_Burrowstrike,function Trig_Burrowstrike_Actions)
endfunction
function InitTrig_Burrowstrike takes nothing returns nothing
endfunction
function Trig_Epicenter_Conditions takes nothing returns boolean
if(not(GetSpellAbilityId()=='A06R'))then
return false
endif
if(GetUnitTypeId(GetTriggerUnit())=='U00I')then
return false
endif
return true
endfunction
function RemoveEnumUnit takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function Trig_Epicenter_Actions takes nothing returns nothing
local location liD
local unit lfo
local group lEw=CreateGroup()
local integer lTT=1
local integer lTu=(4+(GetUnitAbilityLevelSwapped('A06R',GetTriggerUnit())*2))
loop
exitwhen lTT>lTu
set liD=GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc(1,'e00C',GetOwningPlayer(GetTriggerUnit()),liD,bj_UNIT_FACING)
call RemoveLocation(liD)
set lfo=bj_lastCreatedUnit
call GroupAddUnit(lEw,lfo)
call ShowUnitHide(lfo)
call UnitAddAbility(lfo,'A07L')
call SetUnitAbilityLevelSwapped('A07L',lfo,lTT)
call IssueImmediateOrderById(lfo,OrderId("thunderclap"))
call PolledWait(.05)
set liD=GetUnitLoc(lfo)
call TerrainDeformationRippleBJ(.03,false,liD,(150.+(100.*I2R(lTT))),(150.+(100.*I2R(lTT))),72.,.03,512)
call RemoveLocation(liD)
set lTT=lTT+1
endloop
call PolledWait(2)
call ForGroupBJ(lEw,function RemoveEnumUnit)
call RemoveLocation(liD)
call DestroyGroup(lEw)
endfunction
function StartTrigger_Epicenter takes nothing returns nothing
set gg_trg_Epicenter=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Epicenter,EVENT_PLAYER_UNIT_SPELL_FINISH)
call TriggerAddCondition(gg_trg_Epicenter,Condition(function Trig_Epicenter_Conditions))
call TriggerAddAction(gg_trg_Epicenter,function Trig_Epicenter_Actions)
call SpellPreload('A07L')
endfunction
function InitTrig_Epicenter takes nothing returns nothing
endfunction
function Trig_Sand_Storm_Start_Conditions takes nothing returns boolean
if(not(GetSpellAbilityId()=='A0H0'))then
return false
endif
return true
endfunction
function Trig_Sand_Storm_Start_Actions takes nothing returns nothing
local unit lTV
local unit lTw=GetTriggerUnit()
local unit array lTW
local integer lMa
call EnableTrigger(gg_trg_Sand_Storm_Finish)
set lTV=CreateUnit(GetOwningPlayer(lTw),'e00Q',GetUnitX(lTw),GetUnitY(lTw),bj_UNIT_FACING)
call SetUnitPathing(lTV,false)
call SetUnitInvulnerable(lTV,true)
call UnitAddAbility(lTV,'Aloc')
call UnitAddAbility(lTV,'A0HM')
call UnitAddAbility(lTV,'A0HO')
call PolledWait(.25)
call SetUnitAbilityLevelSwapped('A0HM',lTV,GetUnitAbilityLevelSwapped('A0H0',lTw))
call SetUnitAbilityLevelSwapped('A0HO',lTV,GetUnitAbilityLevelSwapped('A0H0',lTw))
call IssueImmediateOrderById(lTV,OrderId("immolation"))
call IssueTargetOrderById(lTV,OrderId("invisibility"),lTw)
set lMa=1
set lTW[lMa]=CreateUnit(GetOwningPlayer(lTw),'e00Q',GetUnitX(lTw)+150,GetUnitY(lTw)+150,bj_UNIT_FACING)
call SetUnitTimeScalePercent(lTW[lMa],.0)
call SetUnitPathing(lTW[lMa],false)
call SetUnitInvulnerable(lTW[lMa],true)
call UnitAddAbility(lTW[lMa],'Aloc')
set lMa=2
set lTW[lMa]=CreateUnit(GetOwningPlayer(lTw),'e00Q',GetUnitX(lTw)+150,GetUnitY(lTw)-150,bj_UNIT_FACING)
call SetUnitTimeScalePercent(lTW[lMa],.0)
call SetUnitPathing(lTW[lMa],false)
call SetUnitInvulnerable(lTW[lMa],true)
call UnitAddAbility(lTW[lMa],'Aloc')
set lMa=3
set lTW[lMa]=CreateUnit(GetOwningPlayer(lTw),'e00Q',GetUnitX(lTw)-150,GetUnitY(lTw)+150,bj_UNIT_FACING)
call SetUnitTimeScalePercent(lTW[lMa],.0)
call SetUnitPathing(lTW[lMa],false)
call SetUnitInvulnerable(lTW[lMa],true)
call UnitAddAbility(lTW[lMa],'Aloc')
set lMa=4
set lTW[lMa]=CreateUnit(GetOwningPlayer(lTw),'e00Q',GetUnitX(lTw)-150,GetUnitY(lTw)-150,bj_UNIT_FACING)
call SetUnitTimeScalePercent(lTW[lMa],.0)
call SetUnitPathing(lTW[lMa],false)
call SetUnitInvulnerable(lTW[lMa],true)
call UnitAddAbility(lTW[lMa],'Aloc')
call PolledWait(20*GetUnitAbilityLevel(lTw,'A0H0'))
if(lTW[1]!=null)then
call RemoveUnit(lTW[1])
endif
if(lTW[2]!=null)then
call RemoveUnit(lTW[2])
endif
if(lTW[3]!=null)then
call RemoveUnit(lTW[3])
endif
if(lTW[4]!=null)then
call RemoveUnit(lTW[4])
endif
endfunction
function StartTrigger_Sand_Storm_Start takes nothing returns nothing
set gg_trg_Sand_Storm_Start=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Sand_Storm_Start,EVENT_PLAYER_UNIT_SPELL_CHANNEL)
call TriggerAddCondition(gg_trg_Sand_Storm_Start,Condition(function Trig_Sand_Storm_Start_Conditions))
call TriggerAddAction(gg_trg_Sand_Storm_Start,function Trig_Sand_Storm_Start_Actions)
endfunction
function InitTrig_Sand_Storm_Start takes nothing returns nothing
endfunction
function Trig_Sand_Storm_Finish_Conditions takes nothing returns boolean
if(not(GetSpellAbilityId()=='A0H0'))then
return false
endif
return true
endfunction
function StormEndSpellII takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())=='e00Q')
endfunction
function StormEndRemoveEnum takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function Trig_Sand_Storm_Finish_Actions takes nothing returns nothing
local unit lTw=GetTriggerUnit()
local group lEw
call PolledWait(GetUnitAbilityLevel(lTw,'A0H0')*.3)
set lEw=GetUnitsOfPlayerMatching(GetOwningPlayer(lTw),Condition(function StormEndSpellII))
call ForGroupBJ(lEw,function StormEndRemoveEnum)
call UnitRemoveAbility(lTw,'B04R')
call DestroyGroup(lEw)
endfunction
function StartTrigger_Sand_Storm_Finish takes nothing returns nothing
set gg_trg_Sand_Storm_Finish=CreateTrigger()
call DisableTrigger(gg_trg_Sand_Storm_Finish)
call TriggerRegisterAnyUnitEventBJ(gg_trg_Sand_Storm_Finish,EVENT_PLAYER_UNIT_SPELL_ENDCAST)
call TriggerAddCondition(gg_trg_Sand_Storm_Finish,Condition(function Trig_Sand_Storm_Finish_Conditions))
call TriggerAddAction(gg_trg_Sand_Storm_Finish,function Trig_Sand_Storm_Finish_Actions)
endfunction
function InitTrig_Sand_Storm_Finish takes nothing returns nothing
endfunction
function NecromasteryCheckII takes nothing returns boolean
if((GetUnitTypeId(GetKillingUnit())=='Nfir'))then
return true
endif
if((GetUnitTypeId(GetDyingUnit())=='Nfir'))then
return true
endif
if((GetUnitTypeId(GetKillingUnit())=='e00F'))then
return true
endif
return false
endfunction
function Trig_Necromastery_Conditions takes nothing returns boolean
if(not NecromasteryCheckII())then
return false
endif
return true
endfunction
function NecromasteryHeroDeath takes nothing returns boolean
if(not(GetUnitTypeId(GetDyingUnit())=='Nfir'))then
return false
endif
return true
endfunction
function EnumUnitKill takes nothing returns nothing
call KillUnit(GetEnumUnit())
endfunction
function NecromasteryKillPush takes nothing returns boolean
if(not(IsUnitIllusion(GetDyingUnit())==false))then
return false
endif
if(not((GetUnitAbilityLevelSwapped('A0CQ',GetKillingUnit())-1)<(7.5*GetUnitAbilityLevelSwapped('A0BR',GetKillingUnit()))))then
return false
endif
if(not(GetUnitTypeId(GetKillingUnit())=='Nfir'))then
return false
endif
return true
endfunction
function NecromasteryDarckFlameKiller takes nothing returns boolean
if(not(IsUnitIllusion(GetDyingUnit())==false))then
return false
endif
if(not(GetUnitTypeId(GetKillingUnit())=='e00F'))then
return false
endif
return true
endfunction
function NecromasterySpellAndLevelCheck takes nothing returns boolean
if(not((GetUnitAbilityLevelSwapped('A0CQ',GetEnumUnit())+1)<(7.5*GetUnitAbilityLevelSwapped('A0BR',GetEnumUnit()))))then
return false
endif
return true
endfunction
function NecromasteryPushLevel takes nothing returns nothing
if(NecromasterySpellAndLevelCheck())then
call SetUnitAbilityLevelSwapped('A0CQ',GetEnumUnit(),(GetUnitAbilityLevelSwapped('A0CQ',GetEnumUnit())+1))
endif
endfunction
function Trig_Necromastery_Actions takes nothing returns nothing
local group lEw
if(NecromasteryHeroDeath())then
call SetUnitAbilityLevelSwapped('A0CQ',GetDyingUnit(),1+R2I((.5*I2R(GetUnitAbilityLevelSwapped('A0CQ',GetDyingUnit())))))
set lEw=GetUnitsOfPlayerAndTypeId(GetOwningPlayer(GetDyingUnit()),'e007')
call ForGroupBJ(lEw,function EnumUnitKill)
call DestroyGroup(lEw)
endif
if(NecromasteryKillPush())then
call SetUnitAbilityLevelSwapped('A0CQ',GetKillingUnit(),(GetUnitAbilityLevelSwapped('A0CQ',GetKillingUnit())+1))
endif
if(NecromasteryDarckFlameKiller())then
set lEw=GetUnitsOfPlayerAndTypeId(GetOwningPlayer(GetKillingUnit()),'Nfir')
call ForGroupBJ(lEw,function NecromasteryPushLevel)
call DestroyGroup(lEw)
endif
endfunction
function StartTrigger_Necromastery takes nothing returns nothing
set gg_trg_Necromastery=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Necromastery,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(gg_trg_Necromastery,Condition(function Trig_Necromastery_Conditions))
call TriggerAddAction(gg_trg_Necromastery,function Trig_Necromastery_Actions)
endfunction
function InitTrig_Necromastery takes nothing returns nothing
endfunction
function Shadowraze_200 takes nothing returns boolean
if(not(GetSpellAbilityId()=='A0EY'))then
return false
endif
return true
endfunction
function Shadowraze_CheckI takes nothing returns boolean
return GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false),GetBooleanAnd((IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))),('BNab'=='BNab')))
endfunction
function Shadowraze_DamageI takes nothing returns nothing
call UnitDamageTargetBJ(GetTriggerUnit(),GetEnumUnit(),(75.*I2R(GetUnitAbilityLevelSwapped('A0EY',GetTriggerUnit()))),ATTACK_TYPE_NORMAL,DAMAGE_TYPE_DEATH)
endfunction
function Shadowraze_450 takes nothing returns boolean
if(not(GetSpellAbilityId()=='A0FH'))then
return false
endif
return true
endfunction
function Shadowraze_CheckII takes nothing returns boolean
return GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false),GetBooleanAnd((IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))),('BNab'=='BNab')))
endfunction
function Shadowraze_DamageII takes nothing returns nothing
call UnitDamageTargetBJ(GetTriggerUnit(),GetEnumUnit(),(75.*I2R(GetUnitAbilityLevelSwapped('A0EY',GetTriggerUnit()))),ATTACK_TYPE_NORMAL,DAMAGE_TYPE_DEATH)
endfunction
function Shadowraze_700 takes nothing returns boolean
if(not(GetSpellAbilityId()=='A0F0'))then
return false
endif
return true
endfunction
function Shadowraze_CheckIII takes nothing returns boolean
return GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false),GetBooleanAnd((IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))),('BNab'=='BNab')))
endfunction
function Shadowraze_DamageIII takes nothing returns nothing
call UnitDamageTargetBJ(GetTriggerUnit(),GetEnumUnit(),(75.*I2R(GetUnitAbilityLevelSwapped('A0EY',GetTriggerUnit()))),ATTACK_TYPE_NORMAL,DAMAGE_TYPE_DEATH)
endfunction
function Trig_Shadowraze_Actions takes nothing returns nothing
local location liD=GetUnitLoc(GetTriggerUnit())
local location lng
local location lnG=PolarProjectionBJ(liD,200.,GetUnitFacing(GetTriggerUnit()))
local group lND
if(Shadowraze_200())then
call CreateNUnitsAtLoc(1,'e006',GetOwningPlayer(GetTriggerUnit()),lnG,bj_UNIT_FACING)
call UnitApplyTimedLifeBJ(2.,'BTLF',bj_lastCreatedUnit)
set lng=GetUnitLoc(bj_lastCreatedUnit)
set lND=GetUnitsInRangeOfLocMatching(325.,lng,Condition(function Shadowraze_CheckI))
call ForGroupBJ(lND,function Shadowraze_DamageI)
call DestroyGroup(lND)
call RemoveLocation(lng)
endif
call RemoveLocation(lnG)
set lnG=PolarProjectionBJ(liD,450.,GetUnitFacing(GetTriggerUnit()))
if(Shadowraze_450())then
call CreateNUnitsAtLoc(1,'e006',GetOwningPlayer(GetTriggerUnit()),lnG,bj_UNIT_FACING)
call UnitApplyTimedLifeBJ(2.,'BTLF',bj_lastCreatedUnit)
set lng=GetUnitLoc(bj_lastCreatedUnit)
set lND=GetUnitsInRangeOfLocMatching(325.,lng,Condition(function Shadowraze_CheckII))
call ForGroupBJ(lND,function Shadowraze_DamageII)
call DestroyGroup(lND)
call RemoveLocation(lng)
endif
call RemoveLocation(lnG)
set lnG=PolarProjectionBJ(liD,700.,GetUnitFacing(GetTriggerUnit()))
if(Shadowraze_700())then
call CreateNUnitsAtLoc(1,'e006',GetOwningPlayer(GetTriggerUnit()),lnG,bj_UNIT_FACING)
call UnitApplyTimedLifeBJ(2.,'BTLF',bj_lastCreatedUnit)
set lng=GetUnitLoc(bj_lastCreatedUnit)
set lND=GetUnitsInRangeOfLocMatching(325.,lng,Condition(function Shadowraze_CheckIII))
call ForGroupBJ(lND,function Shadowraze_DamageIII)
call DestroyGroup(lND)
call RemoveLocation(lng)
endif
call RemoveLocation(lnG)
call RemoveLocation(liD)
endfunction
function StartTrigger_Shadowraze takes nothing returns nothing
set gg_trg_Shadowraze=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Shadowraze,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddAction(gg_trg_Shadowraze,function Trig_Shadowraze_Actions)
endfunction
function InitTrig_Shadowraze takes nothing returns nothing
endfunction
function Trig_Skills_Learn_Actions takes nothing returns nothing
if(GetLearnedSkill()=='A0EY')then
if(GetUnitAbilityLevelSwapped('A0EY',GetTriggerUnit())==1)then
call UnitAddAbility(GetTriggerUnit(),'A0F0')
call UnitAddAbility(GetTriggerUnit(),'A0FH')
else
call SetUnitAbilityLevelSwapped('A0F0',GetTriggerUnit(),GetUnitAbilityLevelSwapped('A0EY',GetTriggerUnit()))
call SetUnitAbilityLevelSwapped('A0FH',GetTriggerUnit(),GetUnitAbilityLevelSwapped('A0EY',GetTriggerUnit()))
endif
endif
if(GetLearnedSkill()=='A0BR')then
if(GetUnitAbilityLevelSwapped('A0BR',GetTriggerUnit())==1)then
call UnitAddAbility(GetTriggerUnit(),'A0CQ')
endif
endif
endfunction
function StartTrigger_Skills_Learn takes nothing returns nothing
set gg_trg_Skills_Learn=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Skills_Learn,EVENT_PLAYER_HERO_SKILL)
call TriggerAddAction(gg_trg_Skills_Learn,function Trig_Skills_Learn_Actions)
endfunction
function InitTrig_Skills_Learn takes nothing returns nothing
endfunction
function Trig_Requiem_of_Souls_Cast_Conditions takes nothing returns boolean
if(not(GetSpellAbilityId()=='A0HE'))then
return false
endif
return true
endfunction
function Trig_Requiem_of_Souls_Cast_Actions takes nothing returns nothing
local integer lt5=GetUnitAbilityLevelSwapped('A0CQ',GetTriggerUnit())
local integer lt6
local integer lEQ
local unit lfo=GetTriggerUnit()
local location liD=GetUnitLoc(GetTriggerUnit())
local location lng
set lt5=lt5/2
set lt6=1
set lEQ=lt5
loop
exitwhen lt6>lEQ
set lng=PolarProjectionBJ(liD,50.,(I2R(lt6)*(360/lt5)))
call CreateNUnitsAtLoc(1,'e00C',GetOwningPlayer(lfo),liD,bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit,'A0HG')
call SetUnitAbilityLevelSwapped('A0HG',bj_lastCreatedUnit,GetUnitAbilityLevelSwapped('A0HE',GetTriggerUnit()))
call UnitApplyTimedLifeBJ(2.,'BTLF',bj_lastCreatedUnit)
call IssuePointOrderByIdLoc(bj_lastCreatedUnit,OrderId("carrionswarm"),lng)
call SetUnitPathing(bj_lastCreatedUnit,false)
call SetUnitInvulnerable(bj_lastCreatedUnit,true)
call UnitAddAbility(bj_lastCreatedUnit,'Aloc')
call RemoveLocation(lng)
set lt6=lt6+1
endloop
call RemoveLocation(liD)
endfunction
function StartTrigger_Requiem_of_Souls_Cast takes nothing returns nothing
set gg_trg_Requiem_of_Souls_Cast=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Requiem_of_Souls_Cast,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Requiem_of_Souls_Cast,Condition(function Trig_Requiem_of_Souls_Cast_Conditions))
call TriggerAddAction(gg_trg_Requiem_of_Souls_Cast,function Trig_Requiem_of_Souls_Cast_Actions)
endfunction
function InitTrig_Requiem_of_Souls_Cast takes nothing returns nothing
endfunction
function Trig_Requiem_of_Souls_Effect_Conditions takes nothing returns boolean
if(not(GetSpellAbilityId()=='A0HE'))then
return false
endif
return true
endfunction
function Requiem_of_Souls_Slow_Filter takes nothing returns boolean
if(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))then
return false
endif
if(GetUnitAbilityLevelSwapped('A04R',GetFilterUnit())==1)then
return false
endif
if(IsUnitAliveBJ(GetFilterUnit())==false)then
return false
endif
if(GetUnitTypeId(GetFilterUnit())=='o003')then
return false
endif
if(IsUnitEnemy(GetFilterUnit(),GetTriggerPlayer())==false)then
return false
endif
if(GetTriggerUnit()==GetFilterUnit())then
return false
endif
if(IsUnitVisible(GetFilterUnit(),GetTriggerPlayer())==false)then
return false
endif
return true
endfunction
function Requiem_Range700 takes nothing returns nothing
local unit lfo=GetTriggerUnit()
local location liD=GetUnitLoc(lfo)
call CreateNUnitsAtLoc(1,'e00C',GetOwningPlayer(lfo),liD,bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit,'A0HH')
call SetUnitAbilityLevelSwapped('A0HH',bj_lastCreatedUnit,GetUnitAbilityLevelSwapped('A0HE',GetTriggerUnit()))
call UnitApplyTimedLifeBJ(2.,'BTLF',bj_lastCreatedUnit)
call IssueTargetOrderById(bj_lastCreatedUnit,OrderId("cripple"),GetEnumUnit())
call SetUnitPathing(bj_lastCreatedUnit,false)
call SetUnitInvulnerable(bj_lastCreatedUnit,true)
call UnitAddAbility(bj_lastCreatedUnit,'Aloc')
call RemoveLocation(liD)
endfunction
function Requiem_Range400 takes nothing returns nothing
local unit lfo=GetTriggerUnit()
local location liD=GetUnitLoc(lfo)
call CreateNUnitsAtLoc(1,'e00C',GetOwningPlayer(lfo),liD,bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit,'A0HH')
call SetUnitAbilityLevelSwapped('A0HJ',bj_lastCreatedUnit,GetUnitAbilityLevelSwapped('A0HE',GetTriggerUnit()))
call UnitApplyTimedLifeBJ(2.,'BTLF',bj_lastCreatedUnit)
call IssueTargetOrderById(bj_lastCreatedUnit,OrderId("cripple"),GetEnumUnit())
call SetUnitPathing(bj_lastCreatedUnit,false)
call SetUnitInvulnerable(bj_lastCreatedUnit,true)
call UnitAddAbility(bj_lastCreatedUnit,'Aloc')
call RemoveLocation(liD)
endfunction
function Requiem_Range200 takes nothing returns nothing
local unit lfo=GetTriggerUnit()
local location liD=GetUnitLoc(lfo)
call CreateNUnitsAtLoc(1,'e00C',GetOwningPlayer(lfo),liD,bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit,'A0HH')
call SetUnitAbilityLevelSwapped('A0HI',bj_lastCreatedUnit,GetUnitAbilityLevelSwapped('A0HE',GetTriggerUnit()))
call UnitApplyTimedLifeBJ(2.,'BTLF',bj_lastCreatedUnit)
call IssueTargetOrderById(bj_lastCreatedUnit,OrderId("cripple"),GetEnumUnit())
call SetUnitPathing(bj_lastCreatedUnit,false)
call SetUnitInvulnerable(bj_lastCreatedUnit,true)
call UnitAddAbility(bj_lastCreatedUnit,'Aloc')
call RemoveLocation(liD)
endfunction
function Trig_Requiem_of_Souls_Effect_Actions takes nothing returns nothing
local location liD=GetUnitLoc(GetTriggerUnit())
local unit lfo=GetTriggerUnit()
local group lEw
set lEw=GetUnitsInRangeOfLocMatching(700,liD,Condition(function Requiem_of_Souls_Slow_Filter))
call ForGroup(lEw,function Requiem_Range700)
set lEw=GetUnitsInRangeOfLocMatching(400,liD,Condition(function Requiem_of_Souls_Slow_Filter))
call ForGroup(lEw,function Requiem_Range400)
set lEw=GetUnitsInRangeOfLocMatching(200,liD,Condition(function Requiem_of_Souls_Slow_Filter))
call ForGroup(lEw,function Requiem_Range200)
call RemoveLocation(liD)
call DestroyGroup(lEw)
endfunction
function StartTrigger_Requiem_of_Souls_Effect takes nothing returns nothing
set gg_trg_Requiem_of_Souls_Effect=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Requiem_of_Souls_Effect,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Requiem_of_Souls_Effect,Condition(function Trig_Requiem_of_Souls_Effect_Conditions))
call TriggerAddAction(gg_trg_Requiem_of_Souls_Effect,function Trig_Requiem_of_Souls_Effect_Actions)
endfunction
function InitTrig_Requiem_of_Souls_Effect takes nothing returns nothing
endfunction
function GetLightning takes string pTable,string pKey returns lightning
return GetStoredInteger(udg_gc_DTAX_Core,pTable,pKey)
return null
endfunction
function TimedLightningDestroy takes nothing returns nothing
call DestroyLightning(GetLightning(H2Tx(GetExpiredTimer()),"Lightning"))
endfunction
function TimedLightning takes string pFo,real px1,real py1,real px2,real py2,real prr,real pgg,real pbb,real paa,real pfl returns nothing
local timer ltt=CreateTimer()
local lightning lFO=AddLightning(pFo,true,px1,py1,px2,py2)
call SetLightningColor(lFO,prr,pgg,pbb,paa)
call SetHandle(H2Tx(ltt),"Lightning",lFO)
call TimerStart(ltt,pfl,false,function TimedLightningDestroy)
endfunction
function Shadow_Wave_Filter takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(udg_u_DTAX_temp))and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0
endfunction
function Shadow_Wave_DamageChild takes nothing returns nothing
call DamageWithTypeDB(udg_u_DTAX_temp,GetEnumUnit(),udg_dR,udg_r_DTAX_necrolyte_reaperscythe_ratio)
endfunction
function Shadow_Wave_DamageChildII takes unit pFb,unit pFB,real pf7 returns nothing
local group lEw=CreateGroup()
local boolexpr lEW=Condition(function Shadow_Wave_Filter)
set udg_u_DTAX_temp=pFb
set udg_r_DTAX_necrolyte_reaperscythe_ratio=pf7
call GroupEnumUnitsInRange(lEw,GetUnitX(pFB),GetUnitY(pFB),180,lEW)
call ForGroup(lEw,function Shadow_Wave_DamageChild)
call DestroyBoolExpr(lEW)
call DestroyGroup(lEw)
endfunction
function Shadow_Wave_Link takes nothing returns boolean
return GetFilterUnit()!=udg_u_DTAX_temp and IsUnitInGroup(GetFilterUnit(),udg_g_UNKNOWN_some_defenders_group)==false and IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))and IsUnitVisible(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>1
endfunction
function Shadow_Wave_DamageMain takes group pUl,unit pUL,unit pFb returns unit
local group lEw=CreateGroup()
local boolexpr lEW=Condition(function Shadow_Wave_Link)
local unit lUm=null
local unit lUM
set udg_g_UNKNOWN_some_defenders_group=pUl
set udg_u_DTAX_temp=pFb
call GroupEnumUnitsInRange(lEw,GetUnitX(pUL),GetUnitY(pUL),500,lEW)
set lUM=FirstOfGroup(lEw)
set lUm=lUM
loop
exitwhen lUM==null
if GetUnitState(lUM,UNIT_STATE_LIFE)!=GetUnitState(lUM,UNIT_STATE_MAX_LIFE)then
if IsUnitType(lUM,UNIT_TYPE_HERO) and IsUnitType(lUm,UNIT_TYPE_HERO)==false then
set lUm=lUM
elseif GetUnitState(lUM,UNIT_STATE_LIFE)<GetUnitState(lUm,UNIT_STATE_LIFE)and IsUnitType(lUM,UNIT_TYPE_HERO) and IsUnitType(lUm,UNIT_TYPE_HERO)then
set lUm=lUM
elseif IsUnitType(lUm,UNIT_TYPE_HERO)==false and GetUnitState(lUM,UNIT_STATE_LIFE)<GetUnitState(lUm,UNIT_STATE_LIFE)then
set lUm=lUM
endif
endif
call GroupRemoveUnit(lEw,lUM)
set lUM=FirstOfGroup(lEw)
endloop
call DestroyGroup(lEw)
call DestroyBoolExpr(lEW)
return lUm
endfunction
function Shadow_Wave_Main takes nothing returns nothing
local unit lfU=GetTriggerUnit()
local unit lFB=GetSpellTargetUnit()
local string lUN="Abilities\\Spells\\Undead\\ReplenishMana\\ReplenishManaCaster.mdl"
local string lUo="origin"
local effect array lFX
local unit array lUO
local integer lxx
local integer lii=1
local real lf7=60+GetUnitAbilityLevel(lfU,'A0OR')*20
local group lUl=CreateGroup()
local integer lUp=4
local boolean lUP=false
set lUO[lii]=lFB
if lFB!=lfU then
call TimedLightning("SPLK",GetUnitX(lfU),GetUnitY(lfU),GetUnitX(lFB),GetUnitY(lFB),.3,.5,.9,1,.7)
endif
set lFX[lii]=AddSpecialEffectTarget(lUN,lUO[lii],lUo)
call SetUnitState(lUO[lii],UNIT_STATE_LIFE,GetUnitState(lUO[lii],UNIT_STATE_LIFE)+lf7)
call Shadow_Wave_DamageChildII(lfU,lUO[lii],lf7)
call GroupAddUnit(lUl,lUO[lii])
set lii=2
loop
exitwhen lii>lUp or lUP
set lUO[lii]=Shadow_Wave_DamageMain(lUl,lUO[lii-1],lfU)
if lUO[lii]==null then
set lUP=true
else
call GroupAddUnit(lUl,lUO[lii])
set lFX[lii]=AddSpecialEffectTarget(lUN,lUO[lii],lUo)
call SetUnitState(lUO[lii],UNIT_STATE_LIFE,GetUnitState(lUO[lii],UNIT_STATE_LIFE)+lf7)
call Shadow_Wave_DamageChildII(lfU,lUO[lii],lf7)
call TimedLightning("SPLK",GetUnitX(lUO[lii-1]),GetUnitY(lUO[lii-1]),GetUnitX(lUO[lii]),GetUnitY(lUO[lii]),.3,.5,.9,1,.7)
set lii=lii+1
endif
endloop
call DestroyGroup(lUl)
call PolledWait(2)
set lxx=1
loop
exitwhen lxx==lii
call DestroyEffect(lFX[lxx])
set lxx=lxx+1
endloop
endfunction
function Shadow_Wave_Spell takes nothing returns boolean
return GetSpellAbilityId()=='A0OR'
endfunction
function Shadow_Wave_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function Shadow_Wave_Spell))
call TriggerAddAction(ltt,function Shadow_Wave_Main)
endfunction
function InitTrig_Shadow_Wave takes nothing returns nothing
endfunction
function Poison_Touch_Spell takes nothing returns boolean
return GetSpellAbilityId()=='A0NQ'
endfunction
function Poison_Touch_Damage takes unit pFb,unit pFB returns nothing
local unit lJV=CreateUnit(GetOwningPlayer(pFb),'e00E',GetUnitX(pFB),GetUnitY(pFB),0)
call UnitAddAbility(lJV,'A0NK')
call IssueTargetOrderById(lJV,OrderId("thunderbolt"),pFB)
endfunction
function Poison_Touch_Main takes nothing returns nothing
local trigger ltt=GetTriggeringTrigger()
local string lf5=H2Tx(ltt)
local unit lFb=GetUnit(lf5,"Source")
local unit lFB=GetUnit(lf5,"Target")
local integer lmZ=GetUnitAbilityLevel(lFb,'A0NQ')
local integer luv=GetTriggerExecCount(ltt)
local real lf7=7*lmZ
if lmZ==1 then
call UnitAddAbility(lFB,'A0OW')
call DamageWithTypeDB(lFb,lFB,udg_dR,lf7)
if luv==8 then
call UnitRemoveAbility(lFB,'A0OW')
call FastFlush(lf5)
call DisableTrigger(ltt)
call PolledWait(5)
call DestroyTrigger(ltt)
endif
endif
if lmZ==2 then
if luv==1 then
call Poison_Touch_Slow(lFb,lFB,2)
endif
if luv>1 then
call UnitAddAbility(lFB,'A0OW')
call DamageWithTypeDB(lFb,lFB,udg_dR,lf7)
endif
if luv==9 then
call UnitRemoveAbility(lFB,'A0OW')
call FastFlush(lf5)
call DisableTrigger(ltt)
call PolledWait(5)
call DestroyTrigger(ltt)
endif
endif
if lmZ==3 then
if luv==1 then
call Poison_Touch_Slow(lFb,lFB,2)
endif
if luv==2 then
call Poison_Touch_Damage(lFb,lFB)
endif
if luv>2 then
call UnitAddAbility(lFB,'A0OW')
call DamageWithTypeDB(lFb,lFB,udg_dR,lf7)
endif
if luv==10 then
call UnitRemoveAbility(lFB,'A0OW')
call FastFlush(lf5)
call DisableTrigger(ltt)
call PolledWait(5)
call DestroyTrigger(ltt)
endif
endif
if lmZ==4 then
if luv==1 then
call Poison_Touch_Slow(lFb,lFB,2)
endif
if luv==2 then
call Poison_Touch_Damage(lFb,lFB)
endif
if luv>2 then
call UnitAddAbility(lFB,'A0OW')
call DamageWithTypeDB(lFb,lFB,udg_dR,lf7)
endif
if luv==10 then
call UnitRemoveAbility(lFB,'A0OW')
call FastFlush(lf5)
call DisableTrigger(ltt)
call PolledWait(5)
call DestroyTrigger(ltt)
endif
endif
endfunction
function Poison_Touch_Setting takes nothing returns nothing
local trigger ltt=CreateTrigger()
local string lf5=H2Tx(ltt)
call TriggerRegisterTimerEvent(ltt,1,true)
call TriggerAddAction(ltt,function Poison_Touch_Main)
call SetHandle(lf5,"Source",GetTriggerUnit())
call SetHandle(lf5,"Target",GetSpellTargetUnit())
call Poison_Touch_Slow(GetTriggerUnit(),GetSpellTargetUnit(),1)
endfunction
function Poison_Touch_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function Poison_Touch_Spell))
call TriggerAddAction(ltt,function Poison_Touch_Setting)
call SpellPreload('A0NJ')
call SpellPreload('A0NK')
endfunction
function InitTrig_Poison_Touch takes nothing returns nothing
endfunction
function Weave_Spell takes nothing returns boolean
return GetSpellAbilityId()=='A0NV'
endfunction
function Weave_Add takes nothing returns nothing
local trigger ltt=GetTriggeringTrigger()
local string lf5=H2Tx(ltt)
local unit lFB=GetUnit(lf5,"Target")
local unit lfU=GetUnit(lf5,"Hero")
local integer lUT=GetTriggerExecCount(ltt)
local boolean lUu=GetUnitState(lFB,UNIT_STATE_LIFE)<.5
local integer lmZ=GetUnitAbilityLevel(lfU,'A0NV')
if lUT==18 or lUu then
if not lUu then
call UnitRemoveAbility(lFB,'A0NW')
call UnitRemoveAbility(lFB,'A0OX')
endif
call FastFlush(lf5)
call DestroyTrigger(ltt)
else
if lmZ==1 and(lUT==5 or lUT==10 or lUT==15)then
call SetUnitAbilityLevel(lFB,'A0NW',GetUnitAbilityLevel(lFB,'A0NW')+1)
endif
if lmZ==2 and(lUT==3 or lUT==5 or lUT==7 or lUT==9 or lUT==11 or lUT==13 or lUT==15)then
call SetUnitAbilityLevel(lFB,'A0NW',GetUnitAbilityLevel(lFB,'A0NW')+1)
endif
if lmZ==3 and(lUT==2 or lUT==3 or lUT==5 or lUT==6 or lUT==8 or lUT==9 or lUT==11 or lUT==12 or lUT==14 or lUT==15 or lUT==16)then
call SetUnitAbilityLevel(lFB,'A0NW',GetUnitAbilityLevel(lFB,'A0NW')+1)
endif
if lmZ==4 and lUT<16 then
call SetUnitAbilityLevel(lFB,'A0NW',GetUnitAbilityLevel(lFB,'A0NW')+1)
endif
endif
endfunction
function Weave_Drain takes nothing returns nothing
local trigger ltt=GetTriggeringTrigger()
local string lf5=H2Tx(ltt)
local unit lFB=GetUnit(lf5,"Target")
local unit lfU=GetUnit(lf5,"Hero")
local integer lUT=GetTriggerExecCount(ltt)
local boolean lUu=GetUnitState(lFB,UNIT_STATE_LIFE)<.5
local integer lmZ=GetUnitAbilityLevel(lfU,'A0NV')
if lUT==18 or lUu then
if not lUu then
call UnitRemoveAbility(lFB,'A0NU')
call UnitRemoveAbility(lFB,'A0OY')
endif
call FastFlush(lf5)
call DestroyTrigger(ltt)
else
if lmZ==1 and(lUT==5 or lUT==10 or lUT==15)then
call SetUnitAbilityLevel(lFB,'A0NU',GetUnitAbilityLevel(lFB,'A0NU')+1)
endif
if lmZ==2 and(lUT==3 or lUT==5 or lUT==7 or lUT==9 or lUT==11 or lUT==13 or lUT==15)then
call SetUnitAbilityLevel(lFB,'A0NU',GetUnitAbilityLevel(lFB,'A0NU')+1)
endif
if lmZ==3 and(lUT==2 or lUT==3 or lUT==5 or lUT==6 or lUT==8 or lUT==9 or lUT==11 or lUT==12 or lUT==14 or lUT==15 or lUT==16)then
call SetUnitAbilityLevel(lFB,'A0NU',GetUnitAbilityLevel(lFB,'A0NU')+1)
endif
if lmZ==4 and lUT<16 then
call SetUnitAbilityLevel(lFB,'A0NU',GetUnitAbilityLevel(lFB,'A0NU')+1)
endif
endif
endfunction
function Weave_Setting takes nothing returns nothing
local unit lfU=GetTriggerUnit()
local unit lFB=GetSpellTargetUnit()
local trigger ltt=CreateTrigger()
local string lf5=H2Tx(ltt)
call SetHandle(lf5,"Target",lFB)
call SetHandle(lf5,"Hero",lfU)
call TriggerRegisterTimerEvent(ltt,1,true)
if IsUnitAlly(lFB,GetOwningPlayer(lfU))then
call UnitAddAbility(lFB,'A0NW')
call UnitAddAbility(lFB,'A0OX')
call TriggerAddAction(ltt,function Weave_Add)
else
call UnitAddAbility(lFB,'A0NU')
call UnitAddAbility(lFB,'A0OY')
call TriggerAddAction(ltt,function Weave_Drain)
endif
endfunction
function Weave_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function Weave_Spell))
call TriggerAddAction(ltt,function Weave_Setting)
call SpellPreload('A0NW')
call SpellPreload('A0NU')
endfunction
function InitTrig_Weave takes nothing returns nothing
endfunction
function ShallowGrave_Spell takes nothing returns boolean
return GetSpellAbilityId()=='A0OS'
endfunction
function ShallowGrave_Timer takes nothing returns nothing
local trigger ltt=GetTriggeringTrigger()
local unit lfo=GetUnit(H2Tx(ltt),"Unit")
if GetUnitState(lfo,UNIT_STATE_LIFE)<1 then
call DisableTrigger(ltt)
elseif GetTriggerExecCount(ltt)>300 then
call DisableTrigger(ltt)
call UnitRemoveAbility(lfo,'A0OV')
elseif GetUnitAbilityLevel(lfo,'A0OV')==0 then
call UnitAddAbility(lfo,'A0OV')
endif
endfunction
function ShallowGrave_Setting takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterTimerEvent(ltt,1,true)
call TriggerAddAction(ltt,function ShallowGrave_Timer)
call SetHandle(H2Tx(ltt),"Unit",GetSpellTargetUnit())
call UnitAddAbility(GetSpellTargetUnit(),'A0OV')
call SetHandle(H2Tx(GetSpellTargetUnit()),"ShallowGraveSource",GetTriggerUnit())
endfunction
function ShallowGrave_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function ShallowGrave_Spell))
call TriggerAddAction(ltt,function ShallowGrave_Setting)
endfunction
function InitTrig_Shallow_Grave takes nothing returns nothing
endfunction
function IsSilenced takes unit pEU returns boolean
return GetUnitAbilityLevel(pEU,'B01T')>0 or GetUnitAbilityLevel(pEU,'BNsi')>0 or GetUnitAbilityLevel(pEU,'B01X')>0 or GetUnitAbilityLevel(pEU,'BNdo')>0 or GetUnitAbilityLevel(pEU,'B02M')>0 or GetUnitAbilityLevel(pEU,'Bhea')>0 or GetUnitAbilityLevel(pEU,'B05V')>0
endfunction
function Last_Word_Silence takes nothing returns nothing
local unit lFB=GetTriggerUnit()
local unit lqb=GetUnit(H2Tx(GetTriggeringTrigger()),"Silencer")
local unit lJV=CreateUnit(GetOwningPlayer(lqb),'e00E',GetUnitX(lFB),GetUnitY(lFB),0)
if IsSilenced(lqb)==false and IsUnitEnemy(lFB,GetOwningPlayer(lqb))then
call UnitAddAbility(lJV,'A0LS')
call SetUnitAbilityLevel(lJV,'A0LS',GetUnitAbilityLevel(lqb,'A0LR'))
call IssueTargetOrderById(lJV,OrderId("soulburn"),lFB)
endif
endfunction
function Last_Word_SpellCheck takes nothing returns boolean
return GetUnitAbilityLevel(GetTriggerUnit(),'B05V')>0 and GetSpellAbilityId()!='AIbk'and GetSpellAbilityId()!='A05Z'
endfunction
function Last_Word_Run takes nothing returns nothing
local unit lfo=GetTriggerUnit()
local trigger ltt
if GetUnitAbilityLevel(lfo,'A0LR')==1 then
set ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_FINISH)
call TriggerAddCondition(ltt,Condition(function Last_Word_SpellCheck))
call TriggerAddAction(ltt,function Last_Word_Silence)
call SetHandle(H2Tx(ltt),"Silencer",lfo)
endif
endfunction
function Last_Word_Check takes nothing returns boolean
return GetLearnedSkill()=='A0LR'and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function Last_Word_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(ltt,Condition(function Last_Word_Check))
call TriggerAddAction(ltt,function Last_Word_Run)
endfunction
function InitTrig_Last_Word takes nothing returns nothing
endfunction
function SilentCurse_Spell takes nothing returns boolean
return GetSpellAbilityId()=='A0KD'
endfunction
function SilentCurse_Main takes nothing returns nothing
local timer ltt=GetExpiredTimer()
local string lf5=H2Tx(ltt)
local unit lfo=GetUnit(lf5,"CurseTarget")
local real lPy=0
if(UnitHasBuffBJ(lfo,'B05D'))then
set lPy=5.
endif
if(UnitHasBuffBJ(lfo,'B05M'))then
set lPy=10.
endif
if(UnitHasBuffBJ(lfo,'B05N'))then
set lPy=15.
endif
if(UnitHasBuffBJ(lfo,'B05O'))then
set lPy=20.
endif
call SetUnitManaBJ(lfo,GetUnitState(lfo,UNIT_STATE_MANA)-lPy)
if(lPy==.0)then
call PauseTimer(ltt)
call FastFlush(lf5)
call DestroyTimer(ltt)
endif
endfunction
function SilentCurse_End takes nothing returns nothing
if E7E7(GetSpellAbilityId())or GetSpellAbilityId()=='A06K'then
call UnitRemoveAbility(GetTriggerUnit(),'B05D')
call UnitRemoveAbility(GetTriggerUnit(),'B05M')
call UnitRemoveAbility(GetTriggerUnit(),'B05N')
call UnitRemoveAbility(GetTriggerUnit(),'B05O')
call DestroyTriggerEx(GetTriggeringTrigger())
endif
endfunction
function SilentCurse_Run takes nothing returns nothing
local timer ltt=CreateTimer()
local trigger lPz=CreateTrigger()
local unit lfo=GetSpellTargetUnit()
call SetHandle(H2Tx(ltt),"CurseTarget",lfo)
call TimerStart(ltt,1.,true,function SilentCurse_Main)
call TriggerRegisterUnitEvent(lPz,lfo,EVENT_UNIT_SPELL_EFFECT)
call TriggerAddAction(lPz,function SilentCurse_End)
endfunction
function SilentCurse_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function SilentCurse_Spell))
call TriggerAddAction(ltt,function SilentCurse_Run)
endfunction
function InitTrig_Curse_of_the_Silent takes nothing returns nothing
endfunction
function Glaives_Damage_Spell takes nothing returns boolean
return GetLearnedSkill()=='A0LZ'and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function Glaives_Damage_OnOff takes nothing returns boolean
if(GetTriggerEventId()==EVENT_PLAYER_UNIT_ATTACKED)then
if(GetUnitAbilityLevel(GetAttacker(),'A0LZ')==0)then
return false
elseif(GetBoolean(H2Tx(GetTriggeringTrigger()),"OrbOn"))then
if IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and GetAttacker()==GetUnit(H2Tx(GetTriggeringTrigger()),"Silencer")then
return true
endif
else
return false
endif
elseif(GetTriggerEventId()==EVENT_UNIT_ISSUED_ORDER)then
if(GetIssuedOrderId()==OrderId("poisonarrows"))then
call SetBoolean(H2Tx(GetTriggeringTrigger()),"OrbOn",true)
elseif(GetIssuedOrderId()==OrderId("unpoisonarrows"))then
call SetBoolean(H2Tx(GetTriggeringTrigger()),"OrbOn",false)
endif
elseif(GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT)then
if(GetSpellAbilityId()=='A0LZ')then
return true
else
return false
endif
endif
return false
endfunction
function Glaives_Damage_Main takes nothing returns nothing
local texttag lgg
local real ldd
if UnitHasBuffBJ(GetTriggerUnit(),'B05X') and GetUnitAbilityLevel(GetEventDamageSource(),'A0LZ')>0 and GetUnit(H2Tx(GetTriggeringTrigger()),"Source")==GetEventDamageSource()then
call DisableTrigger(GetTriggeringTrigger())
set ldd=.15*I2R(GetUnitAbilityLevel(GetEventDamageSource(),'A0LZ')*GetHeroInt(GetEventDamageSource(),true))
set lgg=CreateTextTagUnitBJ("+"+I2S(R2I(ldd)),GetTriggerUnit(),64,10,1,85,86,15)
call SetTextTagVelocityBJ(lgg,64,90)
call UnitDamageTargetBJ(GetEventDamageSource(),GetTriggerUnit(),ldd,ATTACK_TYPE_HERO,DAMAGE_TYPE_DIVINE)
call PolledWait(1)
call DestroyTextTag(lgg)
call DisableTrigger(GetTriggeringTrigger())
endif
endfunction
function Glaives_Damage_Event takes nothing returns nothing
local trigger ltt=CreateTrigger()
local unit lFB
local unit lFb
if(GetTriggerEventId()==EVENT_UNIT_SPELL_EFFECT)then
set lFB=GetSpellTargetUnit()
set lFb=GetTriggerUnit()
else
set lFB=GetTriggerUnit()
set lFb=GetAttacker()
endif
if IsUnitIllusion(lFb)==false then
call SetHandle(H2Tx(ltt),"Source",lFb)
call TriggerRegisterUnitEvent(ltt,lFB,EVENT_UNIT_DAMAGED)
call TriggerAddAction(ltt,function Glaives_Damage_Main)
endif
call PolledWait(2)
call DisableTrigger(ltt)
endfunction
function Glaives_Damage_Run takes nothing returns nothing
local unit lfo=GetTriggerUnit()
local trigger ltt
if GetUnitAbilityLevel(lfo,'A0LZ')==1 then
set ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerRegisterUnitEvent(ltt,GetLearningUnit(),EVENT_UNIT_SPELL_EFFECT)
call TriggerRegisterUnitEvent(ltt,GetLearningUnit(),EVENT_UNIT_ISSUED_ORDER)
call TriggerAddCondition(ltt,Condition(function Glaives_Damage_OnOff))
call TriggerAddAction(ltt,function Glaives_Damage_Event)
call SetHandle(H2Tx(ltt),"Silencer",lfo)
endif
endfunction
function Glaives_Damage_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(ltt,Condition(function Glaives_Damage_Spell))
call TriggerAddAction(ltt,function Glaives_Damage_Run)
endfunction
function InitTrig_Glaives_of_Wisdom_Learn takes nothing returns nothing
endfunction
function Glaives_Steal_Check takes nothing returns boolean
return IsUnitType(GetDyingUnit(),UNIT_TYPE_HERO) and GetUnitAbilityLevel(GetKillingUnit(),'A0LZ')>0 and IsUnitIllusion(GetKillingUnit())==false
endfunction
function Glaives_Steal_Main takes nothing returns nothing
local texttag lg1
local texttag lg2
call SetHeroInt(GetDyingUnit(),GetHeroInt(GetDyingUnit(),false)-1,true)
call SetHeroInt(GetKillingUnit(),GetHeroInt(GetKillingUnit(),false)+1,true)
set lg1=CreateTextTagUnitBJ("+1 Int",GetKillingUnit(),100,10,255,0,0,10)
call SetTextTagVelocityBJ(lg1,64,90)
set lg2=CreateTextTagUnitBJ("-1 Int",GetDyingUnit(),100,10,255,0,0,10)
call SetTextTagVelocityBJ(lg2,64,90)
call PolledWait(3.)
call DestroyTextTag(lg1)
call DestroyTextTag(lg2)
endfunction
function Glaives_Steal_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(ltt,Condition(function Glaives_Steal_Check))
call TriggerAddAction(ltt,function Glaives_Steal_Main)
endfunction
function InitTrig_Glaives_of_Wisdom_Kill takes nothing returns nothing
endfunction
function Trig_Global_Silence_Conditions takes nothing returns boolean
return GetSpellAbilityId()=='A0L3'
endfunction
function Trig_Global_Silence_Actions takes nothing returns nothing
local location liD=GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc(1,'e00E',GetOwningPlayer(GetTriggerUnit()),liD,bj_UNIT_FACING)
call ShowUnitHide(bj_lastCreatedUnit)
call UnitApplyTimedLifeBJ(5.,'BTLF',bj_lastCreatedUnit)
call UnitAddAbility(bj_lastCreatedUnit,'A0L2')
call SetUnitAbilityLevelSwapped('A0L2',bj_lastCreatedUnit,GetUnitAbilityLevel(GetTriggerUnit(),'A0L3'))
call IssuePointOrderByIdLoc(bj_lastCreatedUnit,OrderId("silence"),liD)
call PolledWait(GetUnitAbilityLevel(GetTriggerUnit(),'A0L3')+3)
call RemoveLocation(liD)
endfunction
function StartTrigger_Global_Silence takes nothing returns nothing
set gg_trg_Global_Silence=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Global_Silence,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Global_Silence,Condition(function Trig_Global_Silence_Conditions))
call TriggerAddAction(gg_trg_Global_Silence,function Trig_Global_Silence_Actions)
endfunction
function InitTrig_Global_Silence takes nothing returns nothing
endfunction
function Trig_Slithereen_Crush_Conditions takes nothing returns boolean
if(not(GetSpellAbilityId()=='A01W'))then
return false
endif
return true
endfunction
function Trig_Slithereen_Crush_Actions takes nothing returns nothing
local location liD=GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc(1,'e00E',GetOwningPlayer(GetTriggerUnit()),liD,bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit,'A0M9')
call SetUnitAbilityLevel(bj_lastCreatedUnit,'A0M9',GetUnitAbilityLevel(GetTriggerUnit(),'A01W'))
call IssueImmediateOrderById(bj_lastCreatedUnit,OrderId("thunderclap"))
call RemoveLocation(liD)
endfunction
function StartTrigger_Slithereen_Crush takes nothing returns nothing
set gg_trg_Slithereen_Crush=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Slithereen_Crush,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Slithereen_Crush,Condition(function Trig_Slithereen_Crush_Conditions))
call TriggerAddAction(gg_trg_Slithereen_Crush,function Trig_Slithereen_Crush_Actions)
endfunction
function InitTrig_Slithereen_Crush takes nothing returns nothing
endfunction
function Conjure_Image_Spell takes nothing returns boolean
return GetSpellAbilityId()=='A0H4'
endfunction
function Conjure_Image_Main takes nothing returns nothing
local unit lfo=GetTriggerUnit()
local integer lmZ=GetUnitAbilityLevel(lfo,'A0H4')
local unit lJV=CreateUnit(GetOwningPlayer(lfo),'e00E',GetUnitX(lfo),GetUnitY(lfo),0)
call UnitAddAbility(lJV,'A08Q')
call SetUnitAbilityLevel(lJV,'A08Q',lmZ)
call IssueTargetOrderById(lJV,852274,lfo)
endfunction
function Conjure_Image_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function Conjure_Image_Spell))
call TriggerAddAction(ltt,function Conjure_Image_Main)
endfunction
function InitTrig_Conjure_Image takes nothing returns nothing
endfunction
function Sunder_Spell takes nothing returns boolean
return GetSpellAbilityId()=='A07Q'
endfunction
function Sunder_SpellII takes nothing returns boolean
return GetSpellAbilityId()=='A07R'
endfunction
function SunderSwap takes nothing returns nothing
local trigger ltt=GetTriggeringTrigger()
local string lf5=H2Tx(ltt)
local unit lFb=GetUnit(lf5,"Source")
local unit lFB=GetUnit(lf5,"Target")
local real lUC=GetReal(lf5,"SourceLifePercent")
local real lUd=GetReal(lf5,"TargetLifePercent")
local integer lmZ=GetUnitAbilityLevel(lFb,'A07Q')
if GetSpellTargetUnit()==lFb then
call SetUnitLifePercentBJ(lFb,lUd)
endif
if GetSpellTargetUnit()==lFB then
call SetUnitLifePercentBJ(lFB,lUC)
if GetUnitLifePercent(lFB)<33. and lmZ==1 then
call SetUnitLifePercentBJ(lFB,33.)
endif
if GetUnitLifePercent(lFB)<28. and lmZ==2 then
call SetUnitLifePercentBJ(lFB,28.)
endif
if GetUnitLifePercent(lFB)<23. and lmZ==3 then
call SetUnitLifePercentBJ(lFB,23.)
endif
endif
if GetTriggerExecCount(ltt)==2 then
call DisableTrigger(ltt)
call PolledWait(1)
call FastFlush(lf5)
call DestroyTriggerEx(ltt)
endif
endfunction
function Sunder_Setting takes nothing returns nothing
local trigger ltt=CreateTrigger()
local string lf5=H2Tx(ltt)
local unit lFb=GetTriggerUnit()
local unit lFB=GetSpellTargetUnit()
local unit lJV
call SetHandle(lf5,"Source",lFb)
call SetHandle(lf5,"Target",lFB)
call SetReal(lf5,"SourceLifePercent",GetUnitLifePercent(lFb))
call SetReal(lf5,"TargetLifePercent",GetUnitLifePercent(lFB))
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function Sunder_SpellII))
call TriggerAddAction(ltt,function SunderSwap)
set lJV=CreateUnit(GetOwningPlayer(lFB),'e00Y',GetUnitX(lFB),GetUnitY(lFB),0)
call UnitAddAbility(lJV,'A07R')
call IssueTargetOrderById(lJV,OrderId("thunderbolt"),lFb)
call ShowUnit(lJV,false)
call SetUnitPathing(lJV,false)
call SetUnitInvulnerable(lJV,true)
call UnitApplyTimedLife(lJV,'BTLF',.2)
set lJV=CreateUnit(GetOwningPlayer(lFb),'e00Y',GetUnitX(lFb),GetUnitY(lFb),0)
call UnitAddAbility(lJV,'A07R')
call IssueTargetOrderById(lJV,OrderId("thunderbolt"),lFB)
call ShowUnit(lJV,false)
call SetUnitPathing(lJV,false)
call SetUnitInvulnerable(lJV,true)
call UnitApplyTimedLife(lJV,'BTLF',.2)
endfunction
function Sunder_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function Sunder_Spell))
call TriggerAddAction(ltt,function Sunder_Setting)
endfunction
function InitTrig_Sunder takes nothing returns nothing
endfunction
function Spectral_Dagger_MoveClon takes nothing returns nothing
local timer ltt=GetExpiredTimer()
local string lf5=H2Tx(ltt)
local group lMW=GetGroup(lf5,"AlreadyDamaged")
local group lEw=CreateGroup()
local boolexpr lEW=Condition(function Spectral_Dagger_Filter)
local unit lfU=GetUnit(lf5,"Hero")
local unit lpc=GetUnit(lf5,"Projectile")
local unit lFB=GetUnit(lf5,"Target")
local real lEv=GetUnitX(lFB)
local real lEV=GetUnitY(lFB)
local real lFC=GetUnitX(lpc)
local real lFd=GetUnitY(lpc)
local real lnM=Atan2(lEV-lFd,lEv-lFC)
local real lpC=SafeX(GetUnitX(lpc)+30*Cos(lnM))
local real lpd=SafeY(GetUnitY(lpc)+30*Sin(lnM))
local unit lJV
local integer lmZ=GetUnitAbilityLevel(lfU,'A0HW')
if GetBoolean(lf5,"TrailNext")then
call SetBoolean(lf5,"TrailNext",false)
set lJV=CreateUnit(GetOwningPlayer(lfU),'h002',lFC,lFd,0)
call SetUnitAbilityLevel(lJV,'A0I2',lmZ)
call SetUnitAbilityLevel(lJV,'A0HY',lmZ)
call UnitApplyTimedLife(lJV,'BTLF',12)
else
call SetBoolean(lf5,"TrailNext",true)
endif
call SetUnitX(lpc,lpC)
call SetUnitY(lpc,lpd)
call SetUnitFacing(lpc,lnM*bj_RADTODEG)
set udg_g_UNKNOWN_some_defenders_group=lMW
set udg_u_DTAX_temp=lfU
set udg_r_DTAX_necrolyte_reaperscythe_ratio=50*GetUnitAbilityLevel(lfU,'A0HW')
call GroupEnumUnitsInRange(lEw,lpC,lpd,150,lEW)
call ForGroup(lEw,function Spectral_Dagger_Damage)
call DestroyGroup(lEw)
call DestroyBoolExpr(lEW)
if(lpC-lEv)*(lpC-lEv)+(lpd-lEV)*(lpd-lEV)<1600 then
call PauseTimer(ltt)
call FastFlush(lf5)
call KillUnit(lpc)
call DestroyGroup(lMW)
endif
endfunction
function Spectral_Dagger_Move takes nothing returns nothing
local timer ltt=GetExpiredTimer()
local string lf5=H2Tx(ltt)
local group lMW=GetGroup(lf5,"AlreadyDamaged")
local group lEw=CreateGroup()
local boolexpr lEW=Condition(function Spectral_Dagger_Filter)
local unit lfU=GetUnit(lf5,"Hero")
local unit lpc=GetUnit(lf5,"Projectile")
local real lEv=GetReal(lf5,"TargetX")
local real lEV=GetReal(lf5,"TargetY")
local real lFC=GetUnitX(lpc)
local real lFd=GetUnitY(lpc)
local real lnM=GetReal(lf5,"Angle")
local real lpC=SafeX(GetUnitX(lpc)+30*Cos(lnM))
local real lpd=SafeY(GetUnitY(lpc)+30*Sin(lnM))
local unit lJV
local integer lmZ=GetUnitAbilityLevel(lfU,'A0HW')
if GetBoolean(lf5,"TrailNext")then
call SetBoolean(lf5,"TrailNext",false)
set lJV=CreateUnit(GetOwningPlayer(lfU),'h002',lFC,lFd,0)
call SetUnitAbilityLevel(lJV,'A0I2',lmZ)
call SetUnitAbilityLevel(lJV,'A0HY',lmZ)
call UnitApplyTimedLife(lJV,'BTLF',12)
else
call SetBoolean(lf5,"TrailNext",true)
endif
call SetUnitX(lpc,lpC)
call SetUnitY(lpc,lpd)
set udg_g_UNKNOWN_some_defenders_group=lMW
set udg_u_DTAX_temp=lfU
set udg_r_DTAX_necrolyte_reaperscythe_ratio=50*GetUnitAbilityLevel(lfU,'A0HW')
call GroupEnumUnitsInRange(lEw,lpC,lpd,150,lEW)
call ForGroup(lEw,function Spectral_Dagger_Damage)
call DestroyGroup(lEw)
call DestroyBoolExpr(lEW)
if(lpC-lEv)*(lpC-lEv)+(lpd-lEV)*(lpd-lEV)<1600 then
call PauseTimer(ltt)
call FastFlush(lf5)
call KillUnit(lpc)
call DestroyGroup(lMW)
endif
endfunction
function IsItemDrops takes unit pfo,integer pfy returns boolean
if(GetItemTypeId(UnitItemInSlot(pfo,pfy))=='pspd')then
return true
endif
if(GetItemTypeId(UnitItemInSlot(pfo,pfy))=='oflg')then
return true
endif
return false
endfunction
function Spectral_Dagger_ItemsSafe takes nothing returns nothing
local timer ltt=GetExpiredTimer()
local string lf5=H2Tx(ltt)
local unit lfU=GetUnit(lf5,"Hero")
local real lOZ=GetReal(lf5,"Duration")
local integer lEq=0
loop
exitwhen lEq>5
if IsItemDrops(lfU,lEq)then
if GetUnitAbilityLevel(lfU,'B047')==0 then
call SetItemDropOnDeath(UnitItemInSlot(lfU,lEq),true)
if GetItemTypeId(UnitItemInSlot(lfU,lEq))=='oflg'then
call SetItemDroppable(UnitItemInSlot(lfU,lEq),true)
endif
else
call SetItemDropOnDeath(UnitItemInSlot(lfU,lEq),false)
if GetItemTypeId(UnitItemInSlot(lfU,lEq))=='oflg'then
call SetItemDroppable(UnitItemInSlot(lfU,lEq),false)
endif
endif
endif
set lEq=lEq+1
endloop
set lOZ=lOZ+.2
call SetReal(lf5,"Duration",lOZ)
if GetUnitAbilityLevel(lfU,'B047')==0 then
call SetUnitPathing(lfU,true)
else
call SetUnitPathing(lfU,false)
endif
if lOZ>20 then
call PauseTimer(ltt)
call FastFlush(lf5)
call SetUnitPathing(lfU,true)
set lEq=0
loop
exitwhen lEq>5
if IsItemDrops(lfU,lEq)then
call SetItemDropOnDeath(UnitItemInSlot(lfU,lEq),true)
if GetItemTypeId(UnitItemInSlot(lfU,lEq))=='oflg'then
call SetItemDroppable(UnitItemInSlot(lfU,lEq),true)
endif
endif
set lEq=lEq+1
endloop
endif
endfunction
function Spectral_Dagger_Start takes nothing returns nothing
local unit lfU=GetTriggerUnit()
local unit lFB=GetSpellTargetUnit()
local real lFC=SafeX(GetUnitX(lfU))
local real lFd=SafeY(GetUnitY(lfU))
local unit lpc=CreateUnit(GetOwningPlayer(lfU),'h003',lFC,lFd,0)
local timer ltt=CreateTimer()
local string lf5=H2Tx(ltt)
local group lMW=CreateGroup()
local location ln3
local real lnM
local real lEv
local real lEV
call SetUnitPathing(lpc,false)
call SetHandle(lf5,"AlreadyDamaged",lMW)
call SetHandle(lf5,"Hero",lfU)
call SetHandle(lf5,"Projectile",lpc)
if lFB!=null then
call SetHandle(lf5,"Target",lFB)
call TimerStart(ltt,.035,true,function Spectral_Dagger_MoveClon)
else
set ln3=GetSpellTargetLoc()
set lEv=GetLocationX(ln3)
set lEV=GetLocationY(ln3)
set lnM=Atan2(lEV-lFd,lEv-lFC)
call SetUnitFacing(lpc,lnM*bj_RADTODEG)
set lEv=SafeX(lFC+2100*Cos(lnM))
set lEV=SafeY(lFd+2100*Sin(lnM))
call SetReal(lf5,"TargetX",lEv)
call SetReal(lf5,"TargetY",lEV)
call SetReal(lf5,"Angle",lnM)
call TimerStart(ltt,.035,true,function Spectral_Dagger_Move)
endif
set ltt=CreateTimer()
set lf5=H2Tx(ltt)
call SetUnitPathing(lfU,false)
call SetHandle(lf5,"Hero",lfU)
call PolledWait(3)
call TimerStart(ltt,.2,true,function Spectral_Dagger_ItemsSafe)
endfunction
function Spectral_Dagger_Spell takes nothing returns boolean
return GetSpellAbilityId()=='A0HW'
endfunction
function Spectral_Dagger_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function Spectral_Dagger_Spell))
call TriggerAddAction(ltt,function Spectral_Dagger_Start)
call CreateSound("Sounds\\Spectral Dagger.mp3",false,false,false,10,10,"DefaultEAXON")
call SpellPreload('A0I2')
call SpellPreload('A0HY')
endfunction
function InitTrig_Spectral_Dagger takes nothing returns nothing
endfunction
function DesolateCheck takes nothing returns boolean
return IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO) and GetUnitAbilityLevel(GetAttacker(),'A0FX')>0
endfunction
function DesolateSpell takes nothing returns boolean
return IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))and GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>1 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false
endfunction
function DesolateMain takes nothing returns nothing
local unit lKg=GetAttacker()
local unit lnk=GetTriggerUnit()
local group lEw=CreateGroup()
local boolexpr lEW=Condition(function DesolateSpell)
local string lf5
call GroupEnumUnitsInRange(lEw,GetUnitX(lnk),GetUnitY(lnk),900,lEW)
call GroupRemoveUnit(lEw,lnk)
if FirstOfGroup(lEw)==null then
set lf5=H2Tx(lKg)
if GetBoolean(lf5,"Desolate|InCooldown")==false then
call UnitDamageTarget(lKg,lnk,5+10*GetUnitAbilityLevel(lKg,'A0FX'),true,true,ATTACK_TYPE_HERO,DAMAGE_TYPE_DIVINE,WEAPON_TYPE_WHOKNOWS)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DeathandDecay\\DeathandDecayTarget.mdl",lnk,"overhead"))
call SetBoolean(lf5,"Desolate|InCooldown",true)
call PolledWait(.4)
call SetBoolean(lf5,"Desolate|InCooldown",false)
endif
endif
call DestroyGroup(lEw)
call DestroyBoolExpr(lEW)
endfunction
function DesolateInit takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(ltt,Condition(function DesolateCheck))
call TriggerAddAction(ltt,function DesolateMain)
endfunction
function InitTrig_Desolate takes nothing returns nothing
endfunction
function DispersionFilter takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))
endfunction
function DispersionDamage takes nothing returns nothing
local unit lfU=GetTriggerUnit()
local unit lFB=GetEnumUnit()
local unit lJV=CreateUnit(GetOwningPlayer(lfU),'e00E',GetUnitX(lfU),GetUnitY(lfU),0)
local real lf7=udg_r_DTAX_necrolyte_reaperscythe_ratio
call UnitAddAbility(lJV,'A0NN')
call IssueTargetOrderById(lJV,OrderId("thunderbolt"),lFB)
call UnitDamageTarget(lfU,lFB,lf7,true,false,ATTACK_TYPE_HERO,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)
endfunction
function DispersionMain takes nothing returns nothing
local unit lfU=GetTriggerUnit()
local unit lJV
local group lEw=CreateGroup()
local real lf7=GetEventDamage()
local boolexpr lEW=Condition(function DispersionFilter)
local real lFa=GetUnitState(lfU,UNIT_STATE_LIFE)
set udg_r_DTAX_necrolyte_reaperscythe_ratio=ReturnMinReal(lf7,lFa)
call DelayedDamageCheck(lfU,lf7)
call GroupEnumUnitsInRange(lEw,GetUnitX(lfU),GetUnitY(lfU),400,lEW)
call ForGroup(lEw,function DispersionDamage)
call DestroyGroup(lEw)
call DestroyBoolExpr(lEW)
set lJV=CreateUnit(GetOwningPlayer(lfU),'e01Q',GetUnitX(lfU),GetUnitY(lfU),0)
call SetUnitPathing(lJV,false)
call SetUnitInvulnerable(lJV,true)
call SetUnitAnimation(lJV,"Death")
call PolledWait(2)
call RemoveUnit(lJV)
endfunction
function DispersionRoll takes nothing returns boolean
return GetRandomInt(1,100)<=GetUnitAbilityLevel(GetTriggerUnit(),'A0NA')*4 and GetEventDamage()>5 and GetUnitTypeId(GetEventDamageSource())!='nfoh'and GetUnitTypeId(GetEventDamageSource())!='ndfl'
endfunction
function DispersionSet takes nothing returns nothing
local trigger ltt=CreateTrigger()
local unit lfU=GetTriggerUnit()
call TriggerRegisterUnitEvent(ltt,lfU,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(ltt,Condition(function DispersionRoll))
call TriggerAddAction(ltt,function DispersionMain)
endfunction
function DispersionSpell takes nothing returns boolean
return GetLearnedSkill()=='A0NA'and GetUnitAbilityLevel(GetTriggerUnit(),'A0NA')==1 and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function DispersionInit takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(ltt,Condition(function DispersionSpell))
call TriggerAddAction(ltt,function DispersionSet)
endfunction
function InitTrig_Dispersion takes nothing returns nothing
endfunction
function Haunt_Spell takes nothing returns boolean
return GetSpellAbilityId()=='A0H9'
endfunction
function Haunt_MainFilter takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO) and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))
endfunction
function Haunt_CreateImages takes nothing returns nothing
local unit lFB=GetEnumUnit()
local unit lfU=GetTriggerUnit()
local unit lJV=CreateUnit(GetOwningPlayer(lfU),'e00E',GetUnitX(lFB),GetUnitY(lFB),0)
call SetHandle(H2Tx(lJV),"HauntTarget",lFB)
call UnitAddAbility(lJV,'A0N9')
call SetUnitAbilityLevel(lJV,'A0N9',GetUnitAbilityLevel(lfU,'A0H9'))
call IssueTargetOrderById(lJV,852274,lfU)
endfunction
function Haunt_MainAction takes nothing returns nothing
local unit lfU=GetTriggerUnit()
local group lEw=CreateGroup()
local boolexpr lEW=Condition(function Haunt_MainFilter)
local sound lfG
call GroupEnumUnitsInRect(lEw,bj_mapInitialPlayableArea,lEW)
call ForGroup(lEw,function Haunt_CreateImages)
if FirstOfGroup(lEw)!=null then
set lfG=CreateSound("Abilities\\Spells\\Other\\ANsa\\SacrificeUnit.wav",false,false,false,10,10,"DefaultEAXON")
call StartSound(lfG)
call KillSoundWhenDone(lfG)
endif
call DestroyBoolExpr(lEW)
call DestroyGroup(lEw)
endfunction
function Haunt_IsImage takes nothing returns boolean
return GetUnitAbilityLevel(GetSummonedUnit(),'B06L')>0
endfunction
function Haunt_End takes nothing returns nothing
local string lf5=H2Tx(GetTriggeringTrigger())
local unit luk=GetUnit(lf5,"HauntImage")
local unit lFB=GetUnit(lf5,"HauntTarget")
if GetTriggerEventId()==EVENT_UNIT_DEATH then
call DisableTrigger(GetTriggeringTrigger())
call FastFlush(H2Tx(GetTriggeringTrigger()))
if lFB==GetTriggerUnit()then
call KillUnit(luk)
endif
elseif IsUnitPaused(luk)==false then
call DisableTrigger(GetTriggeringTrigger())
call IssueTargetOrderById(luk,OrderId("attack"),lFB)
call EnableTrigger(GetTriggeringTrigger())
endif
endfunction
function Haunt_RegisterImages takes nothing returns nothing
local unit lJV=GetSummoningUnit()
local unit luk=GetSummonedUnit()
local unit lFB=GetUnit(H2Tx(lJV),"HauntTarget")
local trigger ltt=CreateTrigger()
call SetHandle(H2Tx(udg_uA_DTAX_player_hero_unit[GetPlayerId(GetOwningPlayer(lJV))]),"HauntTarget"+H2Tx(luk),lFB)
call SetUnitPathing(luk,false)
call SetUnitMoveSpeed(luk,400)
call SetUnitX(luk,GetUnitX(lFB))
call SetUnitY(luk,GetUnitY(lFB))
call IssueTargetOrderById(luk,OrderId("attack"),lFB)
call TriggerRegisterUnitEvent(ltt,luk,EVENT_UNIT_ISSUED_TARGET_ORDER)
call TriggerRegisterUnitEvent(ltt,luk,EVENT_UNIT_ISSUED_POINT_ORDER)
call TriggerRegisterUnitEvent(ltt,luk,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(ltt,lFB,EVENT_UNIT_DEATH)
call TriggerRegisterTimerEvent(ltt,.5,true)
call TriggerAddAction(ltt,function Haunt_End)
call SetHandle(H2Tx(ltt),"HauntTarget",lFB)
call SetHandle(H2Tx(ltt),"HauntImage",luk)
call FastFlush(H2Tx(lJV))
endfunction
function Haunt_AddRealityCheck takes nothing returns boolean
return GetLearnedSkill()=='A0H9'and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),'A0H9')==1
endfunction
function Haunt_AddReality takes nothing returns nothing
call UnitAddAbility(GetTriggerUnit(),'A0HA')
endfunction
function Haunt_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function Haunt_Spell))
call TriggerAddAction(ltt,function Haunt_MainAction)
set ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SUMMON)
call TriggerAddCondition(ltt,Condition(function Haunt_IsImage))
call TriggerAddAction(ltt,function Haunt_RegisterImages)
set ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(ltt,Condition(function Haunt_AddRealityCheck))
call TriggerAddAction(ltt,function Haunt_AddReality)
call CreateSound("Abilities\\Spells\\Other\\ANsa\\SacrificeUnit.wav",false,false,false,10,10,"DefaultEAXON")
call SpellPreload('A0N9')
endfunction
function InitTrig_Haunt takes nothing returns nothing
endfunction
function Reality_Spell takes nothing returns boolean
return GetSpellAbilityId()=='A0HA'
endfunction
function Reality_Main takes nothing returns nothing
local unit lfU=GetTriggerUnit()
local unit lFB=Reality_GetImage()
local unit luP=GetUnit(H2Tx(lfU),"HauntTarget"+H2Tx(lFB))
local real lEv
local real lEV
if lFB==null then
call SimError(GetOwningPlayer(lfU),"Cannot find any of your Haunting illusions")
else
set lEv=GetUnitX(lFB)
set lEV=GetUnitY(lFB)
call KillUnit(lFB)
call SetUnitX(lfU,lEv)
call SetUnitY(lfU,lEV)
call PanCameraToTimedForPlayer(GetOwningPlayer(lfU),lEv,lEV,0)
call IssueTargetOrderById(lfU,OrderId("attack"),luP)
endif
endfunction
function Reality_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function Reality_Spell))
call TriggerAddAction(ltt,function Reality_Main)
endfunction
function InitTrig_Reality takes nothing returns nothing
endfunction
function Charge_Spell takes nothing returns boolean
return GetSpellAbilityId()=='A0ML'
endfunction
function Charge_SpeedUp takes nothing returns nothing
local string lf5=H2Tx(GetTriggeringTrigger())
local unit lur=GetUnit(lf5,"Spiritbreaker")
local unit lFB=GetUnit(lf5,"Target")
local unit lJV=GetUnit(lf5,"Caster")
local integer lSd=GetInteger(lf5,"Ability")
local integer luv=GetTriggerExecCount(GetTriggeringTrigger())
local integer luV=GetUnitAbilityLevel(lur,'A0ML')
local trigger luu=GetTrigger(lf5,"TrigOff")
local trigger luR=GetTrigger(lf5,"TrigAttack")
call SetUnitVertexColorBJ(lur,100,100,100,luV*luv)
if ModuloInteger(luv,4)==0 then
call SetUnitAbilityLevel(lJV,lSd,GetUnitAbilityLevel(lJV,lSd)+1)
endif
call DisableTrigger(luu)
call DisableTrigger(luR)
call IssueTargetOrderById(lur,OrderId("attack"),lFB)
call EnableTrigger(luu)
call EnableTrigger(luR)
if GetUnitAbilityLevel(lFB,'B01Z')==0 then
call IssueTargetOrderById(lur,OrderId("attack"),lFB)
endif
endfunction
function Charge_AttackCheck takes nothing returns boolean
return GetUnit(H2Tx(GetTriggeringTrigger()),"Spiritbreaker")==GetAttacker()
endfunction
function Charge_EndSpeedUp takes nothing returns nothing
local trigger ltt=GetTriggeringTrigger()
local string lf5=H2Tx(ltt)
local unit lur=GetUnit(lf5,"Spiritbreaker")
local unit lFB=GetUnit(lf5,"Target")
local unit lJV=GetUnit(lf5,"Caster")
local integer lmZ=GetUnitAbilityLevel(lur,'A0ML')
local unit luT=CreateUnit(GetOwningPlayer(lur),'e00E',GetUnitX(lur),GetUnitY(lur),0)
local trigger luu=GetTrigger(lf5,"TrigOff")
local trigger lus=GetTrigger(lf5,"TrigAccelerate")
call DisableTrigger(ltt)
call DisableTrigger(luu)
call DisableTrigger(lus)
call UnitAddAbility(luT,'A0GS')
call SetUnitAbilityLevel(luT,'A0GS',lmZ)
call IssueTargetOrderById(luT,OrderId("thunderbolt"),lFB)
call RemoveUnit(lJV)
call UnitRemoveAbility(lur,'B01Z')
call UnitRemoveAbility(lFB,'B01Y')
call SetUnitPathing(lur,true)
call SetUnitVertexColorBJ(lur,100,100,100,0)
call PolledWait(1)
call FastFlush(H2Tx(luu))
call DestroyTriggerEx(luu)
call FastFlush(H2Tx(lus))
call DestroyTriggerEx(lus)
call FastFlush(lf5)
call DestroyTriggerEx(ltt)
endfunction
function Charge_Expire takes nothing returns nothing
local trigger ltt=GetTriggeringTrigger()
local string lf5=H2Tx(ltt)
local unit lur=GetUnit(lf5,"Spiritbreaker")
local unit lFB=GetUnit(lf5,"Target")
local unit lJV=GetUnit(lf5,"Caster")
local trigger luR=GetTrigger(lf5,"TrigAttack")
local trigger lus=GetTrigger(lf5,"TrigAccelerate")
call DisableTrigger(luR)
call DisableTrigger(lus)
call DisableTrigger(ltt)
call RemoveUnit(lJV)
call UnitRemoveAbility(lur,'B01Z')
call UnitRemoveAbility(lFB,'B01Y')
call SetUnitPathing(lur,true)
call SetUnitVertexColorBJ(lur,100,100,100,0)
call PolledWait(1)
call FastFlush(H2Tx(luR))
call DestroyTriggerEx(luR)
call FastFlush(H2Tx(lus))
call DestroyTriggerEx(lus)
call FastFlush(lf5)
call DestroyTriggerEx(ltt)
endfunction
function Charge_Setting takes nothing returns nothing
local unit lCaster=GetTriggerUnit()
local unit lVictim=GetSpellTargetUnit()
local integer lLvl=GetUnitAbilityLevel(lCaster,'A0ML')
local integer lSd
local location lStart=GetUnitLoc(lCaster)
local unit lAuraUnit
local trigger lSpeedUp=CreateTrigger()
local trigger lEnd=CreateTrigger()
local trigger lDoStun=CreateTrigger()
call UnitShareVision(lVictim,GetOwningPlayer(lCaster),true)
set lAuraUnit=CreateUnit(GetOwningPlayer(lCaster),'e00C',GetUnitX(lCaster),GetUnitY(lCaster),0)
call SetUnitPathing(lAuraUnit,false)
call UnitAddAbility(lAuraUnit,'Aloc')
call SetHandle(H2Tx(GetOwningPlayer(lCaster)),"ChargeUnit",lAuraUnit)
call SetUnitInvulnerable(lAuraUnit,true)
if(lLvl==1)then
call UnitAddAbility(lAuraUnit,'A0GE')
set lSd='A0GE'
elseif(lLvl==2)then
call UnitAddAbility(lAuraUnit,'A0GF')
set lSd='A0GF'
elseif(lLvl==3)then
call UnitAddAbility(lAuraUnit,'A0GG')
set lSd='A0GG'
elseif(lLvl==4)then
call UnitAddAbility(lAuraUnit,'A0GH')
set lSd='A0GH'
endif
call PolledWait(.1)
call UnitAddAbility(lAuraUnit,'A0GJ')
call IssueTargetOrderById(lAuraUnit,OrderId("faeriefire"),lVictim)
call IssueTargetOrderById(lCaster,OrderId("attack"),lVictim)
call SetUnitPathing(lCaster,false)
call TriggerRegisterTimerEvent(lSpeedUp,1.,true)
call TriggerAddAction(lSpeedUp,function Charge_SpeedUp)
call SetHandle(H2Tx(lSpeedUp),"TrigOff",lEnd)
call SetHandle(H2Tx(lSpeedUp),"TrigAttack",lDoStun)
call SetHandle(H2Tx(lSpeedUp),"Spiritbreaker",lCaster)
call SetHandle(H2Tx(lSpeedUp),"Caster",lAuraUnit)
call SetHandle(H2Tx(lSpeedUp),"Target",lVictim)
call SetInteger(H2Tx(lSpeedUp),"Ability",lSd)
call TriggerRegisterUnitEvent(lDoStun,lVictim,EVENT_UNIT_ATTACKED)
call TriggerAddCondition(lDoStun,Condition(function Charge_AttackCheck))
call TriggerAddAction(lDoStun,function Charge_EndSpeedUp)
call SetHandle(H2Tx(lDoStun),"TrigOff",lEnd)
call SetHandle(H2Tx(lDoStun),"TrigAccelerate",lSpeedUp)
call SetHandle(H2Tx(lDoStun),"Spiritbreaker",lCaster)
call SetHandle(H2Tx(lDoStun),"Caster",lAuraUnit)
call SetHandle(H2Tx(lDoStun),"Target",lVictim)
call TriggerRegisterUnitEvent(lEnd,lCaster,EVENT_UNIT_ISSUED_ORDER)
call TriggerRegisterUnitEvent(lEnd,lCaster,EVENT_UNIT_ISSUED_POINT_ORDER)
call TriggerRegisterUnitEvent(lEnd,lCaster,EVENT_UNIT_ISSUED_TARGET_ORDER)
call TriggerRegisterUnitEvent(lEnd,lCaster,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(lEnd,lVictim,EVENT_UNIT_DEATH)
call TriggerAddAction(lEnd,function Charge_Expire)
call SetHandle(H2Tx(lEnd),"TrigAttack",lDoStun)
call SetHandle(H2Tx(lEnd),"TrigAccelerate",lSpeedUp)
call SetHandle(H2Tx(lEnd),"Spiritbreaker",lCaster)
call SetHandle(H2Tx(lEnd),"Caster",lAuraUnit)
call SetHandle(H2Tx(lEnd),"Target",lVictim)
call PolledWait(.1)
call UnitShareVision(lVictim,GetOwningPlayer(lCaster),false)
if GetUnitState(lCaster,UNIT_STATE_LIFE)<=0 then
call FastFlush(H2Tx(lSpeedUp))
call FastFlush(H2Tx(lDoStun))
call FastFlush(H2Tx(lEnd))
call DisableTrigger(lSpeedUp)
call DisableTrigger(lDoStun)
call DisableTrigger(lEnd)
call PolledWait(1)
call DestroyTriggerEx(lSpeedUp)
call DestroyTriggerEx(lDoStun)
call DestroyTriggerEx(lEnd)
call RemoveUnit(lAuraUnit)
endif
endfunction
function Charge_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function Charge_Spell))
call TriggerAddAction(ltt,function Charge_Setting)
endfunction
function InitTrig_Charge_of_Darkness takes nothing returns nothing
endfunction
function HasteRoll takes nothing returns boolean
return GetUnitAbilityLevel(GetAttacker(),'A0ES')>0 and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetAttacker()))
endfunction
function HasteMain takes nothing returns nothing
local unit lKg=GetAttacker()
local unit lnk=GetTriggerUnit()
local real lf7=GetUnitMoveSpeed(lKg)*.04*GetUnitAbilityLevel(lKg,'A0ES')
call DisableTrigger(GetTriggeringTrigger())
call UnitDamageTargetBJ(lKg,lnk,lf7,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_NORMAL)
call PolledWait(.5)
call EnableTrigger(GetTriggeringTrigger())
endfunction
function HasteInit takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(ltt,Condition(function HasteRoll))
call TriggerAddAction(ltt,function HasteMain)
endfunction
function InitTrig_Empowering_Haste takes nothing returns nothing
endfunction
function Greater_Bash_Roll takes nothing returns boolean
return GetUnitAbilityLevel(GetAttacker(),'A0G5')>0 and IsUnitIllusion(GetAttacker())==false and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and GetUnitTypeId(GetTriggerUnit())!='n00L'and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetAttacker()))and GetRandomInt(1,100)<=17
endfunction
function Greater_Bash_Moving takes nothing returns nothing
local timer ltt=GetExpiredTimer()
local string lf5=H2Tx(ltt)
local unit lnk=GetUnit(lf5,"Defender")
local real lnM=GetReal(lf5,"Angle")
local integer luY=GetInteger(lf5,"Brake")
local real luz=GetReal(lf5,"Movement")
local location luZ
if luY==1 then
call SetReal(lf5,"Movement",luz*.98)
endif
if(GetUnitState(lnk,UNIT_STATE_LIFE)>0)then
set luZ=GetUnitLoc(lnk)
call EnumDestructablesInCircleBJ(150.,luZ,function KillDestructableEnum)
call DestroyEffect(AddSpellEffectByIdLoc('A0G5',EFFECT_TYPE_SPECIAL,luZ))
call RemoveLocation(luZ)
call SetUnitPosition(lnk,GetUnitX(lnk)+luz*Cos(lnM),GetUnitY(lnk)+luz*Sin(lnM))
endif
endfunction
function Greater_Bash_Setting takes nothing returns nothing
local timer ltt=CreateTimer()
local string lf5=H2Tx(ltt)
local unit lnk=GetTriggerUnit()
local unit lKg=GetAttacker()
local real lnM=Atan2(GetUnitY(lnk)-GetUnitY(lKg),GetUnitX(lnk)-GetUnitX(lKg))
local integer lmZ=GetUnitAbilityLevel(lKg,'A0G5')
call DestroyEffect(AddSpecialEffectTargetUnitBJ("weapon",lKg,"Abilities\\Weapons\\PhoenixMissile\\Phoenix_Missile_mini.mdl"))
call DisableTrigger(GetTriggeringTrigger())
call SetHandle(lf5,"Defender",lnk)
call SetReal(lf5,"Angle",lnM)
call SetReal(lf5,"Movement",2)
call SetInteger(lf5,"Brake",0)
call UnitDamageTargetBJ(lKg,lnk,25*lmZ,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_UNKNOWN)
call TimerStart(ltt,.01,true,function Greater_Bash_Moving)
call PolledWait(.1)
call SetInteger(lf5,"Brake",1)
call PolledWait(.4+lmZ*.2)
call PauseTimer(ltt)
call PolledWait(1.25)
call EnableTrigger(GetTriggeringTrigger())
call FastFlush(lf5)
call DestroyTimer(ltt)
endfunction
function Greater_Bash_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(ltt,Condition(function Greater_Bash_Roll))
call TriggerAddAction(ltt,function Greater_Bash_Setting)
endfunction
function InitTrig_Greater_Bash takes nothing returns nothing
endfunction
function Nether_Strike_Spell takes nothing returns boolean
return GetSpellAbilityId()=='A0G4'
endfunction
function Nether_Strike_FadeIn takes nothing returns nothing
local string lf5=H2Tx(GetExpiredTimer())
local integer lu6=GetInteger(lf5,"Fade")
call SetUnitVertexColorBJ(GetUnit(lf5,"caster"),100,100,100,lu6)
call SetInteger(lf5,"Fade",lu6+1)
endfunction
function Nether_Strike_Damage takes nothing returns nothing
local unit lMp=GetUnit(H2Tx(GetTriggeringTrigger()),"caster")
if(GetEventDamageSource()==lMp)then
call DisableTrigger(GetTriggeringTrigger())
call UnitDamageTargetBJ(lMp,GetTriggerUnit(),100*I2R(GetUnitAbilityLevel(lMp,'A0G4')),ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL)
endif
endfunction
function Nether_Strike_FadeOff takes nothing returns nothing
local string lf5=H2Tx(GetExpiredTimer())
local integer lu6=GetInteger(lf5,"Fade")
call SetUnitVertexColorBJ(GetUnit(lf5,"caster"),100,100,100,lu6)
call SetInteger(lf5,"Fade",lu6-1)
endfunction
function Nether_Strike_Setting takes nothing returns nothing
local unit lMp=GetTriggerUnit()
local unit lfK=GetSpellTargetUnit()
local timer lt1=CreateTimer()
local timer lt2=CreateTimer()
local location liD
local location lng
local trigger lu9=CreateTrigger()
call UnitShareVision(lfK,GetOwningPlayer(lMp),true)
call IssueImmediateOrder(lMp,"halt")
call SetInteger(H2Tx(lt1),"Fade",0)
call SetHandle(H2Tx(lt1),"caster",lMp)
call TimerStart(lt1,.01,true,function Nether_Strike_FadeIn)
call PolledWait(1)
call PauseTimer(lt1)
set liD=GetUnitLoc(lfK)
set lng=GetUnitLoc(lMp)
call SetUnitPositionLocFacingLocBJ(lMp,PolarProjectionBJ(liD,80.,AngleBetweenPoints(lng,liD)),liD)
set udg_u_DTAX_temp=lMp
set udg_u_DTAX_temp_target=lfK
call ExecuteFunc("BashSetting")
call SetUnitAnimation(lMp,"attack")
call IssueTargetOrderById(lMp,OrderId("attack"),lfK)
call TriggerRegisterUnitEvent(lu9,lfK,EVENT_UNIT_DAMAGED)
call TriggerAddAction(lu9,function Nether_Strike_Damage)
call SetHandle(H2Tx(lu9),"caster",lMp)
call SetInteger(H2Tx(lt2),"Fade",100)
call SetHandle(H2Tx(lt2),"caster",lMp)
call TimerStart(lt2,.01,true,function Nether_Strike_FadeOff)
call PolledWait(1)
call PauseTimer(lt2)
call SetUnitVertexColorBJ(lMp,100,100,100,0)
call UnitShareVision(lfK,GetOwningPlayer(lMp),false)
call PolledWait(.01)
call DestroyTimer(lt1)
call DestroyTimer(lt2)
call RemoveLocation(liD)
call RemoveLocation(lng)
endfunction
function Nether_Strike_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function Nether_Strike_Spell))
call TriggerAddAction(ltt,function Nether_Strike_Setting)
endfunction
function InitTrig_Nether_Strike takes nothing returns nothing
endfunction
function BashMoving takes nothing returns nothing
local timer ltt=GetExpiredTimer()
local string lf5=H2Tx(ltt)
local unit lnk=GetUnit(lf5,"Defender")
local real lnM=GetReal(lf5,"Angle")
local integer luY=GetInteger(lf5,"Brake")
local real luz=GetReal(lf5,"Movement")
local location luZ
if luY==1 then
call SetReal(lf5,"Movement",luz*.98)
endif
if(GetUnitState(lnk,UNIT_STATE_LIFE)>0)then
set luZ=GetUnitLoc(lnk)
call EnumDestructablesInCircleBJ(150.,luZ,function KillDestructableEnum)
call DestroyEffect(AddSpellEffectByIdLoc('A0G5',EFFECT_TYPE_SPECIAL,luZ))
call RemoveLocation(luZ)
call SetUnitPosition(lnk,GetUnitX(lnk)+luz*Cos(lnM),GetUnitY(lnk)+luz*Sin(lnM))
endif
endfunction
function BashSetting takes nothing returns nothing
local timer ltt=CreateTimer()
local string lf5=H2Tx(ltt)
local unit lKg=udg_u_DTAX_temp
local unit lnk=udg_u_DTAX_temp_target
local real lnM=Atan2(GetUnitY(lnk)-GetUnitY(lKg),GetUnitX(lnk)-GetUnitX(lKg))
local integer lmZ=GetUnitAbilityLevel(lKg,'A0G5')
call DestroyEffect(AddSpecialEffectTargetUnitBJ("weapon",lKg,"Abilities\\Weapons\\PhoenixMissile\\Phoenix_Missile_mini.mdl"))
call SetHandle(lf5,"Defender",lnk)
call SetReal(lf5,"Angle",lnM)
call SetReal(lf5,"Movement",2)
call SetInteger(lf5,"Brake",0)
call UnitDamageTargetBJ(lKg,lnk,25*lmZ,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_UNKNOWN)
call TimerStart(ltt,.01,true,function BashMoving)
call PolledWait(.1)
call SetInteger(lf5,"Brake",1)
call PolledWait(.4+lmZ*.2)
call PauseTimer(ltt)
call PolledWait(1)
call FastFlush(lf5)
call DestroyTimer(ltt)
endfunction
function InitTrig_Greater_Bash_Functions takes nothing returns nothing
endfunction
function Smoke_Screen_Spell takes nothing returns boolean
return GetUnitTypeId(GetSummonedUnit())=='e003'
endfunction
function Smoke_Screen_Main takes nothing returns nothing
local unit lfo=GetSummonedUnit()
local player lEk=GetOwningPlayer(lfo)
local integer lmZ=GetUnitAbilityLevel(GetSummoningUnit(),'A0E6')
local real lqJ=(83+17*lmZ)*.01
call SetUnitScale(lfo,lqJ,lqJ,lqJ)
if PlayerIsScourge(lEk)then
call UnitAddAbility(lfo,'A019')
call SetUnitAbilityLevel(lfo,'A019',lmZ)
else
call UnitAddAbility(lfo,'A0E7')
call SetUnitAbilityLevel(lfo,'A0E7',lmZ)
endif
call IssuePointOrderById(lfo,OrderId("cloudoffog"),GetUnitX(lfo),GetUnitY(lfo))
endfunction
function Smoke_Screen_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SUMMON)
call TriggerAddCondition(ltt,Condition(function Smoke_Screen_Spell))
call TriggerAddAction(ltt,function Smoke_Screen_Main)
endfunction
function InitTrig_Smoke_Screen takes nothing returns nothing
endfunction
function Trig_Permanent_Invisibility_Conditions takes nothing returns boolean
return GetLearnedSkill()=='A00J'and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function Trig_Permanent_Invisibility_Actions takes nothing returns nothing
if(GetUnitAbilityLevel(GetTriggerUnit(),'A0MB')==0)then
call UnitAddAbility(GetTriggerUnit(),'A0MB')
endif
call SetUnitAbilityLevel(GetTriggerUnit(),'A0MB',GetUnitAbilityLevel(GetTriggerUnit(),'A00J'))
endfunction
function StartTrigger_Permanent_Invisibility takes nothing returns nothing
set gg_trg_Permanent_Invisibility=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Permanent_Invisibility,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(gg_trg_Permanent_Invisibility,Condition(function Trig_Permanent_Invisibility_Conditions))
call TriggerAddAction(gg_trg_Permanent_Invisibility,function Trig_Permanent_Invisibility_Actions)
endfunction
function InitTrig_Permanent_Invisibility takes nothing returns nothing
endfunction
function BackStab_Roll takes nothing returns boolean
if((RAbsBJ((GetUnitFacing(GetTriggerUnit())-GetUnitFacing(GetAttacker())))<=105.))then
return true
endif
return false
endfunction
function Trig_Backstab_Conditions takes nothing returns boolean
if(IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetAttacker())))then
return false
endif
if(not(GetUnitAbilityLevelSwapped('A0DZ',GetAttacker())>0))then
return false
endif
if(not(IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false))then
return false
endif
if(not BackStab_Roll())then
return false
endif
return true
endfunction
function Trig_Backstab_Actions takes nothing returns nothing
local effect lkW=AddSpecialEffectTargetUnitBJ("chest",GetTriggerUnit(),"Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl")
call UnitDamageTargetBJ(GetAttacker(),GetTriggerUnit(),((.25*I2R(GetUnitAbilityLevelSwapped('A0DZ',GetAttacker())))*I2R(GetHeroStatBJ(1,GetAttacker(),true))),ATTACK_TYPE_HERO,DAMAGE_TYPE_NORMAL)
call DestroyEffect(lkW)
endfunction
function StartTrigger_Backstab takes nothing returns nothing
set gg_trg_Backstab=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Backstab,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(gg_trg_Backstab,Condition(function Trig_Backstab_Conditions))
call TriggerAddAction(gg_trg_Backstab,function Trig_Backstab_Actions)
endfunction
function InitTrig_Backstab takes nothing returns nothing
endfunction
function GrowSpell takes nothing returns boolean
return GetLearnedSkill()=='A0CY'and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function GrowMain takes nothing returns nothing
local unit lQD=GetUnit(H2Tx(GetTriggeringTrigger()),"Tiny")
local integer lmZ=GetUnitAbilityLevel(lQD,'A0CY')
if GetUnitState(lQD,UNIT_STATE_LIFE)>1 then
call SetUnitScale(lQD,.5+.25*lmZ,.5+.25*lmZ,.5+.25*lmZ)
endif
endfunction
function GrowSetting takes nothing returns nothing
local trigger ltt
local unit lQD=GetTriggerUnit()
local integer lmZ=GetUnitAbilityLevel(lQD,'A0CY')
call SetPlayerTechResearched(GetOwningPlayer(lQD),'R00E',lmZ)
if lmZ==1 then
set ltt=CreateTrigger()
call TriggerAddAction(ltt,function GrowMain)
call TriggerRegisterTimerEvent(ltt,2.,true)
call SetHandle(H2Tx(ltt),"Tiny",lQD)
call SetUnitScale(lQD,.5+.25*lmZ,.5+.25*lmZ,.5+.25*lmZ)
endif
endfunction
function GrowInit takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(ltt,Condition(function GrowSpell))
call TriggerAddAction(ltt,function GrowSetting)
endfunction
function InitTrig_Grow takes nothing returns nothing
endfunction
function Trig_Avalanche_Conditions takes nothing returns boolean
if(not(GetSpellAbilityId()=='A0LL'))then
return false
endif
return true
endfunction
function Trig_Avalanche_Actions takes nothing returns nothing
local location liD=GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc(1,'e00E',GetOwningPlayer(GetTriggerUnit()),liD,bj_UNIT_FACING)
call RemoveLocation(liD)
call SetUnitInvulnerable(bj_lastCreatedUnit,true)
call ShowUnitHide(bj_lastCreatedUnit)
call UnitApplyTimedLifeBJ(10.,'BTLF',bj_lastCreatedUnit)
call UnitAddAbility(bj_lastCreatedUnit,'A0KG')
call SetUnitAbilityLevelSwapped('A0KG',bj_lastCreatedUnit,GetUnitAbilityLevel(GetTriggerUnit(),'A0LL'))
set liD=GetSpellTargetLoc()
call IssuePointOrderByIdLoc(bj_lastCreatedUnit,OrderId("clusterrockets"),liD)
call RemoveLocation(liD)
endfunction
function StartTrigger_Avalanche takes nothing returns nothing
set gg_trg_Avalanche=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Avalanche,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Avalanche,Condition(function Trig_Avalanche_Conditions))
call TriggerAddAction(gg_trg_Avalanche,function Trig_Avalanche_Actions)
endfunction
function InitTrig_Avalanche takes nothing returns nothing
endfunction
function Trig_Toss_Conditions takes nothing returns boolean
if(GetSpellAbilityId()!='A0BZ')then
return false
endif
if GetUnitTypeId(GetSpellTargetUnit())=='n00I'or GetUnitTypeId(GetSpellTargetUnit())=='e01H'then
return false
endif
if(GetOwningPlayer(GetSpellTargetUnit())==GetOwningPlayer(GetTriggerUnit()))then
return false
endif
return true
endfunction
function TossFilter takes nothing returns boolean
if(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT))then
return false
endif
if IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)then
return false
elseif IsUnitType(GetFilterUnit(),UNIT_TYPE_FLYING)then
return false
elseif GetFilterUnit()==GetSpellAbilityUnit()then
return false
elseif IsUnitDeadBJ(GetFilterUnit())then
return false
elseif IsUnitType(GetTriggerUnit(),UNIT_TYPE_ANCIENT)then
return false
elseif GetUnitTypeId(GetFilterUnit())=='n00L'then
return false
elseif IsUnitType(GetTriggerUnit(),UNIT_TYPE_GIANT)then
return false
elseif IsUnitVisible(GetFilterUnit(),GetOwningPlayer(GetSpellAbilityUnit()))==false then
return false
elseif GetUnitAbilityLevelSwapped('A04R',GetFilterUnit())!=0 then
return false
elseif(GetUnitTypeId(GetFilterUnit())=='H00F'or GetUnitTypeId(GetFilterUnit())=='H00E'or GetUnitTypeId(GetFilterUnit())=='H00G')then
return false
endif
return true
endfunction
function TossDamage takes unit pWho,real pxx,real pyy,real pAOE,real pDamage,integer pSpellId returns nothing
local group lVictims=CreateGroup()
local unit lFirst
local location lTMP
call GroupEnumUnitsInRange(lVictims,pxx,pyy,pAOE,null)
loop
set lFirst=FirstOfGroup(lVictims)
exitwhen lFirst==null
if IsUnitEnemy(lFirst,GetOwningPlayer(pWho))and IsUnitDeadBJ(lFirst)==false and GetUnitAbilityLevel(lFirst,'A04R')==0 then
if(IsUnitType(lFirst,UNIT_TYPE_STRUCTURE)==false)then
call UnitDamageTargetBJ(pWho,lFirst,pDamage,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_DEMOLITION)
else
call UnitDamageTargetBJ(pWho,lFirst,pDamage/3,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_DEMOLITION)
endif
set lTMP=GetUnitLoc(lFirst)
call DestroyEffect(AddSpellEffectByIdLoc(pSpellId,EFFECT_TYPE_CASTER,lTMP))
call DestroyEffect(AddSpellEffectByIdLoc(pSpellId,EFFECT_TYPE_CASTER,lTMP))
call DestroyEffect(AddSpellEffectByIdLoc(pSpellId,EFFECT_TYPE_CASTER,lTMP))
call RemoveLocation(lTMP)
call GroupRemoveUnit(lVictims,lFirst)
else
call GroupRemoveUnit(lVictims,lFirst)
endif
endloop
call GroupClear(lVictims)
call DestroyGroup(lVictims)
endfunction
function TossMain takes nothing returns nothing
local timer lMoveTimer=GetExpiredTimer()
local string lTable=H2Tx(lMoveTimer)
local integer lCount=GetInteger(lTable,"TossCounter")
local real lRange=GetReal(lTable,"TossDistance")
local real lAngle=GetReal(lTable,"TossAngle")
local location lTarget=GetLocation(lTable,"TossTargetLoc")
local location lStart=GetLocation(lTable,"TossSourceLoc")
local unit lCaster=GetUnit(lTable,"Tiny")
local unit lVictim=GetUnit(lTable,"TossSource")
local real lHeight=(lCount-25)*(lCount-25)
local real lSpeedMod=lRange*lCount/50-lRange
local location lDest=PolarProjectionBJ(lTarget,lSpeedMod,lAngle)
if(lCount<51)then
call SetUnitPositionLoc(lVictim,lDest)
call SetUnitFlyHeight(lVictim,775-lHeight,0)
set lCount=lCount+1
if(GetRandomInt(1,4)==2)then
call DestroyEffect(AddSpecialEffectTargetUnitBJ("origin",lVictim,"Abilities\\Spells\\Undead\\Cripple\\CrippleTarget.mdl"))
endif
endif
if(lCount>50)then
call SetUnitFlyHeight(lVictim,GetUnitDefaultFlyHeight(lVictim),0)
call PauseUnit(lVictim,false)
call SetUnitPathing(lVictim,true)
call TerrainDeformationRippleBJ(.2,true,lTarget,1.,300.,96.,1,64.)
if IsUnitAlly(lVictim,GetOwningPlayer(lCaster))then
call UnitDamageTargetBJ(lCaster,lVictim,.2*75*GetUnitAbilityLevel(lCaster,'A0BZ'),ATTACK_TYPE_NORMAL,DAMAGE_TYPE_DEMOLITION)
else
call UnitDamageTargetBJ(lCaster,lVictim,(.2+.15*GetUnitAbilityLevel(lCaster,'A0CY'))*75*GetUnitAbilityLevel(lCaster,'A0BZ'),ATTACK_TYPE_NORMAL,DAMAGE_TYPE_DEMOLITION)
endif
call TossDamage(lCaster,GetLocationX(lTarget),GetLocationY(lTarget),300,75.*I2R(GetUnitAbilityLevelSwapped('A0BZ',lCaster)),'A0BZ')
call EnumDestructablesInCircleBJ(300,lTarget,function KillDestructableEnum)
call PauseTimer(GetExpiredTimer())
call PolledWait(.01)
call FastFlush(lTable)
call DestroyTimer(GetExpiredTimer())
call RemoveLocation(lTarget)
call RemoveLocation(lStart)
endif
call SetInteger(lTable,"TossCounter",lCount)
call RemoveLocation(lDest)
endfunction
function Trig_Toss_Actions takes nothing returns nothing
local group lNearCaster=CreateGroup()
local timer lMoveTimer
local unit lCaster=GetTriggerUnit()
local unit lVictim
local location lTarget
local location lStart
local integer lCounter
local real lRange
local real lAngle
local string lf5
call GroupEnumUnitsInRange(lNearCaster,GetUnitX(lCaster),GetUnitY(lCaster),275,Condition(function TossFilter))
set lVictim=GroupPickRandomUnit(lNearCaster)
call DestroyGroup(lNearCaster)
set lTarget=GetUnitLoc(GetSpellTargetUnit())
set lStart=GetUnitLoc(lVictim)
set lCounter=1
set lRange=DistanceBetweenPoints(lStart,lTarget)
set lAngle=AngleBetweenPoints(lStart,lTarget)
if(lVictim!=null and GetUnitTypeId(lVictim)!='n00I'and GetUnitTypeId(lVictim)!='e01H'and GetOwningPlayer(GetSpellTargetUnit())!=GetOwningPlayer(lCaster))then
call SetUnitAnimationByIndex(lCaster,4)
call PauseUnit(lVictim,true)
call SetUnitPathing(lVictim,false)
call UnitAddAbility(lVictim,'AEme')
call UnitRemoveAbility(lVictim,'AEme')
set lMoveTimer=CreateTimer()
set lf5=H2Tx(lMoveTimer)
call SetHandle(lf5,"Tiny",lCaster)
call SetHandle(lf5,"TossSource",lVictim)
call SetHandle(lf5,"TossTargetLoc",lTarget)
call SetHandle(lf5,"TossSourceLoc",lStart)
call SetInteger(lf5,"TossCounter",lCounter)
call SetReal(lf5,"TossDistance",lRange)
call SetReal(lf5,"TossAngle",lAngle)
call TimerStart(lMoveTimer,.02,true,function TossMain)
endif
endfunction
function StartTrigger_Toss takes nothing returns nothing
set gg_trg_Toss=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Toss,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Toss,Condition(function Trig_Toss_Conditions))
call TriggerAddAction(gg_trg_Toss,function Trig_Toss_Actions)
endfunction
function InitTrig_Toss takes nothing returns nothing
endfunction
function Trig_Craggy_Exterior_Conditions takes nothing returns boolean
if(not(GetUnitAbilityLevelSwapped('A0BU',GetTriggerUnit())>0))then
return false
endif
if(not(IsUnitType(GetAttacker(),UNIT_TYPE_MELEE_ATTACKER)))then
return false
endif
return true
endfunction
function Trig_Craggy_Exterior_Actions takes nothing returns nothing
local location liD=GetUnitLoc(GetTriggerUnit())
if(GetRandomInt(1,100)<=(GetUnitAbilityLevelSwapped('A0BU',GetTriggerUnit())*6))then
call CreateNUnitsAtLocFacingLocBJ(1,'e00E',GetOwningPlayer(GetTriggerUnit()),liD,GetUnitLoc(GetAttacker()))
call UnitAddAbility(bj_lastCreatedUnit,'A0BV')
call SetUnitAbilityLevelSwapped('A0BV',bj_lastCreatedUnit,GetUnitAbilityLevelSwapped('A0BU',GetTriggerUnit()))
call IssueTargetOrderById(bj_lastCreatedUnit,OrderId("thunderbolt"),GetAttacker())
endif
call RemoveLocation(liD)
endfunction
function StartTrigger_Craggy_Exterior takes nothing returns nothing
set gg_trg_Craggy_Exterior=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Craggy_Exterior,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(gg_trg_Craggy_Exterior,Condition(function Trig_Craggy_Exterior_Conditions))
call TriggerAddAction(gg_trg_Craggy_Exterior,function Trig_Craggy_Exterior_Actions)
endfunction
function InitTrig_Craggy_Exterior takes nothing returns nothing
endfunction
function Trig_Kraken_Shell_Conditions takes nothing returns boolean
return GetLearnedSkill()=='A04E'and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function Kraken_Timer takes nothing returns nothing
call UnitRemoveBuffsBJ(1,GetUnit(H2Tx(GetExpiredTimer()),"UnitVar"))
endfunction
function Trig_Kraken_Shell_Actions takes nothing returns nothing
local unit lfo=GetTriggerUnit()
local integer lmZ=GetUnitAbilityLevel(lfo,'A04E')
local timer ltt
if lmZ==1 then
set ltt=CreateTimer()
call TimerStart(ltt,11,true,function Kraken_Timer)
call SetHandle(H2Tx(ltt),"UnitVar",lfo)
call SetHandle(H2Tx(lfo),"KrakenTimer",ltt)
else
set ltt=GetTimer(H2Tx(lfo),"KrakenTimer")
call TimerStart(ltt,12-lmZ,true,function Kraken_Timer)
endif
endfunction
function StartTrigger_Kraken_Shell takes nothing returns nothing
set gg_trg_Kraken_Shell=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Kraken_Shell,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(gg_trg_Kraken_Shell,Condition(function Trig_Kraken_Shell_Conditions))
call TriggerAddAction(gg_trg_Kraken_Shell,function Trig_Kraken_Shell_Actions)
endfunction
function InitTrig_Kraken_Shell takes nothing returns nothing
endfunction
function Trig_Gush_Conditions takes nothing returns boolean
return GetSpellAbilityId()=='A046'
endfunction
function Trig_Gush_Actions takes nothing returns nothing
local unit ltt=GetSpellTargetUnit()
local real lUG=(60.+(50.*I2R(GetUnitAbilityLevelSwapped('A046',GetTriggerUnit()))))
local effect lkW=AddSpecialEffectTargetUnitBJ("chest",ltt,"Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl")
call UnitDamageTargetBJ(GetTriggerUnit(),ltt,lUG,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_COLD)
call PolledWait(.1)
call DestroyEffect(lkW)
endfunction
function StartTrigger_Gush takes nothing returns nothing
set gg_trg_Gush=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Gush,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Gush,Condition(function Trig_Gush_Conditions))
call TriggerAddAction(gg_trg_Gush,function Trig_Gush_Actions)
endfunction
function InitTrig_Gush takes nothing returns nothing
endfunction
function Trig_Ravage_Conditions takes nothing returns boolean
return GetSpellAbilityId()=='A03Z'
endfunction
function Trig_Ravage_Actions takes nothing returns nothing
local location liD=GetUnitLoc(GetTriggerUnit())
local location lng
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=16
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call CreateNUnitsAtLoc(1,'e00E',GetOwningPlayer(GetTriggerUnit()),liD,bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit,'A084')
call SetUnitAbilityLevelSwapped('A084',bj_lastCreatedUnit,GetUnitAbilityLevelSwapped('A03Z',GetTriggerUnit()))
set lng=PolarProjectionBJ(liD,100.,(22.5*I2R(bj_forLoopAIndex)))
call IssuePointOrderByIdLoc(bj_lastCreatedUnit,OrderId("impale"),lng)
call RemoveLocation(lng)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call RemoveLocation(liD)
endfunction
function StartTrigger_Ravage takes nothing returns nothing
set gg_trg_Ravage=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Ravage,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Ravage,Condition(function Trig_Ravage_Conditions))
call TriggerAddAction(gg_trg_Ravage,function Trig_Ravage_Actions)
endfunction
function InitTrig_Ravage takes nothing returns nothing
endfunction
function Trig_March_of_the_Machines_Conditions takes nothing returns boolean
return GetSpellAbilityId()=='A0BQ'
endfunction
function Trig_March_of_the_Machines_Actions takes nothing returns nothing
local location lo3=GetUnitLoc(GetTriggerUnit())
local location lND=GetSpellTargetLoc()
call CreateNUnitsAtLocFacingLocBJ(1,'e00E',GetOwningPlayer(GetTriggerUnit()),lo3,lND)
call UnitAddAbility(bj_lastCreatedUnit,'A05F')
call SetUnitAbilityLevelSwapped('A05F',bj_lastCreatedUnit,GetUnitAbilityLevelSwapped('A0BQ',GetTriggerUnit()))
call IssuePointOrderByIdLoc(bj_lastCreatedUnit,OrderId("stampede"),lND)
call RemoveLocation(lo3)
call RemoveLocation(lND)
endfunction
function StartTrigger_March_of_the_Machines takes nothing returns nothing
set gg_trg_March_of_the_Machines=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_March_of_the_Machines,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_March_of_the_Machines,Condition(function Trig_March_of_the_Machines_Conditions))
call TriggerAddAction(gg_trg_March_of_the_Machines,function Trig_March_of_the_Machines_Actions)
endfunction
function InitTrig_March_of_the_Machines takes nothing returns nothing
endfunction
function Trig_Laser_Conditions takes nothing returns boolean
return GetSpellAbilityId()=='A049'
endfunction
function Trig_Laser_Actions takes nothing returns nothing
call UnitDamageTarget(GetTriggerUnit(),GetSpellTargetUnit(),GetUnitAbilityLevel(GetTriggerUnit(),'A049')*80,true,false,ATTACK_TYPE_HERO,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)
endfunction
function StartTrigger_Laser takes nothing returns nothing
set gg_trg_Laser=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Laser,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Laser,Condition(function Trig_Laser_Conditions))
call TriggerAddAction(gg_trg_Laser,function Trig_Laser_Actions)
endfunction
function InitTrig_Laser takes nothing returns nothing
endfunction
function Trig_Rearm_Conditions takes nothing returns boolean
return GetSpellAbilityId()=='A065'
endfunction
function Trig_Rearm_Actions takes nothing returns nothing
local integer lEq=0
local integer lEQ=5
local integer array lQc
set lQc[0]=0
set lQc[1]=0
set lQc[2]=0
set lQc[3]=0
set lQc[4]=0
set lQc[5]=0
loop
exitwhen lEq>lEQ
if(GetItemTypeId(UnitItemInSlot(GetTriggerUnit(),lEq))=='rots'or GetItemTypeId(UnitItemInSlot(GetTriggerUnit(),lEq))=='ches'or GetItemTypeId(UnitItemInSlot(GetTriggerUnit(),lEq))=='pdiv'or GetItemTypeId(UnitItemInSlot(GetTriggerUnit(),lEq))=='I002'or GetItemTypeId(UnitItemInSlot(GetTriggerUnit(),lEq))=='I001'or GetItemTypeId(UnitItemInSlot(GetTriggerUnit(),lEq))=='oven')then
set lQc[lEq]=GetItemTypeId(UnitItemInSlot(GetTriggerUnit(),lEq))
call RemoveItem(UnitItemInSlot(GetTriggerUnit(),lEq))
endif
set lEq=lEq+1
endloop
call UnitResetCooldown(GetTriggerUnit())
set lEq=0
set lEQ=5
loop
exitwhen lEq>lEQ
call UnitAddItemToSlotById(GetTriggerUnit(),lQc[lEq],lEq)
set lEq=lEq+1
endloop
endfunction
function StartTrigger_Rearm takes nothing returns nothing
set gg_trg_Rearm=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Rearm,EVENT_PLAYER_UNIT_SPELL_FINISH)
call TriggerAddCondition(gg_trg_Rearm,Condition(function Trig_Rearm_Conditions))
call TriggerAddAction(gg_trg_Rearm,function Trig_Rearm_Actions)
endfunction
function InitTrig_Rearm takes nothing returns nothing
endfunction
function EdictSpell takes nothing returns boolean
return GetSpellAbilityId()=='A035'
endfunction
function EdictFilter takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(udg_u_DTAX_temp))and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>0 and GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0
endfunction
function LeshExplosionsTimer takes nothing returns nothing
local unit lSq=GetUnit(H2Tx(GetExpiredTimer()),"Leshrac")
local group lEw=CreateGroup()
local boolexpr lEW=Condition(function EdictFilter)
local unit lSQ
set udg_u_DTAX_temp=lSq
call GroupEnumUnitsInRange(lEw,GetUnitX(lSq),GetUnitY(lSq),500,lEW)
set lSQ=GroupPickRandomUnit(lEw)
call AddSpecialEffectTarget("Abilities\\Weapons\\SteamTank\\SteamTankImpact.mdl",lSQ,"chest")
call UnitDamageTarget(lSq,lSQ,12.5*GetUnitAbilityLevel(lSq,'A035'),true,true,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
call DestroyBoolExpr(lEW)
call DestroyGroup(lEw)
endfunction
function LeshExplosionsMain takes nothing returns nothing
local timer ltt=CreateTimer()
local string lf5=H2Tx(ltt)
call SetHandle(lf5,"Leshrac",GetTriggerUnit())
call TimerStart(ltt,.25,true,function LeshExplosionsTimer)
call PolledWait(8.)
call PauseTimer(ltt)
call FastFlush(lf5)
call DestroyTimer(ltt)
endfunction
function LeshExplosionsInit takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function EdictSpell))
call TriggerAddAction(ltt,function LeshExplosionsMain)
endfunction
function InitTrig_Diabolic_Edict takes nothing returns nothing
endfunction
function OvergrowthSpell takes nothing returns boolean
return GetSpellAbilityId()=='A07Z'
endfunction
function OvergrowthFilter takes nothing returns boolean
return IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>0
endfunction
function OvergrowthDymmyCast takes nothing returns nothing
local unit lfo=GetTriggerUnit()
local unit lJV=CreateUnit(GetOwningPlayer(lfo),'e00E',GetUnitX(lfo),GetUnitY(lfo),270)
call UnitAddAbility(lJV,'A06T')
call SetUnitAbilityLevel(lJV,'A06T',GetUnitAbilityLevel(lfo,'A07Z'))
call IssueTargetOrderById(lJV,OrderId("entanglingroots"),GetEnumUnit())
endfunction
function OvergrowthMain takes nothing returns nothing
local unit lfo=GetTriggerUnit()
local group lEw=CreateGroup()
local boolexpr lEW=Condition(function OvergrowthFilter)
call GroupEnumUnitsInRange(lEw,GetUnitX(lfo),GetUnitY(lfo),750,lEW)
call ForGroup(lEw,function OvergrowthDymmyCast)
call DestroyBoolExpr(lEW)
call DestroyGroup(lEw)
endfunction
function OvergrowthInit takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function OvergrowthSpell))
call TriggerAddAction(ltt,function OvergrowthMain)
endfunction
function InitTrig_Overgrowth takes nothing returns nothing
endfunction
function Guise_Spell takes nothing returns boolean
return GetSpellAbilityId()=='A01Z'
endfunction
function Guise_Check takes nothing returns boolean
if GetDestructableLife(GetEnumDestructable())<=0 then
return false
endif
if((GetDestructableTypeId(GetEnumDestructable())=='WTst'))then
set udg_b_DTAX_natures_guise_still_near_the_trees=true
return true
endif
if((GetDestructableTypeId(GetEnumDestructable())=='ITtc'))then
set udg_b_DTAX_natures_guise_still_near_the_trees=true
return true
endif
if((GetDestructableTypeId(GetEnumDestructable())=='ITtw'))then
set udg_b_DTAX_natures_guise_still_near_the_trees=true
return true
endif
if((GetDestructableTypeId(GetEnumDestructable())=='NTtw'))then
set udg_b_DTAX_natures_guise_still_near_the_trees=true
return true
endif
if((GetDestructableTypeId(GetEnumDestructable())=='ATtr'))then
set udg_b_DTAX_natures_guise_still_near_the_trees=true
return true
endif
return false
endfunction
function Guise_Main takes nothing returns nothing
local timer ltt=GetExpiredTimer()
local string lf5=H2Tx(ltt)
local unit lFB=GetUnit(lf5,"Target")
local location liD=GetUnitLoc(lFB)
set udg_b_DTAX_natures_guise_still_near_the_trees=false
call EnumDestructablesInCircleBJ(375,liD,function Guise_Check)
call RemoveLocation(liD)
if(udg_b_DTAX_natures_guise_still_near_the_trees==false)then
call UnitRemoveAbility(lFB,'B021')
call PauseTimer(ltt)
call PolledWait(1)
call FastFlush(lf5)
call DestroyTimer(ltt)
endif
endfunction
function Guise_Run takes nothing returns nothing
local unit lfo=GetTriggerUnit()
local unit lFB=GetSpellTargetUnit()
local timer ltt=CreateTimer()
call SetHandle(H2Tx(ltt),"Target",lFB)
call TimerStart(ltt,1.,true,function Guise_Main)
endfunction
function Guise_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function Guise_Spell))
call TriggerAddAction(ltt,function Guise_Run)
endfunction
function InitTrig_Nature_Guise takes nothing returns nothing
endfunction
function Trig_Berserker_Rage_Cast_Conditions takes nothing returns boolean
return GetSpellAbilityId()=='A0BE'
endfunction
function Trig_Berserker_Rage_Cast_Actions takes nothing returns nothing
call SetUnitAbilityLevel(GetTriggerUnit(),'A09E',GetUnitAbilityLevel(GetTriggerUnit(),'A0BE'))
endfunction
function StartTrigger_Berserker_Rage_Cast takes nothing returns nothing
set gg_trg_Berserker_Rage_Cast=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Berserker_Rage_Cast,EVENT_PLAYER_UNIT_SPELL_FINISH)
call TriggerRegisterAnyUnitEventBJ(gg_trg_Berserker_Rage_Cast,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Berserker_Rage_Cast,Condition(function Trig_Berserker_Rage_Cast_Conditions))
call TriggerAddAction(gg_trg_Berserker_Rage_Cast,function Trig_Berserker_Rage_Cast_Actions)
endfunction
function InitTrig_Berserker_Rage_Cast takes nothing returns nothing
endfunction
function Trig_Berserker_Rage_Learn_Conditions takes nothing returns boolean
return GetLearnedSkill()=='A0BE'and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function Trig_Berserker_Rage_Learn_Actions takes nothing returns nothing
call SetUnitAbilityLevel(GetTriggerUnit(),'A09E',GetUnitAbilityLevel(GetTriggerUnit(),'A0BE'))
endfunction
function StartTrigger_Berserker_Rage_Learn takes nothing returns nothing
set gg_trg_Berserker_Rage_Learn=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Berserker_Rage_Learn,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(gg_trg_Berserker_Rage_Learn,Condition(function Trig_Berserker_Rage_Learn_Conditions))
call TriggerAddAction(gg_trg_Berserker_Rage_Learn,function Trig_Berserker_Rage_Learn_Actions)
endfunction
function InitTrig_Berserker_Rage_Learn takes nothing returns nothing
endfunction
function IcePath_Filter takes nothing returns boolean
return((IsUnitType(GetFilterUnit(),UNIT_TYPE_MAGIC_IMMUNE)==false)and(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetDyingUnit())))and(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false)and(GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0))
endfunction
function IcePath_Freeze takes nothing returns nothing
local unit luu=GetDyingUnit()
local integer lMP=GetUnitUserData(luu)
local group lgg
local unit loS
local unit lot
local boolexpr lEW=Condition(function IcePath_Filter)
set lgg=CreateGroup()
call GroupEnumUnitsInRange(lgg,GetUnitX(luu),GetUnitY(luu),175,lEW)
loop
set lot=FirstOfGroup(lgg)
exitwhen(lot==null)
call GroupRemoveUnit(lgg,lot)
set loS=CreateUnit(GetOwningPlayer(luu),'e00E',GetUnitX(lot),GetUnitY(lot),0)
call UnitAddAbility(loS,'A0OF')
call SetUnitAbilityLevel(loS,'A0OF',lMP)
call IssueTargetOrderById(loS,OrderId("thunderbolt"),lot)
call UnitApplyTimedLife(loS,'BTLF',1)
call UnitAddAbility(loS,'Aloc')
endloop
call DestroyGroup(lgg)
call DestroyBoolExpr(lEW)
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Undead\\FreezingBreath\\FreezingBreathMissile.mdl",GetUnitX(luu),GetUnitY(luu)))
endfunction
function IcePath_StopOnDeath takes nothing returns boolean
return GetUnitTypeId(GetDyingUnit())=='e01U'
endfunction
function IcePath_Spell takes nothing returns boolean
return GetSpellAbilityId()=='A0O6'
endfunction
function IcePath_Main takes nothing returns nothing
local timer ltt=GetExpiredTimer()
local string lf5=H2Tx(ltt)
local unit lfU=GetUnit(lf5,"Hero")
local integer lmZ=GetUnitAbilityLevel(lfU,'A0O6')
local real lxx=GetReal(lf5,"IcePathX")
local real lyy=GetReal(lf5,"IcePathY")
local real lnM=GetReal(lf5,"IcePathAngle")
local unit loS
local integer lMa=GetInteger(lf5,"IcePath|Counter")
set lxx=lxx+100*Cos(lnM*bj_DEGTORAD)
set lyy=lyy+100*Sin(lnM*bj_DEGTORAD)
call SetReal(lf5,"IcePathX",lxx)
call SetReal(lf5,"IcePathY",lyy)
set loS=CreateUnit(GetOwningPlayer(lfU),'e01U',lxx,lyy,GetRandomReal(0,359))
call UnitApplyTimedLife(loS,'BTLF',.5)
call SetUnitUserData(loS,lmZ)
call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\FrostWyrmMissile\\FrostWyrmMissile.mdl",lxx,lyy))
set lMa=lMa+1
call SetInteger(lf5,"IcePath|Counter",lMa)
if lMa>=10 then
call PauseTimer(ltt)
call FastFlush(lf5)
call DestroyTimer(ltt)
endif
endfunction
function IcePath_Run takes nothing returns nothing
local timer ltt=CreateTimer()
local unit lfU=GetTriggerUnit()
local location ln3=GetSpellTargetLoc()
local location lov=GetUnitLoc(lfU)
local string lf5=H2Tx(ltt)
call SetHandle(lf5,"Hero",lfU)
call SetReal(lf5,"IcePathX",GetUnitX(lfU))
call SetReal(lf5,"IcePathY",GetUnitY(lfU))
call SetReal(lf5,"IcePathAngle",AngleBetweenPoints(lov,ln3))
call SetInteger(lf5,"IcePath|Counter",0)
call RemoveLocation(lov)
call RemoveLocation(ln3)
call TimerStart(ltt,.05,true,function IcePath_Main)
endfunction
function IcePath_Init takes nothing returns nothing
local trigger loV=CreateTrigger()
set udg_triggerl099=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(loV,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(loV,Condition(function IcePath_StopOnDeath))
call TriggerAddAction(loV,function IcePath_Freeze)
call TriggerRegisterAnyUnitEventBJ(udg_triggerl099,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(udg_triggerl099,Condition(function IcePath_Spell))
call TriggerAddAction(udg_triggerl099,function IcePath_Run)
endfunction
function InitTrig_Ice_Path takes nothing returns nothing
endfunction
function Macropyre_Spell takes nothing returns boolean
return GetSpellAbilityId()=='A0O5'
endfunction
function Macropyre_Main takes nothing returns nothing
local timer ltt=GetExpiredTimer()
local string lf5=H2Tx(ltt)
local unit lfo=GetUnit(lf5,"UnitVar")
local player lEk=GetOwningPlayer(lfo)
local real lnM=GetReal(lf5,"Angle")
local integer lmZ=GetUnitAbilityLevel(lfo,'A0O5')
local integer lo7=GetInteger(lf5,"Count")
local location lo8=GetLocation(lf5,"SourceLoc")
local real lLm=GetLocationX(lo8)+150*(3+lmZ-lo7+1)*Cos(lnM)
local real lLn=GetLocationY(lo8)+150*(3+lmZ-lo7+1)*Sin(lnM)
local unit loK=CreateUnit(lEk,'e00E',lLm,lLn,0)
call UnitAddAbility(loK,'A0OE')
call SetUnitAbilityLevel(loK,'A0OE',lmZ)
call IssuePointOrderById(loK,OrderId("flamestrike"),lLm,lLn)
set lo7=lo7-1
call SetInteger(lf5,"Count",lo7)
if lo7==0 or GetUnitState(lfo,UNIT_STATE_LIFE)<1 then
call PauseTimer(ltt)
call FastFlush(lf5)
call RemoveLocation(lo8)
call SetUnitAnimation(lfo,"stand")
call DestroyTimer(ltt)
endif
endfunction
function Macropyre_Set takes nothing returns nothing
local unit lfo=GetTriggerUnit()
local location ln3=GetSpellTargetLoc()
local timer ltt=CreateTimer()
local string lf5=H2Tx(ltt)
local integer lmZ=GetUnitAbilityLevel(lfo,'A0O5')
call SetUnitAnimation(lfo,"spell")
call SetInteger(lf5,"Count",3+lmZ)
call SetReal(lf5,"Angle",Atan2(GetLocationY(ln3)-GetUnitY(lfo),GetLocationX(ln3)-GetUnitX(lfo)))
call SetHandle(lf5,"UnitVar",lfo)
call SetHandle(lf5,"SourceLoc",GetUnitLoc(lfo))
call TimerStart(ltt,.2,true,function Macropyre_Main)
call RemoveLocation(ln3)
endfunction
function Macropyre_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function Macropyre_Spell))
call TriggerAddAction(ltt,function Macropyre_Set)
endfunction
function InitTrig_Macropyre takes nothing returns nothing
endfunction
function Trig_Dual_Breath_Conditions takes nothing returns boolean
return GetSpellAbilityId()=='A0O7'
endfunction
function DualBreazee_Cone takes real poL,real pom,real poM,real pon,real poN,real poo returns nothing
local real loO=Asin((pon-poM)/pom)
local real lxx=poM/Sin(loO)
local real lyy=(pom+pon+lxx)*Tan(loO)
set udg_Ah[1]=poN+lxx*Cos((poL-180)*bj_DEGTORAD)
set udg_Ah[2]=poo+lxx*Sin((poL-180)*bj_DEGTORAD)
set udg_Ah[7]=poN+(pom+pon)*Cos(poL*bj_DEGTORAD)
set udg_Ah[8]=poo+(pom+pon)*Sin(poL*bj_DEGTORAD)
set udg_Ah[3]=udg_Ah[7]+lyy*Cos((poL-90)*bj_DEGTORAD)
set udg_Ah[4]=udg_Ah[8]+lyy*Sin((poL-90)*bj_DEGTORAD)
set udg_Ah[5]=udg_Ah[7]+lyy*Cos((poL+90)*bj_DEGTORAD)
set udg_Ah[6]=udg_Ah[8]+lyy*Sin((poL+90)*bj_DEGTORAD)
endfunction
function DualBreazee_InCone takes real px1,real py1,real px2,real py2,real px3,real py3,real pxx,real pyy returns boolean
local real loH=(pyy-py1)*(px2-px1)-(pxx-px1)*(py2-py1)
local real loi=(pyy-py3)*(px1-px3)-(pxx-px3)*(py1-py3)
local real loI=(pyy-py2)*(px3-px2)-(pxx-px2)*(py3-py2)
return(loH*loi>0)and(loI*loi>0)
endfunction
function DualBreazee_SlowValid takes nothing returns boolean
local unit lfu=GetFilterUnit()
local location lll=GetUnitLoc(lfu)
if(IsUnitType(lfu,UNIT_TYPE_MAGIC_IMMUNE)==false)and DualBreazee_InCone(udg_Ah[1],udg_Ah[2],udg_Ah[3],udg_Ah[4],udg_Ah[5],udg_Ah[6],GetLocationX(lll),GetLocationY(lll))and IsUnitEnemy(lfu,GetOwningPlayer(GetTriggerUnit()))then
call RemoveLocation(lll)
return true
else
call RemoveLocation(lll)
return false
endif
endfunction
function DualBreazee_Slow takes nothing returns nothing
local unit loK=CreateUnit(GetOwningPlayer(GetTriggerUnit()),'e00E',GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit()),270)
call UnitAddAbility(loK,'A0OA')
call IssueTargetOrderById(loK,OrderId("frostnova"),GetEnumUnit())
endfunction
function Trig_Dual_Breath_Actions takes nothing returns nothing
local unit luu=GetTriggerUnit()
local group lgg
local location lll=GetUnitLoc(GetTriggerUnit())
local location lpp
local real lff
local integer lMP=GetUnitAbilityLevel(luu,'A0O7')
local unit loK
if GetSpellTargetUnit()==null then
set lpp=GetSpellTargetLoc()
else
set lpp=GetUnitLoc(GetSpellTargetUnit())
endif
set lff=AngleBetweenPoints(lll,lpp)
call DualBreazee_Cone(lff,550.,200.,250.,GetLocationX(lll),GetLocationY(lll))
set loK=CreateUnit(GetOwningPlayer(luu),'e00E',GetUnitX(luu),GetUnitY(luu),270)
call UnitAddAbility(loK,'A0OB')
call SetUnitAbilityLevel(loK,'A0OB',lMP)
call IssuePointOrderById(loK,OrderId("breathoffire"),GetLocationX(lpp),GetLocationY(lpp))
set lgg=GetUnitsInRectMatching(bj_mapInitialPlayableArea,Condition(function DualBreazee_SlowValid))
call PolledWait(.2)
call SetUnitAnimation(luu,"spell")
call ForGroup(lgg,function DualBreazee_Slow)
set loK=CreateUnit(GetOwningPlayer(luu),'e00E',GetUnitX(luu)+50*Cos(Atan2(GetLocationY(lpp)-GetUnitY(luu),GetLocationX(lpp)-GetUnitX(luu))),GetUnitY(luu)+50*Sin(Atan2(GetLocationY(lpp)-GetUnitY(luu),GetLocationX(lpp)-GetUnitX(luu))),270)
call UnitAddAbility(loK,'A0OC')
call SetUnitAbilityLevel(loK,'A0OC',lMP)
call IssuePointOrderById(loK,OrderId("breathoffrost"),GetLocationX(lpp),GetLocationY(lpp))
call PolledWait(.1)
call ResetUnitAnimation(luu)
call DestroyGroup(lgg)
call RemoveLocation(lpp)
call RemoveLocation(lll)
endfunction
function StartTrigger_Dual_Breath takes nothing returns nothing
set gg_trg_Dual_Breath=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Dual_Breath,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Dual_Breath,Condition(function Trig_Dual_Breath_Conditions))
call TriggerAddAction(gg_trg_Dual_Breath,function Trig_Dual_Breath_Actions)
call SpellPreload('A0OB')
call SpellPreload('A0OC')
call SpellPreload('A0OA')
endfunction
function InitTrig_Dual_Breath takes nothing returns nothing
endfunction
function Trig_Auto_Fire_Conditions takes nothing returns boolean
return GetUnitAbilityLevel(GetAttacker(),'A0O8')>0 and(IsUnitEnemy(GetAttacker(),GetOwningPlayer(GetTriggerUnit())))
endfunction
function FireAttackJakiro_ValidTarget takes nothing returns boolean
local unit lfu=GetFilterUnit()
local unit lKm=GetAttacker()
local location loz=GetUnitLoc(lfu)
local location loZ=GetUnitLoc(lKm)
local real lNg=AngleBetweenPoints(loZ,loz)
local real loL=GetUnitFacing(lKm)
local real lo0=RAbsBJ(loL-(lNg+180))
call RemoveLocation(loz)
call RemoveLocation(loZ)
if((lo0>=155)and(lo0<=205)and(IsUnitType(lfu,UNIT_TYPE_MAGIC_IMMUNE)==false)and(IsUnitEnemy(lfu,GetOwningPlayer(lKm)))and(IsUnitType(lfu,UNIT_TYPE_GROUND))and(IsUnitType(lfu,UNIT_TYPE_STRUCTURE)==false))then
return true
else
return false
endif
endfunction
function FireAttackJakiro_Chance takes integer pMP returns real
local real array loX
set loX[1]=25
set loX[2]=30
set loX[3]=35
set loX[4]=40
return loX[pMP]
endfunction
function Trig_Auto_Fire_Actions takes nothing returns nothing
local unit lKm=GetAttacker()
local location loZ=GetUnitLoc(lKm)
local real loL=GetUnitFacing(lKm)
local unit lfK
local group lgg=GetUnitsInRangeOfLocMatching(800.,loZ,Condition(function FireAttackJakiro_ValidTarget))
local group lo3
local unit lo4
local integer lMP=GetUnitAbilityLevel(lKm,'A0O8')
if GetRandomReal(1,100)<=FireAttackJakiro_Chance(lMP)and CountUnitsInGroup(lgg)>0then
set lo3=GetRandomSubGroup(1,lgg)
set lfK=FirstOfGroup(lo3)
set lo4=CreateUnit(GetOwningPlayer(lKm),'e01V',GetLocationX(loZ)+100*Cos((loL+20)*bj_DEGTORAD),GetLocationY(loZ)+100*Sin((loL+20)*bj_DEGTORAD),loL)
call UnitAddAbility(lo4,'A0OD')
call SetUnitAbilityLevel(lo4,'A0OD',lMP)
call IssueTargetOrderById(lo4,OrderId("attack"),lfK)
call UnitApplyTimedLife(lo4,'BTLF',10)
call DestroyGroup(lo3)
call DisableTrigger(GetTriggeringTrigger())
call PolledWait(.5)
call UnitAddAbility(lo4,'Abun')
call EnableTrigger(GetTriggeringTrigger())
endif
call DisableTrigger(GetTriggeringTrigger())
call PolledWait(.75)
call EnableTrigger(GetTriggeringTrigger())
call DestroyGroup(lgg)
call RemoveLocation(loZ)
endfunction
function StartTrigger_Auto_Fire takes nothing returns nothing
set gg_trg_Auto_Fire=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Auto_Fire,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(gg_trg_Auto_Fire,Condition(function Trig_Auto_Fire_Conditions))
call TriggerAddAction(gg_trg_Auto_Fire,function Trig_Auto_Fire_Actions)
endfunction
function InitTrig_Auto_Fire takes nothing returns nothing
endfunction
function Overpower_Roll takes nothing returns boolean
return GetUnitAbilityLevel(GetAttacker(),'B02O')>0
endfunction
function Overpower_Main takes nothing returns nothing
set udg_iA_DTAX_Ulfsaar_overpower_attack_counter[GetPlayerId(GetOwningPlayer(GetDyingUnit()))]=0
set udg_iA_DTAX_Ulfsaar_overpower_attack_counter[GetPlayerId(GetOwningPlayer(GetAttacker()))]=(udg_iA_DTAX_Ulfsaar_overpower_attack_counter[GetPlayerId(GetOwningPlayer(GetAttacker()))]+1)
if(udg_iA_DTAX_Ulfsaar_overpower_attack_counter[GetPlayerId(GetOwningPlayer(GetAttacker()))]>=5)then
call UnitRemoveAbility(GetAttacker(),'B02O')
set udg_iA_DTAX_Ulfsaar_overpower_attack_counter[GetPlayerId(GetOwningPlayer(GetAttacker()))]=0
endif
endfunction
function Overpower_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(ltt,Condition(function Overpower_Roll))
call TriggerAddAction(ltt,function Overpower_Main)
endfunction
function InitTrig_Overpower_Counter takes nothing returns nothing
endfunction
function OverpowerCast_Spell takes nothing returns boolean
return GetSpellAbilityId()=='A059'
endfunction
function OverpowerCast_Main takes nothing returns nothing
set udg_iA_DTAX_Ulfsaar_overpower_attack_counter[GetPlayerId(GetOwningPlayer(GetTriggerUnit()))]=0
endfunction
function OverpowerCast_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function OverpowerCast_Spell))
call TriggerAddAction(ltt,function OverpowerCast_Main)
endfunction
function InitTrig_Overpower takes nothing returns nothing
endfunction
function Trig_Enrage_Conditions takes nothing returns boolean
if(UnitHasBuffBJ(GetAttacker(),'B02H')==false)then
return false
endif
if(IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE))then
return false
endif
if(IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetAttacker())))then
return false
endif
return true
endfunction
function Trig_Enrage_Actions takes nothing returns nothing
local real lQr=(GetUnitStateSwap(UNIT_STATE_LIFE,GetAttacker())*(.03+(.01*I2R(GetUnitAbilityLevelSwapped('A0LC',GetAttacker())))))
call UnitDamageTargetBJ(GetAttacker(),GetTriggerUnit(),lQr,ATTACK_TYPE_HERO,DAMAGE_TYPE_NORMAL)
endfunction
function StartTrigger_Enrage takes nothing returns nothing
set gg_trg_Enrage=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Enrage,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(gg_trg_Enrage,Condition(function Trig_Enrage_Conditions))
call TriggerAddAction(gg_trg_Enrage,function Trig_Enrage_Actions)
endfunction
function InitTrig_Enrage takes nothing returns nothing
endfunction
function Nether_Swap_Spell takes nothing returns boolean
if(GetSpellAbilityId()=='A00G')then
return true
endif
return false
endfunction
function Nether_Swap_Main takes nothing returns nothing
local unit lQt=GetSpellAbilityUnit()
local unit lQT=GetSpellTargetUnit()
local location lQu=GetUnitLoc(lQt)
local location lQU=GetUnitLoc(lQT)
call PolledWait(.01)
call SetUnitPositionLoc(lQt,lQU)
call SetUnitPositionLoc(lQT,lQu)
call EnumDestructablesInCircleBJ(300,lQu,function KillDestructableEnum)
call RemoveLocation(lQU)
call RemoveLocation(lQu)
endfunction
function Nether_Swap_Fix takes nothing returns nothing
if(IsTerrainPathable(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),PATHING_TYPE_WALKABILITY))then
call DropOrder(GetTriggerUnit())
call SimError(GetOwningPlayer(GetTriggerUnit()),"Cannot use nether swap here")
endif
endfunction
function Nether_Swap_Init takes nothing returns nothing
local trigger ltt=CreateTrigger()
set udg_triggerl132=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_triggerl132,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(udg_triggerl132,Condition(function Nether_Swap_Spell))
call TriggerAddAction(udg_triggerl132,function Nether_Swap_Main)
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(ltt,Condition(function Nether_Swap_Spell))
call TriggerAddAction(ltt,function Nether_Swap_Fix)
endfunction
function InitTrig_Nether_Swap takes nothing returns nothing
endfunction
function Trig_Poison_Nova_Conditions takes nothing returns boolean
if((GetSpellAbilityId()=='A013'))then
return true
endif
if((GetSpellAbilityId()=='A0A6'))then
return true
endif
return false
endfunction
function Poison_Nova_Filter takes nothing returns boolean
return GetBooleanAnd(GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false),(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))),GetBooleanAnd(GetBooleanAnd((UnitHasBuffBJ(GetFilterUnit(),'B027')==false),(UnitHasBuffBJ(GetFilterUnit(),'B028')==false)),(IsUnitAliveBJ(GetFilterUnit()))))
endfunction
function Trig_Poison_Nova_Actions takes nothing returns nothing
local integer lUY
local integer lEq
local integer lEQ
local integer lUz=200
local real array lPN
local unit array lUZ
local unit lU0=GetTriggerUnit()
local unit lnX
local location lU1=GetUnitLoc(GetTriggerUnit())
local location lU2
local location lU3
local group lU4
if(GetSpellAbilityId()=='A013')then
set lUY=GetUnitAbilityLevelSwapped('A013',GetTriggerUnit())
else
set lUY=(GetUnitAbilityLevelSwapped('A0A6',GetTriggerUnit())+1)
endif
set lEq=1
set lEQ=18
loop
exitwhen lEq>lEQ
set lU2=GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc(1,'e017',GetOwningPlayer(lU0),lU2,lPN[lEq])
if(GetSpellAbilityId()=='A013')then
call SetUnitAbilityLevelSwapped('A057',bj_lastCreatedUnit,GetUnitAbilityLevelSwapped('A013',GetSpellAbilityUnit()))
else
call SetUnitAbilityLevelSwapped('A057',bj_lastCreatedUnit,(GetUnitAbilityLevelSwapped('A0A6',GetSpellAbilityUnit())+1))
endif
set lUZ[lEq]=bj_lastCreatedUnit
call IssuePointOrderByIdLoc(bj_lastCreatedUnit,OrderId("move"),PolarProjectionBJ(lU2,675.,(I2R(lEq)*20.)))
call RemoveLocation(lU2)
set lEq=lEq+1
endloop
set lEq=1
set lEQ=5
loop
exitwhen lEq>lEQ
set lU4=GetUnitsInRangeOfLocMatching(lUz,lU1,Condition(function Poison_Nova_Filter))
loop
set lnX=FirstOfGroup(lU4)
exitwhen lnX==null
set lU3=GetUnitLoc(lnX)
call CreateNUnitsAtLoc(1,'o00I',GetOwningPlayer(lU0),lU3,bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit,'A057')
call SetUnitAbilityLevelSwapped('A057',bj_lastCreatedUnit,lUY)
call UnitApplyTimedLifeBJ(1.,'BTLF',bj_lastCreatedUnit)
call IssueTargetOrderById(bj_lastCreatedUnit,OrderId("attack"),lnX)
call SetUnitPathing(bj_lastCreatedUnit,false)
call SetUnitInvulnerable(bj_lastCreatedUnit,true)
call UnitAddAbility(bj_lastCreatedUnit,'Aloc')
call RemoveLocation(lU3)
call GroupRemoveUnit(lU4,lnX)
endloop
set lUz=lUz+200
call PolledWait(.18)
set lEq=lEq+1
endloop
set lEq=1
set lEQ=18
loop
exitwhen lEq>lEQ
call RemoveUnit(lUZ[lEq])
set lEq=lEq+1
endloop
call RemoveLocation(lU1)
call RemoveLocation(lU2)
call DestroyGroup(lU4)
endfunction
function StartTrigger_Poison_Nova takes nothing returns nothing
set gg_trg_Poison_Nova=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Poison_Nova,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Poison_Nova,Condition(function Trig_Poison_Nova_Conditions))
call TriggerAddAction(gg_trg_Poison_Nova,function Trig_Poison_Nova_Actions)
endfunction
function InitTrig_Poison_Nova takes nothing returns nothing
endfunction
function AddLife takes unit pEU,real pFh returns nothing
call SetUnitState(pEU,UNIT_STATE_LIFE,GetUnitState(pEU,UNIT_STATE_LIFE)+pFh)
endfunction
function ShadowWordTimer takes nothing returns nothing
local timer ltt=GetExpiredTimer()
local string lf5=H2Tx(ltt)
local integer lMa=GetInteger(lf5,"Counter")
local unit lfU=GetUnit(lf5,"Hero")
local unit lFB=GetUnit(lf5,"Target")
local integer lmZ=GetUnitAbilityLevel(lfU,'A0AS')
if lMa>7 or GetUnitState(lFB,UNIT_STATE_LIFE)<1 then
call DestroyEffect(GetFX(lf5,"Effect"))
call UnitRemoveAbility(lFB,'A0P0')
call PauseTimer(ltt)
call FastFlush(lf5)
call DestroyTimer(ltt)
else
set lMa=lMa+1
call AddLife(lFB,lmZ*10)
call SetInteger(lf5,"Counter",lMa)
endif
endfunction
function ShadowWordClean takes nothing returns nothing
local timer ltt=GetExpiredTimer()
local string lf5=H2Tx(ltt)
local integer lMa=GetInteger(lf5,"Counter")
local unit lfU=GetUnit(lf5,"Hero")
local unit lFB=GetUnit(lf5,"Target")
local integer lmZ=GetUnitAbilityLevel(lfU,'A0AS')
if lMa>7 or GetUnitState(lFB,UNIT_STATE_LIFE)<1 then
call DestroyEffect(GetFX(lf5,"Effect"))
call UnitRemoveAbility(lFB,'A0P0')
call PauseTimer(ltt)
call FastFlush(lf5)
call DestroyTimer(ltt)
else
set lMa=lMa+1
call UnitDamageTarget(lfU,lFB,lmZ*8,true,false,ATTACK_TYPE_HERO,DAMAGE_TYPE_DIVINE,WEAPON_TYPE_WHOKNOWS)
call SetInteger(lf5,"Counter",lMa)
endif
endfunction
function ShadowWordAction takes nothing returns nothing
local unit lfU=GetTriggerUnit()
local unit lFB=GetSpellTargetUnit()
local timer ltt=CreateTimer()
local string lf5=H2Tx(ltt)
call UnitAddAbility(lFB,'A0P0')
call SetHandle(lf5,"Target",lFB)
call SetHandle(lf5,"Hero",lfU)
call SetInteger(lf5,"Counter",0)
if IsUnitAlly(lFB,GetOwningPlayer(lfU))then
call SetHandle(lf5,"Effect",AddSpecialEffectTarget("Abilities\\Spells\\Items\\StaffOfSanctuary\\Staff_Sanctuary_Target.mdl",lFB,"chest"))
call TimerStart(ltt,1,true,function ShadowWordTimer)
else
call SetHandle(lf5,"Effect",AddSpecialEffectTarget("Abilities\\Spells\\Orc\\Voodoo\\VoodooAuraTarget.mdl",lFB,"overhead"))
call TimerStart(ltt,1,true,function ShadowWordClean)
endif
endfunction
function ShadowWordCheck takes nothing returns boolean
return GetSpellAbilityId()=='A0AS'
endfunction
function Hi takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function ShadowWordCheck))
call TriggerAddAction(ltt,function ShadowWordAction)
call SpellPreload('A0JF')
endfunction
function InitTrig_Shadow_Word takes nothing returns nothing
endfunction
function UpheavalSpell takes nothing returns boolean
return GetSpellAbilityId()=='A06P'
endfunction
function UpheavalFilter takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(udg_u_DTAX_temp))and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>1
endfunction
function UpheavalSlowBuff takes nothing returns nothing
local unit lFB=GetEnumUnit()
local unit lJV=CreateUnit(GetOwningPlayer(udg_u_DTAX_temp),'e00E',GetUnitX(lFB),GetUnitY(lFB),0)
call UnitAddAbility(lJV,'A0JE')
call SetUnitAbilityLevel(lJV,'A0JE',udg_i_DTAX_beastmaster_primal_roar_intel_gain_REF3)
call IssueTargetOrderById(lJV,OrderId("slow"),lFB)
endfunction
function UpheavalAddUnit takes unit pfU returns nothing
local group lEw=CreateGroup()
local boolexpr lEW=Condition(function UpheavalFilter)
set udg_u_DTAX_temp=pfU
call GroupEnumUnitsInRange(lEw,GetUnitX(pfU),GetUnitY(pfU),675,lEW)
call ForGroup(lEw,function UpheavalSlowBuff)
call DestroyGroup(lEw)
call DestroyBoolExpr(lEW)
endfunction
function UpheavalTimer takes nothing returns nothing
local trigger ltt=GetTriggeringTrigger()
local string lf5=H2Tx(ltt)
local unit lfU
local unit lJV=GetUnit(lf5,"Caster")
if GetTriggerEventId()==EVENT_UNIT_SPELL_ENDCAST then
call KillUnit(lJV)
call FastFlush(lf5)
call DestroyTriggerEx(ltt)
else
call SetUnitAnimation(lJV,"birth")
set lfU=GetUnit(lf5,"Hero")
set udg_i_DTAX_beastmaster_primal_roar_intel_gain_REF3=GetTriggerExecCount(ltt)*GetUnitAbilityLevel(lfU,'A06P')/2
call UpheavalAddUnit(lfU)
endif
endfunction
function UpheavalMain takes nothing returns nothing
local unit lfU=GetTriggerUnit()
local location liD=GetSpellTargetLoc()
local trigger ltt=CreateTrigger()
local string lf5=H2Tx(ltt)
local real lxx=GetLocationX(liD)
local real lyy=GetLocationY(liD)
local unit lJV=CreateUnit(GetOwningPlayer(lfU),'e01G',lxx,lyy,0)
call RemoveLocation(liD)
call TriggerRegisterUnitEvent(ltt,lfU,EVENT_UNIT_SPELL_ENDCAST)
call TriggerRegisterTimerEvent(ltt,.5,true)
call TriggerAddAction(ltt,function UpheavalTimer)
call SetHandle(lf5,"Hero",lfU)
call SetHandle(lf5,"Caster",lJV)
endfunction
function UpheavalInit takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddAction(ltt,function UpheavalMain)
call TriggerAddCondition(ltt,Condition(function UpheavalSpell))
call SpellPreload('A0JE')
endfunction
function InitTrig_Upheaval takes nothing returns nothing
endfunction
function FatalSpell takes nothing returns boolean
return GetSpellAbilityId()=='A0J5'
endfunction
function FatalBoundsEnumCheck takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))and IsUnitVisible(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>1
endfunction
function TempLightning takes unit pvK,unit pvl returns nothing
local lightning lFO
if pvK!=null and pvl!=null then
set lFO=AddLightning("CLPB",true,GetUnitX(pvK),GetUnitY(pvK),GetUnitX(pvl),GetUnitY(pvl))
call SetLightningColor(lFO,.7,.1,.9,1)
set udg_lig_DTAX_TempLightning=lFO
call ExecuteFunc("TempLightningClean")
endif
endfunction
function AddFatalBuff takes nothing returns nothing
call UnitAddAbility(GetEnumUnit(),'A0P2')
endfunction
function RemoveFatalBuff takes nothing returns nothing
call UnitRemoveAbility(GetEnumUnit(),'A0P2')
endfunction
function DoFatalDamage takes nothing returns nothing
if GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)>1 and GetEnumUnit()!=GetTriggerUnit()then
call UnitDamageTarget(udg_u_DTAX_temp,GetEnumUnit(),udg_r_DTAX_necrolyte_reaperscythe_ratio,true,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)
endif
endfunction
function FatalBoundsDamage takes nothing returns nothing
local trigger ltt=GetTriggeringTrigger()
local string lf5=H2Tx(ltt)
local real lf7
local unit lfo
local unit lfU
local group lEw=GetGroup(lf5,"Group")
if GetTriggerEventId()!=EVENT_UNIT_DAMAGED then
call ForGroup(lEw,function RemoveFatalBuff)
call FastFlush(lf5)
call DestroyGroup(lEw)
call DestroyTriggerEx(ltt)
elseif GetEventDamage()>10 and GetEventDamage()<6000 then
set lfU=GetUnit(lf5,"Hero")
set lf7=GetUnitAbilityLevel(lfU,'A0J5')*.05*GetEventDamage()
set udg_r_DTAX_necrolyte_reaperscythe_ratio=ReturnMinReal(lf7,GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE))
set udg_u_DTAX_temp=lfU
call DisableTrigger(ltt)
call ForGroup(lEw,function DoFatalDamage)
call EnableTrigger(ltt)
endif
endfunction
function FatalBoundsMain takes nothing returns nothing
local unit lfU=GetTriggerUnit()
local unit lFB=GetSpellTargetUnit()
local group lEw=CreateGroup()
local boolexpr lEW=Condition(function FatalBoundsEnumCheck)
local trigger ltt=CreateTrigger()
local string lf5=H2Tx(ltt)
local integer lii=2
local group lvN=CreateGroup()
local unit array lvo
local string lvO="Abilities\\Spells\\Undead\\Curse\\CurseTarget.mdl"
call SetHandle(lf5,"Hero",lfU)
call TempLightning(lfU,lFB)
call TimedEffect(lvO,lFB,"overhead",25)
set lvo[1]=lFB
call SetHandle(lf5,"Unit1",lvo[1])
call TriggerRegisterUnitEvent(ltt,lvo[1],EVENT_UNIT_DAMAGED)
call GroupEnumUnitsInRange(lEw,GetUnitX(lFB),GetUnitY(lFB),600,lEW)
call GroupRemoveUnit(lEw,lFB)
call GroupAddUnit(lvN,lFB)
call SetHandle(lf5,"Group",lvN)
loop
exitwhen lii>5 or FirstOfGroup(lEw)==null
set lvo[lii]=FirstOfGroup(lEw)
call TempLightning(lvo[lii-1],lvo[lii])
call TriggerRegisterUnitEvent(ltt,lvo[lii],EVENT_UNIT_DAMAGED)
call GroupAddUnit(lvN,lvo[lii])
call GroupRemoveUnit(lEw,lvo[lii])
call TimedEffect(lvO,lvo[lii],"overhead",25)
set lii=lii+1
endloop
call SetInteger(lf5,"FXCount",lii-1)
set udg_i_DTAX_beastmaster_primal_roar_intel_gain_REF3=GetUnitAbilityLevel(lfU,'A0J5')
call ForGroup(lvN,function AddFatalBuff)
call TriggerRegisterTimerEvent(ltt,25,false)
call TriggerAddAction(ltt,function FatalBoundsDamage)
endfunction
function FatalBoundsInit takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function FatalSpell))
call TriggerAddAction(ltt,function FatalBoundsMain)
call SpellPreload('A0J9')
endfunction
function InitTrig_Fatal_Bonds takes nothing returns nothing
endfunction
function AutoTextTag takes string pfk,unit pfK,real pfl,integer pfL,integer pfm,integer pfM,integer pfn returns nothing
local texttag ltt=CreateTextTag()
call SetTextTagText(ltt,pfk,.02)
call SetTextTagPosUnit(ltt,pfK,.0)
call SetTextTagColor(ltt,pfL,pfm,pfM,pfn)
call SetTextTagVelocity(ltt,0,.01)
call SetTextTagVisibility(ltt,true)
call SetTextTagFadepoint(ltt,2.)
call SetTextTagLifespan(ltt,pfl)
call SetTextTagPermanent(ltt,false)
endfunction
function MaledictEnumFilter takes nothing returns boolean
if(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))==false)then
return false
endif
if(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==false)then
return false
endif
return true
endfunction
function MaledictMain takes nothing returns nothing
local location liD=GetSpellTargetLoc()
local group lEw=GetUnitsInRangeOfLocMatching(160,liD,Condition(function MaledictEnumFilter))
local integer lgB=CountUnitsInGroup(lEw)
local integer lmZ=GetUnitAbilityLevel(GetTriggerUnit(),'A0NO')
local real lv7
local unit array lv8
local real array lv9
local effect array lVa
local integer lVA=1
local integer lVb=12
local integer lEq=1
local integer lEQ=lgB
local integer lVB
loop
exitwhen lEq>lEQ
set lv8[lEq]=FirstOfGroup(lEw)
set lv9[lEq]=GetUnitState(lv8[lEq],UNIT_STATE_LIFE)
call GroupRemoveUnit(lEw,lv8[lEq])
set lVa[lEq]=AddSpecialEffectTarget("Abilities\\Spells\\Orc\\SpiritLink\\SpiritLinkTarget.mdl",lv8[lEq],"overhead")
set lEq=lEq+1
endloop
loop
exitwhen lVA>lVb
set lEq=1
set lEQ=lgB
loop
exitwhen lEq>lEQ
if(IsUnitAliveBJ(lv8[lEq]))then
call UnitDamageTargetBJ(GetTriggerUnit(),lv8[lEq],lmZ*5,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC)
if(ModuloInteger(lVA,4)==0)then
set lv7=ReturnMaxReal((lv9[lEq]-GetUnitState(lv8[lEq],UNIT_STATE_LIFE)),0)
set lVB=lmZ*10*R2I(lv7/100)
if(lVB>0)then
call UnitDamageTargetBJ(GetTriggerUnit(),lv8[lEq],lmZ*10*R2I(lv7/100),ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC)
call AutoTextTag(I2S(R2I(lmZ*10*R2I(lv7/100)))+"!",lv8[lEq],2.,218,165,32,255)
endif
endif
endif
set lEq=lEq+1
endloop
set lVA=lVA+1
call PolledWait(1)
endloop
set lEq=1
set lEQ=lgB
loop
exitwhen lEq>lEQ
call DestroyEffect(lVa[lEq])
set lEq=lEq+1
endloop
call DestroyGroup(lEw)
call RemoveLocation(liD)
endfunction
function MaledictCheck takes nothing returns boolean
if(GetSpellAbilityId()=='A0NO')then
return true
endif
return false
endfunction
function MaledictInit takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function MaledictCheck))
call TriggerAddAction(ltt,function MaledictMain)
endfunction
function InitTrig_Maledict takes nothing returns nothing
endfunction
function CasksSpell takes nothing returns boolean
return GetSpellAbilityId()=='A0NM'
endfunction
function CaskFilter takes nothing returns boolean
if(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))then
return false
endif
if(GetUnitAbilityLevelSwapped('A04R',GetFilterUnit())==1)then
return false
endif
if(IsUnitAliveBJ(GetFilterUnit())==false)then
return false
endif
if(GetUnitTypeId(GetFilterUnit())=='o003')then
return false
endif
if(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))==false)then
return false
endif
if(IsUnitVisible(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))==false)then
return false
endif
return true
endfunction
function CasksAction takes nothing returns nothing
local integer lmZ=GetUnitAbilityLevelSwapped('A0NM',GetTriggerUnit())
local unit lFB=GetSpellTargetUnit()
local unit lJV
local unit lvx
local unit lvX=GetTriggerUnit()
local integer lEq
local integer lEQ
local integer lMa=0
local group lEw
local location ln3
loop
exitwhen lMa>(lmZ*2)
set lMa=lMa+1
set lJV=CreateUnit(GetOwningPlayer(GetTriggerUnit()),'e00E',GetUnitX(lvX),GetUnitY(lvX),bj_UNIT_FACING)
call UnitAddAbility(lJV,'A0NL')
call IssueTargetOrderById(lJV,OrderId("thunderbolt"),lFB)
call PolledWait(((GetUnitX(lFB)-GetUnitX(lJV))*(GetUnitX(lFB)-GetUnitX(lJV))+(GetUnitY(lFB)-GetUnitY(lJV))*(GetUnitY(lFB)-GetUnitY(lJV)))/360000)
if IsUnitType(lFB,UNIT_TYPE_HERO)==false then
call UnitDamageTarget(GetTriggerUnit(),lFB,50+25*lmZ,true,true,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
endif
if(lMa<(lmZ*2+1))then
set ln3=GetUnitLoc(lFB)
set lEw=GetUnitsInRangeOfLocMatching(600.,ln3,Condition(function CaskFilter))
call RemoveLocation(ln3)
loop
set lvx=GroupPickRandomUnit(lEw)
if(lvx==null)then
set lMa=100
call DestroyGroup(lEw)
exitwhen 1==1
elseif(lvx!=lFB)then
set lvX=lFB
set lFB=lvx
call DestroyGroup(lEw)
exitwhen 1==1
endif
call GroupRemoveUnit(lEw,lvx)
endloop
endif
endloop
endfunction
function CasksInit takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(ltt,Condition(function CasksSpell))
call TriggerAddAction(ltt,function CasksAction)
endfunction
function InitTrig_Paralyzing_Cask takes nothing returns nothing
endfunction
function VoodooHealAction takes unit pfo,real pvY returns nothing
call SetUnitState(pfo,UNIT_STATE_LIFE,ReturnMaxReal(0,GetUnitState(pfo,UNIT_STATE_LIFE)+pvY))
endfunction
function VoodooEnumAction takes nothing returns nothing
call VoodooHealAction(GetEnumUnit(),GetUnitAbilityLevel(udg_u_DTAX_temp,'A0NE')*6)
endfunction
function VoodooFilterII takes nothing returns boolean
if(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE))then
return false
endif
if(IsUnitAlly(GetFilterUnit(),GetOwningPlayer(udg_u_DTAX_temp))==false)then
return false
endif
return true
endfunction
function VoodooTimer takes nothing returns nothing
local trigger ltt=GetTriggeringTrigger()
local unit lv1=GetUnit(H2Tx(ltt),"WitchDoctor")
local group lEw=CreateGroup()
if(GetUnitState(lv1,UNIT_STATE_MANA)<10)then
call DisableTrigger(ltt)
endif
set udg_u_DTAX_temp=lv1
call GroupEnumUnitsInRange(lEw,GetUnitX(lv1),GetUnitY(lv1),350,Condition(function VoodooFilterII))
call GroupAddUnit(lEw,lv1)
call ForGroup(lEw,function VoodooEnumAction)
call DestroyGroup(lEw)
endfunction
function VoodooMain takes nothing returns nothing
local unit lfo=GetTriggerUnit()
local trigger ltt=GetTrigger(H2Tx(lfo),"VoodooTrigger")
if(ltt==null)then
set ltt=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(ltt,1.)
call TriggerAddAction(ltt,function VoodooTimer)
call SetHandle(H2Tx(ltt),"WitchDoctor",lfo)
call SetHandle(H2Tx(lfo),"VoodooTrigger",ltt)
endif
if(GetIssuedOrderId()==OrderId("immolation"))then
call EnableTrigger(ltt)
else
call DisableTrigger(ltt)
endif
endfunction
function VoodooSkillCheck takes nothing returns boolean
if(GetIssuedOrderId()==852177or GetIssuedOrderId()==OrderId("unimmolation"))then
if(GetUnitTypeId(GetTriggerUnit())=='E01A')then
return true
endif
endif
return false
endfunction
function VoodooInit takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_ISSUED_ORDER)
call TriggerAddCondition(ltt,Condition(function VoodooSkillCheck))
call TriggerAddAction(ltt,function VoodooMain)
endfunction
function InitTrig_Voodoo_Restoration takes nothing returns nothing
endfunction
function InitCustomTriggers takes nothing returns nothing
call InitTrig_Core()
call InitTrig_Shared()
call InitTrig_ExecuteFunc_or_UNUSED()
call InitTrig_Recreate_Initiate()
call InitTrig_AttackSpeed()
call InitTrig_Select_Game_Mode()
call InitTrig_ProcessCMD()
call InitTrig_Recreate()
call InitTrig_Unstuck()
call InitTrig_Leave()
call InitTrig_ReviveHero()
call InitTrig_NormalGoldIncome()
call InitTrig_CreepKill()
call InitTrig_HeroKill()
call InitTrig_DenyHero()
call InitTrig_StartSpawningCreeps()
call InitTrig_SwapTimeElapsed()
call InitTrig_RepickTimeElapsed()
call InitTrig_Ancient_Protectors_Count()
call InitTrig_Spirit_Towers_Count()
call InitTrig_Sentienel_Won()
call InitTrig_Scourge_Won()
call InitTrig_WT_and_FT_Protection()
call InitTrig_Restore_Destructables()
call InitTrig_Dummy_Control()
call InitTrig_Ancient_Protectors_System()
call InitTrig_Spirit_Towers_System()
call InitTrig_IncreaseRangedSpawn()
call InitTrig_IncreaseMeleeSpawn()
call InitTrig_SpawnCreeps()
call InitTrig_Barrack1_Destroyed()
call InitTrig_Barrack2_Destroyed()
call InitTrig_Barrack3_Destroyed()
call InitTrig_Barrack4_Destroyed()
call InitTrig_Barrack5_Destroyed()
call InitTrig_Barrack6_Destroyed()
call InitTrig_Barrack7_Destroyed()
call InitTrig_Barrack8_Destroyed()
call InitTrig_Barrack9_Destroyed()
call InitTrig_Barrack10_Destroyed()
call InitTrig_Barrack11_Destroyed()
call InitTrig_Barrack12_Destroyed()
call InitTrig_Sentinel_MegaCreeps()
call InitTrig_Scourge_MegaCreeps()
call InitTrig_IncreaseCreepsLevel()
call InitTrig_EnableNeutralCreepsSpawn()
call InitTrig_SpawnNeutralCreeps()
call InitTrig_SpawnSuperCreeps()
call InitTrig_Observer_Support()
call InitTrig_HeroAIManager()
call InitTrig_True_Sights()
call InitTrig_TowerAI()
call InitTrig_Mechanical_Control()
call InitTrig_Voting()
call InitTrig_Single_Player()
call InitTrig_Mirrormatch()
call InitTrig_Deathmatch()
call InitTrig_SameHero_Deny_Geomancer()
call InitTrig_Easymode()
call InitTrig_NormalModeDefaulted()
call InitTrig_WTF_Mode()
call InitTrig_Drafting()
call InitTrig_Random_Hero()
call InitTrig_Repick()
call InitTrig_SwapHero()
call InitTrig_InitHero()
call InitTrig_SetUpReciepes()
call InitTrig_Disassemble()
call InitTrig_Mjollnir()
call InitTrig_Crow_Morph()
call InitTrig_Perseverance_Split()
call InitTrig_Teleportation_Item()
call InitTrig_Mekansm_Armor_Heal()
call InitTrig_Rune_Capture()
call InitTrig_Bottle_Control()
call InitTrig_Aegis()
call InitTrig_Charges_Connection()
call InitTrig_Courier_Set_Droppable()
call InitTrig_Courier_Set_UnDroppable()
call InitTrig_Helm_of_the_Dominator()
call InitTrig_Refresher_Orb()
call InitTrig_Necronomicon()
call InitTrig_Illusion_Rune()
call InitTrig_Recreate_Rune()
call InitTrig_Powerups_Replacements()
call InitTrig_Try_Apply_Reciepe()
call InitTrig_RM_Replace_and_Denies()
call InitTrig_Aghanim_Scepter()
call InitTrig_Specific_Reciepes()
call InitTrig_Undroppable_Cooldowns()
call InitTrig_Reset_Droppable_Status()
call InitTrig_Double_Damage_Rune()
call InitTrig_Double_Damage_End()
call InitTrig_TripleKill_Dropdown1()
call InitTrig_TripleKill_Dropdown2()
call InitTrig_TripleKill_Dropdown3()
call InitTrig_TripleKill_Dropdown4()
call InitTrig_TripleKill_Dropdown5()
call InitTrig_TripleKill_Dropdown7()
call InitTrig_TripleKill_Dropdown8()
call InitTrig_TripleKill_Dropdown9()
call InitTrig_TripleKill_Dropdown10()
call InitTrig_TripleKill_Dropdown11()
call InitTrig_Roshan_Secret()
call InitTrig_Roshan_Kill()
call InitTrig_Roshan_Protection()
call InitTrig_Roshan_Control()
call InitTrig_Necronomicon_Warrior_1()
call InitTrig_Necronomicon_Warrior_2()
call InitTrig_Necronomicon_Warrior_3()
call InitTrig_UniversalDeathPact()
call InitTrig_FinalStatBoard()
call InitTrig_KD_Show()
call InitTrig_KD_Update()
call InitTrig_KD_Refresh()
call InitTrig_CS_Board()
call InitTrig_FinalStatBoard_Refresh()
call InitTrig_NeutralKillsCounter()
call InitTrig_SelledItemsCounter()
call InitTrig_Bottle_Recall()
call InitTrig_Waypoint_Final()
call InitTrig_Waypoint_MiddleSE()
call InitTrig_Waypoint_MiddleSC()
call InitTrig_Waypoint_LeftSE()
call InitTrig_Waypoint_LeftSC()
call InitTrig_Waypoint_RightSC()
call InitTrig_Waypoint_RightSE()
call InitTrig_Waypoint_Init()
call InitTrig_Waypoint_Order()
call InitTrig_Game_Start()
call InitTrig_PlayersFoodCap()
call InitTrig_Teams()
call InitTrig_HeroDataBase()
call InitTrig_ItemIconDataBase()
call InitTrig_Quests()
call InitTrig_InitSpellsForHero()
call InitTrig_PreloadNeutralCreeps()
call InitTrig_Alliances()
call InitTrig_init()
call InitTrig_Goblin_Greed()
call InitTrig_Unstable_Concoction()
call InitTrig_Acid_Spray()
call InitTrig_Mana_Void()
call InitTrig_Battle_Hunger_Dispell()
call InitTrig_Counter_Helix()
call InitTrig_Berserker_Call()
call InitTrig_Culling_Blade()
call InitTrig_Nightmare()
call InitTrig_Fiend_Grip()
call InitTrig_Brain_Sap()
call InitTrig_Beast_Rage()
call InitTrig_Wild_Axes()
call InitTrig_Call_of_the_Wild()
call InitTrig_Primal_Roar()
call InitTrig_Strygwyr_Thirst()
call InitTrig_Blood_Bath()
call InitTrig_Rupture()
call InitTrig_Searing_Arrows()
call InitTrig_Track_Cast()
call InitTrig_Track_Kill()
call InitTrig_Warpath()
call InitTrig_Viscous_Nasal_Goo()
call InitTrig_Bristleback()
call InitTrig_Quill_Spray()
call InitTrig_Spin_Web_Functions()
call InitTrig_Spin_Web()
call InitTrig_Spin_Web_Learn()
call InitTrig_Rot()
call InitTrig_Flesh_Heap()
call InitTrig_Meat_Hook()
call InitTrig_Return()
call InitTrig_Double_Edge()
call InitTrig_Chaos_Bolt()
call InitTrig_Freezing_Field()
call InitTrig_LVL_Death()
call InitTrig_Devour()
call InitTrig_Scorched_Earth()
call InitTrig_Dragon_Blood()
call InitTrig_ScatterShot()
call InitTrig_Assassinate()
call InitTrig_Take_Aim()
call InitTrig_Fissure()
call InitTrig_Echo_Slam()
call InitTrig_Aftershock()
call InitTrig_Untouchable()
call InitTrig_Enchant()
call InitTrig_Nature_Attendants()
call InitTrig_Impetus()
call InitTrig_Black_Hole()
call InitTrig_Malefice()
call InitTrig_Midnight_Pulse()
call InitTrig_Conversion()
call InitTrig_Chronosphere()
call InitTrig_Time_Walk()
call InitTrig_Backtrack()
call InitTrig_Poof()
call InitTrig_Earthbind()
call InitTrig_Duplicates_Periodic()
call InitTrig_Divided_We_Stand()
call InitTrig_Duplicates_Levelling()
call InitTrig_Remote_Mines()
call InitTrig_Remote_Mines_Detonate()
call InitTrig_Goblin_Land_Mine_Counter()
call InitTrig_Split_Shot()
call InitTrig_Penitence()
call InitTrig_Hand_of_God()
call InitTrig_Holy_Persuasion()
call InitTrig_Test_of_Faith()
call InitTrig_Healing_Ward()
call InitTrig_Blade_Fury()
call InitTrig_Mana_Leak()
call InitTrig_Mana_Leak_Effect()
call InitTrig_Chakra_Magic()
call InitTrig_Illuminate()
call InitTrig_Chain_Frost()
call InitTrig_Storm_Seeker()
call InitTrig_Spirit_Bear_Cast()
call InitTrig_Spirit_Bear_Learn()
call InitTrig_Spirit_Bear_AutoReturn()
call InitTrig_Spirit_Bear_Return()
call InitTrig_Synergy()
call InitTrig_Spirit_Bear_Death()
call InitTrig_Spirit_KillBear()
call InitTrig_Death_Coil()
call InitTrig_Aphotic_Shield()
call InitTrig_Borrowed_Time()
call InitTrig_Frostmourne()
call InitTrig_Static_Field()
call InitTrig_Lightning_Bolt()
call InitTrig_Thundergod_Wrath()
call InitTrig_Reverse_Polarity()
call InitTrig_Lucent_Beam()
call InitTrig_Moon_Glaive()
call InitTrig_VertexColorChanges()
call InitTrig_Morph()
call InitTrig_Adaptive_Strike()
call InitTrig_Replicate()
call InitTrig_Song_of_the_Siren()
call InitTrig_Gravekeeper_Cloak()
call InitTrig_Raise_Revenants()
call InitTrig_Grave_Chill()
call InitTrig_Soul_Assumption()
call InitTrig_Reaper_Scythe()
call InitTrig_Sadist()
call InitTrig_Death_Pulse()
call InitTrig_Shukuchi()
call InitTrig_Time_Lapse_Cast()
call InitTrig_Time_Lapse_Learn()
call InitTrig_Corrosive_Skin()
call InitTrig_Void()
call InitTrig_Crippling_Fear()
call InitTrig_Nether_Ward()
call InitTrig_Astral_Imprisonment()
call InitTrig_Arcane_Orb()
call InitTrig_Essence_Aura()
call InitTrig_Sanity_Eclipse()
call InitTrig_Multi_Cast()
call InitTrig_Bloodlust()
call InitTrig_Fireblast()
call InitTrig_Purification()
call InitTrig_Blur()
call InitTrig_Blink_Strike()
call InitTrig_Doppelwalk_Illusion()
call InitTrig_Doppelwalk()
call InitTrig_Phantom_Edge()
call InitTrig_Spirit_Lance()
call InitTrig_Moonlight_Shadow()
call InitTrig_Starfall()
call InitTrig_Elune_Arrow()
call InitTrig_Leap()
call InitTrig_Sprout()
call InitTrig_Teleportation()
call InitTrig_Teleportation_Deny()
call InitTrig_Burrowstrike()
call InitTrig_Epicenter()
call InitTrig_Sand_Storm_Start()
call InitTrig_Sand_Storm_Finish()
call InitTrig_Necromastery()
call InitTrig_Shadowraze()
call InitTrig_Skills_Learn()
call InitTrig_Requiem_of_Souls_Cast()
call InitTrig_Requiem_of_Souls_Effect()
call InitTrig_Shadow_Wave()
call InitTrig_Poison_Touch()
call InitTrig_Weave()
call InitTrig_Shallow_Grave()
call InitTrig_Last_Word()
call InitTrig_Curse_of_the_Silent()
call InitTrig_Glaives_of_Wisdom_Learn()
call InitTrig_Glaives_of_Wisdom_Kill()
call InitTrig_Global_Silence()
call InitTrig_Slithereen_Crush()
call InitTrig_Conjure_Image()
call InitTrig_Sunder()
call InitTrig_Spectral_Dagger()
call InitTrig_Desolate()
call InitTrig_Dispersion()
call InitTrig_Haunt()
call InitTrig_Reality()
call InitTrig_Charge_of_Darkness()
call InitTrig_Empowering_Haste()
call InitTrig_Greater_Bash()
call InitTrig_Nether_Strike()
call InitTrig_Greater_Bash_Functions()
call InitTrig_Smoke_Screen()
call InitTrig_Permanent_Invisibility()
call InitTrig_Backstab()
call InitTrig_Grow()
call InitTrig_Avalanche()
call InitTrig_Toss()
call InitTrig_Craggy_Exterior()
call InitTrig_Kraken_Shell()
call InitTrig_Gush()
call InitTrig_Ravage()
call InitTrig_March_of_the_Machines()
call InitTrig_Laser()
call InitTrig_Rearm()
call InitTrig_Diabolic_Edict()
call InitTrig_Overgrowth()
call InitTrig_Nature_Guise()
call InitTrig_Berserker_Rage_Cast()
call InitTrig_Berserker_Rage_Learn()
call InitTrig_Ice_Path()
call InitTrig_Macropyre()
call InitTrig_Dual_Breath()
call InitTrig_Auto_Fire()
call InitTrig_Overpower_Counter()
call InitTrig_Overpower()
call InitTrig_Enrage()
call InitTrig_Nether_Swap()
call InitTrig_Poison_Nova()
call InitTrig_Shadow_Word()
call InitTrig_Upheaval()
call InitTrig_Fatal_Bonds()
call InitTrig_Maledict()
call InitTrig_Paralyzing_Cask()
call InitTrig_Voodoo_Restoration()
endfunction
function InitCustomPlayerSlots takes nothing returns nothing
call SetPlayerStartLocation(Player(1),0)
call ForcePlayerStartLocation(Player(1),0)
call SetPlayerColor(Player(1),ConvertPlayerColor(1))
call SetPlayerRacePreference(Player(1),RACE_PREF_NIGHTELF)
call SetPlayerRaceSelectable(Player(1),false)
call SetPlayerController(Player(1),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(2),1)
call ForcePlayerStartLocation(Player(2),1)
call SetPlayerColor(Player(2),ConvertPlayerColor(2))
call SetPlayerRacePreference(Player(2),RACE_PREF_NIGHTELF)
call SetPlayerRaceSelectable(Player(2),false)
call SetPlayerController(Player(2),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(3),2)
call ForcePlayerStartLocation(Player(3),2)
call SetPlayerColor(Player(3),ConvertPlayerColor(3))
call SetPlayerRacePreference(Player(3),RACE_PREF_NIGHTELF)
call SetPlayerRaceSelectable(Player(3),false)
call SetPlayerController(Player(3),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(4),3)
call ForcePlayerStartLocation(Player(4),3)
call SetPlayerColor(Player(4),ConvertPlayerColor(4))
call SetPlayerRacePreference(Player(4),RACE_PREF_NIGHTELF)
call SetPlayerRaceSelectable(Player(4),false)
call SetPlayerController(Player(4),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(5),4)
call ForcePlayerStartLocation(Player(5),4)
call SetPlayerColor(Player(5),ConvertPlayerColor(5))
call SetPlayerRacePreference(Player(5),RACE_PREF_NIGHTELF)
call SetPlayerRaceSelectable(Player(5),false)
call SetPlayerController(Player(5),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(7),5)
call ForcePlayerStartLocation(Player(7),5)
call SetPlayerColor(Player(7),ConvertPlayerColor(7))
call SetPlayerRacePreference(Player(7),RACE_PREF_UNDEAD)
call SetPlayerRaceSelectable(Player(7),false)
call SetPlayerController(Player(7),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(8),6)
call ForcePlayerStartLocation(Player(8),6)
call SetPlayerColor(Player(8),ConvertPlayerColor(8))
call SetPlayerRacePreference(Player(8),RACE_PREF_UNDEAD)
call SetPlayerRaceSelectable(Player(8),false)
call SetPlayerController(Player(8),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(9),7)
call ForcePlayerStartLocation(Player(9),7)
call SetPlayerColor(Player(9),ConvertPlayerColor(9))
call SetPlayerRacePreference(Player(9),RACE_PREF_UNDEAD)
call SetPlayerRaceSelectable(Player(9),false)
call SetPlayerController(Player(9),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(10),8)
call ForcePlayerStartLocation(Player(10),8)
call SetPlayerColor(Player(10),ConvertPlayerColor(10))
call SetPlayerRacePreference(Player(10),RACE_PREF_UNDEAD)
call SetPlayerRaceSelectable(Player(10),false)
call SetPlayerController(Player(10),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(11),9)
call ForcePlayerStartLocation(Player(11),9)
call SetPlayerColor(Player(11),ConvertPlayerColor(11))
call SetPlayerRacePreference(Player(11),RACE_PREF_UNDEAD)
call SetPlayerRaceSelectable(Player(11),false)
call SetPlayerController(Player(11),MAP_CONTROL_USER)
endfunction
function InitCustomTeams takes nothing returns nothing
call SetPlayerTeam(Player(1),0)
call SetPlayerTeam(Player(2),0)
call SetPlayerTeam(Player(3),0)
call SetPlayerTeam(Player(4),0)
call SetPlayerTeam(Player(5),0)
call SetPlayerTeam(Player(7),1)
call SetPlayerTeam(Player(8),1)
call SetPlayerTeam(Player(9),1)
call SetPlayerTeam(Player(10),1)
call SetPlayerTeam(Player(11),1)
endfunction
function InitAllyPriorities takes nothing returns nothing
call SetStartLocPrioCount(0,4)
call SetStartLocPrio(0,0,1,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(0,1,2,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(0,2,3,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(0,3,4,MAP_LOC_PRIO_HIGH)
call SetStartLocPrioCount(1,4)
call SetStartLocPrio(1,0,0,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(1,1,2,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(1,2,3,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(1,3,4,MAP_LOC_PRIO_HIGH)
call SetStartLocPrioCount(2,4)
call SetStartLocPrio(2,0,0,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(2,1,1,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(2,2,3,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(2,3,4,MAP_LOC_PRIO_HIGH)
call SetStartLocPrioCount(3,4)
call SetStartLocPrio(3,0,0,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(3,1,1,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(3,2,2,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(3,3,4,MAP_LOC_PRIO_HIGH)
call SetStartLocPrioCount(4,4)
call SetStartLocPrio(4,0,0,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(4,1,1,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(4,2,2,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(4,3,3,MAP_LOC_PRIO_HIGH)
call SetStartLocPrioCount(5,4)
call SetStartLocPrio(5,0,6,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(5,1,7,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(5,2,8,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(5,3,9,MAP_LOC_PRIO_HIGH)
call SetStartLocPrioCount(6,4)
call SetStartLocPrio(6,0,5,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(6,1,7,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(6,2,8,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(6,3,9,MAP_LOC_PRIO_HIGH)
call SetStartLocPrioCount(7,4)
call SetStartLocPrio(7,0,5,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(7,1,6,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(7,2,8,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(7,3,9,MAP_LOC_PRIO_HIGH)
call SetStartLocPrioCount(8,4)
call SetStartLocPrio(8,0,5,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(8,1,6,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(8,2,7,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(8,3,9,MAP_LOC_PRIO_HIGH)
call SetStartLocPrioCount(9,4)
call SetStartLocPrio(9,0,5,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(9,1,6,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(9,2,7,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(9,3,8,MAP_LOC_PRIO_HIGH)
endfunction
function main takes nothing returns nothing
call SetCameraBounds(-7424.0+GetCameraMargin(CAMERA_MARGIN_LEFT),-7680.0+GetCameraMargin(CAMERA_MARGIN_BOTTOM),7424.0-GetCameraMargin(CAMERA_MARGIN_RIGHT),7168.0-GetCameraMargin(CAMERA_MARGIN_TOP),-7424.0+GetCameraMargin(CAMERA_MARGIN_LEFT),7168.0-GetCameraMargin(CAMERA_MARGIN_TOP),7424.0-GetCameraMargin(CAMERA_MARGIN_RIGHT),-7680.0+GetCameraMargin(CAMERA_MARGIN_BOTTOM))
call SetDayNightModels("Environment\\DNC\\DNCFelwood\\DNCFelwoodTerrain\\DNCFelwoodTerrain.mdl","Environment\\DNC\\DNCFelwood\\DNCFelwoodUnit\\DNCFelwoodUnit.mdl")
call SetWaterBaseColor(0,0,255,255)
call NewSoundEnvironment("Default")
call SetAmbientDaySound("FelwoodDay")
call SetAmbientNightSound("FelwoodNight")
call SetMapMusic("Music",true,0)
call InitSounds()
call CreateRegions()
call CreateCameras()
call CreateAllUnits()
call InitBlizzard()
call InitGlobals()
call InitCustomTriggers()
endfunction
function config takes nothing returns nothing
call SetMapName("DotA Allstars v6.41")
call SetMapDescription("Choose from 82 unique heroes in an epic battle to defend the Ancients.\n\nModes: |c001e90ff-ap, -ar, -lm, -rd, -mm, -tr, -dm, -vr, -rv, -mr, -du, -sp, -sh, -aa, -ai, -as, -id, -em, -sc, -np|r")
call SetPlayers(10)
call SetTeams(10)
call SetGamePlacement(MAP_PLACEMENT_TEAMS_TOGETHER)
call DefineStartLocation(0,-6272.0,-6912.0)
call DefineStartLocation(1,-6272.0,-6912.0)
call DefineStartLocation(2,-6272.0,-6912.0)
call DefineStartLocation(3,-6272.0,-6912.0)
call DefineStartLocation(4,-6272.0,-6912.0)
call DefineStartLocation(5,6080.0,6400.0)
call DefineStartLocation(6,6080.0,6400.0)
call DefineStartLocation(7,6080.0,6400.0)
call DefineStartLocation(8,6080.0,6400.0)
call DefineStartLocation(9,6080.0,6400.0)
call InitCustomPlayerSlots()
call InitCustomTeams()
call InitAllyPriorities()
endfunction

 

 

posted on 2012-06-05 22:26  谭宇(tony)  阅读(1841)  评论(0编辑  收藏  举报