globals
constant boolean LIBRARY_SCS=true
constant integer COUNT_OF_PLAYERS=12
constant integer INVERSE=1
real SCS_angle=400
real SCS_distance=220
real SCS__offset
location SCS__l
unit array udg_Unit
integer udg_i=0
unit udg_her_item1=null
unit udg_player1hero=null
unit udg_player2hero=null
integer udg_slot1=0
player udg_marketowner=null
playercolor udg_marketownerer=null
unit udg_player3hero=null
unit udg_player4hero=null
unit udg_player6hero=null
unit udg_player5hero=null
real udg_player1stats=0
real udg_player3stats=0
real udg_player2stats=0
real udg_player6stats=0
real udg_player5stats=0
real udg_player4stats=0
player udg_siegeplayer01=null
unit udg_lolo=null
force udg_B_guard=null
unit udg_B_guard_p=null
group udg_Animals=null
dialog udg_Bandit_Guard_1=null
button udg_Bandit_Gurad_Ans1=null
button udg_Bandit_Gurad_Ans2=null
button udg_Bandit_Gurad_Ans3=null
quest udg_Bandit_Vino=null
unit udg_B_gonzales_1=null
force udg_B_gonzales_1_p=null
dialog udg_Bandit_Gonsales_1=null
button udg_Bandit_Gonsales_Ans1=null
button udg_Bandit_Gonsales_Ans2=null
button udg_Bandit_Gonsales_Ans3=null
button udg_Bandit_Gonsales_Ans4=null
quest udg_Gonsales_q_1=null
force udg_B_trader_1_p=null
dialog udg_Bandit_Trader=null
button udg_Bandit_Trader_Ans1=null
button udg_Bandit_Trader_Ans2=null
button udg_Bandit_Trader_Ans3=null
button udg_Bandit_Trader_Ans4=null
dialog udg_Bandit_Trader_2=null
unit udg_B_trader_1=null
force udg_B_enrike_p=null
button udg_Bandit_Trader_Ans1_1=null
button udg_Bandit_Trader_Ans1_2=null
button udg_Bandit_Trader_Ans1_3=null
unit udg_P1_pet=null
unit udg_P2_pet=null
unit udg_P3_pet=null
unit udg_P4_pet=null
unit udg_P5_pet=null
unit udg_P6_pet=null
integer udg_P1_pet_exp=0
integer udg_P2_pet_exp=0
integer udg_P3_pet_exp=0
integer udg_P4_pet_exp=0
integer udg_P5_pet_exp=0
integer udg_P6_pet_exp=0
dialog udg_Tutorial=null
button udg_Tutorisl_ask1=null
button udg_Tutorisl_ask2=null
button udg_Tutorisl_ask3=null
button udg_Tutorisl_ask4=null
button udg_Tutorisl_ask5=null
button udg_Tutorisl_ask6=null
dialog udg_Guard_Captain=null
button udg_Guard_cap_1=null
button udg_Guard_cap_2=null
button udg_Guard_cap_3=null
quest udg_Guard_Castle_save=null
unit udg_Guard_Quest_Bandit=null
dialog udg_Guard=null
quest udg_Guard_Quest1=null
button udg_Guard_take_quest=null
real udg_Exp_hero=0
integer udg_R_Guard=0
integer udg_R_Bandit=0
integer udg_R_Rainger=0
integer udg_R_Necroman=0
integer udg_R_Shaman=0
integer udg_R_Monk=0
unit udg_Karavan=null
unit udg_Karavan_Guard=null
group udg_Quest_G_Bandits=null
integer udg_Quest_Banda=0
unit udg_Gurad_Friend=null
integer udg_G_quest_dino=0
button udg_Guard_about_city=null
button udg_Guard_bb=null
integer udg_G_quest_pig=0
dialog udg_Town_speak=null
button udg_Town_News=null
button udg_Town_bb=null
unit udg_Town_Speaker=null
integer udg_Level_of_mob=0
dialog udg_Naparnik_Ilven=null
button udg_Nap_Ilven_Party=null
unit udg_Ilven=null
button udg_Nap_Ilven_Story=null
button udg_Nap_Ilven_BB=null
unit udg_Orc=null
dialog udg_Naparnik_Orc=null
button udg_Nap_Orc_Party=null
button udg_Nap_Orc_Bb=null
button udg_Nap_Orc_Story=null
integer udg_number=0
boolean array udg_RunOrNO
unit array udg_moved
real array udg_MoveFacing
boolean array udg_MovedAvtoFacing
boolean array udg_MovedDeath
boolean array udg_MovedIsSnorads
real array udg_MovedDamage
real array udg_MovedRang
real array udg_realMove
real array udg_realStop
integer udg_biginInteger=0
location udg_p=null
location array udg_MovedPozition
group udg_Picked_Units_Groop=null
boolean array udg_MoveOforON
unit array udg_TrUnit
integer array udg_Int
integer array udg_TmInt
unit array udg_Target
effect array udg_Effect
group array udg_Group
dialog udg_window=null
button array udg_button
quest array udg_quest
item udg_stone=null
unit udg_tempunit=null
integer udg_count=0
unit udg_necr=null
rect gg_rct_boloto=null
rect gg_rct_npc1=null
rect gg_rct_npc2=null
rect gg_rct_npc21=null
rect gg_rct_npc3=null
rect gg_rct_npc31=null
rect gg_rct_npc4=null
rect gg_rct_npc41=null
rect gg_rct_npc5=null
rect gg_rct_npc51=null
rect gg_rct_npc6=null
rect gg_rct_npc61=null
rect gg_rct_npc7=null
rect gg_rct_npc71=null
rect gg_rct_sethero=null
rect gg_rct_resp=null
rect gg_rct_Enter_temple=null
rect gg_rct________________018=null
rect gg_rct_mine=null
rect gg_rct_outship=null
rect gg_rct_out=null
rect gg_rct________________022=null
rect gg_rct________________023=null
rect gg_rct_Skelet_siege=null
rect gg_rct_skelet_spawn_1=null
rect gg_rct_Skelet_spawn_2=null
rect gg_rct________________027=null
rect gg_rct________________028=null
rect gg_rct_firegod=null
rect gg_rct_E_Arah_Big=null
rect gg_rct_E_Arah_Liitle_2=null
rect gg_rct_E_Arah_Liitle_1=null
rect gg_rct_S_Bandit_guard=null
rect gg_rct_Region_034=null
rect gg_rct_Region_035=null
rect gg_rct_Region_036=null
rect gg_rct_Region_037=null
rect gg_rct_Enrike=null
rect gg_rct_Region_039=null
rect gg_rct_Region_040=null
rect gg_rct_Region_041=null
rect gg_rct_Region_042=null
rect gg_rct_City=null
rect gg_rct_Region_044=null
rect gg_rct_Region_045=null
rect gg_rct_Chiken=null
rect gg_rct_Sewers=null
rect gg_rct_Sewers2=null
rect gg_rct_Region_015=null
rect gg_rct_Region_049=null
rect gg_rct_Region_050=null
rect gg_rct_Quest_Guard_1=null
rect gg_rct_Quest_Guard_2=null
rect gg_rct_Quest_Guard_3=null
rect gg_rct_WP_1=null
rect gg_rct_WP_2=null
rect gg_rct_WP_3=null
rect gg_rct_WP_4=null
rect gg_rct_WP_5=null
rect gg_rct_WP_6=null
rect gg_rct_WP_7=null
rect gg_rct_WP_8=null
rect gg_rct_WP_9=null
rect gg_rct_WP_10=null
rect gg_rct_Region_064=null
rect gg_rct_Region_065=null
rect gg_rct_Earth=null
camerasetup gg_cam_Camera_001=null
camerasetup gg_cam_Camera_002=null
camerasetup gg_cam_Camera_003=null
camerasetup gg_cam_Camera_004=null
camerasetup gg_cam_cam1=null
camerasetup gg_cam_cam2=null
camerasetup gg_cam_cam3=null
camerasetup gg_cam_Camera_008=null
camerasetup gg_cam_Intro1=null
camerasetup gg_cam_Intro2=null
camerasetup gg_cam_intro3=null
camerasetup gg_cam_Camera_012=null
string gg_snd_222
string gg_snd_city
sound gg_snd_city01=null
sound gg_snd_chikens=null
sound gg_snd_sewers=null
sound gg_snd_tutor1=null
sound gg_snd_tutor2=null
sound gg_snd_tutor3=null
sound gg_snd_tutor4=null
sound gg_snd_tutor5=null
sound gg_snd_tutor6=null
sound gg_snd_tutor7=null
sound gg_snd_tutor8=null
sound gg_snd_tutor9=null
sound gg_snd_Ilven___Hello=null
sound gg_snd_Ilven___Yes=null
trigger gg_trg_Earth_end=null
trigger gg_trg_Earth_start=null
trigger gg_trg_Killer_Bandit=null
trigger gg_trg_Killer_Guard=null
trigger gg_trg_Set=null
trigger gg_trg_Untitled_Trigger_003=null
trigger gg_trg_Fire_fix=null
trigger gg_trg_Run_fix=null
trigger gg_trg_Anim_orc_fix=null
trigger gg_trg_Animations=null
trigger gg_trg_every1second=null
trigger gg_trg_sethero=null
trigger gg_trg_initialization=null
trigger gg_trg_HeroDeath=null
trigger gg_trg_mob_res=null
trigger gg_trg_DIPLOMATY=null
trigger gg_trg_Chip_clother=null
trigger gg_trg_Black=null
trigger gg_trg_Blue=null
trigger gg_trg_Exp=null
trigger gg_trg_Fog_1=null
trigger gg_trg_Fog_2=null
trigger gg_trg_Fog_3=null
trigger gg_trg_N_speak=null
trigger gg_trg_Spawn=null
trigger gg_trg_Ilven=null
trigger gg_trg_Orc=null
trigger gg_trg_Human=null
trigger gg_trg_Orc_Party=null
trigger gg_trg_Orc_Story=null
trigger gg_trg_Orc_Bb=null
trigger gg_trg_Ilven_Party=null
trigger gg_trg_Ilven_Story=null
trigger gg_trg_Ilven_Bb=null
trigger gg_trg_Wolf_lvl1_res=null
trigger gg_trg_Wolf_lvl2_res=null
trigger gg_trg_Wolf_lvl3_res=null
trigger gg_trg_Wolf_lvl4_res=null
trigger gg_trg_wolf_evolution_1=null
trigger gg_trg_wolf_evolution_2=null
trigger gg_trg_wolf_evolution_3=null
trigger gg_trg_wolf_evolution_4=null
trigger gg_trg_Set_player_pet=null
trigger gg_trg_Wolf_lvl1_stat=null
trigger gg_trg_Wolf_lvl2_stat=null
trigger gg_trg_Wolf_lvl3_stat=null
trigger gg_trg_Wolf_lvl4_stat=null
trigger gg_trg_Wolf_lvl5_stat=null
trigger gg_trg_ship1=null
trigger gg_trg_ship1_Copy=null
trigger gg_trg_ship2=null
trigger gg_trg_ship2_Copy=null
trigger gg_trg_Tutorial=null
trigger gg_trg_Tut_ans_1=null
trigger gg_trg_Tut_ans_2=null
trigger gg_trg_Tut_ans_3=null
trigger gg_trg_Tut_ans_4=null
trigger gg_trg_Tut_ans_5=null
trigger gg_trg_Tut_ans_6=null
trigger gg_trg_Town_Arbalet=null
trigger gg_trg_Town_Sailor=null
trigger gg_trg_Town_Woman=null
trigger gg_trg_Town_Korsar=null
trigger gg_trg_Town_Woman_2=null
trigger gg_trg_Town_Arena_figther=null
trigger gg_trg_Town_News=null
trigger gg_trg_Town_BB=null
trigger gg_trg_Guard=null
trigger gg_trg_Quest_Guard_v1=null
trigger gg_trg_Quest_Guard_uncom=null
trigger gg_trg_Quest_Guard_bb=null
trigger gg_trg_Quest_Guard_about_city=null
trigger gg_trg_Quest_Guard_1_finish=null
trigger gg_trg_Quest_Guard_2_1=null
trigger gg_trg_Quest_Guard_3_finish=null
trigger gg_trg_Quest_Guard_4_finish=null
trigger gg_trg_Quest_Guard_4_integer=null
trigger gg_trg_Quest_Guard_5_finish=null
trigger gg_trg_Quest_Guard_5_integer=null
trigger gg_trg_Quest_Guard_2_finish=null
trigger gg_trg_Quest_Guard_2_fale=null
trigger gg_trg_Captain_Quest_1=null
trigger gg_trg_Captain_Q_in_progress=null
trigger gg_trg_Cap_Ask_1=null
trigger gg_trg_Cap_Ask_2=null
trigger gg_trg_Cap_Ask_3=null
trigger gg_trg_fight1=null
trigger gg_trg_fight2=null
trigger gg_trg_Untitled_Trigger_007=null
trigger gg_trg_B_gonzales_q_1=null
trigger gg_trg_Bandit_Vino=null
trigger gg_trg_G_1_Enrike=null
trigger gg_trg_G_1_Trader=null
trigger gg_trg_G_1_Trader_Ansver_1=null
trigger gg_trg_G_1_Trader_Ansver_1_1=null
trigger gg_trg_G_1_Trader_Ansver_1_2=null
trigger gg_trg_G_1_Trader_Ansver_1_3=null
trigger gg_trg_G_1_Trader_Ansver_1_3_1=null
trigger gg_trg_G_1_Trader_Ansver_2=null
trigger gg_trg_Untitled_Trigger_001=null
trigger gg_trg_B_enrike=null
trigger gg_trg_speak=null
trigger gg_trg_B_guard=null
trigger gg_trg_B_gonzales_begin=null
trigger gg_trg_B_gonzales_ansver_1_1=null
trigger gg_trg_B_gonzales_ansver_1_2=null
trigger gg_trg_B_gonzales_ansver_1_2_unready=null
trigger gg_trg_B_gonzales_ansver_1_3=null
trigger gg_trg_B_gonzales_ansver_1_4=null
trigger gg_trg_B_archer=null
trigger gg_trg_B_guard_ansver_1_1=null
trigger gg_trg_B_guard_ansver_1_2=null
trigger gg_trg_B_guard_ansver_1_3=null
trigger gg_trg_____________________________________007=null
trigger gg_trg_rats_drop=null
trigger gg_trg_player1start=null
trigger gg_trg_player2start=null
trigger gg_trg_player3start=null
trigger gg_trg_player4start=null
trigger gg_trg_player5start=null
trigger gg_trg_player6start=null
trigger gg_trg_player1end=null
trigger gg_trg_player2end=null
trigger gg_trg_player3end=null
trigger gg_trg_player4end=null
trigger gg_trg_player5end=null
trigger gg_trg_player6end=null
trigger gg_trg_player1=null
trigger gg_trg_player2=null
trigger gg_trg_player3=null
trigger gg_trg_player4=null
trigger gg_trg_player5=null
trigger gg_trg_player6=null
trigger gg_trg_____________________________________003=null
trigger gg_trg_pack1=null
trigger gg_trg_pack3=null
trigger gg_trg_pack2=null
trigger gg_trg_SCS=null
trigger gg_trg_camdebug=null
trigger gg_trg_Init=null
trigger gg_trg_____________________________________001_____________________u=null
trigger gg_trg_cam4=null
trigger gg_trg_cam5=null
trigger gg_trg_cam2=null
trigger gg_trg_cam3=null
trigger gg_trg_cam1=null
trigger gg_trg_DarkHealth=null
trigger gg_trg_Cunami=null
trigger gg_trg_Opletenie=null
trigger gg_trg_WaterKick=null
trigger gg_trg_Tornado=null
trigger gg_trg_Earthslam=null
trigger gg_trg_Earth_Shake=null
trigger gg_trg_DeathBall=null
trigger gg_trg_SunPower=null
trigger gg_trg_Moving_system=null
trigger gg_trg_lvl_Ini=null
trigger gg_trg_lvlup_p2=null
trigger gg_trg_lvlup_p3=null
trigger gg_trg_lvlup_p4=null
trigger gg_trg_lvlup_p5=null
trigger gg_trg_lvlup_p6=null
trigger gg_trg_dead_p2=null
trigger gg_trg_dead_p3=null
trigger gg_trg_dead_p4=null
trigger gg_trg_dead_p5=null
trigger gg_trg_dead_p6=null
trigger gg_trg_heal=null
trigger gg_trg_heal_p2=null
trigger gg_trg_heal_p3=null
trigger gg_trg_heal_p4=null
trigger gg_trg_heal_p5=null
trigger gg_trg_heal_p6=null
trigger gg_trg_buttons=null
trigger gg_trg_quests=null
trigger gg_trg_skelet_quest=null
trigger gg_trg_check=null
trigger gg_trg_defender=null
trigger gg_trg_zhertva=null
unit gg_unit_H00D_0036=null
unit gg_unit_H01F_0503=null
unit gg_unit_H00D_0035=null
unit gg_unit_H001_0022=null
unit gg_unit_H00A_0031=null
unit gg_unit_H002_0034=null
unit gg_unit_H00E_0026=null
unit gg_unit_H00E_0027=null
unit gg_unit_h00G_0043=null
unit gg_unit_H01F_0502=null
unit gg_unit_H01F_0501=null
unit gg_unit_H01D_0488=null
unit gg_unit_H004_0505=null
unit gg_unit_H004_0504=null
unit gg_unit_e000_0074=null
unit gg_unit_h00G_0064=null
unit gg_unit_h00G_0072=null
unit gg_unit_e000_0076=null
unit gg_unit_e000_0075=null
unit gg_unit_h00G_0073=null
unit gg_unit_e000_0077=null
unit gg_unit_e000_0078=null
unit gg_unit_h00G_0070=null
unit gg_unit_h00G_0071=null
unit gg_unit_hvlt_0253=null
unit gg_unit_H00T_0354=null
unit gg_unit_hfoo_0357=null
unit gg_unit_hfoo_0358=null
unit gg_unit_hfoo_0359=null
unit gg_unit_hfoo_0360=null
unit gg_unit_H00W_0361=null
unit gg_unit_H00W_0363=null
unit gg_unit_H004_0506=null
unit gg_unit_H011_0380=null
unit gg_unit_h012_0381=null
unit gg_unit_H013_0383=null
unit gg_unit_H00C_0385=null
unit gg_unit_H00E_0401=null
unit gg_unit_H00Z_0408=null
unit gg_unit_H015_0425=null
unit gg_unit_H00Y_0433=null
unit gg_unit_H00O_0444=null
unit gg_unit_H015_0437=null
unit gg_unit_H002_0438=null
unit gg_unit_H002_0440=null
unit gg_unit_H015_0435=null
unit gg_unit_H015_0445=null
unit gg_unit_H00Z_0446=null
unit gg_unit_H00B_0449=null
unit gg_unit_H01J_0104=null
unit gg_unit_H01J_0105=null
unit gg_unit_H01J_0106=null
destructable gg_dest_B00L_17507=null
trigger l__library_init
unit array s__SCS__Units
boolean array s__SCS__Up
boolean array s__SCS__Down
boolean array s__SCS__Left
boolean array s__SCS__Right
boolean array s__SCS__ApplyCam
boolean array s__SCS__ApplyControl
integer array s__SCS__Anims
boolean array s__SCS__Arround
boolean array s__SCS__FlagArround
boolean array s__SCS__ResetFlag
endglobals
function SCS__ConditionToMove takes unit u returns boolean
return(GetUnitState(u,UNIT_STATE_LIFE)>=0.45)and(GetUnitAbilityLevel(u,0x4253544E)==0)and(GetUnitAbilityLevel(u,0x42505345)==0)and(GetUnitAbilityLevel(u,0x4255736C)==0)and(GetUnitAbilityLevel(u,0x42557374)==0)and(GetUnitAbilityLevel(u,0x4255696D)==0)and(GetUnitAbilityLevel(u,0x42776561)==0)and(GetUnitAbilityLevel(u,0x42776562)==0)and(GetUnitAbilityLevel(u,0x426D6C74)==0)
endfunction
function SCS__UpUp_Func takes integer i returns nothing
set s__SCS__Up[i]=false
if GetUnitState(s__SCS__Units[i],UNIT_STATE_LIFE)>=0.45 then
call SetUnitTimeScale(s__SCS__Units[i],1)
call SetUnitAnimation(s__SCS__Units[i],"stand")
endif
if(s__SCS__Down[i])and(s__SCS__Arround[i])then
set s__SCS__FlagArround[i]=true
call SetUnitFacingTimed(s__SCS__Units[i],(GetUnitFacing(s__SCS__Units[i])+180),0.01)
endif
if s__SCS__ResetFlag[i]then
set s__SCS__ResetFlag[i]=false
if GetUnitState(s__SCS__Units[i],UNIT_STATE_LIFE)>=0.45 and s__SCS__ApplyControl[i]and s__SCS__Anims[i]!=-1 then
call SetUnitAnimationByIndex(s__SCS__Units[i],s__SCS__Anims[i])
endif
if(not s__SCS__Up[i])and(s__SCS__Arround[i])then
call SetUnitTimeScale(s__SCS__Units[i],GetUnitMoveSpeed(s__SCS__Units[i])/GetUnitDefaultMoveSpeed(s__SCS__Units[i]))
set s__SCS__FlagArround[i]=true
call SetUnitFacingTimed(s__SCS__Units[i],(GetUnitFacing(s__SCS__Units[i])+180),0)
else
call SetUnitTimeScale(s__SCS__Units[i],-GetUnitMoveSpeed(s__SCS__Units[i])/GetUnitDefaultMoveSpeed(s__SCS__Units[i]))
endif
endif
endfunction
function SCS__DownUp_Func takes integer i returns nothing
set s__SCS__Down[i]=false
if GetUnitState(s__SCS__Units[i],UNIT_STATE_LIFE)>=0.45 then
call SetUnitTimeScale(s__SCS__Units[i],1)
call SetUnitAnimation(s__SCS__Units[i],"stand")
endif
if s__SCS__FlagArround[i]then
set s__SCS__FlagArround[i]=false
call SetUnitFacingTimed(s__SCS__Units[i],(GetUnitFacing(s__SCS__Units[i])+180),0)
endif
if s__SCS__ResetFlag[i]then
set s__SCS__ResetFlag[i]=false
if GetUnitState(s__SCS__Units[i],UNIT_STATE_LIFE)>=0.45 and s__SCS__ApplyControl[i]then
if(s__SCS__Anims[i]!=-1)then
call SetUnitAnimationByIndex(s__SCS__Units[i],s__SCS__Anims[i])
endif
call SetUnitTimeScale(s__SCS__Units[i],GetUnitMoveSpeed(s__SCS__Units[i])/GetUnitDefaultMoveSpeed(s__SCS__Units[i]))
endif
endif
endfunction
function SCS__LeftUp_Func takes integer i returns nothing
set s__SCS__Left[i]=false
if(not s__SCS__Up[i])and(not s__SCS__Down[i])then
call IssueImmediateOrder(s__SCS__Units[i],"stop")
endif
endfunction
function SCS__RightUp_Func takes integer i returns nothing
set s__SCS__Right[i]=false
if(not s__SCS__Up[i])and(not s__SCS__Down[i])then
call IssueImmediateOrder(s__SCS__Units[i],"stop")
endif
endfunction
function SCS_Associate takes unit u,player p,integer a,boolean b returns nothing
if(s__SCS__Units[GetPlayerId(p)]!=null)then
call SetUnitTimeScale(s__SCS__Units[GetPlayerId(p)],1)
call SetUnitAnimation(s__SCS__Units[GetPlayerId(p)],"stand")
endif
set s__SCS__Units[GetPlayerId(p)]=u
set s__SCS__Anims[GetPlayerId(p)]=a
set s__SCS__Arround[GetPlayerId(p)]=b
set s__SCS__FlagArround[GetPlayerId(p)]=false
endfunction
function SCS_SetControl takes player p,boolean b returns nothing
local integer i=GetPlayerId(p)
set s__SCS__ApplyControl[i]=b
if not b then
call SCS__UpUp_Func(i)
call SCS__DownUp_Func(i)
call SCS__RightUp_Func(i)
call SCS__LeftUp_Func(i)
endif
endfunction
function SCS_SetCamera takes player p,boolean b returns nothing
set s__SCS__ApplyCam[GetPlayerId(p)]=b
if(GetLocalPlayer()==p)then
if not b then
call ResetToGameCamera(0)
call CameraSetSmoothingFactor(0)
else
call SetCameraTargetController(s__SCS__Units[GetPlayerId(p)],0,0,false)
call CameraSetSmoothingFactor(1)
endif
endif
endfunction
function SCS__UpUp_Actions takes nothing returns nothing
local integer i=GetPlayerId(GetTriggerPlayer())
call SCS__UpUp_Func(i)
endfunction
function SCS__UpDown_Actions takes nothing returns nothing
local integer i=GetPlayerId(GetTriggerPlayer())
set s__SCS__Up[i]=true
if GetUnitState(s__SCS__Units[i],UNIT_STATE_LIFE)>=0.45 and s__SCS__ApplyControl[i]then
if(s__SCS__Anims[i]!=-1)then
call SetUnitAnimationByIndex(s__SCS__Units[i],s__SCS__Anims[i])
endif
call SetUnitTimeScale(s__SCS__Units[i],GetUnitMoveSpeed(s__SCS__Units[i])/GetUnitDefaultMoveSpeed(s__SCS__Units[i]))
endif
endfunction
function SCS__DownUp_Actions takes nothing returns nothing
local integer i=GetPlayerId(GetTriggerPlayer())
call SCS__DownUp_Func(i)
endfunction
function SCS__DownDown_Actions takes nothing returns nothing
local integer i=GetPlayerId(GetTriggerPlayer())
set s__SCS__Down[i]=true
if GetUnitState(s__SCS__Units[i],UNIT_STATE_LIFE)>=0.45 and s__SCS__ApplyControl[i]and s__SCS__Anims[i]!=-1 then
call SetUnitAnimationByIndex(s__SCS__Units[i],s__SCS__Anims[i])
endif
if(not s__SCS__Up[i])and(s__SCS__Arround[i])then
call SetUnitTimeScale(s__SCS__Units[i],GetUnitMoveSpeed(s__SCS__Units[i])/GetUnitDefaultMoveSpeed(s__SCS__Units[i]))
set s__SCS__FlagArround[i]=true
call SetUnitFacingTimed(s__SCS__Units[i],(GetUnitFacing(s__SCS__Units[i])+180),0)
else
call SetUnitTimeScale(s__SCS__Units[i],-GetUnitMoveSpeed(s__SCS__Units[i])/GetUnitDefaultMoveSpeed(s__SCS__Units[i]))
endif
endfunction
function SCS__RightUp_Actions takes nothing returns nothing
local integer i=GetPlayerId(GetTriggerPlayer())
call SCS__RightUp_Func(i)
endfunction
function SCS__RightDown_Actions takes nothing returns nothing
local integer i=GetPlayerId(GetTriggerPlayer())
set s__SCS__Right[i]=true
endfunction
function SCS__LeftUp_Actions takes nothing returns nothing
local integer i=GetPlayerId(GetTriggerPlayer())
call SCS__LeftUp_Func(i)
endfunction
function SCS__LeftDown_Actions takes nothing returns nothing
local integer i=GetPlayerId(GetTriggerPlayer())
set s__SCS__Left[i]=true
endfunction
function SCS__Move_Actions takes nothing returns nothing
local real X
local real Y
local real Xh
local real Yh
local boolean bx
local boolean by
local real Angle
local integer i=0
local integer iflag=0
local boolean bflag=false
loop
exitwhen i>=COUNT_OF_PLAYERS
if(s__SCS__Units[i]!=null)and(s__SCS__ApplyControl[i])then
if s__SCS__Up[i]and(not s__SCS__Down[i])and SCS__ConditionToMove(s__SCS__Units[i])then
set bflag=true
set iflag=1
elseif(not s__SCS__Up[i])and s__SCS__Down[i]and SCS__ConditionToMove(s__SCS__Units[i])then
set bflag=true
if(s__SCS__FlagArround[i])then
set iflag=1
else
set iflag=-1
endif
else
set bflag=false
endif
if bflag then
set Angle=GetUnitFacing(s__SCS__Units[i])
set X=GetUnitX(s__SCS__Units[i])+iflag*(GetUnitMoveSpeed(s__SCS__Units[i])/100)*Cos(Angle*bj_DEGTORAD)
set Y=GetUnitY(s__SCS__Units[i])+iflag*(GetUnitMoveSpeed(s__SCS__Units[i])/100)*Sin(Angle*bj_DEGTORAD)
set Xh=GetUnitX(s__SCS__Units[i])
set Yh=GetUnitY(s__SCS__Units[i])
call SetUnitPosition(s__SCS__Units[i],X,Y)
call ClearTextMessages()
if(RAbsBJ(GetUnitX(s__SCS__Units[i])-X)>0.5)or(RAbsBJ(GetUnitY(s__SCS__Units[i])-Y)>0.5)then
call SetUnitPosition(s__SCS__Units[i],X,Yh)
set bx=RAbsBJ(GetUnitX(s__SCS__Units[i])-X)<=0.5
call SetUnitPosition(s__SCS__Units[i],Xh,Y)
set by=RAbsBJ(GetUnitY(s__SCS__Units[i])-Y)<=0.5
if bx then
call SetUnitPosition(s__SCS__Units[i],X,Yh)
elseif by then
call SetUnitPosition(s__SCS__Units[i],Xh,Y)
else
call SetUnitPosition(s__SCS__Units[i],Xh,Yh)
endif
endif
endif
if s__SCS__Right[i]and(not s__SCS__Left[i])and SCS__ConditionToMove(s__SCS__Units[i])then
set bflag=true
set iflag=1
elseif(not s__SCS__Right[i])and s__SCS__Left[i]and SCS__ConditionToMove(s__SCS__Units[i])then
set bflag=true
set iflag=-1
else
set bflag=false
endif
if bflag then
if s__SCS__Down[i]then
call SetUnitFacingTimed(s__SCS__Units[i],(GetUnitFacing(s__SCS__Units[i])+iflag*INVERSE*(8.00)),0.01)
else
call SetUnitFacingTimed(s__SCS__Units[i],(GetUnitFacing(s__SCS__Units[i])-iflag*(8.00)),0.01)
endif
endif
endif
set i=i+1
endloop
endfunction
function SCS__Animation_Actions takes nothing returns nothing
local integer i=0
loop
exitwhen i>=COUNT_OF_PLAYERS
if s__SCS__Up[i]and s__SCS__Down[i]and not s__SCS__ResetFlag[i]then
set s__SCS__ResetFlag[i]=true
call SetUnitAnimation(s__SCS__Units[i],"stand")
endif
if not s__SCS__ResetFlag[i]then
if(s__SCS__Up[i]or s__SCS__Down[i])and SCS__ConditionToMove(s__SCS__Units[i])and s__SCS__Anims[i]!=-1 then
call SetUnitAnimationByIndex(s__SCS__Units[i],s__SCS__Anims[i])
endif
endif
set i=i+1
endloop
endfunction
function SCS__Camera_Actions takes nothing returns nothing
local integer i=0
local real Z1
local real Z2
local real Angle1
local real Angle2
loop
exitwhen i>=COUNT_OF_PLAYERS
if(s__SCS__Units[i]!=null)and(s__SCS__ApplyCam[i])then
call MoveLocation(SCS__l,GetUnitX(s__SCS__Units[i]),GetUnitY(s__SCS__Units[i]))
set Z1=GetLocationZ(SCS__l)
call MoveLocation(SCS__l,GetUnitX(s__SCS__Units[i])-SCS_angle*Cos(GetUnitFacing(s__SCS__Units[i])*bj_DEGTORAD),GetUnitY(s__SCS__Units[i])-SCS_angle*Sin(GetUnitFacing(s__SCS__Units[i])*bj_DEGTORAD))
set Z2=GetLocationZ(SCS__l)
if(Z1+100>=Z2)then
set SCS__offset=GetCameraField(CAMERA_FIELD_ZOFFSET)+GetUnitFlyHeight(s__SCS__Units[i])+240+Z1-GetCameraEyePositionZ()
set Angle1=-10
else
set SCS__offset=R2I(GetCameraField(CAMERA_FIELD_ZOFFSET))+240+GetUnitFlyHeight(s__SCS__Units[i])+Z2-R2I(GetCameraEyePositionZ())
set Angle1=-65
endif
set Angle2=GetUnitFacing(s__SCS__Units[i])
if(s__SCS__Down[i])and(not s__SCS__Up[i])and(s__SCS__Arround[i])then
set Angle2=Angle2+180
endif
if(GetLocalPlayer()==Player(i))then
call SetCameraField(CAMERA_FIELD_ZOFFSET,SCS__offset,0.25)
call SetCameraField(CAMERA_FIELD_TARGET_DISTANCE,SCS_distance,0.25)
call SetCameraField(CAMERA_FIELD_ANGLE_OF_ATTACK,Angle1,0.25)
call SetCameraField(CAMERA_FIELD_FIELD_OF_VIEW,150,0.1)
call SetCameraField(CAMERA_FIELD_FARZ,bj_CAMERA_DEFAULT_FARZ,0.25)
call SetCameraField(CAMERA_FIELD_ROTATION,Angle2,0.25)
endif
endif
set i=i+1
endloop
endfunction
function SCS__init takes nothing returns nothing
local integer Count=0
local trigger UpDown=CreateTrigger()
local trigger UpUp=CreateTrigger()
local trigger DownDown=CreateTrigger()
local trigger DownUp=CreateTrigger()
local trigger RightDown=CreateTrigger()
local trigger RightUp=CreateTrigger()
local trigger LeftDown=CreateTrigger()
local trigger LeftUp=CreateTrigger()
set SCS__l=Location(0,0)
loop
exitwhen Count>=COUNT_OF_PLAYERS
call TriggerRegisterPlayerEvent(UpDown,Player(Count),EVENT_PLAYER_ARROW_UP_DOWN)
call TriggerRegisterPlayerEvent(UpUp,Player(Count),EVENT_PLAYER_ARROW_UP_UP)
call TriggerRegisterPlayerEvent(DownDown,Player(Count),EVENT_PLAYER_ARROW_DOWN_DOWN)
call TriggerRegisterPlayerEvent(DownUp,Player(Count),EVENT_PLAYER_ARROW_DOWN_UP)
call TriggerRegisterPlayerEvent(LeftDown,Player(Count),EVENT_PLAYER_ARROW_LEFT_DOWN)
call TriggerRegisterPlayerEvent(LeftUp,Player(Count),EVENT_PLAYER_ARROW_LEFT_UP)
call TriggerRegisterPlayerEvent(RightDown,Player(Count),EVENT_PLAYER_ARROW_RIGHT_DOWN)
call TriggerRegisterPlayerEvent(RightUp,Player(Count),EVENT_PLAYER_ARROW_RIGHT_UP)
set Count=Count+1
endloop
call TriggerAddAction(UpDown,function SCS__UpDown_Actions)
call TriggerAddAction(UpUp,function SCS__UpUp_Actions)
call TriggerAddAction(DownDown,function SCS__DownDown_Actions)
call TriggerAddAction(DownUp,function SCS__DownUp_Actions)
call TriggerAddAction(RightDown,function SCS__RightDown_Actions)
call TriggerAddAction(RightUp,function SCS__RightUp_Actions)
call TriggerAddAction(LeftDown,function SCS__LeftDown_Actions)
call TriggerAddAction(LeftUp,function SCS__LeftUp_Actions)
call TimerStart(CreateTimer(),0.01,true,function SCS__Move_Actions)
call TimerStart(CreateTimer(),0.2,true,function SCS__Animation_Actions)
call TimerStart(CreateTimer(),0.01,true,function SCS__Camera_Actions)
endfunction
function InitGlobals takes nothing returns nothing
local integer i=0
set udg_i=0
set udg_player1stats=0
set udg_player3stats=0
set udg_player2stats=0
set udg_player6stats=0
set udg_player5stats=0
set udg_player4stats=0
set udg_B_guard=CreateForce()
set udg_Animals=CreateGroup()
set udg_Bandit_Guard_1=DialogCreate()
set udg_B_gonzales_1_p=CreateForce()
set udg_Bandit_Gonsales_1=DialogCreate()
set udg_B_trader_1_p=CreateForce()
set udg_Bandit_Trader=DialogCreate()
set udg_Bandit_Trader_2=DialogCreate()
set udg_B_enrike_p=CreateForce()
set udg_P1_pet_exp=0
set udg_P2_pet_exp=0
set udg_P3_pet_exp=0
set udg_P4_pet_exp=0
set udg_P5_pet_exp=0
set udg_P6_pet_exp=0
set udg_Tutorial=DialogCreate()
set udg_Guard_Captain=DialogCreate()
set udg_Guard=DialogCreate()
set udg_Exp_hero=0
set udg_R_Guard=0
set udg_R_Bandit=0
set udg_R_Rainger=0
set udg_R_Necroman=0
set udg_R_Shaman=0
set udg_R_Monk=0
set udg_Quest_G_Bandits=CreateGroup()
set udg_Quest_Banda=0
set udg_G_quest_dino=10
set udg_G_quest_pig=5
set udg_Town_speak=DialogCreate()
set udg_Level_of_mob=0
set udg_Naparnik_Ilven=DialogCreate()
set udg_Naparnik_Orc=DialogCreate()
set udg_number=0
set i=0
loop
exitwhen(i>1)
set udg_RunOrNO[i]=false
set i=i+1
endloop
set i=0
loop
exitwhen(i>1)
set udg_MoveFacing[i]=0
set i=i+1
endloop
set i=0
loop
exitwhen(i>1)
set udg_MovedAvtoFacing[i]=false
set i=i+1
endloop
set i=0
loop
exitwhen(i>1)
set udg_MovedDeath[i]=false
set i=i+1
endloop
set i=0
loop
exitwhen(i>1)
set udg_MovedIsSnorads[i]=false
set i=i+1
endloop
set i=0
loop
exitwhen(i>1)
set udg_MovedDamage[i]=0
set i=i+1
endloop
set i=0
loop
exitwhen(i>1)
set udg_MovedRang[i]=0
set i=i+1
endloop
set i=0
loop
exitwhen(i>1)
set udg_realMove[i]=0
set i=i+1
endloop
set i=0
loop
exitwhen(i>1)
set udg_realStop[i]=0
set i=i+1
endloop
set udg_biginInteger=0
set udg_Picked_Units_Groop=CreateGroup()
set i=0
loop
exitwhen(i>1)
set udg_MoveOforON[i]=false
set i=i+1
endloop
set i=0
loop
exitwhen(i>1)
set udg_Int[i]=0
set i=i+1
endloop
set i=0
loop
exitwhen(i>1)
set udg_TmInt[i]=0
set i=i+1
endloop
set i=0
loop
exitwhen(i>1)
set udg_Group[i]=CreateGroup()
set i=i+1
endloop
set udg_window=DialogCreate()
set udg_count=0
endfunction
function InitSounds takes nothing returns nothing
set gg_snd_222="war3mapImported\\222.mp3"
set gg_snd_city="war3mapImported\\city.mp3"
set gg_snd_city01=CreateSound("war3mapImported\\city.mp3",false,false,false,10,10,"")
call SetSoundDuration(gg_snd_city01,20101)
call SetSoundChannel(gg_snd_city01,0)
call SetSoundVolume(gg_snd_city01,127)
call SetSoundPitch(gg_snd_city01,1.0)
set gg_snd_chikens=CreateSound("war3mapImported\\chikens.mp3",false,false,false,10,10,"")
call SetSoundDuration(gg_snd_chikens,7196)
call SetSoundChannel(gg_snd_chikens,0)
call SetSoundVolume(gg_snd_chikens,127)
call SetSoundPitch(gg_snd_chikens,1.0)
set gg_snd_sewers=CreateSound("war3mapImported\\sewers.wav",false,false,false,10,10,"")
call SetSoundDuration(gg_snd_sewers,9874)
call SetSoundChannel(gg_snd_sewers,0)
call SetSoundVolume(gg_snd_sewers,127)
call SetSoundPitch(gg_snd_sewers,1.0)
set gg_snd_tutor1=CreateSound("war3mapImported\\tutor1.wav",false,false,false,10,10,"")
call SetSoundDuration(gg_snd_tutor1,3135)
call SetSoundChannel(gg_snd_tutor1,0)
call SetSoundVolume(gg_snd_tutor1,127)
call SetSoundPitch(gg_snd_tutor1,1.0)
set gg_snd_tutor2=CreateSound("war3mapImported\\tutor2.wav",false,false,false,10,10,"")
call SetSoundDuration(gg_snd_tutor2,10971)
call SetSoundChannel(gg_snd_tutor2,0)
call SetSoundVolume(gg_snd_tutor2,127)
call SetSoundPitch(gg_snd_tutor2,1.0)
set gg_snd_tutor3=CreateSound("war3mapImported\\tutor3.wav",false,false,false,10,10,"")
call SetSoundDuration(gg_snd_tutor3,11146)
call SetSoundChannel(gg_snd_tutor3,0)
call SetSoundVolume(gg_snd_tutor3,127)
call SetSoundPitch(gg_snd_tutor3,1.0)
set gg_snd_tutor4=CreateSound("war3mapImported\\tutor4.wav",false,false,false,10,10,"")
call SetSoundDuration(gg_snd_tutor4,8429)
call SetSoundChannel(gg_snd_tutor4,0)
call SetSoundVolume(gg_snd_tutor4,127)
call SetSoundPitch(gg_snd_tutor4,1.0)
set gg_snd_tutor5=CreateSound("war3mapImported\\tutor5.wav",false,false,false,10,10,"")
call SetSoundDuration(gg_snd_tutor5,7941)
call SetSoundChannel(gg_snd_tutor5,0)
call SetSoundVolume(gg_snd_tutor5,127)
call SetSoundPitch(gg_snd_tutor5,1.0)
set gg_snd_tutor6=CreateSound("war3mapImported\\tutor6.wav",false,false,false,10,10,"")
call SetSoundDuration(gg_snd_tutor6,8499)
call SetSoundChannel(gg_snd_tutor6,0)
call SetSoundVolume(gg_snd_tutor6,127)
call SetSoundPitch(gg_snd_tutor6,1.0)
set gg_snd_tutor7=CreateSound("war3mapImported\\tutor7.wav",false,false,false,10,10,"")
call SetSoundDuration(gg_snd_tutor7,7767)
call SetSoundChannel(gg_snd_tutor7,0)
call SetSoundVolume(gg_snd_tutor7,127)
call SetSoundPitch(gg_snd_tutor7,1.0)
set gg_snd_tutor8=CreateSound("war3mapImported\\tutor8.wav",false,false,false,10,10,"")
call SetSoundDuration(gg_snd_tutor8,8638)
call SetSoundChannel(gg_snd_tutor8,0)
call SetSoundVolume(gg_snd_tutor8,127)
call SetSoundPitch(gg_snd_tutor8,1.0)
set gg_snd_tutor9=CreateSound("war3mapImported\\tutor9.wav",false,false,false,10,10,"")
call SetSoundDuration(gg_snd_tutor9,2612)
call SetSoundChannel(gg_snd_tutor9,0)
call SetSoundVolume(gg_snd_tutor9,127)
call SetSoundPitch(gg_snd_tutor9,1.0)
set gg_snd_Ilven___Hello=CreateSound("war3mapImported\\Ilven - Hello.wav",false,false,false,10,10,"")
call SetSoundChannel(gg_snd_Ilven___Hello,0)
call SetSoundVolume(gg_snd_Ilven___Hello,127)
call SetSoundPitch(gg_snd_Ilven___Hello,1.0)
set gg_snd_Ilven___Yes=CreateSound("war3mapImported\\Ilven - Yes.wav",false,false,false,10,10,"")
call SetSoundChannel(gg_snd_Ilven___Yes,0)
call SetSoundVolume(gg_snd_Ilven___Yes,127)
call SetSoundPitch(gg_snd_Ilven___Yes,1.0)
endfunction
function CreateAllDestructables takes nothing returns nothing
local destructable d
local trigger t
local real life
set gg_dest_B00L_17507=CreateDestructableZ(0x4230304C,13952.0,-31040.0,59.9,89.540,2.000,0)
endfunction
function CreateAllItems takes nothing returns nothing
local integer itemID
call CreateItem(0x49303030,6783.4,-18131.3)
call CreateItem(0x49303043,18440.4,-29775.9)
call CreateItem(0x4930304A,8783.7,-30374.9)
call CreateItem(0x4930304A,8752.0,-30349.8)
call CreateItem(0x4930304A,3450.5,-17803.5)
call CreateItem(0x4930304A,4530.7,-17241.3)
call CreateItem(0x4930304A,4529.0,-17207.8)
call CreateItem(0x4930304A,5576.4,-17297.4)
call CreateItem(0x4930304A,7151.9,-20008.1)
call CreateItem(0x4930304A,7107.2,-20001.7)
call CreateItem(0x4930304A,6873.8,-20481.6)
call CreateItem(0x4930304A,6856.6,-19773.8)
call CreateItem(0x4930304A,6429.2,-19555.9)
call CreateItem(0x4930304A,6133.7,-20144.1)
call CreateItem(0x4930304A,6720.5,-20312.9)
call CreateItem(0x4930304A,7090.2,-20735.5)
call CreateItem(0x4930304A,7689.2,-21056.7)
call CreateItem(0x4930304A,7654.0,-21048.4)
call CreateItem(0x4930304A,7653.1,-21081.4)
call CreateItem(0x4930304A,8970.0,-22358.9)
call CreateItem(0x4930304A,8929.3,-22343.2)
call CreateItem(0x4930304A,8272.0,-22412.6)
call CreateItem(0x4930304A,9603.3,-23751.0)
call CreateItem(0x4930304A,9596.9,-23797.4)
call CreateItem(0x4930304A,9646.9,-23738.9)
call CreateItem(0x4930304A,7219.2,-27703.0)
call CreateItem(0x4930304A,7116.2,-27936.9)
call CreateItem(0x4930304A,6761.4,-27489.4)
call CreateItem(0x4930304A,6560.3,-27741.2)
call CreateItem(0x4930304A,6601.3,-27667.0)
call CreateItem(0x4930304A,6563.5,-27667.2)
call CreateItem(0x4930304A,7587.6,-27636.9)
call CreateItem(0x4930304A,7564.3,-27701.2)
call CreateItem(0x4930304A,7536.3,-27644.1)
call CreateItem(0x4930304A,7285.8,-28032.6)
call CreateItem(0x4930304A,7198.8,-28061.1)
call CreateItem(0x4930304A,7237.1,-28049.3)
call CreateItem(0x4930304A,7029.8,-28494.0)
call CreateItem(0x4930304A,7005.2,-28580.7)
call CreateItem(0x4930304A,6974.8,-28621.9)
call CreateItem(0x4930304A,6845.1,-28549.8)
call CreateItem(0x4930304A,6755.8,-29287.9)
call CreateItem(0x4930304A,6788.1,-29131.4)
call CreateItem(0x4930304A,6836.0,-29061.9)
call CreateItem(0x4930304A,6853.1,-29099.3)
call CreateItem(0x4930304A,6835.6,-29527.1)
call CreateItem(0x4930304A,6791.3,-29594.7)
call CreateItem(0x4930304A,6765.0,-29638.2)
call CreateItem(0x4930304A,6809.0,-30089.3)
call CreateItem(0x4930304A,7227.4,-30173.8)
call CreateItem(0x4930304A,7228.9,-30211.0)
call CreateItem(0x4930304A,7761.0,-30187.8)
call CreateItem(0x4930304A,7797.9,-30186.6)
call CreateItem(0x4930304A,7841.9,-30154.4)
call CreateItem(0x4930304A,9124.3,-29749.1)
call CreateItem(0x4930304A,9086.1,-29711.1)
call CreateItem(0x4930304A,9092.0,-29670.4)
call CreateItem(0x4930304A,9050.2,-29709.0)
call CreateItem(0x4930304A,9070.4,-29746.3)
call CreateItem(0x4930304A,9145.3,-30065.8)
call CreateItem(0x4930304A,9099.9,-30035.5)
call CreateItem(0x4930304A,9091.6,-29992.8)
call CreateItem(0x4930304E,2621.5,-17332.1)
call CreateItem(0x4930304F,5001.6,-18234.9)
call CreateItem(0x49303050,3817.8,-15078.4)
call CreateItem(0x49303051,14234.2,-10975.5)
call CreateItem(0x49303051,14089.9,-10810.0)
call CreateItem(0x49303051,12921.5,-13482.9)
call CreateItem(0x49303051,12196.8,-14751.3)
call CreateItem(0x49303051,11816.1,-15552.8)
call CreateItem(0x49303051,10810.6,-15983.9)
call CreateItem(0x49303051,10211.3,-16674.9)
call CreateItem(0x49303051,15823.5,-13863.0)
call CreateItem(0x49303051,8534.9,-18485.5)
call CreateItem(0x49303051,9502.3,-19255.4)
call CreateItem(0x49303051,11203.3,-19026.0)
call CreateItem(0x49303051,13463.0,-18921.1)
call CreateItem(0x49303051,14353.0,-20004.1)
call CreateItem(0x49303051,11151.0,-20368.6)
call CreateItem(0x49303051,7853.4,-21263.4)
call CreateItem(0x49303051,6665.5,-20884.4)
call CreateItem(0x49303051,7284.7,-18978.0)
call CreateItem(0x49303051,8903.8,-16516.5)
call CreateItem(0x49303051,7925.9,-18919.7)
call CreateItem(0x49303052,18517.6,-29768.1)
call CreateItem(0x49303053,13511.9,-28375.0)
call CreateItem(0x49303059,3734.8,-15108.2)
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,0x65303030,3456.0,-12864.0,270.000)
set gg_unit_h00G_0043=CreateUnit(p,0x68303047,21952.0,-32192.0,270.000)
set u=CreateUnit(p,0x68303148,-2112.0,-20736.0,270.000)
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 u=CreateUnit(p,0x4870616C,-7224.3,-14682.5,265.920)
call SetHeroLevel(u,50,false)
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_h00G_0064=CreateUnit(p,0x68303047,21824.0,-32192.0,270.000)
set gg_unit_e000_0074=CreateUnit(p,0x65303030,3584.0,-12864.0,270.000)
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_h00G_0070=CreateUnit(p,0x68303047,21696.0,-32192.0,270.000)
set gg_unit_e000_0075=CreateUnit(p,0x65303030,3712.0,-12864.0,270.000)
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_h00G_0071=CreateUnit(p,0x68303047,21568.0,-32192.0,270.000)
set gg_unit_e000_0076=CreateUnit(p,0x65303030,3840.0,-12864.0,270.000)
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_h00G_0072=CreateUnit(p,0x68303047,21440.0,-32192.0,270.000)
set gg_unit_e000_0077=CreateUnit(p,0x65303030,3968.0,-12864.0,270.000)
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_h00G_0073=CreateUnit(p,0x68303047,21312.0,-32192.0,270.000)
set gg_unit_e000_0078=CreateUnit(p,0x65303030,4096.0,-12864.0,270.000)
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 u=CreateUnit(p,0x48303037,7229.2,-18315.3,201.380)
call SetHeroLevel(u,50,false)
call SetUnitState(u,UNIT_STATE_MANA,0)
call SelectHeroSkill(u,0x41486862)
call SelectHeroSkill(u,0x41486862)
call SelectHeroSkill(u,0x41486862)
call SelectHeroSkill(u,0x41486473)
call SelectHeroSkill(u,0x41486473)
call SelectHeroSkill(u,0x41486473)
call SelectHeroSkill(u,0x41486164)
call SelectHeroSkill(u,0x41486164)
call SelectHeroSkill(u,0x41486164)
call SelectHeroSkill(u,0x41487265)
set u=CreateUnit(p,0x48303046,3838.4,-18264.6,181.350)
set u=CreateUnit(p,0x48303046,4603.8,-17894.0,88.400)
set u=CreateUnit(p,0x48303046,6979.1,-17439.7,166.898)
call SetHeroLevel(u,23,false)
call SetUnitState(u,UNIT_STATE_MANA,0)
set u=CreateUnit(p,0x48303046,6823.1,-18347.4,121.545)
call SetHeroLevel(u,12,false)
call SetUnitState(u,UNIT_STATE_MANA,0)
set u=CreateUnit(p,0x4830304C,7247.2,-18425.9,203.370)
call SetHeroLevel(u,42,false)
call SetUnitState(u,UNIT_STATE_MANA,0)
set u=CreateUnit(p,0x6E6F7733,7303.8,-18094.4,229.234)
set u=CreateUnit(p,0x48303135,5493.3,-19028.3,54.180)
set u=CreateUnit(p,0x48303135,7187.1,-17676.5,173.468)
set u=CreateUnit(p,0x48303135,7227.5,-17243.5,184.331)
set u=CreateUnit(p,0x48303046,6040.3,-17846.9,214.381)
set u=CreateUnit(p,0x48303137,7596.4,-16162.0,178.752)
set u=CreateUnit(p,0x6E776C64,7584.1,-16273.6,168.830)
set gg_unit_H015_0425=CreateUnit(p,0x48303135,4890.3,-15622.9,168.816)
set gg_unit_H015_0435=CreateUnit(p,0x48303135,5051.6,-17440.1,22.039)
call SetUnitState(gg_unit_H015_0435,UNIT_STATE_MANA,0)
set gg_unit_H015_0445=CreateUnit(p,0x48303135,4019.9,-17006.4,316.339)
call SetUnitState(gg_unit_H015_0445,UNIT_STATE_MANA,0)
set u=CreateUnit(p,0x48303046,2880.5,-16984.2,15.430)
call SetHeroLevel(u,21,false)
set u=CreateUnit(p,0x48303046,2839.4,-16498.5,344.570)
call SetHeroLevel(u,12,false)
set u=CreateUnit(p,0x48303135,3815.8,-17151.4,175.630)
set u=CreateUnit(p,0x48303135,2872.2,-16779.7,352.190)
call SetHeroLevel(u,21,false)
endfunction
function CreateUnitsForPlayer7 takes nothing returns nothing
local player p=Player(7)
local unit u
local integer unitID
local trigger t
local real life
set u=CreateUnit(p,0x4830304F,3053.4,-14913.3,263.364)
set u=CreateUnit(p,0x4830304F,5373.6,-14868.6,168.855)
set gg_unit_H00O_0444=CreateUnit(p,0x4830304F,4941.5,-15334.0,345.130)
call SetHeroLevel(gg_unit_H00O_0444,12,false)
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_h012_0381=CreateUnit(p,0x68303132,14016.0,-29760.0,270.000)
set u=CreateUnit(p,0x68303132,13888.0,-29760.0,270.000)
endfunction
function CreateUnitsForPlayer8 takes nothing returns nothing
local player p=Player(8)
local unit u
local integer unitID
local trigger t
local real life
set u=CreateUnit(p,0x48303054,13948.2,-30537.7,91.760)
call SetHeroLevel(u,27,false)
set u=CreateUnit(p,0x48303054,14174.6,-30533.6,92.710)
call SetHeroLevel(u,21,false)
set u=CreateUnit(p,0x48303054,12227.5,-30707.0,117.540)
call SetHeroLevel(u,3,false)
set u=CreateUnit(p,0x48303054,12684.8,-29722.2,304.774)
call SetHeroLevel(u,9,false)
set u=CreateUnit(p,0x48303054,13627.1,-30704.8,156.930)
call SetHeroLevel(u,35,false)
set gg_unit_H00T_0354=CreateUnit(p,0x48303054,13210.9,-29268.2,89.660)
call SetHeroLevel(gg_unit_H00T_0354,12,false)
call UnitAddItemToSlotById(gg_unit_H00T_0354,0x49303043,0)
set gg_unit_H00W_0361=CreateUnit(p,0x48303057,13315.4,-29364.9,84.952)
set u=CreateUnit(p,0x48303057,13112.1,-29353.9,82.864)
set gg_unit_H00W_0363=CreateUnit(p,0x48303057,14007.3,-30143.9,114.800)
set u=CreateUnit(p,0x48303057,12697.1,-31100.4,261.780)
set gg_unit_H011_0380=CreateUnit(p,0x48303131,14699.8,-31620.4,94.360)
call SetHeroLevel(gg_unit_H011_0380,50,false)
set u=CreateUnit(p,0x48303054,14815.7,-31669.8,86.201)
set u=CreateUnit(p,0x48303054,15089.7,-31387.9,171.538)
set u=CreateUnit(p,0x48303136,14582.8,-31639.8,112.970)
call SetHeroLevel(u,50,false)
set u=CreateUnit(p,0x48303054,13127.1,-31052.2,358.495)
set u=CreateUnit(p,0x48303054,11770.6,-30348.0,142.717)
endfunction
function CreateUnitsForPlayer9 takes nothing returns nothing
local player p=Player(9)
local unit u
local integer unitID
local trigger t
local real life
set u=CreateUnit(p,0x4830314B,-8344.6,-9801.3,93.670)
call SetHeroLevel(u,21,false)
set life=GetUnitState(u,UNIT_STATE_LIFE)
call SetUnitState(u,UNIT_STATE_LIFE,0.01*life)
set u=CreateUnit(p,0x4830314B,-8847.7,-9829.2,43.530)
call SetHeroLevel(u,21,false)
set life=GetUnitState(u,UNIT_STATE_LIFE)
call SetUnitState(u,UNIT_STATE_LIFE,0.01*life)
set u=CreateUnit(p,0x4830314B,-8661.5,-8924.9,30.850)
call SetHeroLevel(u,21,false)
set life=GetUnitState(u,UNIT_STATE_LIFE)
call SetUnitState(u,UNIT_STATE_LIFE,0.01*life)
set u=CreateUnit(p,0x4830314B,-8094.7,-8917.8,24.070)
call SetHeroLevel(u,21,false)
set life=GetUnitState(u,UNIT_STATE_LIFE)
call SetUnitState(u,UNIT_STATE_LIFE,0.01*life)
set u=CreateUnit(p,0x4830314B,-8706.8,-10753.7,320.206)
call SetHeroLevel(u,21,false)
set u=CreateUnit(p,0x4830314D,14954.9,-7080.1,88.278)
set u=CreateUnit(p,0x4830304E,2670.4,-13053.3,23.420)
set u=CreateUnit(p,0x4830304E,5795.1,-15455.2,267.340)
set u=CreateUnit(p,0x4830314D,15362.2,-7070.0,92.243)
set u=CreateUnit(p,0x4830314D,15337.4,-11964.8,22.292)
set u=CreateUnit(p,0x4830314C,15162.1,-6992.7,89.970)
call SetHeroLevel(u,50,false)
call SetUnitState(u,UNIT_STATE_MANA,0)
call SelectHeroSkill(u,0x41486862)
call SelectHeroSkill(u,0x41486862)
call SelectHeroSkill(u,0x41486862)
call SelectHeroSkill(u,0x41486473)
call SelectHeroSkill(u,0x41486473)
call SelectHeroSkill(u,0x41486473)
call SelectHeroSkill(u,0x41487265)
set u=CreateUnit(p,0x4830304E,14421.8,-7673.6,272.157)
call SetUnitState(u,UNIT_STATE_MANA,0)
set u=CreateUnit(p,0x4830314D,16378.7,-10964.0,261.591)
call SetUnitState(u,UNIT_STATE_MANA,0)
set u=CreateUnit(p,0x4830314D,14786.2,-11971.1,307.583)
set u=CreateUnit(p,0x4830314D,13679.3,-10545.9,357.418)
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_hvlt_0253=CreateUnit(p,0x68766C74,3520.0,-21248.0,270.000)
endfunction
function CreateUnitsForPlayer10 takes nothing returns nothing
local player p=Player(10)
local unit u
local integer unitID
local trigger t
local real life
set u=CreateUnit(p,0x48303030,3504.3,-20192.1,89.870)
call IssueImmediateOrder(u,"healon")
set u=CreateUnit(p,0x48303149,4145.9,-16400.5,4.890)
set u=CreateUnit(p,0x48303031,4680.9,-17418.1,273.640)
call SetHeroLevel(u,7,false)
call SetUnitState(u,UNIT_STATE_MANA,0)
set u=CreateUnit(p,0x48303034,2795.9,-13532.4,36.630)
call SetHeroLevel(u,31,false)
call SetUnitState(u,UNIT_STATE_MANA,0)
set u=CreateUnit(p,0x48303031,2820.5,-16627.6,342.373)
call SetHeroLevel(u,12,false)
set gg_unit_H001_0022=CreateUnit(p,0x48303031,3358.4,-18907.0,90.390)
call SetHeroLevel(gg_unit_H001_0022,31,false)
set u=CreateUnit(p,0x48303032,3930.5,-20023.6,174.234)
set u=CreateUnit(p,0x48303032,6455.5,-17271.3,255.857)
call SetHeroLevel(u,4,false)
set gg_unit_H00E_0026=CreateUnit(p,0x48303045,3943.4,-17570.5,324.841)
set gg_unit_H00E_0027=CreateUnit(p,0x48303045,5240.1,-21289.0,307.255)
set u=CreateUnit(p,0x48303039,4213.3,-16111.3,356.918)
call SetHeroLevel(u,48,false)
set u=CreateUnit(p,0x48303042,4414.1,-15268.5,353.920)
call SetHeroLevel(u,33,false)
call SelectHeroSkill(u,0x414E6373)
call SelectHeroSkill(u,0x414E6373)
call SelectHeroSkill(u,0x414E6373)
call SelectHeroSkill(u,0x41303035)
call SelectHeroSkill(u,0x41303035)
call SelectHeroSkill(u,0x41303035)
call SelectHeroSkill(u,0x41303035)
call SelectHeroSkill(u,0x41303035)
call SelectHeroSkill(u,0x41303035)
call SelectHeroSkill(u,0x41303035)
call SelectHeroSkill(u,0x41303035)
call SelectHeroSkill(u,0x41303035)
call SelectHeroSkill(u,0x41303035)
call IssueImmediateOrder(u,"")
set u=CreateUnit(p,0x48303043,4705.5,-20053.3,102.945)
call SetHeroLevel(u,32,false)
set gg_unit_H00D_0035=CreateUnit(p,0x48303044,3479.7,-16540.0,273.420)
call SetHeroLevel(gg_unit_H00D_0035,50,false)
call SelectHeroSkill(gg_unit_H00D_0035,0x4148627A)
call SelectHeroSkill(gg_unit_H00D_0035,0x4148627A)
call SelectHeroSkill(gg_unit_H00D_0035,0x4148627A)
call UnitAddItemToSlotById(gg_unit_H00D_0035,0x49303032,1)
set gg_unit_H00D_0036=CreateUnit(p,0x48303044,3446.3,-17278.7,101.530)
call SetHeroLevel(gg_unit_H00D_0036,35,false)
call SelectHeroSkill(gg_unit_H00D_0036,0x4148627A)
call SelectHeroSkill(gg_unit_H00D_0036,0x4148627A)
call SelectHeroSkill(gg_unit_H00D_0036,0x4148627A)
call UnitAddItemToSlotById(gg_unit_H00D_0036,0x49303032,1)
set u=CreateUnit(p,0x48303045,2868.8,-17079.9,20.750)
call SetHeroLevel(u,31,false)
set u=CreateUnit(p,0x48303045,4615.6,-19428.9,93.379)
set u=CreateUnit(p,0x48303045,3845.9,-20315.2,298.352)
call SetHeroLevel(u,41,false)
set u=CreateUnit(p,0x48303045,3368.5,-19180.0,270.419)
call SetHeroLevel(u,37,false)
set u=CreateUnit(p,0x4830305A,-318.6,-15047.1,85.403)
set u=CreateUnit(p,0x4830305A,-547.5,-15105.6,87.965)
set u=CreateUnit(p,0x4830305A,771.1,-15610.0,170.445)
set u=CreateUnit(p,0x48303044,4575.5,-19807.7,263.651)
set u=CreateUnit(p,0x4830304D,3269.6,-21324.5,270.132)
set u=CreateUnit(p,0x48303030,15100.0,-9922.6,267.639)
set u=CreateUnit(p,0x4830304E,13735.2,-11513.4,5.400)
set u=CreateUnit(p,0x4830304E,14882.1,-11605.4,309.062)
set u=CreateUnit(p,0x4830304F,-3713.0,-28275.5,44.070)
set u=CreateUnit(p,0x48303050,-5666.1,-30797.7,86.846)
call SetHeroLevel(u,30,false)
call SelectHeroSkill(u,0x41486862)
call SelectHeroSkill(u,0x41486862)
call SelectHeroSkill(u,0x41486862)
call SelectHeroSkill(u,0x41486473)
call SelectHeroSkill(u,0x41486473)
call SelectHeroSkill(u,0x41486473)
call SelectHeroSkill(u,0x41486164)
call SelectHeroSkill(u,0x41486164)
call SelectHeroSkill(u,0x41486164)
call SelectHeroSkill(u,0x41487265)
set u=CreateUnit(p,0x4830304F,-5548.8,-28320.0,87.834)
set u=CreateUnit(p,0x4830304F,-5817.0,-30703.0,24.357)
set u=CreateUnit(p,0x4830304F,-4929.1,-31106.2,116.472)
set u=CreateUnit(p,0x48303051,-4465.7,-31003.2,146.314)
call SetHeroLevel(u,50,false)
set u=CreateUnit(p,0x4830304F,-4709.0,-29745.1,103.933)
set u=CreateUnit(p,0x4830304F,-5236.5,-28932.4,267.817)
set u=CreateUnit(p,0x4830304F,-6331.2,-29156.5,323.151)
set u=CreateUnit(p,0x4830304F,-5762.5,-29664.9,32.681)
set u=CreateUnit(p,0x4830304E,12991.6,-11935.4,297.639)
set u=CreateUnit(p,0x4830304E,13448.4,-10577.6,261.330)
set u=CreateUnit(p,0x4830304E,13307.3,-9678.3,188.534)
set u=CreateUnit(p,0x4830304E,17135.9,-9830.0,268.708)
set u=CreateUnit(p,0x4830304E,3373.9,-19648.4,264.000)
call SetHeroLevel(u,12,false)
set u=CreateUnit(p,0x4830305A,3703.3,-21372.2,276.850)
set u=CreateUnit(p,0x48303055,16382.1,-23667.4,270.420)
set u=CreateUnit(p,0x48303058,15504.4,-11666.4,219.480)
set u=CreateUnit(p,0x4830305A,9060.2,-22883.4,299.700)
set u=CreateUnit(p,0x4830305A,15273.7,-13289.2,264.152)
set u=CreateUnit(p,0x4830305A,14921.1,-13286.4,273.971)
set u=CreateUnit(p,0x4830305A,15303.8,-10661.3,266.849)
set u=CreateUnit(p,0x48303059,16504.8,-23667.4,270.174)
set u=CreateUnit(p,0x48303059,16245.1,-23660.9,269.958)
set u=CreateUnit(p,0x48303059,17090.6,-24655.6,6.726)
set u=CreateUnit(p,0x48303059,17087.2,-24415.2,353.186)
set u=CreateUnit(p,0x48303059,16206.0,-24717.0,86.408)
set u=CreateUnit(p,0x68726468,-1414.9,-22087.7,326.860)
set gg_unit_H00C_0385=CreateUnit(p,0x48303043,21442.4,-31464.5,272.990)
call SetHeroLevel(gg_unit_H00C_0385,4,false)
set gg_unit_H00E_0401=CreateUnit(p,0x48303045,4499.0,-15842.4,302.680)
set u=CreateUnit(p,0x48303045,5253.3,-14549.4,263.070)
set u=CreateUnit(p,0x48303034,-5992.8,-29199.9,289.964)
set u=CreateUnit(p,0x4830305A,3454.8,-14967.3,101.155)
set u=CreateUnit(p,0x4830305A,5955.9,-17591.4,203.290)
set gg_unit_H00Z_0408=CreateUnit(p,0x4830305A,4743.2,-14643.9,211.471)
set u=CreateUnit(p,0x48303031,5374.3,-12976.2,246.900)
set u=CreateUnit(p,0x48303031,4489.3,-13311.1,137.940)
set u=CreateUnit(p,0x48303031,3149.9,-13014.3,214.180)
set u=CreateUnit(p,0x48303031,4181.3,-16579.6,203.760)
set u=CreateUnit(p,0x48303042,5260.2,-14996.1,141.066)
set u=CreateUnit(p,0x48303042,4976.2,-18003.4,89.924)
set u=CreateUnit(p,0x48303045,2407.9,-15172.9,92.167)
set u=CreateUnit(p,0x48303045,2788.2,-15151.2,99.461)
set u=CreateUnit(p,0x48303045,3053.9,-15148.4,89.168)
set u=CreateUnit(p,0x48303045,2978.2,-15530.8,304.671)
set u=CreateUnit(p,0x48303044,4522.7,-14762.1,192.066)
set u=CreateUnit(p,0x48303044,3707.2,-17817.8,64.865)
set u=CreateUnit(p,0x48303030,2482.5,-15503.6,79.170)
set u=CreateUnit(p,0x48303036,3967.8,-14812.1,158.845)
set u=CreateUnit(p,0x4830304E,5128.9,-15038.1,139.265)
set u=CreateUnit(p,0x48303058,2768.1,-16981.8,10.180)
call SetHeroLevel(u,21,false)
set u=CreateUnit(p,0x48303135,4365.6,-14757.5,348.575)
set gg_unit_H015_0437=CreateUnit(p,0x48303135,3853.7,-14838.9,30.675)
set u=CreateUnit(p,0x48303032,5240.3,-14824.6,336.587)
set gg_unit_H002_0440=CreateUnit(p,0x48303032,4436.3,-14858.2,88.390)
set gg_unit_H00Z_0446=CreateUnit(p,0x4830305A,4257.3,-16993.5,174.347)
call SetUnitState(gg_unit_H00Z_0446,UNIT_STATE_MANA,0)
set u=CreateUnit(p,0x48303145,19755.9,-20657.3,17.480)
call SetHeroLevel(u,23,false)
set gg_unit_H00B_0449=CreateUnit(p,0x48303042,3836.4,-17320.1,62.602)
call SetUnitState(gg_unit_H00B_0449,UNIT_STATE_MANA,0)
set u=CreateUnit(p,0x48303044,2764.6,-17108.3,19.940)
set gg_unit_H01D_0488=CreateUnit(p,0x48303144,2448.5,-14786.8,6.685)
call SetHeroLevel(gg_unit_H01D_0488,50,false)
call SelectHeroSkill(gg_unit_H01D_0488,0x41486862)
call SelectHeroSkill(gg_unit_H01D_0488,0x41486862)
call SelectHeroSkill(gg_unit_H01D_0488,0x41486862)
call SelectHeroSkill(gg_unit_H01D_0488,0x41486473)
call SelectHeroSkill(gg_unit_H01D_0488,0x41486473)
call SelectHeroSkill(gg_unit_H01D_0488,0x41486473)
call SelectHeroSkill(gg_unit_H01D_0488,0x41486164)
call SelectHeroSkill(gg_unit_H01D_0488,0x41486164)
call SelectHeroSkill(gg_unit_H01D_0488,0x41486164)
call SelectHeroSkill(gg_unit_H01D_0488,0x41487265)
call UnitAddItemToSlotById(gg_unit_H01D_0488,0x49303057,0)
call UnitAddItemToSlotById(gg_unit_H01D_0488,0x49303056,1)
set u=CreateUnit(p,0x48313130,1907.0,-17986.9,352.150)
set u=CreateUnit(p,0x48303145,19795.0,-19273.7,0.920)
call SetHeroLevel(u,45,false)
set u=CreateUnit(p,0x48303145,19825.3,-18893.6,1.870)
call SetHeroLevel(u,11,false)
set u=CreateUnit(p,0x48303145,19801.9,-19409.9,6.220)
call SetHeroLevel(u,17,false)
set u=CreateUnit(p,0x48303049,19928.2,-19088.7,143.990)
call SetHeroLevel(u,41,false)
set u=CreateUnit(p,0x48303049,19536.4,-19274.9,10.940)
call SetHeroLevel(u,14,false)
set u=CreateUnit(p,0x48303049,19532.7,-18863.1,356.200)
call SetHeroLevel(u,31,false)
set u=CreateUnit(p,0x48303045,3559.6,-14982.7,104.092)
set gg_unit_H01F_0501=CreateUnit(p,0x48303146,2982.8,-17407.0,204.022)
call SetHeroLevel(gg_unit_H01F_0501,12,false)
set gg_unit_H01F_0502=CreateUnit(p,0x48303146,1360.9,-17051.1,277.996)
call SetHeroLevel(gg_unit_H01F_0502,12,false)
set gg_unit_H01F_0503=CreateUnit(p,0x48303146,5345.4,-18161.8,75.643)
call SetHeroLevel(gg_unit_H01F_0503,12,false)
set gg_unit_H004_0504=CreateUnit(p,0x48303034,4717.7,-16645.3,178.599)
set gg_unit_H004_0505=CreateUnit(p,0x48303034,884.2,-18173.1,43.178)
set gg_unit_H004_0506=CreateUnit(p,0x48303034,1204.3,-16674.0,134.554)
endfunction
function CreateUnitsForPlayer11 takes nothing returns nothing
local player p=Player(11)
local unit u
local integer unitID
local trigger t
local real life
set gg_unit_H00Y_0433=CreateUnit(p,0x48303059,4553.0,-16590.8,20.479)
endfunction
function CreateNeutralHostile takes nothing returns nothing
local player p=Player(PLAYER_NEUTRAL_AGGRESSIVE)
local unit u
local integer unitID
local trigger t
local real life
set u=CreateUnit(p,0x6E303033,7186.2,-20075.9,311.417)
set u=CreateUnit(p,0x6E303033,6804.6,-20673.0,219.382)
set u=CreateUnit(p,0x6E303033,6155.8,-21293.8,251.441)
set u=CreateUnit(p,0x6E303033,6786.4,-19951.8,216.163)
set u=CreateUnit(p,0x6E303030,3321.5,-23641.4,270.766)
set u=CreateUnit(p,0x6E303033,6990.1,-20255.3,111.328)
set u=CreateUnit(p,0x6E303033,4886.0,-20988.8,266.163)
set u=CreateUnit(p,0x6E303033,5869.5,-21570.9,30.884)
set u=CreateUnit(p,0x6E303033,7500.7,-22229.0,16.095)
set u=CreateUnit(p,0x6E303030,7438.7,-20769.9,18.348)
set u=CreateUnit(p,0x6E303030,871.1,-18915.9,97.353)
set u=CreateUnit(p,0x6E303030,2527.6,-19975.0,191.388)
set u=CreateUnit(p,0x6E303030,1789.2,-21028.0,284.038)
set u=CreateUnit(p,0x6E303030,1649.8,-21100.1,349.134)
set u=CreateUnit(p,0x6E303030,1717.2,-21654.4,266.449)
set u=CreateUnit(p,0x6E303044,-3926.7,-18731.9,50.846)
set u=CreateUnit(p,0x6E303044,-3793.3,-18796.4,245.222)
set u=CreateUnit(p,0x6E303044,-3780.9,-18580.7,210.395)
set u=CreateUnit(p,0x6E303044,-4114.7,-18755.5,233.785)
set u=CreateUnit(p,0x6E303032,3932.1,-28985.1,258.505)
set u=CreateUnit(p,0x6E303032,3910.8,-31724.5,85.981)
set u=CreateUnit(p,0x6E303030,2012.9,-22005.0,73.797)
set u=CreateUnit(p,0x6E303030,27.4,-19693.8,109.306)
set u=CreateUnit(p,0x6E303030,-386.5,-19464.6,342.037)
set u=CreateUnit(p,0x6E303030,8275.8,-22497.4,173.820)
set u=CreateUnit(p,0x6E303030,8919.3,-23534.3,176.446)
set u=CreateUnit(p,0x6E303030,11578.0,-21561.6,314.043)
set u=CreateUnit(p,0x6E303030,12011.8,-22601.2,39.365)
set u=CreateUnit(p,0x6E303034,5838.9,-23561.8,53.406)
set u=CreateUnit(p,0x6E303034,6977.8,-24244.1,261.285)
set u=CreateUnit(p,0x6E303034,8113.2,-23864.6,337.324)
set u=CreateUnit(p,0x6E303034,10347.6,-23288.2,330.885)
set u=CreateUnit(p,0x6E303034,4394.8,-24239.3,114.481)
set u=CreateUnit(p,0x6E303034,7083.8,-28382.4,27.313)
set u=CreateUnit(p,0x6E303034,6857.3,-28599.1,176.017)
set u=CreateUnit(p,0x6E303034,7062.3,-29675.0,26.610)
set u=CreateUnit(p,0x6E303034,7023.4,-29355.6,354.671)
set u=CreateUnit(p,0x6E303036,3160.6,-23430.6,83.510)
set u=CreateUnit(p,0x6E303036,2176.6,-22775.0,167.228)
set u=CreateUnit(p,0x6E303035,5063.7,-24651.9,104.337)
set u=CreateUnit(p,0x6E303036,9215.2,-25023.2,264.559)
set u=CreateUnit(p,0x6E303035,4719.0,-23661.3,75.227)
set u=CreateUnit(p,0x6E303033,6632.0,-23088.8,154.604)
set u=CreateUnit(p,0x6E303035,7941.0,-25450.4,312.977)
set u=CreateUnit(p,0x6E303035,9393.1,-23966.4,245.014)
set u=CreateUnit(p,0x6E303035,12202.0,-23787.2,72.556)
set u=CreateUnit(p,0x6E303035,8788.8,-27573.0,250.595)
set u=CreateUnit(p,0x6E303035,7295.6,-26877.0,322.195)
set u=CreateUnit(p,0x6E303037,8557.3,-16719.3,59.592)
call SetUnitColor(u,ConvertPlayerColor(12))
set u=CreateUnit(p,0x6E303037,8805.4,-30064.1,302.913)
call SetUnitColor(u,ConvertPlayerColor(12))
set u=CreateUnit(p,0x6E303036,10583.4,-20920.8,39.761)
set u=CreateUnit(p,0x6E303036,7923.0,-21187.7,338.862)
set u=CreateUnit(p,0x6E303032,21554.4,-19921.0,56.691)
set u=CreateUnit(p,0x6E303037,10989.2,-19256.6,29.104)
call SetUnitColor(u,ConvertPlayerColor(12))
set u=CreateUnit(p,0x6E303037,1099.1,-25041.7,48.188)
call SetUnitColor(u,ConvertPlayerColor(12))
set u=CreateUnit(p,0x6E303037,12605.0,-27748.3,4.340)
call SetUnitColor(u,ConvertPlayerColor(12))
set u=CreateUnit(p,0x6E303036,13491.4,-28128.8,116.547)
set u=CreateUnit(p,0x6E303035,13684.6,-26325.8,19.919)
set u=CreateUnit(p,0x6E303036,13168.1,-23888.3,146.090)
set u=CreateUnit(p,0x6E303034,10713.4,-22655.9,235.576)
set u=CreateUnit(p,0x6E303033,6739.0,-20092.7,263.131)
set u=CreateUnit(p,0x6E303033,5576.3,-22841.0,289.136)
set u=CreateUnit(p,0x6E303033,8023.7,-24117.6,46.210)
set u=CreateUnit(p,0x6E303033,10171.7,-23584.1,211.768)
set u=CreateUnit(p,0x6E303030,8317.0,-21114.8,345.179)
set u=CreateUnit(p,0x6E303035,5983.9,-24612.3,66.104)
set u=CreateUnit(p,0x6E303034,7167.3,-27978.7,63.725)
set u=CreateUnit(p,0x6E303032,21282.5,-20007.1,244.827)
set u=CreateUnit(p,0x6E303033,9826.9,-25134.8,237.312)
set u=CreateUnit(p,0x6E303033,6586.3,-25536.5,230.665)
set u=CreateUnit(p,0x6E303033,7147.8,-30120.7,309.692)
set u=CreateUnit(p,0x6E303034,6889.0,-20421.2,168.678)
set u=CreateUnit(p,0x6E303039,12993.4,-18040.2,329.962)
call SetUnitColor(u,ConvertPlayerColor(12))
set u=CreateUnit(p,0x6E303034,14919.3,-15401.9,202.671)
set u=CreateUnit(p,0x6E303035,15976.3,-14187.7,51.593)
set u=CreateUnit(p,0x6E303035,15599.2,-14780.8,56.438)
set u=CreateUnit(p,0x6E303036,13107.1,-14240.6,44.957)
set u=CreateUnit(p,0x6E303036,13201.9,-15876.4,302.485)
set u=CreateUnit(p,0x6E303039,-5000.4,-22033.8,342.103)
call SetUnitColor(u,ConvertPlayerColor(12))
set u=CreateUnit(p,0x6E303039,10786.6,-25775.8,275.314)
call SetUnitColor(u,ConvertPlayerColor(12))
set u=CreateUnit(p,0x6E303039,-5627.6,-25166.6,193.827)
call SetUnitColor(u,ConvertPlayerColor(12))
set u=CreateUnit(p,0x6E303034,-4336.8,-25623.5,327.765)
set u=CreateUnit(p,0x6E303034,-3756.9,-25019.2,112.910)
set u=CreateUnit(p,0x6E303034,-2399.2,-25517.9,271.436)
set u=CreateUnit(p,0x6E303034,-2512.9,-24838.7,220.184)
set u=CreateUnit(p,0x6E303034,-1006.3,-25534.0,174.523)
set u=CreateUnit(p,0x6E303034,2397.2,-23319.3,57.625)
set u=CreateUnit(p,0x6E303034,2520.0,-25691.3,209.571)
set u=CreateUnit(p,0x6E303034,3436.4,-26094.6,236.213)
set u=CreateUnit(p,0x6E303034,4052.8,-25777.0,5.724)
set u=CreateUnit(p,0x6E303034,8308.6,-24362.6,182.181)
set u=CreateUnit(p,0x6E303034,12824.8,-22353.8,148.562)
set u=CreateUnit(p,0x6E303036,15094.3,-19237.2,221.909)
set u=CreateUnit(p,0x6E303036,14718.6,-17723.9,198.979)
set u=CreateUnit(p,0x6E303034,9938.4,-17208.8,89.036)
set u=CreateUnit(p,0x6E303034,9508.9,-17705.8,169.261)
set u=CreateUnit(p,0x6E303034,9878.2,-16496.0,175.051)
set u=CreateUnit(p,0x6E303033,9535.0,-18569.0,314.021)
set u=CreateUnit(p,0x6E303030,10013.1,-19945.6,335.610)
set u=CreateUnit(p,0x6E303030,12653.1,-19383.9,4.625)
set u=CreateUnit(p,0x6E303030,14143.0,-19332.1,10.481)
set u=CreateUnit(p,0x6E303030,14308.1,-20126.2,324.041)
set u=CreateUnit(p,0x6E303030,13449.2,-20331.8,127.698)
set u=CreateUnit(p,0x6E303036,-5133.7,-26988.8,223.864)
set u=CreateUnit(p,0x6E303036,-3743.9,-23799.4,156.923)
set u=CreateUnit(p,0x6E303036,-910.2,-20952.7,8.449)
set u=CreateUnit(p,0x6E303035,-4851.7,-23030.6,71.908)
set u=CreateUnit(p,0x6E303035,11454.6,-18227.8,313.801)
set u=CreateUnit(p,0x6E303030,9287.9,-15871.8,114.547)
set u=CreateUnit(p,0x6E303030,8467.3,-16110.9,5.933)
set u=CreateUnit(p,0x6E303030,8807.0,-15794.5,300.222)
set u=CreateUnit(p,0x6E303030,9579.3,-15839.0,248.639)
set u=CreateUnit(p,0x6E303042,18457.0,-28650.0,106.650)
call SetUnitColor(u,ConvertPlayerColor(12))
set u=CreateUnit(p,0x6E303042,18606.3,-27375.4,81.796)
call SetUnitColor(u,ConvertPlayerColor(12))
set u=CreateUnit(p,0x6E303044,-3332.9,-18761.3,126.270)
set u=CreateUnit(p,0x6E303044,-4292.7,-18195.4,152.275)
set u=CreateUnit(p,0x6E303032,20591.5,-19859.5,346.838)
set u=CreateUnit(p,0x6E303044,-4480.0,-15642.4,125.556)
set u=CreateUnit(p,0x6E303032,20199.7,-19910.7,61.569)
set u=CreateUnit(p,0x6E303032,20552.8,-20391.2,14.283)
set u=CreateUnit(p,0x6E303032,21037.4,-19297.2,173.476)
set u=CreateUnit(p,0x6E303032,21099.9,-18981.3,183.010)
set u=CreateUnit(p,0x6E303032,21288.3,-18974.7,185.422)
set u=CreateUnit(p,0x6E303032,21420.3,-19737.7,173.507)
set u=CreateUnit(p,0x6E303032,20883.4,-19132.1,178.364)
set u=CreateUnit(p,0x6E303032,21564.7,-19042.0,180.133)
set u=CreateUnit(p,0x6E303032,20293.2,-18980.2,185.212)
set u=CreateUnit(p,0x6E303032,21272.0,-19514.6,172.128)
set u=CreateUnit(p,0x6E303032,20244.6,-19389.0,164.177)
set u=CreateUnit(p,0x6E303032,20771.5,-18914.0,186.007)
set u=CreateUnit(p,0x6E303032,20503.2,-18949.2,185.714)
set u=CreateUnit(p,0x6E303032,20720.9,-19351.2,170.222)
set u=CreateUnit(p,0x6E303032,20473.6,-19375.2,167.413)
set u=CreateUnit(p,0x6E303032,20270.3,-19150.1,176.527)
set u=CreateUnit(p,0x6E303032,21269.7,-19274.3,177.942)
set u=CreateUnit(p,0x6E303032,21568.8,-19397.5,168.553)
set u=CreateUnit(p,0x6E303032,20471.5,-20181.9,187.916)
set u=CreateUnit(p,0x6E303032,20561.8,-20077.8,40.420)
set u=CreateUnit(p,0x6E303044,-2997.0,-16610.5,182.192)
set u=CreateUnit(p,0x6E303044,-2316.1,-17329.3,287.631)
set u=CreateUnit(p,0x6E303044,-2828.5,-16161.4,136.685)
set u=CreateUnit(p,0x6E303044,-4654.8,-15606.5,231.895)
set u=CreateUnit(p,0x6E303044,-5589.2,-17191.2,193.464)
set u=CreateUnit(p,0x6E303044,-5960.7,-14546.4,116.107)
set u=CreateUnit(p,0x6E303044,-6308.0,-14765.3,318.152)
set u=CreateUnit(p,0x6E303044,-1711.5,-14008.4,320.547)
set u=CreateUnit(p,0x6E303044,-2274.2,-14302.8,127.610)
set u=CreateUnit(p,0x6E303044,-2901.7,-15380.3,232.137)
endfunction
function CreateNeutralPassiveBuildings takes nothing returns nothing
local player p=Player(PLAYER_NEUTRAL_PASSIVE)
local unit u
local integer unitID
local trigger t
local real life
set u=CreateUnit(p,0x6E776774,8960.0,-30912.0,270.000)
call WaygateSetDestination(u,GetRectCenterX(gg_rct_Enter_temple),GetRectCenterY(gg_rct_Enter_temple))
call WaygateActivate(u,true)
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 u=CreateUnit(p,0x48303036,4385.8,-15514.6,1.410)
call SetHeroLevel(u,13,false)
call SetUnitState(u,UNIT_STATE_MANA,0)
set gg_unit_H00A_0031=CreateUnit(p,0x48303041,3461.7,-13397.4,89.950)
call SetHeroLevel(gg_unit_H00A_0031,50,false)
set gg_unit_H002_0034=CreateUnit(p,0x48303032,4565.5,-15469.3,182.860)
call SetHeroLevel(gg_unit_H002_0034,12,false)
set u=CreateUnit(p,0x68726468,1466.8,-26870.6,81.770)
set u=CreateUnit(p,0x6E66726F,5989.8,-26479.2,337.807)
set u=CreateUnit(p,0x6E66726F,7030.4,-26363.7,110.713)
set u=CreateUnit(p,0x6E66726F,6813.3,-26792.1,151.924)
set u=CreateUnit(p,0x6E66726F,7205.5,-26748.7,327.688)
set u=CreateUnit(p,0x6E66726F,7760.4,-26734.8,274.260)
set u=CreateUnit(p,0x6E66726F,7711.3,-27376.1,3.801)
set u=CreateUnit(p,0x6E66726F,8008.2,-27720.2,142.376)
set u=CreateUnit(p,0x6E66726F,8403.5,-27454.7,242.827)
set u=CreateUnit(p,0x6E66726F,8697.6,-27192.2,201.001)
set u=CreateUnit(p,0x6E66726F,8568.4,-26430.3,292.476)
set u=CreateUnit(p,0x6E66726F,9273.2,-26268.6,27.390)
set u=CreateUnit(p,0x6E66726F,9041.7,-25578.7,88.849)
set u=CreateUnit(p,0x6E66726F,9768.8,-25542.4,134.444)
set u=CreateUnit(p,0x6E66726F,10103.1,-25709.8,274.348)
set u=CreateUnit(p,0x6E66726F,10933.2,-25429.7,170.458)
set u=CreateUnit(p,0x6E66726F,10924.3,-24524.3,36.739)
set u=CreateUnit(p,0x6E66726F,10845.4,-24641.8,165.591)
set u=CreateUnit(p,0x6E66726F,10283.9,-24308.0,53.824)
set u=CreateUnit(p,0x6E66726F,9554.6,-24837.5,222.590)
set u=CreateUnit(p,0x6E66726F,8458.7,-24832.1,188.641)
set u=CreateUnit(p,0x6E66726F,7947.4,-25013.6,247.980)
set u=CreateUnit(p,0x6E66726F,8089.7,-24624.8,346.398)
set u=CreateUnit(p,0x6E66726F,8315.9,-24466.0,271.140)
set u=CreateUnit(p,0x6E66726F,7592.6,-25229.0,259.263)
set u=CreateUnit(p,0x6E66726F,6203.1,-25681.0,266.130)
set u=CreateUnit(p,0x6E66726F,6769.5,-25764.4,273.689)
set u=CreateUnit(p,0x6E66726F,5865.9,-26461.8,324.755)
set u=CreateUnit(p,0x6E66726F,5719.3,-27005.4,315.526)
set u=CreateUnit(p,0x6E66726F,6331.9,-26589.5,128.522)
set gg_unit_H01J_0104=CreateUnit(p,0x4830314A,-8772.9,-9617.4,84.078)
set gg_unit_H01J_0105=CreateUnit(p,0x4830314A,-8520.4,-9348.6,182.901)
set gg_unit_H01J_0106=CreateUnit(p,0x4830314A,-8759.5,-9081.4,273.486)
set u=CreateUnit(p,0x4830314A,-8005.8,-9493.6,113.661)
set u=CreateUnit(p,0x6E656368,4670.7,-19353.0,48.144)
set u=CreateUnit(p,0x6E656368,4285.4,-18640.5,26.412)
set u=CreateUnit(p,0x6E656368,3134.4,-18706.3,78.884)
set u=CreateUnit(p,0x6E656368,2631.9,-17582.3,198.024)
set u=CreateUnit(p,0x6E656368,3467.6,-17679.6,69.644)
set u=CreateUnit(p,0x6E656368,5353.1,-17432.9,180.939)
set u=CreateUnit(p,0x6E656368,6366.3,-17837.1,211.186)
set u=CreateUnit(p,0x6E656368,4897.5,-20383.5,59.932)
set u=CreateUnit(p,0x6E656368,5909.2,-20752.3,112.580)
set u=CreateUnit(p,0x6E656368,6017.8,-20050.7,274.194)
set u=CreateUnit(p,0x6E656368,5807.2,-19368.3,145.628)
set u=CreateUnit(p,0x6E656368,5584.6,-18935.6,221.656)
set u=CreateUnit(p,0x6E656372,5903.9,-22265.1,212.702)
set u=CreateUnit(p,0x6E656372,6863.0,-21791.7,164.756)
set u=CreateUnit(p,0x6E656372,9253.7,-23638.6,66.942)
set u=CreateUnit(p,0x6E656372,9250.8,-23749.8,306.857)
set u=CreateUnit(p,0x6E66726F,8151.7,-26514.0,357.100)
set u=CreateUnit(p,0x6E646572,7852.7,-26356.4,163.582)
set u=CreateUnit(p,0x6E726163,16141.7,-12001.7,139.959)
set u=CreateUnit(p,0x6E726163,14868.9,-11512.0,182.653)
set u=CreateUnit(p,0x6E656372,14463.1,-12450.6,310.472)
set u=CreateUnit(p,0x6E656372,14575.3,-11150.2,230.401)
set u=CreateUnit(p,0x6E656372,16164.5,-10998.5,30.038)
set u=CreateUnit(p,0x6E646572,16178.8,-11198.8,156.560)
set u=CreateUnit(p,0x6E646572,5632.3,-22208.0,164.833)
set u=CreateUnit(p,0x6E646572,4577.3,-22447.2,18.974)
set u=CreateUnit(p,0x6E646572,6685.6,-24279.6,143.815)
set u=CreateUnit(p,0x6E646572,8296.5,-21516.4,311.274)
set u=CreateUnit(p,0x6E646572,5432.3,-24135.4,11.195)
set u=CreateUnit(p,0x6E656372,5621.7,-23799.0,291.125)
set u=CreateUnit(p,0x6E656372,6979.5,-23488.8,198.287)
set u=CreateUnit(p,0x6E656372,6416.4,-24178.4,46.737)
set u=CreateUnit(p,0x6E726163,6117.1,-22543.6,219.525)
set u=CreateUnit(p,0x6E726163,4481.3,-24354.1,78.247)
set u=CreateUnit(p,0x6E303034,7848.2,-16435.8,342.663)
set gg_unit_hfoo_0357=CreateUnit(p,0x68666F6F,18667.5,-29729.2,178.140)
set gg_unit_hfoo_0358=CreateUnit(p,0x68666F6F,15909.1,-25077.3,37.036)
set gg_unit_hfoo_0359=CreateUnit(p,0x68666F6F,16345.3,-25050.9,216.130)
set gg_unit_hfoo_0360=CreateUnit(p,0x68666F6F,16902.8,-25111.1,167.865)
set gg_unit_H013_0383=CreateUnit(p,0x48303133,21313.6,-31473.6,267.750)
call SetHeroLevel(gg_unit_H013_0383,17,false)
set u=CreateUnit(p,0x6E303036,7851.0,-16163.6,20.710)
set u=CreateUnit(p,0x6E303035,7859.4,-15938.7,333.160)
set u=CreateUnit(p,0x6E303033,7871.1,-16372.1,76.302)
set u=CreateUnit(p,0x6E303030,7929.4,-15882.1,310.791)
set u=CreateUnit(p,0x48303036,5318.3,-17604.1,234.095)
set gg_unit_H002_0438=CreateUnit(p,0x48303032,3316.9,-16168.8,352.860)
set u=CreateUnit(p,0x6E656368,5473.1,-18913.8,161.207)
set u=CreateUnit(p,0x6E656368,5561.8,-18693.9,242.849)
set u=CreateUnit(p,0x6E656368,5641.8,-18914.4,295.431)
set u=CreateUnit(p,0x6E656368,5491.2,-19169.7,13.854)
set u=CreateUnit(p,0x6E656368,5579.8,-19170.9,278.776)
set u=CreateUnit(p,0x6E656368,5721.6,-18797.1,32.323)
set u=CreateUnit(p,0x6E656368,5539.1,-18796.5,90.728)
set u=CreateUnit(p,0x6E656368,5381.0,-18764.9,316.504)
set u=CreateUnit(p,0x6E656368,5405.3,-18969.6,56.395)
set u=CreateUnit(p,0x6E656368,5385.3,-19087.2,223.480)
set u=CreateUnit(p,0x48303059,2871.6,-16874.7,1.530)
set u=CreateUnit(p,0x48303031,2857.3,-16952.0,8.890)
set u=CreateUnit(p,0x48303054,3650.8,-16345.2,270.210)
set u=CreateUnit(p,0x48303054,3275.7,-16351.9,270.880)
call SetHeroLevel(u,12,false)
set u=CreateUnit(p,0x48303147,-1927.9,-20873.3,359.079)
call SetHeroLevel(u,50,false)
endfunction
function CreatePlayerBuildings takes nothing returns nothing
call CreateBuildingsForPlayer0()
call CreateBuildingsForPlayer1()
call CreateBuildingsForPlayer2()
call CreateBuildingsForPlayer3()
call CreateBuildingsForPlayer4()
call CreateBuildingsForPlayer5()
call CreateBuildingsForPlayer8()
call CreateBuildingsForPlayer10()
endfunction
function CreatePlayerUnits takes nothing returns nothing
call CreateUnitsForPlayer0()
call CreateUnitsForPlayer6()
call CreateUnitsForPlayer7()
call CreateUnitsForPlayer8()
call CreateUnitsForPlayer9()
call CreateUnitsForPlayer10()
call CreateUnitsForPlayer11()
endfunction
function CreateAllUnits takes nothing returns nothing
call CreateNeutralPassiveBuildings()
call CreatePlayerBuildings()
call CreateNeutralHostile()
call CreateNeutralPassive()
call CreatePlayerUnits()
endfunction
function CreateRegions takes nothing returns nothing
local weathereffect we
set gg_rct_boloto=Rect(-8544.0,-28992.0,14656.0,-20224.0)
set we=AddWeatherEffect(gg_rct_boloto,0x4644776C)
call EnableWeatherEffect(we,true)
set gg_rct_npc1=Rect(3392.0,-14784.0,3488.0,-14688.0)
set gg_rct_npc2=Rect(5568.0,-14752.0,5696.0,-14624.0)
set gg_rct_npc21=Rect(5600.0,-17184.0,5760.0,-17152.0)
set gg_rct_npc3=Rect(5280.0,-18656.0,5376.0,-18560.0)
set gg_rct_npc31=Rect(5440.0,-18880.0,5504.0,-18816.0)
set gg_rct_npc4=Rect(3296.0,-18944.0,3392.0,-18880.0)
set gg_rct_npc41=Rect(3296.0,-18624.0,3392.0,-18560.0)
set gg_rct_npc5=Rect(6720.0,-17504.0,6784.0,-17408.0)
set gg_rct_npc51=Rect(6944.0,-17408.0,7040.0,-17280.0)
set gg_rct_npc6=Rect(5120.0,-18336.0,5216.0,-18208.0)
set gg_rct_npc61=Rect(5056.0,-18336.0,5120.0,-18208.0)
set gg_rct_npc7=Rect(3904.0,-17632.0,4000.0,-17536.0)
set gg_rct_npc71=Rect(4640.0,-14944.0,4736.0,-14848.0)
set gg_rct_sethero=Rect(3424.0,-12992.0,4288.0,-12736.0)
set gg_rct_resp=Rect(3392.0,-19968.0,3584.0,-19808.0)
set gg_rct_Enter_temple=Rect(4928.0,-30592.0,5280.0,-30144.0)
set gg_rct________________018=Rect(8864.0,-30656.0,9056.0,-30592.0)
set gg_rct_mine=Rect(6656.0,-30560.0,9216.0,-28384.0)
set gg_rct_outship=Rect(3520.0,-13632.0,3840.0,-13504.0)
set gg_rct_out=Rect(3488.0,-13824.0,3872.0,-13760.0)
set gg_rct________________022=Rect(3424.0,-13760.0,3808.0,-13696.0)
set gg_rct________________023=Rect(3520.0,-13504.0,3840.0,-13408.0)
set gg_rct_Skelet_siege=Rect(4224.0,-30848.0,4416.0,-29792.0)
set gg_rct_skelet_spawn_1=Rect(3744.0,-31872.0,4096.0,-31552.0)
set gg_rct_Skelet_spawn_2=Rect(3776.0,-29184.0,4096.0,-28800.0)
set gg_rct________________027=Rect(12864.0,-13184.0,17568.0,-8928.0)
set gg_rct________________028=Rect(1568.0,-17824.0,1664.0,-17728.0)
set gg_rct_firegod=Rect(3552.0,-22752.0,4192.0,-22080.0)
set gg_rct_E_Arah_Big=Rect(18368.0,-28512.0,18592.0,-28192.0)
set gg_rct_E_Arah_Liitle_2=Rect(18784.0,-29504.0,18848.0,-29152.0)
set gg_rct_E_Arah_Liitle_1=Rect(18016.0,-29760.0,18080.0,-29344.0)
set gg_rct_S_Bandit_guard=Rect(13088.0,-29248.0,13344.0,-29056.0)
set gg_rct_Region_034=Rect(18336.0,-29824.0,18528.0,-29568.0)
set gg_rct_Region_035=Rect(13088.0,-29920.0,13280.0,-29792.0)
set gg_rct_Region_036=Rect(6528.0,-22784.0,6688.0,-22656.0)
set gg_rct_Region_037=Rect(21792.0,-31648.0,21888.0,-31520.0)
set gg_rct_Enrike=Rect(4128.0,-16192.0,4224.0,-16096.0)
set gg_rct_Region_039=Rect(12864.0,-29536.0,12992.0,-29440.0)
set gg_rct_Region_040=Rect(-1120.0,-22208.0,-1024.0,-22080.0)
set gg_rct_Region_041=Rect(-1248.0,-22208.0,-1152.0,-22112.0)
set gg_rct_Region_042=Rect(7296.0,-16256.0,7424.0,-16096.0)
set gg_rct_City=Rect(800.0,-20256.0,7232.0,-12288.0)
call SetSoundPosition(gg_snd_city01,4016.0,-16272.0,-29.8)
call RegisterStackedSound(gg_snd_city01,true,6432.0,7968.0)
set gg_rct_Region_044=Rect(3392.0,-16576.0,3520.0,-16480.0)
set gg_rct_Region_045=Rect(3360.0,-17344.0,3520.0,-17248.0)
set gg_rct_Chiken=Rect(5344.0,-19328.0,5760.0,-18688.0)
call SetSoundPosition(gg_snd_chikens,5552.0,-19008.0,-3.3)
call RegisterStackedSound(gg_snd_chikens,true,416.0,640.0)
set gg_rct_Sewers=Rect(16672.0,-30336.0,21888.0,-26048.0)
call SetSoundPosition(gg_snd_sewers,19280.0,-28192.0,97.9)
call RegisterStackedSound(gg_snd_sewers,true,5216.0,4288.0)
set gg_rct_Sewers2=Rect(-2944.0,-32032.0,9856.0,-28736.0)
call SetSoundPosition(gg_snd_sewers,3456.0,-30384.0,-29.8)
call RegisterStackedSound(gg_snd_sewers,true,12800.0,3296.0)
set gg_rct_Region_015=Rect(15456.0,-21792.0,15616.0,-20288.0)
set gg_rct_Region_049=Rect(15008.0,-21792.0,15232.0,-20288.0)
set gg_rct_Region_050=Rect(22592.0,-31616.0,22688.0,-31488.0)
set gg_rct_Quest_Guard_1=Rect(1600.0,-26560.0,1984.0,-26176.0)
set gg_rct_Quest_Guard_2=Rect(-2624.0,-27200.0,-2528.0,-27104.0)
set gg_rct_Quest_Guard_3=Rect(11488.0,-15552.0,11584.0,-15456.0)
set gg_rct_WP_1=Rect(6112.0,-22400.0,6176.0,-22336.0)
set gg_rct_WP_2=Rect(8448.0,-22016.0,8512.0,-21952.0)
set gg_rct_WP_3=Rect(11264.0,-22336.0,11328.0,-22272.0)
set gg_rct_WP_4=Rect(10688.0,-20256.0,10752.0,-20192.0)
set gg_rct_WP_5=Rect(8576.0,-17408.0,8640.0,-17344.0)
set gg_rct_WP_6=Rect(10048.0,-16192.0,10112.0,-16128.0)
set gg_rct_WP_7=Rect(12128.0,-16288.0,12192.0,-16224.0)
set gg_rct_WP_8=Rect(12608.0,-15040.0,12672.0,-14976.0)
set gg_rct_WP_9=Rect(14496.0,-15072.0,14560.0,-15008.0)
set gg_rct_WP_10=Rect(14848.0,-13568.0,15328.0,-13280.0)
set gg_rct_Region_064=Rect(5280.0,-20256.0,5472.0,-20000.0)
set gg_rct_Region_065=Rect(5024.0,-20544.0,5760.0,-19808.0)
set gg_rct_Earth=Rect(8512.0,-20352.0,8896.0,-19936.0)
endfunction
function CreateCameras takes nothing returns nothing
set gg_cam_Camera_001=CreateCameraSetup()
call CameraSetupSetField(gg_cam_Camera_001,CAMERA_FIELD_ZOFFSET,0.0,0.0)
call CameraSetupSetField(gg_cam_Camera_001,CAMERA_FIELD_ROTATION,182.2,0.0)
call CameraSetupSetField(gg_cam_Camera_001,CAMERA_FIELD_ANGLE_OF_ATTACK,352.0,0.0)
call CameraSetupSetField(gg_cam_Camera_001,CAMERA_FIELD_TARGET_DISTANCE,1665.9,0.0)
call CameraSetupSetField(gg_cam_Camera_001,CAMERA_FIELD_ROLL,0.0,0.0)
call CameraSetupSetField(gg_cam_Camera_001,CAMERA_FIELD_FIELD_OF_VIEW,70.0,0.0)
call CameraSetupSetField(gg_cam_Camera_001,CAMERA_FIELD_FARZ,5039.7,0.0)
call CameraSetupSetDestPosition(gg_cam_Camera_001,6633.4,-23225.6,0.0)
set gg_cam_Camera_002=CreateCameraSetup()
call CameraSetupSetField(gg_cam_Camera_002,CAMERA_FIELD_ZOFFSET,0.0,0.0)
call CameraSetupSetField(gg_cam_Camera_002,CAMERA_FIELD_ROTATION,87.6,0.0)
call CameraSetupSetField(gg_cam_Camera_002,CAMERA_FIELD_ANGLE_OF_ATTACK,311.8,0.0)
call CameraSetupSetField(gg_cam_Camera_002,CAMERA_FIELD_TARGET_DISTANCE,2373.4,0.0)
call CameraSetupSetField(gg_cam_Camera_002,CAMERA_FIELD_ROLL,0.0,0.0)
call CameraSetupSetField(gg_cam_Camera_002,CAMERA_FIELD_FIELD_OF_VIEW,70.0,0.0)
call CameraSetupSetField(gg_cam_Camera_002,CAMERA_FIELD_FARZ,5496.3,0.0)
call CameraSetupSetDestPosition(gg_cam_Camera_002,-4145.0,-18614.9,0.0)
set gg_cam_Camera_003=CreateCameraSetup()
call CameraSetupSetField(gg_cam_Camera_003,CAMERA_FIELD_ZOFFSET,0.0,0.0)
call CameraSetupSetField(gg_cam_Camera_003,CAMERA_FIELD_ROTATION,237.1,0.0)
call CameraSetupSetField(gg_cam_Camera_003,CAMERA_FIELD_ANGLE_OF_ATTACK,346.5,0.0)
call CameraSetupSetField(gg_cam_Camera_003,CAMERA_FIELD_TARGET_DISTANCE,4318.5,0.0)
call CameraSetupSetField(gg_cam_Camera_003,CAMERA_FIELD_ROLL,0.0,0.0)
call CameraSetupSetField(gg_cam_Camera_003,CAMERA_FIELD_FIELD_OF_VIEW,70.0,0.0)
call CameraSetupSetField(gg_cam_Camera_003,CAMERA_FIELD_FARZ,10000.0,0.0)
call CameraSetupSetDestPosition(gg_cam_Camera_003,9818.0,-26000.3,0.0)
set gg_cam_Camera_004=CreateCameraSetup()
call CameraSetupSetField(gg_cam_Camera_004,CAMERA_FIELD_ZOFFSET,0.0,0.0)
call CameraSetupSetField(gg_cam_Camera_004,CAMERA_FIELD_ROTATION,88.2,0.0)
call CameraSetupSetField(gg_cam_Camera_004,CAMERA_FIELD_ANGLE_OF_ATTACK,298.2,0.0)
call CameraSetupSetField(gg_cam_Camera_004,CAMERA_FIELD_TARGET_DISTANCE,1433.9,0.0)
call CameraSetupSetField(gg_cam_Camera_004,CAMERA_FIELD_ROLL,0.0,0.0)
call CameraSetupSetField(gg_cam_Camera_004,CAMERA_FIELD_FIELD_OF_VIEW,70.0,0.0)
call CameraSetupSetField(gg_cam_Camera_004,CAMERA_FIELD_FARZ,10000.0,0.0)
call CameraSetupSetDestPosition(gg_cam_Camera_004,4202.0,-15840.4,0.0)
set gg_cam_cam1=CreateCameraSetup()
call CameraSetupSetField(gg_cam_cam1,CAMERA_FIELD_ZOFFSET,0.0,0.0)
call CameraSetupSetField(gg_cam_cam1,CAMERA_FIELD_ROTATION,101.6,0.0)
call CameraSetupSetField(gg_cam_cam1,CAMERA_FIELD_ANGLE_OF_ATTACK,349.7,0.0)
call CameraSetupSetField(gg_cam_cam1,CAMERA_FIELD_TARGET_DISTANCE,1475.4,0.0)
call CameraSetupSetField(gg_cam_cam1,CAMERA_FIELD_ROLL,0.0,0.0)
call CameraSetupSetField(gg_cam_cam1,CAMERA_FIELD_FIELD_OF_VIEW,70.0,0.0)
call CameraSetupSetField(gg_cam_cam1,CAMERA_FIELD_FARZ,7402.4,0.0)
call CameraSetupSetDestPosition(gg_cam_cam1,-1433.3,-19722.2,0.0)
set gg_cam_cam2=CreateCameraSetup()
call CameraSetupSetField(gg_cam_cam2,CAMERA_FIELD_ZOFFSET,0.0,0.0)
call CameraSetupSetField(gg_cam_cam2,CAMERA_FIELD_ROTATION,101.6,0.0)
call CameraSetupSetField(gg_cam_cam2,CAMERA_FIELD_ANGLE_OF_ATTACK,349.7,0.0)
call CameraSetupSetField(gg_cam_cam2,CAMERA_FIELD_TARGET_DISTANCE,1475.4,0.0)
call CameraSetupSetField(gg_cam_cam2,CAMERA_FIELD_ROLL,0.0,0.0)
call CameraSetupSetField(gg_cam_cam2,CAMERA_FIELD_FIELD_OF_VIEW,70.0,0.0)
call CameraSetupSetField(gg_cam_cam2,CAMERA_FIELD_FARZ,7402.4,0.0)
call CameraSetupSetDestPosition(gg_cam_cam2,-1369.6,-19987.5,0.0)
set gg_cam_cam3=CreateCameraSetup()
call CameraSetupSetField(gg_cam_cam3,CAMERA_FIELD_ZOFFSET,0.0,0.0)
call CameraSetupSetField(gg_cam_cam3,CAMERA_FIELD_ROTATION,100.7,0.0)
call CameraSetupSetField(gg_cam_cam3,CAMERA_FIELD_ANGLE_OF_ATTACK,347.9,0.0)
call CameraSetupSetField(gg_cam_cam3,CAMERA_FIELD_TARGET_DISTANCE,1475.4,0.0)
call CameraSetupSetField(gg_cam_cam3,CAMERA_FIELD_ROLL,0.0,0.0)
call CameraSetupSetField(gg_cam_cam3,CAMERA_FIELD_FIELD_OF_VIEW,70.0,0.0)
call CameraSetupSetField(gg_cam_cam3,CAMERA_FIELD_FARZ,7402.4,0.0)
call CameraSetupSetDestPosition(gg_cam_cam3,-1236.3,-20411.1,0.0)
set gg_cam_Camera_008=CreateCameraSetup()
call CameraSetupSetField(gg_cam_Camera_008,CAMERA_FIELD_ZOFFSET,0.0,0.0)
call CameraSetupSetField(gg_cam_Camera_008,CAMERA_FIELD_ROTATION,59.7,0.0)
call CameraSetupSetField(gg_cam_Camera_008,CAMERA_FIELD_ANGLE_OF_ATTACK,356.9,0.0)
call CameraSetupSetField(gg_cam_Camera_008,CAMERA_FIELD_TARGET_DISTANCE,2666.8,0.0)
call CameraSetupSetField(gg_cam_Camera_008,CAMERA_FIELD_ROLL,0.0,0.0)
call CameraSetupSetField(gg_cam_Camera_008,CAMERA_FIELD_FIELD_OF_VIEW,70.0,0.0)
call CameraSetupSetField(gg_cam_Camera_008,CAMERA_FIELD_FARZ,9125.1,0.0)
call CameraSetupSetDestPosition(gg_cam_Camera_008,13695.6,-15055.1,0.0)
set gg_cam_Intro1=CreateCameraSetup()
call CameraSetupSetField(gg_cam_Intro1,CAMERA_FIELD_ZOFFSET,0.0,0.0)
call CameraSetupSetField(gg_cam_Intro1,CAMERA_FIELD_ROTATION,267.8,0.0)
call CameraSetupSetField(gg_cam_Intro1,CAMERA_FIELD_ANGLE_OF_ATTACK,354.7,0.0)
call CameraSetupSetField(gg_cam_Intro1,CAMERA_FIELD_TARGET_DISTANCE,3215.4,0.0)
call CameraSetupSetField(gg_cam_Intro1,CAMERA_FIELD_ROLL,0.0,0.0)
call CameraSetupSetField(gg_cam_Intro1,CAMERA_FIELD_FIELD_OF_VIEW,70.0,0.0)
call CameraSetupSetField(gg_cam_Intro1,CAMERA_FIELD_FARZ,7948.7,0.0)
call CameraSetupSetDestPosition(gg_cam_Intro1,6857.5,-27444.0,0.0)
set gg_cam_Intro2=CreateCameraSetup()
call CameraSetupSetField(gg_cam_Intro2,CAMERA_FIELD_ZOFFSET,0.0,0.0)
call CameraSetupSetField(gg_cam_Intro2,CAMERA_FIELD_ROTATION,260.5,0.0)
call CameraSetupSetField(gg_cam_Intro2,CAMERA_FIELD_ANGLE_OF_ATTACK,352.7,0.0)
call CameraSetupSetField(gg_cam_Intro2,CAMERA_FIELD_TARGET_DISTANCE,3215.4,0.0)
call CameraSetupSetField(gg_cam_Intro2,CAMERA_FIELD_ROLL,0.0,0.0)
call CameraSetupSetField(gg_cam_Intro2,CAMERA_FIELD_FIELD_OF_VIEW,70.0,0.0)
call CameraSetupSetField(gg_cam_Intro2,CAMERA_FIELD_FARZ,7948.7,0.0)
call CameraSetupSetDestPosition(gg_cam_Intro2,6866.7,-27958.4,0.0)
set gg_cam_intro3=CreateCameraSetup()
call CameraSetupSetField(gg_cam_intro3,CAMERA_FIELD_ZOFFSET,0.0,0.0)
call CameraSetupSetField(gg_cam_intro3,CAMERA_FIELD_ROTATION,270.9,0.0)
call CameraSetupSetField(gg_cam_intro3,CAMERA_FIELD_ANGLE_OF_ATTACK,348.1,0.0)
call CameraSetupSetField(gg_cam_intro3,CAMERA_FIELD_TARGET_DISTANCE,1239.7,0.0)
call CameraSetupSetField(gg_cam_intro3,CAMERA_FIELD_ROLL,0.0,0.0)
call CameraSetupSetField(gg_cam_intro3,CAMERA_FIELD_FIELD_OF_VIEW,70.0,0.0)
call CameraSetupSetField(gg_cam_intro3,CAMERA_FIELD_FARZ,7948.7,0.0)
call CameraSetupSetDestPosition(gg_cam_intro3,7031.4,-29061.8,0.0)
set gg_cam_Camera_012=CreateCameraSetup()
call CameraSetupSetField(gg_cam_Camera_012,CAMERA_FIELD_ZOFFSET,0.0,0.0)
call CameraSetupSetField(gg_cam_Camera_012,CAMERA_FIELD_ROTATION,111.5,0.0)
call CameraSetupSetField(gg_cam_Camera_012,CAMERA_FIELD_ANGLE_OF_ATTACK,336.6,0.0)
call CameraSetupSetField(gg_cam_Camera_012,CAMERA_FIELD_TARGET_DISTANCE,1650.0,0.0)
call CameraSetupSetField(gg_cam_Camera_012,CAMERA_FIELD_ROLL,0.0,0.0)
call CameraSetupSetField(gg_cam_Camera_012,CAMERA_FIELD_FIELD_OF_VIEW,70.0,0.0)
call CameraSetupSetField(gg_cam_Camera_012,CAMERA_FIELD_FARZ,5000.0,0.0)
call CameraSetupSetDestPosition(gg_cam_Camera_012,5329.1,-20454.3,0.0)
endfunction
function Trig_Earth_end_Actions takes nothing returns nothing
call SetUnitPositionLoc(GetLeavingUnit(),GetRectCenter(gg_rct_WP_10))
endfunction
function InitTrig_Earth_end takes nothing returns nothing
set gg_trg_Earth_end=CreateTrigger()
call TriggerRegisterLeaveRectSimple(gg_trg_Earth_end,gg_rct_Earth)
call TriggerAddAction(gg_trg_Earth_end,function Trig_Earth_end_Actions)
endfunction
function Trig_Earth_start_Conditions takes nothing returns boolean
if(not(GetItemTypeId(GetManipulatedItem())==0x49303059))then
return false
endif
return true
endfunction
function Trig_Earth_start_Actions takes nothing returns nothing
call SetUnitPositionLoc(GetManipulatingUnit(),GetRectCenter(gg_rct_Earth))
endfunction
function InitTrig_Earth_start takes nothing returns nothing
set gg_trg_Earth_start=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Earth_start,EVENT_PLAYER_UNIT_USE_ITEM)
call TriggerAddCondition(gg_trg_Earth_start,Condition(function Trig_Earth_start_Conditions))
call TriggerAddAction(gg_trg_Earth_start,function Trig_Earth_start_Actions)
endfunction
function Trig_Killer_Bandit_Conditions takes nothing returns boolean
if(not(GetOwningPlayer(GetKillingUnitBJ())==Player(0)))then
return false
endif
return true
endfunction
function Trig_Killer_Bandit_Actions takes nothing returns nothing
set udg_R_Guard=(udg_R_Guard+1)
set udg_R_Monk=(udg_R_Monk+1)
set udg_R_Bandit=(udg_R_Bandit-1)
endfunction
function InitTrig_Killer_Bandit takes nothing returns nothing
set gg_trg_Killer_Bandit=CreateTrigger()
call TriggerRegisterPlayerUnitEventSimple(gg_trg_Killer_Bandit,Player(8),EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(gg_trg_Killer_Bandit,Condition(function Trig_Killer_Bandit_Conditions))
call TriggerAddAction(gg_trg_Killer_Bandit,function Trig_Killer_Bandit_Actions)
endfunction
function Trig_Killer_Guard_Conditions takes nothing returns boolean
if(not(GetOwningPlayer(GetKillingUnitBJ())==Player(0)))then
return false
endif
return true
endfunction
function Trig_Killer_Guard_Actions takes nothing returns nothing
set udg_R_Guard=(udg_R_Guard-1)
set udg_R_Bandit=(udg_R_Bandit+1)
set udg_R_Necroman=(udg_R_Necroman+1)
endfunction
function InitTrig_Killer_Guard takes nothing returns nothing
set gg_trg_Killer_Guard=CreateTrigger()
call TriggerRegisterPlayerUnitEventSimple(gg_trg_Killer_Guard,Player(10),EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(gg_trg_Killer_Guard,Condition(function Trig_Killer_Guard_Conditions))
call TriggerAddAction(gg_trg_Killer_Guard,function Trig_Killer_Guard_Actions)
endfunction
function Trig_Set_Actions takes nothing returns nothing
call TriggerSleepAction(2)
call CreateLeaderboardBJ(GetPlayersAll(),"TRIGSTR_2742")
call LeaderboardAddItemBJ(Player(0),GetLastCreatedLeaderboard(),"TRIGSTR_2743",0)
call LeaderboardSetPlayerItemStyleBJ(Player(0),GetLastCreatedLeaderboard(),true,false,false)
call LeaderboardAddItemBJ(Player(1),GetLastCreatedLeaderboard(),"TRIGSTR_2745",0)
call LeaderboardAddItemBJ(Player(2),GetLastCreatedLeaderboard(),"TRIGSTR_2746",0)
call LeaderboardAddItemBJ(Player(3),GetLastCreatedLeaderboard(),"TRIGSTR_2750",0)
call LeaderboardAddItemBJ(Player(4),GetLastCreatedLeaderboard(),"TRIGSTR_2747",0)
call LeaderboardAddItemBJ(Player(5),GetLastCreatedLeaderboard(),"TRIGSTR_2748",0)
call LeaderboardAddItemBJ(Player(6),GetLastCreatedLeaderboard(),"TRIGSTR_2749",0)
endfunction
function InitTrig_Set takes nothing returns nothing
set gg_trg_Set=CreateTrigger()
call TriggerAddAction(gg_trg_Set,function Trig_Set_Actions)
endfunction
function Trig_Untitled_Trigger_003_Actions takes nothing returns nothing
call SetPlayerAllianceStateBJ(Player(10),Player(8),bj_ALLIANCE_UNALLIED_VISION)
call SetPlayerAllianceStateBJ(Player(8),Player(10),bj_ALLIANCE_UNALLIED_VISION)
endfunction
function InitTrig_Untitled_Trigger_003 takes nothing returns nothing
set gg_trg_Untitled_Trigger_003=CreateTrigger()
call TriggerAddAction(gg_trg_Untitled_Trigger_003,function Trig_Untitled_Trigger_003_Actions)
endfunction
function Trig_Fire_fix_Conditions takes nothing returns boolean
if(not(GetSpellAbilityId()==0x41303045))then
return false
endif
return true
endfunction
function Trig_Fire_fix_Actions takes nothing returns nothing
call SetUnitOwner(GetLastCreatedUnit(),Player(PLAYER_NEUTRAL_PASSIVE),true)
call SetUnitPositionLoc(GetChangingUnit(),GetRectCenter(gg_rct_Region_037))
endfunction
function InitTrig_Fire_fix takes nothing returns nothing
set gg_trg_Fire_fix=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Fire_fix,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(gg_trg_Fire_fix,Condition(function Trig_Fire_fix_Conditions))
call TriggerAddAction(gg_trg_Fire_fix,function Trig_Fire_fix_Actions)
endfunction
function Trig_Run_fix_Actions takes nothing returns nothing
call IssueTargetOrderBJ(GetAttackedUnitBJ(),"attack",GetAttacker())
call TriggerSleepAction(2.00)
endfunction
function InitTrig_Run_fix takes nothing returns nothing
set gg_trg_Run_fix=CreateTrigger()
call TriggerRegisterPlayerUnitEventSimple(gg_trg_Run_fix,Player(PLAYER_NEUTRAL_AGGRESSIVE),EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddAction(gg_trg_Run_fix,function Trig_Run_fix_Actions)
endfunction
function Trig_Anim_orc_fix_Conditions takes nothing returns boolean
if(not(GetUnitTypeId(GetAttacker())==0x48303052))then
return false
endif
return true
endfunction
function Trig_Anim_orc_fix_Func001C takes nothing returns boolean
if(not(GetRandomInt(1,2)==1))then
return false
endif
return true
endfunction
function Trig_Anim_orc_fix_Actions takes nothing returns nothing
if(Trig_Anim_orc_fix_Func001C())then
call SetUnitAnimation(GetAttacker(),"attack")
else
call SetUnitAnimation(GetAttacker(),"attack first")
endif
endfunction
function InitTrig_Anim_orc_fix takes nothing returns nothing
set gg_trg_Anim_orc_fix=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Anim_orc_fix,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(gg_trg_Anim_orc_fix,Condition(function Trig_Anim_orc_fix_Conditions))
call TriggerAddAction(gg_trg_Anim_orc_fix,function Trig_Anim_orc_fix_Actions)
endfunction
function Trig_Animations_Func003A takes nothing returns nothing
call CameraSetupApplyForPlayer(true,gg_cam_Camera_004,GetEnumPlayer(),0)
endfunction
function Trig_Animations_Actions takes nothing returns nothing
call IssueTargetOrderBJ(gg_unit_H00W_0363,"attack",gg_unit_h012_0381)
call IssuePointOrderLocBJ(gg_unit_H00E_0027,"patrol",GetRectCenter(gg_rct_Region_036))
call ForForce(GetPlayersAll(),function Trig_Animations_Func003A)
call TriggerSleepAction(2)
call FogEnableOn()
call SetDoodadAnimationRectBJ("stand alternative",0x4430444B,GetPlayableMapRect())
call SetUnitAnimation(gg_unit_H01J_0104,"spell")
call SetUnitAnimation(gg_unit_H01J_0105,"spell")
call SetUnitAnimation(gg_unit_H01J_0106,"spell")
call SetDoodadAnimationRectBJ("stand alternate",0x44304259,GetPlayableMapRect())
call SetDoodadAnimationRectBJ("stand alternate",0x44304349,GetPlayableMapRect())
call SetUnitAnimation(gg_unit_hfoo_0357,"death")
call SetUnitAnimation(gg_unit_hfoo_0358,"death")
call SetUnitAnimation(gg_unit_hfoo_0359,"death")
call SetUnitAnimation(gg_unit_hfoo_0360,"death")
call SetTerrainFogExBJ(0,1000.00,8500.00,0.50,99.00,99.00,99.00)
call KillDestructable(gg_dest_B00L_17507)
endfunction
function InitTrig_Animations takes nothing returns nothing
set gg_trg_Animations=CreateTrigger()
call TriggerAddAction(gg_trg_Animations,function Trig_Animations_Actions)
endfunction
function Trig_every1second_Actions takes nothing returns nothing
call LeaderboardSetPlayerItemValueBJ(Player(1),GetLastCreatedLeaderboard(),udg_R_Guard)
call LeaderboardSetPlayerItemValueBJ(Player(2),GetLastCreatedLeaderboard(),udg_R_Bandit)
call LeaderboardSetPlayerItemValueBJ(Player(4),GetLastCreatedLeaderboard(),udg_R_Monk)
call LeaderboardSetPlayerItemValueBJ(Player(5),GetLastCreatedLeaderboard(),udg_R_Necroman)
set udg_player1stats=GetUnitManaPercent(gg_unit_h00G_0043)
set udg_player2stats=GetUnitManaPercent(gg_unit_h00G_0064)
set udg_player3stats=GetUnitManaPercent(gg_unit_h00G_0070)
set udg_player4stats=GetUnitManaPercent(gg_unit_h00G_0071)
set udg_player5stats=GetUnitManaPercent(gg_unit_h00G_0072)
set udg_player6stats=GetUnitManaPercent(gg_unit_h00G_0073)
endfunction
function InitTrig_every1second takes nothing returns nothing
set gg_trg_every1second=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(gg_trg_every1second,0.10)
call TriggerAddAction(gg_trg_every1second,function Trig_every1second_Actions)
endfunction
function Trig_sethero_Func001001 takes nothing returns boolean
return(GetOwningPlayer(GetEnteringUnit())==Player(0))
endfunction
function Trig_sethero_Func002001 takes nothing returns boolean
return(GetOwningPlayer(GetEnteringUnit())==Player(1))
endfunction
function Trig_sethero_Func003001 takes nothing returns boolean
return(GetOwningPlayer(GetEnteringUnit())==Player(2))
endfunction
function Trig_sethero_Func004001 takes nothing returns boolean
return(GetOwningPlayer(GetEnteringUnit())==Player(3))
endfunction
function Trig_sethero_Func005001 takes nothing returns boolean
return(GetOwningPlayer(GetEnteringUnit())==Player(4))
endfunction
function Trig_sethero_Func006001 takes nothing returns boolean
return(GetOwningPlayer(GetEnteringUnit())==Player(5))
endfunction
function Trig_sethero_Actions takes nothing returns nothing
if((GetOwningPlayer(GetEnteringUnit())==Player(0)))then
set udg_player1hero=GetEnteringUnit()
else
call DoNothing()
endif
if((GetOwningPlayer(GetEnteringUnit())==Player(1)))then
set udg_player2hero=GetEnteringUnit()
else
call DoNothing()
endif
if((GetOwningPlayer(GetEnteringUnit())==Player(2)))then
set udg_player3hero=GetEnteringUnit()
else
call DoNothing()
endif
if((GetOwningPlayer(GetEnteringUnit())==Player(3)))then
set udg_player4hero=GetEnteringUnit()
else
call DoNothing()
endif
if((GetOwningPlayer(GetEnteringUnit())==Player(4)))then
set udg_player5hero=GetEnteringUnit()
else
call DoNothing()
endif
if((GetOwningPlayer(GetEnteringUnit())==Player(5)))then
set udg_player6hero=GetEnteringUnit()
else
call DoNothing()
endif
endfunction
function InitTrig_sethero takes nothing returns nothing
set gg_trg_sethero=CreateTrigger()
call TriggerRegisterEnterRectSimple(gg_trg_sethero,gg_rct_sethero)
call TriggerAddAction(gg_trg_sethero,function Trig_sethero_Actions)
endfunction
function Trig_Init_Copy_Func001002002001001 takes nothing returns boolean
return(IsUnitDeadBJ(GetFilterUnit())==false)
endfunction
function Trig_Init_Copy_Func001002002001002 takes nothing returns boolean
return(GetOwningPlayer(GetFilterUnit())==Player(PLAYER_NEUTRAL_AGGRESSIVE))
endfunction
function Trig_Init_Copy_Func001002002001 takes nothing returns boolean
return GetBooleanAnd((IsUnitDeadBJ(GetFilterUnit())==false),(GetOwningPlayer(GetFilterUnit())==Player(PLAYER_NEUTRAL_AGGRESSIVE)))
endfunction
function Trig_Init_Copy_Func001002002002 takes nothing returns boolean
return(IsUnitIdType(GetUnitTypeId(GetFilterUnit()),UNIT_TYPE_PEON)==true)
endfunction
function Trig_Init_Copy_Func001002002 takes nothing returns boolean
return GetBooleanAnd((GetBooleanAnd((IsUnitDeadBJ(GetFilterUnit())==false),(GetOwningPlayer(GetFilterUnit())==Player(PLAYER_NEUTRAL_AGGRESSIVE)))),(IsUnitIdType(GetUnitTypeId(GetFilterUnit()),UNIT_TYPE_PEON)==true))
endfunction
function Trig_initialization_Actions takes nothing returns nothing
call SetDoodadAnimationRectBJ("death alternative",0x44304532,GetPlayableMapRect())
call SetSkyModel("Environment\\Sky\\LordaeronSummerSky\\LordaeronSummerSky.mdl")
call FogEnable(false)
call FogMaskEnable(false)
call IssueTargetOrderBJ(gg_unit_H00D_0036,"attack",gg_unit_H00D_0035)
call IssueTargetOrderBJ(gg_unit_H00D_0035,"attack",gg_unit_H00D_0036)
set udg_player1stats=GetUnitManaPercent(gg_unit_h00G_0043)
set udg_Animals=GetUnitsInRectMatching(GetPlayableMapRect(),Condition(function Trig_Init_Copy_Func001002002))
endfunction
function InitTrig_initialization takes nothing returns nothing
set gg_trg_initialization=CreateTrigger()
call TriggerAddAction(gg_trg_initialization,function Trig_initialization_Actions)
endfunction
function Trig_HeroDeath_Conditions takes nothing returns boolean
if(not(IsUnitType(GetDyingUnit(),UNIT_TYPE_HERO)==true))then
return false
endif
return true
endfunction
function Trig_HeroDeath_Actions takes nothing returns nothing
call QuestMessageBJ(GetForceOfPlayer(GetOwningPlayer(GetDyingUnit())),bj_QUESTMESSAGE_UPDATED,"TRIGSTR_2957")
call TriggerSleepAction((I2R(GetHeroLevel(GetDyingUnit()))*5.00))
call ReviveHeroLoc(GetDyingUnit(),GetRectCenter(gg_rct_resp),true)
endfunction
function InitTrig_HeroDeath takes nothing returns nothing
set gg_trg_HeroDeath=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_HeroDeath,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(gg_trg_HeroDeath,Condition(function Trig_HeroDeath_Conditions))
call TriggerAddAction(gg_trg_HeroDeath,function Trig_HeroDeath_Actions)
endfunction
function Trig_mob_res_Actions takes nothing returns nothing
set udg_Level_of_mob=GetUnitLevel(GetDyingUnit())
call TriggerSleepAction((I2R(udg_Level_of_mob)*15.00))
call CreateNUnitsAtLoc(1,GetUnitTypeId(GetDyingUnit()),Player(PLAYER_NEUTRAL_AGGRESSIVE),GetUnitLoc(GetDyingUnit()),bj_UNIT_FACING)
endfunction
function InitTrig_mob_res takes nothing returns nothing
set gg_trg_mob_res=CreateTrigger()
call TriggerRegisterPlayerUnitEventSimple(gg_trg_mob_res,Player(PLAYER_NEUTRAL_AGGRESSIVE),EVENT_PLAYER_UNIT_DEATH)
call TriggerAddAction(gg_trg_mob_res,function Trig_mob_res_Actions)
endfunction
function Trig_DIPLOMATY_Func004001 takes nothing returns boolean
return(GetOwningPlayer(GetAttackedUnitBJ())!=Player(PLAYER_NEUTRAL_AGGRESSIVE))
endfunction
function Trig_DIPLOMATY_Func004002 takes nothing returns boolean
return(GetOwningPlayer(GetAttackedUnitBJ())!=Player(PLAYER_NEUTRAL_PASSIVE))
endfunction
function Trig_DIPLOMATY_Conditions takes nothing returns boolean
if(not GetBooleanAnd((GetOwningPlayer(GetAttackedUnitBJ())!=Player(PLAYER_NEUTRAL_AGGRESSIVE)),(GetOwningPlayer(GetAttackedUnitBJ())!=Player(PLAYER_NEUTRAL_PASSIVE))))then
return false
endif
return true
endfunction
function Trig_DIPLOMATY_Actions takes nothing returns nothing
call SetPlayerAllianceStateBJ(GetOwningPlayer(GetAttackedUnitBJ()),GetOwningPlayer(GetAttacker()),bj_ALLIANCE_UNALLIED)
call SetPlayerAllianceStateBJ(GetOwningPlayer(GetAttacker()),GetOwningPlayer(GetAttackedUnitBJ()),bj_ALLIANCE_UNALLIED)
call TriggerSleepAction(30.00)
endfunction
function InitTrig_DIPLOMATY takes nothing returns nothing
set gg_trg_DIPLOMATY=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_DIPLOMATY,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(gg_trg_DIPLOMATY,Condition(function Trig_DIPLOMATY_Conditions))
call TriggerAddAction(gg_trg_DIPLOMATY,function Trig_DIPLOMATY_Actions)
endfunction
function Trig_Chip_clother_Conditions takes nothing returns boolean
if(not(GetItemTypeId(GetItemOfTypeFromUnitBJ(udg_player1hero,0x49303030))==0x49303030))then
return false
endif
return true
endfunction
function Trig_Chip_clother_Func003C takes nothing returns boolean
if(not(GetHeroStatBJ(bj_HEROSTAT_STR,udg_player1hero,true)>=5))then
return false
endif
if(not(GetHeroStatBJ(bj_HEROSTAT_AGI,udg_player1hero,true)>=5))then
return false
endif
if(not(GetHeroStatBJ(bj_HEROSTAT_INT,udg_player1hero,true)>=5))then
return false
endif
return true
endfunction
function Trig_Chip_clother_Actions takes nothing returns nothing
if(Trig_Chip_clother_Func003C())then
call DoNothing()
else
call UnitRemoveItemSwapped(GetItemOfTypeFromUnitBJ(udg_player1hero,0x49303030),udg_player1hero)
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),udg_player1hero,GetHeroProperName(udg_player1hero),null,"TRIGSTR_1902",bj_TIMETYPE_ADD,0,true)
endif
endfunction
function InitTrig_Chip_clother takes nothing returns nothing
set gg_trg_Chip_clother=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(gg_trg_Chip_clother,2)
call TriggerAddCondition(gg_trg_Chip_clother,Condition(function Trig_Chip_clother_Conditions))
call TriggerAddAction(gg_trg_Chip_clother,function Trig_Chip_clother_Actions)
endfunction
function Trig_Black_Conditions takes nothing returns boolean
if(not(GetUnitTypeId(GetEnteringUnit())==GetUnitTypeId(udg_player1hero)))then
return false
endif
return true
endfunction
function Trig_Black_Actions takes nothing returns nothing
call ResetTerrainFogBJ()
call SetTerrainFogExBJ(0,0.00,2000.00,0,0.00,0.00,0.00)
endfunction
function InitTrig_Black takes nothing returns nothing
set gg_trg_Black=CreateTrigger()
call TriggerRegisterEnterRectSimple(gg_trg_Black,gg_rct_Region_015)
call TriggerAddCondition(gg_trg_Black,Condition(function Trig_Black_Conditions))
call TriggerAddAction(gg_trg_Black,function Trig_Black_Actions)
endfunction
function Trig_Blue_Conditions takes nothing returns boolean
if(not(GetUnitTypeId(GetEnteringUnit())==GetUnitTypeId(udg_player1hero)))then
return false
endif
return true
endfunction
function Trig_Blue_Actions takes nothing returns nothing
call ResetTerrainFogBJ()
call SetTerrainFogExBJ(0,0.00,4000.00,0.50,25.00,25.00,100.00)
endfunction
function InitTrig_Blue takes nothing returns nothing
set gg_trg_Blue=CreateTrigger()
call TriggerRegisterEnterRectSimple(gg_trg_Blue,gg_rct_Region_049)
call TriggerAddCondition(gg_trg_Blue,Condition(function Trig_Blue_Conditions))
call TriggerAddAction(gg_trg_Blue,function Trig_Blue_Actions)
endfunction
function Trig_Exp_Actions takes nothing returns nothing
call AddHeroXPSwapped(500,udg_player1hero,true)
endfunction
function InitTrig_Exp takes nothing returns nothing
set gg_trg_Exp=CreateTrigger()
call TriggerRegisterPlayerChatEvent(gg_trg_Exp,Player(0),"-exp",true)
call TriggerAddAction(gg_trg_Exp,function Trig_Exp_Actions)
endfunction
function Trig_Fog_1_Actions takes nothing returns nothing
call SetSkyModel("Environment\\Sky\\FelwoodSky\\FelwoodSky.mdl")
call FogEnableOn()
call SetTerrainFogExBJ(0,0.00,6000.00,0.50,99.00,99.00,99.00)
endfunction
function InitTrig_Fog_1 takes nothing returns nothing
set gg_trg_Fog_1=CreateTrigger()
call TriggerRegisterPlayerChatEvent(gg_trg_Fog_1,Player(0),"-fog 1",true)
call TriggerAddAction(gg_trg_Fog_1,function Trig_Fog_1_Actions)
endfunction
function Trig_Fog_2_Actions takes nothing returns nothing
call SetSkyModel("Environment\\Sky\\LordaeronSummerSky\\LordaeronSummerSky.mdl")
call FogEnableOn()
call SetTerrainFogExBJ(0,0.00,5000.00,0.50,50.00,50.00,100.00)
endfunction
function InitTrig_Fog_2 takes nothing returns nothing
set gg_trg_Fog_2=CreateTrigger()
call TriggerRegisterPlayerChatEvent(gg_trg_Fog_2,Player(0),"-fog 2",true)
call TriggerAddAction(gg_trg_Fog_2,function Trig_Fog_2_Actions)
endfunction
function Trig_Fog_3_Actions takes nothing returns nothing
call SetSkyModel("Environment\\Sky\\FoggedSky\\FoggedSky.mdl")
call FogEnableOff()
call SetTerrainFogExBJ(0,0.00,5000.00,0.50,50.00,100.00,25.00)
endfunction
function InitTrig_Fog_3 takes nothing returns nothing
set gg_trg_Fog_3=CreateTrigger()
call TriggerRegisterPlayerChatEvent(gg_trg_Fog_3,Player(0),"-fog 3",true)
call TriggerAddAction(gg_trg_Fog_3,function Trig_Fog_3_Actions)
endfunction
function Trig_N_speak_Actions takes nothing returns nothing
call TriggerSleepAction(2)
call DialogAddButtonBJ(udg_Naparnik_Ilven,"TRIGSTR_2995")
set udg_Nap_Ilven_Story=GetLastCreatedButtonBJ()
call DialogAddButtonBJ(udg_Naparnik_Ilven,"TRIGSTR_2968")
set udg_Nap_Ilven_Party=GetLastCreatedButtonBJ()
call DialogAddButtonBJ(udg_Naparnik_Ilven,"TRIGSTR_2996")
set udg_Nap_Ilven_BB=GetLastCreatedButtonBJ()
call DialogAddButtonBJ(udg_Naparnik_Orc,"TRIGSTR_3004")
set udg_Nap_Orc_Story=GetLastCreatedButtonBJ()
call DialogAddButtonBJ(udg_Naparnik_Orc,"TRIGSTR_3005")
set udg_Nap_Orc_Party=GetLastCreatedButtonBJ()
call DialogAddButtonBJ(udg_Naparnik_Orc,"TRIGSTR_3006")
set udg_Nap_Orc_Bb=GetLastCreatedButtonBJ()
endfunction
function InitTrig_N_speak takes nothing returns nothing
set gg_trg_N_speak=CreateTrigger()
call TriggerAddAction(gg_trg_N_speak,function Trig_N_speak_Actions)
endfunction
function Trig_Spawn_Func001C takes nothing returns boolean
if(not(GetUnitTypeId(udg_player1hero)==0x48303052))then
return false
endif
return true
endfunction
function Trig_Spawn_Func002C takes nothing returns boolean
if(not(GetUnitTypeId(udg_player1hero)==0x48303056))then
return false
endif
return true
endfunction
function Trig_Spawn_Func003C takes nothing returns boolean
if(not(GetUnitTypeId(udg_player1hero)==0x48303038))then
return false
endif
return true
endfunction
function Trig_Spawn_Func004C takes nothing returns boolean
if(not(GetUnitTypeId(udg_player1hero)==0x48303053))then
return false
endif
return true
endfunction
function Trig_Spawn_Func005C takes nothing returns boolean
if(not(GetUnitTypeId(udg_player1hero)==0x48303130))then
return false
endif
return true
endfunction
function Trig_Spawn_Func006C takes nothing returns boolean
if(not(GetUnitTypeId(udg_player1hero)==0x48303035))then
return false
endif
return true
endfunction
function Trig_Spawn_Actions takes nothing returns nothing
if(Trig_Spawn_Func001C())then
call CreateNUnitsAtLoc(1,0x48303056,Player(1),GetRandomLocInRect(gg_rct_sethero),bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,0x48303038,Player(2),GetRandomLocInRect(gg_rct_sethero),bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,0x48303053,Player(3),GetRandomLocInRect(gg_rct_sethero),bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,0x48303130,Player(4),GetRandomLocInRect(gg_rct_sethero),bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,0x48303035,Player(5),GetRandomLocInRect(gg_rct_sethero),bj_UNIT_FACING)
call KillUnit(gg_unit_e000_0075)
call KillUnit(gg_unit_e000_0076)
call KillUnit(gg_unit_e000_0077)
call KillUnit(gg_unit_e000_0078)
call KillUnit(gg_unit_e000_0074)
call DisableTrigger(GetTriggeringTrigger())
else
endif
if(Trig_Spawn_Func002C())then
call CreateNUnitsAtLoc(1,0x48303052,Player(1),GetRandomLocInRect(gg_rct_sethero),bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,0x48303038,Player(2),GetRandomLocInRect(gg_rct_sethero),bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,0x48303053,Player(3),GetRandomLocInRect(gg_rct_sethero),bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,0x48303130,Player(4),GetRandomLocInRect(gg_rct_sethero),bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,0x48303035,Player(5),GetRandomLocInRect(gg_rct_sethero),bj_UNIT_FACING)
call KillUnit(gg_unit_e000_0075)
call KillUnit(gg_unit_e000_0076)
call KillUnit(gg_unit_e000_0077)
call KillUnit(gg_unit_e000_0078)
call KillUnit(gg_unit_e000_0074)
call DisableTrigger(GetTriggeringTrigger())
else
endif
if(Trig_Spawn_Func003C())then
call CreateNUnitsAtLoc(1,0x48303056,Player(1),GetRandomLocInRect(gg_rct_sethero),bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,0x48303052,Player(2),GetRandomLocInRect(gg_rct_sethero),bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,0x48303053,Player(3),GetRandomLocInRect(gg_rct_sethero),bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,0x48303130,Player(4),GetRandomLocInRect(gg_rct_sethero),bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,0x48303035,Player(5),GetRandomLocInRect(gg_rct_sethero),bj_UNIT_FACING)
call KillUnit(gg_unit_e000_0075)
call KillUnit(gg_unit_e000_0076)
call KillUnit(gg_unit_e000_0077)
call KillUnit(gg_unit_e000_0078)
call KillUnit(gg_unit_e000_0074)
call DisableTrigger(GetTriggeringTrigger())
else
endif
if(Trig_Spawn_Func004C())then
call CreateNUnitsAtLoc(1,0x48303056,Player(1),GetRandomLocInRect(gg_rct_sethero),bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,0x48303038,Player(2),GetRandomLocInRect(gg_rct_sethero),bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,0x48303052,Player(3),GetRandomLocInRect(gg_rct_sethero),bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,0x48303130,Player(4),GetRandomLocInRect(gg_rct_sethero),bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,0x48303035,Player(5),GetRandomLocInRect(gg_rct_sethero),bj_UNIT_FACING)
call KillUnit(gg_unit_e000_0075)
call KillUnit(gg_unit_e000_0076)
call KillUnit(gg_unit_e000_0077)
call KillUnit(gg_unit_e000_0078)
call KillUnit(gg_unit_e000_0074)
call DisableTrigger(GetTriggeringTrigger())
else
endif
if(Trig_Spawn_Func005C())then
call CreateNUnitsAtLoc(1,0x48303056,Player(1),GetRandomLocInRect(gg_rct_sethero),bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,0x48303038,Player(2),GetRandomLocInRect(gg_rct_sethero),bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,0x48303053,Player(3),GetRandomLocInRect(gg_rct_sethero),bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,0x48303052,Player(4),GetRandomLocInRect(gg_rct_sethero),bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,0x48303035,Player(5),GetRandomLocInRect(gg_rct_sethero),bj_UNIT_FACING)
call KillUnit(gg_unit_e000_0075)
call KillUnit(gg_unit_e000_0076)
call KillUnit(gg_unit_e000_0077)
call KillUnit(gg_unit_e000_0078)
call KillUnit(gg_unit_e000_0074)
call DisableTrigger(GetTriggeringTrigger())
else
endif
if(Trig_Spawn_Func006C())then
call CreateNUnitsAtLoc(1,0x48303056,Player(1),GetRandomLocInRect(gg_rct_sethero),bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,0x48303038,Player(2),GetRandomLocInRect(gg_rct_sethero),bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,0x48303053,Player(3),GetRandomLocInRect(gg_rct_sethero),bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,0x48303130,Player(4),GetRandomLocInRect(gg_rct_sethero),bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,0x48303052,Player(5),GetRandomLocInRect(gg_rct_sethero),bj_UNIT_FACING)
call KillUnit(gg_unit_e000_0075)
call KillUnit(gg_unit_e000_0076)
call KillUnit(gg_unit_e000_0077)
call KillUnit(gg_unit_e000_0078)
call KillUnit(gg_unit_e000_0074)
call DisableTrigger(GetTriggeringTrigger())
else
endif
endfunction
function InitTrig_Spawn takes nothing returns nothing
set gg_trg_Spawn=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(gg_trg_Spawn,5.00)
call TriggerAddAction(gg_trg_Spawn,function Trig_Spawn_Actions)
endfunction
function Trig_Ilven_Func006001 takes nothing returns boolean
return(GetSpellAbilityId()==0x41303142)
endfunction
function Trig_Ilven_Func006002 takes nothing returns boolean
return(GetUnitTypeId(GetSpellTargetUnit())==0x48303038)
endfunction
function Trig_Ilven_Conditions takes nothing returns boolean
if(not GetBooleanAnd((GetSpellAbilityId()==0x41303142),(GetUnitTypeId(GetSpellTargetUnit())==0x48303038)))then
return false
endif
return true
endfunction
function Trig_Ilven_Func005A takes nothing returns nothing
call DialogDisplayBJ(true,udg_Naparnik_Ilven,GetEnumPlayer())
endfunction
function Trig_Ilven_Actions takes nothing returns nothing
set udg_Ilven=GetSpellTargetUnit()
call CinematicModeBJ(true,GetPlayersAll())
call SetUnitFacingToFaceUnitTimed(GetSpellTargetUnit(),GetSpellAbilityUnit(),0.50)
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),GetSpellTargetUnit(),GetHeroProperName(udg_Town_Speaker),gg_snd_Ilven___Hello,"TRIGSTR_2967",bj_TIMETYPE_ADD,0,true)
call ForForce(GetPlayersAll(),function Trig_Ilven_Func005A)
endfunction
function InitTrig_Ilven takes nothing returns nothing
set gg_trg_Ilven=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Ilven,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(gg_trg_Ilven,Condition(function Trig_Ilven_Conditions))
call TriggerAddAction(gg_trg_Ilven,function Trig_Ilven_Actions)
endfunction
function Trig_Orc_Func006001 takes nothing returns boolean
return(GetSpellAbilityId()==0x41303142)
endfunction
function Trig_Orc_Func006002 takes nothing returns boolean
return(GetUnitTypeId(GetSpellTargetUnit())==0x48303052)
endfunction
function Trig_Orc_Conditions takes nothing returns boolean
if(not GetBooleanAnd((GetSpellAbilityId()==0x41303142),(GetUnitTypeId(GetSpellTargetUnit())==0x48303052)))then
return false
endif
return true
endfunction
function Trig_Orc_Func005A takes nothing returns nothing
call DialogDisplayBJ(true,udg_Naparnik_Orc,GetEnumPlayer())
endfunction
function Trig_Orc_Actions takes nothing returns nothing
set udg_Orc=GetSpellTargetUnit()
call CinematicModeBJ(true,GetPlayersAll())
call SetUnitFacingToFaceUnitTimed(GetSpellTargetUnit(),GetSpellAbilityUnit(),0.50)
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),GetSpellTargetUnit(),GetHeroProperName(udg_Town_Speaker),gg_snd_Ilven___Hello,"TRIGSTR_3002",bj_TIMETYPE_ADD,0,true)
call ForForce(GetPlayersAll(),function Trig_Orc_Func005A)
endfunction
function InitTrig_Orc takes nothing returns nothing
set gg_trg_Orc=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Orc,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(gg_trg_Orc,Condition(function Trig_Orc_Conditions))
call TriggerAddAction(gg_trg_Orc,function Trig_Orc_Actions)
endfunction
function Trig_Human_Func006001 takes nothing returns boolean
return(GetSpellAbilityId()==0x41303142)
endfunction
function Trig_Human_Func006002 takes nothing returns boolean
return(GetUnitTypeId(GetSpellTargetUnit())==0x48303035)
endfunction
function Trig_Human_Conditions takes nothing returns boolean
if(not GetBooleanAnd((GetSpellAbilityId()==0x41303142),(GetUnitTypeId(GetSpellTargetUnit())==0x48303035)))then
return false
endif
return true
endfunction
function Trig_Human_Func005A takes nothing returns nothing
call DialogDisplayBJ(true,udg_Naparnik_Orc,GetEnumPlayer())
endfunction
function Trig_Human_Actions takes nothing returns nothing
set udg_Orc=GetSpellTargetUnit()
call CinematicModeBJ(true,GetPlayersAll())
call SetUnitFacingToFaceUnitTimed(GetSpellTargetUnit(),GetSpellAbilityUnit(),0.50)
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),GetSpellTargetUnit(),GetHeroProperName(udg_Town_Speaker),gg_snd_Ilven___Hello,"TRIGSTR_3015",bj_TIMETYPE_ADD,0,true)
call ForForce(GetPlayersAll(),function Trig_Human_Func005A)
endfunction
function InitTrig_Human takes nothing returns nothing
set gg_trg_Human=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Human,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(gg_trg_Human,Condition(function Trig_Human_Conditions))
call TriggerAddAction(gg_trg_Human,function Trig_Human_Actions)
endfunction
function Trig_Orc_Party_Conditions takes nothing returns boolean
if(not(GetClickedButtonBJ()==udg_Nap_Orc_Party))then
return false
endif
return true
endfunction
function Trig_Orc_Party_Actions takes nothing returns nothing
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),udg_Ilven,GetHeroProperName(udg_Orc),gg_snd_Ilven___Yes,"TRIGSTR_3003",bj_TIMETYPE_ADD,0,true)
call TriggerSleepAction(2)
call CinematicModeBJ(false,GetPlayersAll())
call IssueTargetOrderBJ(udg_Orc,"smart",udg_player1hero)
endfunction
function InitTrig_Orc_Party takes nothing returns nothing
set gg_trg_Orc_Party=CreateTrigger()
call TriggerRegisterDialogEventBJ(gg_trg_Orc_Party,udg_Naparnik_Orc)
call TriggerAddCondition(gg_trg_Orc_Party,Condition(function Trig_Orc_Party_Conditions))
call TriggerAddAction(gg_trg_Orc_Party,function Trig_Orc_Party_Actions)
endfunction
function Trig_Orc_Story_Conditions takes nothing returns boolean
if(not(GetClickedButtonBJ()==udg_Nap_Orc_Story))then
return false
endif
return true
endfunction
function Trig_Orc_Story_Actions takes nothing returns nothing
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),udg_Orc,GetHeroProperName(udg_Orc),gg_snd_Ilven___Yes,"TRIGSTR_3008",bj_TIMETYPE_ADD,0,true)
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),udg_Orc,GetHeroProperName(udg_Orc),null,"TRIGSTR_3009",bj_TIMETYPE_ADD,0,true)
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),udg_Orc,GetHeroProperName(udg_Orc),null,"TRIGSTR_3010",bj_TIMETYPE_ADD,0,true)
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),udg_Orc,GetHeroProperName(udg_Orc),null,"TRIGSTR_3011",bj_TIMETYPE_ADD,0,true)
call TriggerSleepAction(2)
call DialogDisplayBJ(true,udg_Naparnik_Orc,Player(0))
endfunction
function InitTrig_Orc_Story takes nothing returns nothing
set gg_trg_Orc_Story=CreateTrigger()
call TriggerRegisterDialogEventBJ(gg_trg_Orc_Story,udg_Naparnik_Orc)
call TriggerAddCondition(gg_trg_Orc_Story,Condition(function Trig_Orc_Story_Conditions))
call TriggerAddAction(gg_trg_Orc_Story,function Trig_Orc_Story_Actions)
endfunction
function Trig_Orc_Bb_Conditions takes nothing returns boolean
if(not(GetClickedButtonBJ()==udg_Nap_Orc_Bb))then
return false
endif
return true
endfunction
function Trig_Orc_Bb_Actions takes nothing returns nothing
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),udg_Orc,GetHeroProperName(udg_Orc),gg_snd_Ilven___Yes,"TRIGSTR_3012",bj_TIMETYPE_ADD,0,true)
call TriggerSleepAction(2)
call CinematicModeBJ(false,GetPlayersAll())
endfunction
function InitTrig_Orc_Bb takes nothing returns nothing
set gg_trg_Orc_Bb=CreateTrigger()
call TriggerRegisterDialogEventBJ(gg_trg_Orc_Bb,udg_Naparnik_Orc)
call TriggerAddCondition(gg_trg_Orc_Bb,Condition(function Trig_Orc_Bb_Conditions))
call TriggerAddAction(gg_trg_Orc_Bb,function Trig_Orc_Bb_Actions)
endfunction
function Trig_Ilven_Party_Conditions takes nothing returns boolean
if(not(GetClickedButtonBJ()==udg_Nap_Ilven_Party))then
return false
endif
return true
endfunction
function Trig_Ilven_Party_Actions takes nothing returns nothing
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),udg_Ilven,GetHeroProperName(udg_Ilven),gg_snd_Ilven___Yes,"TRIGSTR_2981",bj_TIMETYPE_ADD,0,true)
call TriggerSleepAction(2)
call CinematicModeBJ(false,GetPlayersAll())
call IssueTargetOrderBJ(udg_Ilven,"smart",udg_player1hero)
endfunction
function InitTrig_Ilven_Party takes nothing returns nothing
set gg_trg_Ilven_Party=CreateTrigger()
call TriggerRegisterDialogEventBJ(gg_trg_Ilven_Party,udg_Naparnik_Ilven)
call TriggerAddCondition(gg_trg_Ilven_Party,Condition(function Trig_Ilven_Party_Conditions))
call TriggerAddAction(gg_trg_Ilven_Party,function Trig_Ilven_Party_Actions)
endfunction
function Trig_Ilven_Story_Conditions takes nothing returns boolean
if(not(GetClickedButtonBJ()==udg_Nap_Ilven_Story))then
return false
endif
return true
endfunction
function Trig_Ilven_Story_Actions takes nothing returns nothing
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),udg_Ilven,GetHeroProperName(udg_Ilven),gg_snd_Ilven___Yes,"TRIGSTR_2997",bj_TIMETYPE_ADD,0,true)
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),udg_Ilven,GetHeroProperName(udg_Ilven),null,"TRIGSTR_2998",bj_TIMETYPE_ADD,0,true)
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),udg_Ilven,GetHeroProperName(udg_Ilven),null,"TRIGSTR_2999",bj_TIMETYPE_ADD,0,true)
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),udg_Ilven,GetHeroProperName(udg_Ilven),null,"TRIGSTR_3000",bj_TIMETYPE_ADD,0,true)
call TriggerSleepAction(2)
call DialogDisplayBJ(true,udg_Naparnik_Ilven,Player(0))
endfunction
function InitTrig_Ilven_Story takes nothing returns nothing
set gg_trg_Ilven_Story=CreateTrigger()
call TriggerRegisterDialogEventBJ(gg_trg_Ilven_Story,udg_Naparnik_Ilven)
call TriggerAddCondition(gg_trg_Ilven_Story,Condition(function Trig_Ilven_Story_Conditions))
call TriggerAddAction(gg_trg_Ilven_Story,function Trig_Ilven_Story_Actions)
endfunction
function Trig_Ilven_Bb_Conditions takes nothing returns boolean
if(not(GetClickedButtonBJ()==udg_Nap_Ilven_BB))then
return false
endif
return true
endfunction
function Trig_Ilven_Bb_Actions takes nothing returns nothing
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),udg_Ilven,GetHeroProperName(udg_Ilven),gg_snd_Ilven___Yes,"TRIGSTR_3001",bj_TIMETYPE_ADD,0,true)
call TriggerSleepAction(2)
call CinematicModeBJ(false,GetPlayersAll())
endfunction
function InitTrig_Ilven_Bb takes nothing returns nothing
set gg_trg_Ilven_Bb=CreateTrigger()
call TriggerRegisterDialogEventBJ(gg_trg_Ilven_Bb,udg_Naparnik_Ilven)
call TriggerAddCondition(gg_trg_Ilven_Bb,Condition(function Trig_Ilven_Bb_Conditions))
call TriggerAddAction(gg_trg_Ilven_Bb,function Trig_Ilven_Bb_Actions)
endfunction
function Trig_Wolf_lvl1_res_Conditions takes nothing returns boolean
if(not(GetUnitTypeId(GetDyingUnit())==0x68303138))then
return false
endif
return true
endfunction
function Trig_Wolf_lvl1_res_Actions takes nothing returns nothing
call QuestMessageBJ(GetPlayersAll(),bj_QUESTMESSAGE_UPDATED,(GetPlayerName(GetOwningPlayer(GetDyingUnit()))+", ваш питомец умер, и возродится через 15 секунд возле друида-торговца!"))
call TriggerSleepAction(15.00)
call CreateNUnitsAtLoc(1,0x68303138,GetOwningPlayer(GetDyingUnit()),GetRectCenter(gg_rct_Region_042),bj_UNIT_FACING)
endfunction
function InitTrig_Wolf_lvl1_res takes nothing returns nothing
set gg_trg_Wolf_lvl1_res=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Wolf_lvl1_res,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(gg_trg_Wolf_lvl1_res,Condition(function Trig_Wolf_lvl1_res_Conditions))
call TriggerAddAction(gg_trg_Wolf_lvl1_res,function Trig_Wolf_lvl1_res_Actions)
endfunction
function Trig_Wolf_lvl2_res_Conditions takes nothing returns boolean
if(not(GetUnitTypeId(GetDyingUnit())==0x68303139))then
return false
endif
return true
endfunction
function Trig_Wolf_lvl2_res_Actions takes nothing returns nothing
call QuestMessageBJ(GetPlayersAll(),bj_QUESTMESSAGE_UPDATED,(GetPlayerName(GetOwningPlayer(GetDyingUnit()))+", ваш питомец умер, и возродится через 15 секунд возле друида-торговца!"))
call TriggerSleepAction(15.00)
call CreateNUnitsAtLoc(1,0x68303138,GetOwningPlayer(GetDyingUnit()),GetRectCenter(gg_rct_Region_042),bj_UNIT_FACING)
endfunction
function InitTrig_Wolf_lvl2_res takes nothing returns nothing
set gg_trg_Wolf_lvl2_res=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Wolf_lvl2_res,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(gg_trg_Wolf_lvl2_res,Condition(function Trig_Wolf_lvl2_res_Conditions))
call TriggerAddAction(gg_trg_Wolf_lvl2_res,function Trig_Wolf_lvl2_res_Actions)
endfunction
function Trig_Wolf_lvl3_res_Conditions takes nothing returns boolean
if(not(GetUnitTypeId(GetDyingUnit())==0x68303141))then
return false
endif
return true
endfunction
function Trig_Wolf_lvl3_res_Actions takes nothing returns nothing
call QuestMessageBJ(GetPlayersAll(),bj_QUESTMESSAGE_UPDATED,(GetPlayerName(GetOwningPlayer(GetDyingUnit()))+", ваш питомец умер, и возродится через 15 секунд возле друида-торговца!"))
call TriggerSleepAction(15.00)
call CreateNUnitsAtLoc(1,0x68303138,GetOwningPlayer(GetDyingUnit()),GetRectCenter(gg_rct_Region_042),bj_UNIT_FACING)
endfunction
function InitTrig_Wolf_lvl3_res takes nothing returns nothing
set gg_trg_Wolf_lvl3_res=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Wolf_lvl3_res,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(gg_trg_Wolf_lvl3_res,Condition(function Trig_Wolf_lvl3_res_Conditions))
call TriggerAddAction(gg_trg_Wolf_lvl3_res,function Trig_Wolf_lvl3_res_Actions)
endfunction
function Trig_Wolf_lvl4_res_Conditions takes nothing returns boolean
if(not(GetUnitTypeId(GetDyingUnit())==0x68303142))then
return false
endif
return true
endfunction
function Trig_Wolf_lvl4_res_Actions takes nothing returns nothing
call QuestMessageBJ(GetPlayersAll(),bj_QUESTMESSAGE_UPDATED,(GetPlayerName(GetOwningPlayer(GetDyingUnit()))+", ваш питомец умер, и возродится через 15 секунд возле друида-торговца!"))
call TriggerSleepAction(15.00)
call CreateNUnitsAtLoc(1,0x68303138,GetOwningPlayer(GetDyingUnit()),GetRectCenter(gg_rct_Region_042),bj_UNIT_FACING)
endfunction
function InitTrig_Wolf_lvl4_res takes nothing returns nothing
set gg_trg_Wolf_lvl4_res=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Wolf_lvl4_res,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(gg_trg_Wolf_lvl4_res,Condition(function Trig_Wolf_lvl4_res_Conditions))
call TriggerAddAction(gg_trg_Wolf_lvl4_res,function Trig_Wolf_lvl4_res_Actions)
endfunction
function Trig_wolf_evolution_1_Func001C takes nothing returns boolean
if(not(udg_P1_pet_exp>=5))then
return false
endif
return true
endfunction
function Trig_wolf_evolution_1_Actions takes nothing returns nothing
if(Trig_wolf_evolution_1_Func001C())then
call SetUnitOwner(udg_P1_pet,Player(PLAYER_NEUTRAL_PASSIVE),true)
call SetUnitPositionLoc(udg_P1_pet,GetRectCenter(gg_rct_Region_037))
call KillUnit(udg_P1_pet)
call CreateNUnitsAtLoc(1,0x68303139,Player(0),GetUnitLoc(udg_P1_pet),bj_UNIT_FACING)
set udg_P1_pet=GetLastCreatedUnit()
call AddSpecialEffectTargetUnitBJ("overhead",udg_P1_pet,"Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl")
call TriggerSleepAction(2)
call DestroyEffectBJ(GetLastCreatedEffectBJ())
call DisableTrigger(GetTriggeringTrigger())
else
call DoNothing()
endif
endfunction
function InitTrig_wolf_evolution_1 takes nothing returns nothing
set gg_trg_wolf_evolution_1=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(gg_trg_wolf_evolution_1,1.00)
call TriggerAddAction(gg_trg_wolf_evolution_1,function Trig_wolf_evolution_1_Actions)
endfunction
function Trig_wolf_evolution_2_Func001C takes nothing returns boolean
if(not(udg_P1_pet_exp>=25))then
return false
endif
return true
endfunction
function Trig_wolf_evolution_2_Actions takes nothing returns nothing
if(Trig_wolf_evolution_2_Func001C())then
call SetUnitOwner(udg_P1_pet,Player(PLAYER_NEUTRAL_PASSIVE),true)
call SetUnitPositionLoc(udg_P1_pet,GetRectCenter(gg_rct_Region_037))
call KillUnit(udg_P1_pet)
call CreateNUnitsAtLoc(1,0x68303141,Player(0),GetUnitLoc(udg_P1_pet),bj_UNIT_FACING)
set udg_P1_pet=GetLastCreatedUnit()
call AddSpecialEffectTargetUnitBJ("overhead",udg_P1_pet,"Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl")
call TriggerSleepAction(2)
call DestroyEffectBJ(GetLastCreatedEffectBJ())
call DisableTrigger(GetTriggeringTrigger())
else
call DoNothing()
endif
endfunction
function InitTrig_wolf_evolution_2 takes nothing returns nothing
set gg_trg_wolf_evolution_2=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(gg_trg_wolf_evolution_2,1.00)
call TriggerAddAction(gg_trg_wolf_evolution_2,function Trig_wolf_evolution_2_Actions)
endfunction
function Trig_wolf_evolution_3_Func001C takes nothing returns boolean
if(not(udg_P1_pet_exp>=50))then
return false
endif
return true
endfunction
function Trig_wolf_evolution_3_Actions takes nothing returns nothing
if(Trig_wolf_evolution_3_Func001C())then
call SetUnitOwner(udg_P1_pet,Player(PLAYER_NEUTRAL_PASSIVE),true)
call SetUnitPositionLoc(udg_P1_pet,GetRectCenter(gg_rct_Region_037))
call KillUnit(udg_P1_pet)
call CreateNUnitsAtLoc(1,0x68303142,Player(0),GetUnitLoc(udg_P1_pet),bj_UNIT_FACING)
set udg_P1_pet=GetLastCreatedUnit()
call AddSpecialEffectTargetUnitBJ("overhead",udg_P1_pet,"Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl")
call TriggerSleepAction(2)
call DestroyEffectBJ(GetLastCreatedEffectBJ())
call DisableTrigger(GetTriggeringTrigger())
else
call DoNothing()
endif
endfunction
function InitTrig_wolf_evolution_3 takes nothing returns nothing
set gg_trg_wolf_evolution_3=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(gg_trg_wolf_evolution_3,1.00)
call TriggerAddAction(gg_trg_wolf_evolution_3,function Trig_wolf_evolution_3_Actions)
endfunction
function Trig_wolf_evolution_4_Func001C takes nothing returns boolean
if(not(udg_P1_pet_exp>=100))then
return false
endif
return true
endfunction
function Trig_wolf_evolution_4_Actions takes nothing returns nothing
if(Trig_wolf_evolution_4_Func001C())then
call SetUnitOwner(udg_P1_pet,Player(PLAYER_NEUTRAL_PASSIVE),true)
call SetUnitPositionLoc(udg_P1_pet,GetRectCenter(gg_rct_Region_037))
call KillUnit(udg_P1_pet)
call CreateNUnitsAtLoc(1,0x68303143,Player(0),GetUnitLoc(udg_P1_pet),bj_UNIT_FACING)
set udg_P1_pet=GetLastCreatedUnit()
call AddSpecialEffectTargetUnitBJ("overhead",udg_P1_pet,"Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl")
call TriggerSleepAction(2)
call DestroyEffectBJ(GetLastCreatedEffectBJ())
call DisableTrigger(GetTriggeringTrigger())
else
call DoNothing()
endif
endfunction
function InitTrig_wolf_evolution_4 takes nothing returns nothing
set gg_trg_wolf_evolution_4=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(gg_trg_wolf_evolution_4,1.00)
call TriggerAddAction(gg_trg_wolf_evolution_4,function Trig_wolf_evolution_4_Actions)
endfunction
function Trig_Set_player_pet_Func001Func002Func001Func001Func001Func001Func001C takes nothing returns boolean
if(not(GetOwningPlayer(GetBuyingUnit())==Player(5)))then
return false
endif
return true
endfunction
function Trig_Set_player_pet_Func001Func002Func001Func001Func001Func001C takes nothing returns boolean
if(not(GetOwningPlayer(GetBuyingUnit())==Player(4)))then
return false
endif
return true
endfunction
function Trig_Set_player_pet_Func001Func002Func001Func001Func001C takes nothing returns boolean
if(not(GetOwningPlayer(GetBuyingUnit())==Player(3)))then
return false
endif
return true
endfunction
function Trig_Set_player_pet_Func001Func002Func001Func001C takes nothing returns boolean
if(not(GetOwningPlayer(GetBuyingUnit())==Player(2)))then
return false
endif
return true
endfunction
function Trig_Set_player_pet_Func001Func002Func001C takes nothing returns boolean
if(not(GetOwningPlayer(GetBuyingUnit())==Player(1)))then
return false
endif
return true
endfunction
function Trig_Set_player_pet_Func001Func002C takes nothing returns boolean
if(not(GetOwningPlayer(GetBuyingUnit())==Player(0)))then
return false
endif
return true
endfunction
function Trig_Set_player_pet_Func001C takes nothing returns boolean
if(not(GetUnitTypeId(GetSoldUnit())==0x68303138))then
return false
endif
return true
endfunction
function Trig_Set_player_pet_Actions takes nothing returns nothing
if(Trig_Set_player_pet_Func001C())then
if(Trig_Set_player_pet_Func001Func002C())then
set udg_P1_pet=GetSoldUnit()
else
if(Trig_Set_player_pet_Func001Func002Func001C())then
set udg_P2_pet=GetSoldUnit()
else
if(Trig_Set_player_pet_Func001Func002Func001Func001C())then
set udg_P3_pet=GetSoldUnit()
else
if(Trig_Set_player_pet_Func001Func002Func001Func001Func001C())then
set udg_P4_pet=GetSoldUnit()
else
if(Trig_Set_player_pet_Func001Func002Func001Func001Func001Func001C())then
set udg_P5_pet=GetSoldUnit()
else
if(Trig_Set_player_pet_Func001Func002Func001Func001Func001Func001Func001C())then
set udg_P6_pet=GetSoldUnit()
else
call DoNothing()
endif
endif
endif
endif
endif
endif
else
call DoNothing()
endif
endfunction
function InitTrig_Set_player_pet takes nothing returns nothing
set gg_trg_Set_player_pet=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Set_player_pet,EVENT_PLAYER_UNIT_SELL)
call TriggerAddAction(gg_trg_Set_player_pet,function Trig_Set_player_pet_Actions)
endfunction
function Trig_Wolf_lvl1_stat_Conditions takes nothing returns boolean
if(not(GetUnitTypeId(GetKillingUnitBJ())==0x68303138))then
return false
endif
return true
endfunction
function Trig_Wolf_lvl1_stat_Func001Func002Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if(not(GetUnitTypeId(GetDyingUnit())==0x6E303041))then
return false
endif
return true
endfunction
function Trig_Wolf_lvl1_stat_Func001Func002Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if(not(GetUnitTypeId(GetDyingUnit())==0x6E303039))then
return false
endif
return true
endfunction
function Trig_Wolf_lvl1_stat_Func001Func002Func001Func001Func001Func001Func001C takes nothing returns boolean
if(not(GetUnitTypeId(GetDyingUnit())==0x6E303037))then
return false
endif
return true
endfunction
function Trig_Wolf_lvl1_stat_Func001Func002Func001Func001Func001Func001C takes nothing returns boolean
if(not(GetUnitTypeId(GetDyingUnit())==0x6E303035))then
return false
endif
return true
endfunction
function Trig_Wolf_lvl1_stat_Func001Func002Func001Func001Func001C takes nothing returns boolean
if(not(GetUnitTypeId(GetDyingUnit())==0x6E303036))then
return false
endif
return true
endfunction
function Trig_Wolf_lvl1_stat_Func001Func002Func001Func001C takes nothing returns boolean
if(not(GetUnitTypeId(GetDyingUnit())==0x6E303034))then
return false
endif
return true
endfunction
function Trig_Wolf_lvl1_stat_Func001Func002Func001C takes nothing returns boolean
if(not(GetUnitTypeId(GetDyingUnit())==0x6E303030))then
return false
endif
return true
endfunction
function Trig_Wolf_lvl1_stat_Func001Func002C takes nothing returns boolean
if(not(GetUnitTypeId(GetDyingUnit())==0x6E303033))then
return false
endif
return true
endfunction
function Trig_Wolf_lvl1_stat_Func001C takes nothing returns boolean
if(not(GetOwningPlayer(GetKillingUnitBJ())==Player(0)))then
return false
endif
return true
endfunction
function Trig_Wolf_lvl1_stat_Actions takes nothing returns nothing
if(Trig_Wolf_lvl1_stat_Func001C())then
if(Trig_Wolf_lvl1_stat_Func001Func002C())then
set udg_P1_pet_exp=(udg_P1_pet_exp+1)
call QuestMessageBJ(bj_FORCE_PLAYER[0],bj_QUESTMESSAGE_UPDATED,("Опыт вашего питомца: "+I2S(udg_P1_pet_exp)))
else
if(Trig_Wolf_lvl1_stat_Func001Func002Func001C())then
set udg_P1_pet_exp=(udg_P1_pet_exp+2)
call QuestMessageBJ(bj_FORCE_PLAYER[0],bj_QUESTMESSAGE_UPDATED,("Опыт вашего питомца: "+I2S(udg_P1_pet_exp)))
else
if(Trig_Wolf_lvl1_stat_Func001Func002Func001Func001C())then
set udg_P1_pet_exp=(udg_P1_pet_exp+3)
call QuestMessageBJ(bj_FORCE_PLAYER[0],bj_QUESTMESSAGE_UPDATED,("Опыт вашего питомца: "+I2S(udg_P1_pet_exp)))
else
if(Trig_Wolf_lvl1_stat_Func001Func002Func001Func001Func001C())then
set udg_P1_pet_exp=(udg_P1_pet_exp+4)
call QuestMessageBJ(bj_FORCE_PLAYER[0],bj_QUESTMESSAGE_UPDATED,("Опыт вашего питомца: "+I2S(udg_P1_pet_exp)))
else
if(Trig_Wolf_lvl1_stat_Func001Func002Func001Func001Func001Func001C())then
set udg_P1_pet_exp=(udg_P1_pet_exp+5)
call QuestMessageBJ(bj_FORCE_PLAYER[0],bj_QUESTMESSAGE_UPDATED,("Опыт вашего питомца: "+I2S(udg_P1_pet_exp)))
else
if(Trig_Wolf_lvl1_stat_Func001Func002Func001Func001Func001Func001Func001C())then
set udg_P1_pet_exp=(udg_P1_pet_exp+6)
call QuestMessageBJ(bj_FORCE_PLAYER[0],bj_QUESTMESSAGE_UPDATED,("Опыт вашего питомца: "+I2S(udg_P1_pet_exp)))
else
if(Trig_Wolf_lvl1_stat_Func001Func002Func001Func001Func001Func001Func001Func001C())then
set udg_P1_pet_exp=(udg_P1_pet_exp+7)
call QuestMessageBJ(bj_FORCE_PLAYER[0],bj_QUESTMESSAGE_UPDATED,("Опыт вашего питомца: "+I2S(udg_P1_pet_exp)))
else
if(Trig_Wolf_lvl1_stat_Func001Func002Func001Func001Func001Func001Func001Func001Func001C())then
set udg_P1_pet_exp=(udg_P1_pet_exp+8)
call QuestMessageBJ(bj_FORCE_PLAYER[0],bj_QUESTMESSAGE_UPDATED,("Опыт вашего питомца: "+I2S(udg_P1_pet_exp)))
else
endif
endif
endif
endif
endif
endif
endif
endif
else
call DoNothing()
endif
endfunction
function InitTrig_Wolf_lvl1_stat takes nothing returns nothing
set gg_trg_Wolf_lvl1_stat=CreateTrigger()
call TriggerRegisterPlayerUnitEventSimple(gg_trg_Wolf_lvl1_stat,Player(PLAYER_NEUTRAL_AGGRESSIVE),EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(gg_trg_Wolf_lvl1_stat,Condition(function Trig_Wolf_lvl1_stat_Conditions))
call TriggerAddAction(gg_trg_Wolf_lvl1_stat,function Trig_Wolf_lvl1_stat_Actions)
endfunction
function Trig_Wolf_lvl2_stat_Conditions takes nothing returns boolean
if(not(GetUnitTypeId(GetKillingUnitBJ())==0x68303139))then
return false
endif
return true
endfunction
function Trig_Wolf_lvl2_stat_Func001Func002Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if(not(GetUnitTypeId(GetDyingUnit())==0x6E303041))then
return false
endif
return true
endfunction
function Trig_Wolf_lvl2_stat_Func001Func002Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if(not(GetUnitTypeId(GetDyingUnit())==0x6E303039))then
return false
endif
return true
endfunction
function Trig_Wolf_lvl2_stat_Func001Func002Func001Func001Func001Func001Func001C takes nothing returns boolean
if(not(GetUnitTypeId(GetDyingUnit())==0x6E303037))then
return false
endif
return true
endfunction
function Trig_Wolf_lvl2_stat_Func001Func002Func001Func001Func001Func001C takes nothing returns boolean
if(not(GetUnitTypeId(GetDyingUnit())==0x6E303035))then
return false
endif
return true
endfunction
function Trig_Wolf_lvl2_stat_Func001Func002Func001Func001Func001C takes nothing returns boolean
if(not(GetUnitTypeId(GetDyingUnit())==0x6E303036))then
return false
endif
return true
endfunction
function Trig_Wolf_lvl2_stat_Func001Func002Func001Func001C takes nothing returns boolean
if(not(GetUnitTypeId(GetDyingUnit())==0x6E303034))then
return false
endif
return true
endfunction
function Trig_Wolf_lvl2_stat_Func001Func002Func001C takes nothing returns boolean
if(not(GetUnitTypeId(GetDyingUnit())==0x6E303030))then
return false
endif
return true
endfunction
function Trig_Wolf_lvl2_stat_Func001Func002C takes nothing returns boolean
if(not(GetUnitTypeId(GetDyingUnit())==0x6E303033))then
return false
endif
return true
endfunction
function Trig_Wolf_lvl2_stat_Func001C takes nothing returns boolean
if(not(GetOwningPlayer(GetKillingUnitBJ())==Player(0)))then
return false
endif
return true
endfunction
function Trig_Wolf_lvl2_stat_Actions takes nothing returns nothing
if(Trig_Wolf_lvl2_stat_Func001C())then
if(Trig_Wolf_lvl2_stat_Func001Func002C())then
set udg_P1_pet_exp=(udg_P1_pet_exp+1)
call QuestMessageBJ(bj_FORCE_PLAYER[0],bj_QUESTMESSAGE_UPDATED,("Опыт вашего питомца: "+I2S(udg_P1_pet_exp)))
else
if(Trig_Wolf_lvl2_stat_Func001Func002Func001C())then
set udg_P1_pet_exp=(udg_P1_pet_exp+2)
call QuestMessageBJ(bj_FORCE_PLAYER[0],bj_QUESTMESSAGE_UPDATED,("Опыт вашего питомца: "+I2S(udg_P1_pet_exp)))
else
if(Trig_Wolf_lvl2_stat_Func001Func002Func001Func001C())then
set udg_P1_pet_exp=(udg_P1_pet_exp+3)
call QuestMessageBJ(bj_FORCE_PLAYER[0],bj_QUESTMESSAGE_UPDATED,("Опыт вашего питомца: "+I2S(udg_P1_pet_exp)))
else
if(Trig_Wolf_lvl2_stat_Func001Func002Func001Func001Func001C())then
set udg_P1_pet_exp=(udg_P1_pet_exp+4)
call QuestMessageBJ(bj_FORCE_PLAYER[0],bj_QUESTMESSAGE_UPDATED,("Опыт вашего питомца: "+I2S(udg_P1_pet_exp)))
else
if(Trig_Wolf_lvl2_stat_Func001Func002Func001Func001Func001Func001C())then
set udg_P1_pet_exp=(udg_P1_pet_exp+5)
call QuestMessageBJ(bj_FORCE_PLAYER[0],bj_QUESTMESSAGE_UPDATED,("Опыт вашего питомца: "+I2S(udg_P1_pet_exp)))
else
if(Trig_Wolf_lvl2_stat_Func001Func002Func001Func001Func001Func001Func001C())then
set udg_P1_pet_exp=(udg_P1_pet_exp+6)
call QuestMessageBJ(bj_FORCE_PLAYER[0],bj_QUESTMESSAGE_UPDATED,("Опыт вашего питомца: "+I2S(udg_P1_pet_exp)))
else
if(Trig_Wolf_lvl2_stat_Func001Func002Func001Func001Func001Func001Func001Func001C())then
set udg_P1_pet_exp=(udg_P1_pet_exp+7)
call QuestMessageBJ(bj_FORCE_PLAYER[0],bj_QUESTMESSAGE_UPDATED,("Опыт вашего питомца: "+I2S(udg_P1_pet_exp)))
else
if(Trig_Wolf_lvl2_stat_Func001Func002Func001Func001Func001Func001Func001Func001Func001C())then
set udg_P1_pet_exp=(udg_P1_pet_exp+8)
call QuestMessageBJ(bj_FORCE_PLAYER[0],bj_QUESTMESSAGE_UPDATED,("Опыт вашего питомца: "+I2S(udg_P1_pet_exp)))
else
endif
endif
endif
endif
endif
endif
endif
endif
else
call DoNothing()
endif
endfunction
function InitTrig_Wolf_lvl2_stat takes nothing returns nothing
set gg_trg_Wolf_lvl2_stat=CreateTrigger()
call TriggerRegisterPlayerUnitEventSimple(gg_trg_Wolf_lvl2_stat,Player(PLAYER_NEUTRAL_AGGRESSIVE),EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(gg_trg_Wolf_lvl2_stat,Condition(function Trig_Wolf_lvl2_stat_Conditions))
call TriggerAddAction(gg_trg_Wolf_lvl2_stat,function Trig_Wolf_lvl2_stat_Actions)
endfunction
function Trig_Wolf_lvl3_stat_Conditions takes nothing returns boolean
if(not(GetUnitTypeId(GetKillingUnitBJ())==0x68303141))then
return false
endif
return true
endfunction
function Trig_Wolf_lvl3_stat_Func001Func002Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if(not(GetUnitTypeId(GetDyingUnit())==0x6E303041))then
return false
endif
return true
endfunction
function Trig_Wolf_lvl3_stat_Func001Func002Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if(not(GetUnitTypeId(GetDyingUnit())==0x6E303039))then
return false
endif
return true
endfunction
function Trig_Wolf_lvl3_stat_Func001Func002Func001Func001Func001Func001Func001C takes nothing returns boolean
if(not(GetUnitTypeId(GetDyingUnit())==0x6E303037))then
return false
endif
return true
endfunction
function Trig_Wolf_lvl3_stat_Func001Func002Func001Func001Func001Func001C takes nothing returns boolean
if(not(GetUnitTypeId(GetDyingUnit())==0x6E303035))then
return false
endif
return true
endfunction
function Trig_Wolf_lvl3_stat_Func001Func002Func001Func001Func001C takes nothing returns boolean
if(not(GetUnitTypeId(GetDyingUnit())==0x6E303036))then
return false
endif
return true
endfunction
function Trig_Wolf_lvl3_stat_Func001Func002Func001Func001C takes nothing returns boolean
if(not(GetUnitTypeId(GetDyingUnit())==0x6E303034))then
return false
endif
return true
endfunction
function Trig_Wolf_lvl3_stat_Func001Func002Func001C takes nothing returns boolean
if(not(GetUnitTypeId(GetDyingUnit())==0x6E303030))then
return false
endif
return true
endfunction
function Trig_Wolf_lvl3_stat_Func001Func002C takes nothing returns boolean
if(not(GetUnitTypeId(GetDyingUnit())==0x6E303033))then
return false
endif
return true
endfunction
function Trig_Wolf_lvl3_stat_Func001C takes nothing returns boolean
if(not(GetOwningPlayer(GetKillingUnitBJ())==Player(0)))then
return false
endif
return true
endfunction
function Trig_Wolf_lvl3_stat_Actions takes nothing returns nothing
if(Trig_Wolf_lvl3_stat_Func001C())then
if(Trig_Wolf_lvl3_stat_Func001Func002C())then
set udg_P1_pet_exp=(udg_P1_pet_exp+1)
call QuestMessageBJ(bj_FORCE_PLAYER[0],bj_QUESTMESSAGE_UPDATED,("Опыт вашего питомца: "+I2S(udg_P1_pet_exp)))
else
if(Trig_Wolf_lvl3_stat_Func001Func002Func001C())then
set udg_P1_pet_exp=(udg_P1_pet_exp+2)
call QuestMessageBJ(bj_FORCE_PLAYER[0],bj_QUESTMESSAGE_UPDATED,("Опыт вашего питомца: "+I2S(udg_P1_pet_exp)))
else
if(Trig_Wolf_lvl3_stat_Func001Func002Func001Func001C())then
set udg_P1_pet_exp=(udg_P1_pet_exp+3)
call QuestMessageBJ(bj_FORCE_PLAYER[0],bj_QUESTMESSAGE_UPDATED,("Опыт вашего питомца: "+I2S(udg_P1_pet_exp)))
else
if(Trig_Wolf_lvl3_stat_Func001Func002Func001Func001Func001C())then
set udg_P1_pet_exp=(udg_P1_pet_exp+4)
call QuestMessageBJ(bj_FORCE_PLAYER[0],bj_QUESTMESSAGE_UPDATED,("Опыт вашего питомца: "+I2S(udg_P1_pet_exp)))
else
if(Trig_Wolf_lvl3_stat_Func001Func002Func001Func001Func001Func001C())then
set udg_P1_pet_exp=(udg_P1_pet_exp+5)
call QuestMessageBJ(bj_FORCE_PLAYER[0],bj_QUESTMESSAGE_UPDATED,("Опыт вашего питомца: "+I2S(udg_P1_pet_exp)))
else
if(Trig_Wolf_lvl3_stat_Func001Func002Func001Func001Func001Func001Func001C())then
set udg_P1_pet_exp=(udg_P1_pet_exp+6)
call QuestMessageBJ(bj_FORCE_PLAYER[0],bj_QUESTMESSAGE_UPDATED,("Опыт вашего питомца: "+I2S(udg_P1_pet_exp)))
else
if(Trig_Wolf_lvl3_stat_Func001Func002Func001Func001Func001Func001Func001Func001C())then
set udg_P1_pet_exp=(udg_P1_pet_exp+7)
call QuestMessageBJ(bj_FORCE_PLAYER[0],bj_QUESTMESSAGE_UPDATED,("Опыт вашего питомца: "+I2S(udg_P1_pet_exp)))
else
if(Trig_Wolf_lvl3_stat_Func001Func002Func001Func001Func001Func001Func001Func001Func001C())then
set udg_P1_pet_exp=(udg_P1_pet_exp+8)
call QuestMessageBJ(bj_FORCE_PLAYER[0],bj_QUESTMESSAGE_UPDATED,("Опыт вашего питомца: "+I2S(udg_P1_pet_exp)))
else
endif
endif
endif
endif
endif
endif
endif
endif
else
call DoNothing()
endif
endfunction
function InitTrig_Wolf_lvl3_stat takes nothing returns nothing
set gg_trg_Wolf_lvl3_stat=CreateTrigger()
call TriggerRegisterPlayerUnitEventSimple(gg_trg_Wolf_lvl3_stat,Player(PLAYER_NEUTRAL_AGGRESSIVE),EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(gg_trg_Wolf_lvl3_stat,Condition(function Trig_Wolf_lvl3_stat_Conditions))
call TriggerAddAction(gg_trg_Wolf_lvl3_stat,function Trig_Wolf_lvl3_stat_Actions)
endfunction
function Trig_Wolf_lvl4_stat_Conditions takes nothing returns boolean
if(not(GetUnitTypeId(GetKillingUnitBJ())==0x68303142))then
return false
endif
return true
endfunction
function Trig_Wolf_lvl4_stat_Func001Func002Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if(not(GetUnitTypeId(GetDyingUnit())==0x6E303041))then
return false
endif
return true
endfunction
function Trig_Wolf_lvl4_stat_Func001Func002Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if(not(GetUnitTypeId(GetDyingUnit())==0x6E303039))then
return false
endif
return true
endfunction
function Trig_Wolf_lvl4_stat_Func001Func002Func001Func001Func001Func001Func001C takes nothing returns boolean
if(not(GetUnitTypeId(GetDyingUnit())==0x6E303037))then
return false
endif
return true
endfunction
function Trig_Wolf_lvl4_stat_Func001Func002Func001Func001Func001Func001C takes nothing returns boolean
if(not(GetUnitTypeId(GetDyingUnit())==0x6E303035))then
return false
endif
return true
endfunction
function Trig_Wolf_lvl4_stat_Func001Func002Func001Func001Func001C takes nothing returns boolean
if(not(GetUnitTypeId(GetDyingUnit())==0x6E303036))then
return false
endif
return true
endfunction
function Trig_Wolf_lvl4_stat_Func001Func002Func001Func001C takes nothing returns boolean
if(not(GetUnitTypeId(GetDyingUnit())==0x6E303034))then
return false
endif
return true
endfunction
function Trig_Wolf_lvl4_stat_Func001Func002Func001C takes nothing returns boolean
if(not(GetUnitTypeId(GetDyingUnit())==0x6E303030))then
return false
endif
return true
endfunction
function Trig_Wolf_lvl4_stat_Func001Func002C takes nothing returns boolean
if(not(GetUnitTypeId(GetDyingUnit())==0x6E303033))then
return false
endif
return true
endfunction
function Trig_Wolf_lvl4_stat_Func001C takes nothing returns boolean
if(not(GetOwningPlayer(GetKillingUnitBJ())==Player(0)))then
return false
endif
return true
endfunction
function Trig_Wolf_lvl4_stat_Actions takes nothing returns nothing
if(Trig_Wolf_lvl4_stat_Func001C())then
if(Trig_Wolf_lvl4_stat_Func001Func002C())then
set udg_P1_pet_exp=(udg_P1_pet_exp+1)
call QuestMessageBJ(bj_FORCE_PLAYER[0],bj_QUESTMESSAGE_UPDATED,("Опыт вашего питомца: "+I2S(udg_P1_pet_exp)))
else
if(Trig_Wolf_lvl4_stat_Func001Func002Func001C())then
set udg_P1_pet_exp=(udg_P1_pet_exp+2)
call QuestMessageBJ(bj_FORCE_PLAYER[0],bj_QUESTMESSAGE_UPDATED,("Опыт вашего питомца: "+I2S(udg_P1_pet_exp)))
else
if(Trig_Wolf_lvl4_stat_Func001Func002Func001Func001C())then
set udg_P1_pet_exp=(udg_P1_pet_exp+3)
call QuestMessageBJ(bj_FORCE_PLAYER[0],bj_QUESTMESSAGE_UPDATED,("Опыт вашего питомца: "+I2S(udg_P1_pet_exp)))
else
if(Trig_Wolf_lvl4_stat_Func001Func002Func001Func001Func001C())then
set udg_P1_pet_exp=(udg_P1_pet_exp+4)
call QuestMessageBJ(bj_FORCE_PLAYER[0],bj_QUESTMESSAGE_UPDATED,("Опыт вашего питомца: "+I2S(udg_P1_pet_exp)))
else
if(Trig_Wolf_lvl4_stat_Func001Func002Func001Func001Func001Func001C())then
set udg_P1_pet_exp=(udg_P1_pet_exp+5)
call QuestMessageBJ(bj_FORCE_PLAYER[0],bj_QUESTMESSAGE_UPDATED,("Опыт вашего питомца: "+I2S(udg_P1_pet_exp)))
else
if(Trig_Wolf_lvl4_stat_Func001Func002Func001Func001Func001Func001Func001C())then
set udg_P1_pet_exp=(udg_P1_pet_exp+6)
call QuestMessageBJ(bj_FORCE_PLAYER[0],bj_QUESTMESSAGE_UPDATED,("Опыт вашего питомца: "+I2S(udg_P1_pet_exp)))
else
if(Trig_Wolf_lvl4_stat_Func001Func002Func001Func001Func001Func001Func001Func001C())then
set udg_P1_pet_exp=(udg_P1_pet_exp+7)
call QuestMessageBJ(bj_FORCE_PLAYER[0],bj_QUESTMESSAGE_UPDATED,("Опыт вашего питомца: "+I2S(udg_P1_pet_exp)))
else
if(Trig_Wolf_lvl4_stat_Func001Func002Func001Func001Func001Func001Func001Func001Func001C())then
set udg_P1_pet_exp=(udg_P1_pet_exp+8)
call QuestMessageBJ(bj_FORCE_PLAYER[0],bj_QUESTMESSAGE_UPDATED,("Опыт вашего питомца: "+I2S(udg_P1_pet_exp)))
else
endif
endif
endif
endif
endif
endif
endif
endif
else
call DoNothing()
endif
endfunction
function InitTrig_Wolf_lvl4_stat takes nothing returns nothing
set gg_trg_Wolf_lvl4_stat=CreateTrigger()
call TriggerRegisterPlayerUnitEventSimple(gg_trg_Wolf_lvl4_stat,Player(PLAYER_NEUTRAL_AGGRESSIVE),EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(gg_trg_Wolf_lvl4_stat,Condition(function Trig_Wolf_lvl4_stat_Conditions))
call TriggerAddAction(gg_trg_Wolf_lvl4_stat,function Trig_Wolf_lvl4_stat_Actions)
endfunction
function Trig_Wolf_lvl5_stat_Conditions takes nothing returns boolean
if(not(GetUnitTypeId(GetKillingUnitBJ())==0x68303143))then
return false
endif
return true
endfunction
function Trig_Wolf_lvl5_stat_Func001Func002Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if(not(GetUnitTypeId(GetDyingUnit())==0x6E303041))then
return false
endif
return true
endfunction
function Trig_Wolf_lvl5_stat_Func001Func002Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if(not(GetUnitTypeId(GetDyingUnit())==0x6E303039))then
return false
endif
return true
endfunction
function Trig_Wolf_lvl5_stat_Func001Func002Func001Func001Func001Func001Func001C takes nothing returns boolean
if(not(GetUnitTypeId(GetDyingUnit())==0x6E303037))then
return false
endif
return true
endfunction
function Trig_Wolf_lvl5_stat_Func001Func002Func001Func001Func001Func001C takes nothing returns boolean
if(not(GetUnitTypeId(GetDyingUnit())==0x6E303035))then
return false
endif
return true
endfunction
function Trig_Wolf_lvl5_stat_Func001Func002Func001Func001Func001C takes nothing returns boolean
if(not(GetUnitTypeId(GetDyingUnit())==0x6E303036))then
return false
endif
return true
endfunction
function Trig_Wolf_lvl5_stat_Func001Func002Func001Func001C takes nothing returns boolean
if(not(GetUnitTypeId(GetDyingUnit())==0x6E303034))then
return false
endif
return true
endfunction
function Trig_Wolf_lvl5_stat_Func001Func002Func001C takes nothing returns boolean
if(not(GetUnitTypeId(GetDyingUnit())==0x6E303030))then
return false
endif
return true
endfunction
function Trig_Wolf_lvl5_stat_Func001Func002C takes nothing returns boolean
if(not(GetUnitTypeId(GetDyingUnit())==0x6E303033))then
return false
endif
return true
endfunction
function Trig_Wolf_lvl5_stat_Func001C takes nothing returns boolean
if(not(GetOwningPlayer(GetKillingUnitBJ())==Player(0)))then
return false
endif
return true
endfunction
function Trig_Wolf_lvl5_stat_Actions takes nothing returns nothing
if(Trig_Wolf_lvl5_stat_Func001C())then
if(Trig_Wolf_lvl5_stat_Func001Func002C())then
set udg_P1_pet_exp=(udg_P1_pet_exp+1)
call QuestMessageBJ(bj_FORCE_PLAYER[0],bj_QUESTMESSAGE_UPDATED,("Опыт вашего питомца: "+I2S(udg_P1_pet_exp)))
else
if(Trig_Wolf_lvl5_stat_Func001Func002Func001C())then
set udg_P1_pet_exp=(udg_P1_pet_exp+2)
call QuestMessageBJ(bj_FORCE_PLAYER[0],bj_QUESTMESSAGE_UPDATED,("Опыт вашего питомца: "+I2S(udg_P1_pet_exp)))
else
if(Trig_Wolf_lvl5_stat_Func001Func002Func001Func001C())then
set udg_P1_pet_exp=(udg_P1_pet_exp+3)
call QuestMessageBJ(bj_FORCE_PLAYER[0],bj_QUESTMESSAGE_UPDATED,("Опыт вашего питомца: "+I2S(udg_P1_pet_exp)))
else
if(Trig_Wolf_lvl5_stat_Func001Func002Func001Func001Func001C())then
set udg_P1_pet_exp=(udg_P1_pet_exp+4)
call QuestMessageBJ(bj_FORCE_PLAYER[0],bj_QUESTMESSAGE_UPDATED,("Опыт вашего питомца: "+I2S(udg_P1_pet_exp)))
else
if(Trig_Wolf_lvl5_stat_Func001Func002Func001Func001Func001Func001C())then
set udg_P1_pet_exp=(udg_P1_pet_exp+5)
call QuestMessageBJ(bj_FORCE_PLAYER[0],bj_QUESTMESSAGE_UPDATED,("Опыт вашего питомца: "+I2S(udg_P1_pet_exp)))
else
if(Trig_Wolf_lvl5_stat_Func001Func002Func001Func001Func001Func001Func001C())then
set udg_P1_pet_exp=(udg_P1_pet_exp+6)
call QuestMessageBJ(bj_FORCE_PLAYER[0],bj_QUESTMESSAGE_UPDATED,("Опыт вашего питомца: "+I2S(udg_P1_pet_exp)))
else
if(Trig_Wolf_lvl5_stat_Func001Func002Func001Func001Func001Func001Func001Func001C())then
set udg_P1_pet_exp=(udg_P1_pet_exp+7)
call QuestMessageBJ(bj_FORCE_PLAYER[0],bj_QUESTMESSAGE_UPDATED,("Опыт вашего питомца: "+I2S(udg_P1_pet_exp)))
else
if(Trig_Wolf_lvl5_stat_Func001Func002Func001Func001Func001Func001Func001Func001Func001C())then
set udg_P1_pet_exp=(udg_P1_pet_exp+8)
call QuestMessageBJ(bj_FORCE_PLAYER[0],bj_QUESTMESSAGE_UPDATED,("Опыт вашего питомца: "+I2S(udg_P1_pet_exp)))
else
endif
endif
endif
endif
endif
endif
endif
endif
else
call DoNothing()
endif
endfunction
function InitTrig_Wolf_lvl5_stat takes nothing returns nothing
set gg_trg_Wolf_lvl5_stat=CreateTrigger()
call TriggerRegisterPlayerUnitEventSimple(gg_trg_Wolf_lvl5_stat,Player(PLAYER_NEUTRAL_AGGRESSIVE),EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(gg_trg_Wolf_lvl5_stat,Condition(function Trig_Wolf_lvl5_stat_Conditions))
call TriggerAddAction(gg_trg_Wolf_lvl5_stat,function Trig_Wolf_lvl5_stat_Actions)
endfunction
function Trig_ship1_Actions takes nothing returns nothing
call SetUnitPositionLoc(GetEnteringUnit(),GetRectCenter(gg_rct_out))
endfunction
function InitTrig_ship1 takes nothing returns nothing
set gg_trg_ship1=CreateTrigger()
call DisableTrigger(gg_trg_ship1)
call TriggerRegisterEnterRectSimple(gg_trg_ship1,gg_rct_outship)
call TriggerAddAction(gg_trg_ship1,function Trig_ship1_Actions)
endfunction
function Trig_ship1_Copy_Actions takes nothing returns nothing
call SetUnitPositionLoc(GetEnteringUnit(),GetRectCenter(gg_rct_out))
endfunction
function InitTrig_ship1_Copy takes nothing returns nothing
set gg_trg_ship1_Copy=CreateTrigger()
call DisableTrigger(gg_trg_ship1_Copy)
call TriggerRegisterEnterRectSimple(gg_trg_ship1_Copy,gg_rct_outship)
call TriggerAddAction(gg_trg_ship1_Copy,function Trig_ship1_Copy_Actions)
endfunction
function Trig_ship2_Actions takes nothing returns nothing
call SetUnitPositionLoc(GetEnteringUnit(),GetRectCenter(gg_rct________________023))
endfunction
function InitTrig_ship2 takes nothing returns nothing
set gg_trg_ship2=CreateTrigger()
call DisableTrigger(gg_trg_ship2)
call TriggerRegisterEnterRectSimple(gg_trg_ship2,gg_rct________________022)
call TriggerAddAction(gg_trg_ship2,function Trig_ship2_Actions)
endfunction
function Trig_ship2_Copy_Actions takes nothing returns nothing
call SetUnitPositionLoc(GetEnteringUnit(),GetRectCenter(gg_rct________________023))
endfunction
function InitTrig_ship2_Copy takes nothing returns nothing
set gg_trg_ship2_Copy=CreateTrigger()
call DisableTrigger(gg_trg_ship2_Copy)
call TriggerRegisterEnterRectSimple(gg_trg_ship2_Copy,gg_rct________________022)
call TriggerAddAction(gg_trg_ship2_Copy,function Trig_ship2_Copy_Actions)
endfunction
function Trig_Tutorial_Func005001 takes nothing returns boolean
return(GetSpellAbilityId()==0x41303142)
endfunction
function Trig_Tutorial_Func005002 takes nothing returns boolean
return(GetSpellTargetUnit()==gg_unit_H00A_0031)
endfunction
function Trig_Tutorial_Conditions takes nothing returns boolean
if(not GetBooleanAnd((GetSpellAbilityId()==0x41303142),(GetSpellTargetUnit()==gg_unit_H00A_0031)))then
return false
endif
return true
endfunction
function Trig_Tutorial_Func004A takes nothing returns nothing
call DialogDisplayBJ(true,udg_Tutorial,GetEnumPlayer())
endfunction
function Trig_Tutorial_Actions takes nothing returns nothing
call CinematicModeBJ(true,GetPlayersAll())
call SetUnitFacingToFaceUnitTimed(gg_unit_H00A_0031,GetSpellAbilityUnit(),0.50)
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),gg_unit_H00A_0031,"TRIGSTR_2643",gg_snd_tutor1,"TRIGSTR_2644",bj_TIMETYPE_ADD,0,true)
call ForForce(GetPlayersAll(),function Trig_Tutorial_Func004A)
endfunction
function InitTrig_Tutorial takes nothing returns nothing
set gg_trg_Tutorial=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Tutorial,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(gg_trg_Tutorial,Condition(function Trig_Tutorial_Conditions))
call TriggerAddAction(gg_trg_Tutorial,function Trig_Tutorial_Actions)
endfunction
function Trig_Tut_ans_1_Conditions takes nothing returns boolean
if(not(GetClickedButtonBJ()==udg_Tutorisl_ask1))then
return false
endif
return true
endfunction
function Trig_Tut_ans_1_Func004A takes nothing returns nothing
call DialogDisplayBJ(true,udg_Tutorial,GetEnumPlayer())
endfunction
function Trig_Tut_ans_1_Actions takes nothing returns nothing
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),gg_unit_H00A_0031,"TRIGSTR_2607",gg_snd_tutor2,"TRIGSTR_2608",bj_TIMETYPE_ADD,0,true)
call TriggerSleepAction(2)
call ForForce(GetPlayersAll(),function Trig_Tut_ans_1_Func004A)
endfunction
function InitTrig_Tut_ans_1 takes nothing returns nothing
set gg_trg_Tut_ans_1=CreateTrigger()
call TriggerRegisterDialogEventBJ(gg_trg_Tut_ans_1,udg_Tutorial)
call TriggerAddCondition(gg_trg_Tut_ans_1,Condition(function Trig_Tut_ans_1_Conditions))
call TriggerAddAction(gg_trg_Tut_ans_1,function Trig_Tut_ans_1_Actions)
endfunction
function Trig_Tut_ans_2_Conditions takes nothing returns boolean
if(not(GetClickedButtonBJ()==udg_Tutorisl_ask2))then
return false
endif
return true
endfunction
function Trig_Tut_ans_2_Func004A takes nothing returns nothing
call DialogDisplayBJ(true,udg_Tutorial,GetEnumPlayer())
endfunction
function Trig_Tut_ans_2_Actions takes nothing returns nothing
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),gg_unit_H00A_0031,"TRIGSTR_2668",gg_snd_tutor3,"TRIGSTR_2669",bj_TIMETYPE_ADD,0,true)
call TriggerSleepAction(2)
call ForForce(GetPlayersAll(),function Trig_Tut_ans_2_Func004A)
endfunction
function InitTrig_Tut_ans_2 takes nothing returns nothing
set gg_trg_Tut_ans_2=CreateTrigger()
call TriggerRegisterDialogEventBJ(gg_trg_Tut_ans_2,udg_Tutorial)
call TriggerAddCondition(gg_trg_Tut_ans_2,Condition(function Trig_Tut_ans_2_Conditions))
call TriggerAddAction(gg_trg_Tut_ans_2,function Trig_Tut_ans_2_Actions)
endfunction
function Trig_Tut_ans_3_Conditions takes nothing returns boolean
if(not(GetClickedButtonBJ()==udg_Tutorisl_ask3))then
return false
endif
return true
endfunction
function Trig_Tut_ans_3_Func005A takes nothing returns nothing
call DialogDisplayBJ(true,udg_Tutorial,GetEnumPlayer())
endfunction
function Trig_Tut_ans_3_Actions takes nothing returns nothing
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),gg_unit_H00A_0031,"TRIGSTR_2658",gg_snd_tutor4,"TRIGSTR_2659",bj_TIMETYPE_ADD,0,true)
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),gg_unit_H00A_0031,"TRIGSTR_2660",gg_snd_tutor5,"TRIGSTR_2661",bj_TIMETYPE_ADD,0,true)
call TriggerSleepAction(2)
call ForForce(GetPlayersAll(),function Trig_Tut_ans_3_Func005A)
endfunction
function InitTrig_Tut_ans_3 takes nothing returns nothing
set gg_trg_Tut_ans_3=CreateTrigger()
call TriggerRegisterDialogEventBJ(gg_trg_Tut_ans_3,udg_Tutorial)
call TriggerAddCondition(gg_trg_Tut_ans_3,Condition(function Trig_Tut_ans_3_Conditions))
call TriggerAddAction(gg_trg_Tut_ans_3,function Trig_Tut_ans_3_Actions)
endfunction
function Trig_Tut_ans_4_Conditions takes nothing returns boolean
if(not(GetClickedButtonBJ()==udg_Tutorisl_ask4))then
return false
endif
return true
endfunction
function Trig_Tut_ans_4_Func005A takes nothing returns nothing
call DialogDisplayBJ(true,udg_Tutorial,GetEnumPlayer())
endfunction
function Trig_Tut_ans_4_Actions takes nothing returns nothing
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),gg_unit_H00A_0031,"TRIGSTR_2662",gg_snd_tutor6,"TRIGSTR_2663",bj_TIMETYPE_ADD,0,true)
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),gg_unit_H00A_0031,"TRIGSTR_2664",gg_snd_tutor7,"TRIGSTR_2665",bj_TIMETYPE_ADD,0,true)
call TriggerSleepAction(2)
call ForForce(GetPlayersAll(),function Trig_Tut_ans_4_Func005A)
endfunction
function InitTrig_Tut_ans_4 takes nothing returns nothing
set gg_trg_Tut_ans_4=CreateTrigger()
call TriggerRegisterDialogEventBJ(gg_trg_Tut_ans_4,udg_Tutorial)
call TriggerAddCondition(gg_trg_Tut_ans_4,Condition(function Trig_Tut_ans_4_Conditions))
call TriggerAddAction(gg_trg_Tut_ans_4,function Trig_Tut_ans_4_Actions)
endfunction
function Trig_Tut_ans_5_Conditions takes nothing returns boolean
if(not(GetClickedButtonBJ()==udg_Tutorisl_ask5))then
return false
endif
return true
endfunction
function Trig_Tut_ans_5_Func004A takes nothing returns nothing
call DialogDisplayBJ(true,udg_Tutorial,GetEnumPlayer())
endfunction
function Trig_Tut_ans_5_Actions takes nothing returns nothing
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),gg_unit_H00A_0031,"TRIGSTR_2666",gg_snd_tutor8,"TRIGSTR_2667",bj_TIMETYPE_ADD,0,true)
call TriggerSleepAction(2)
call ForForce(GetPlayersAll(),function Trig_Tut_ans_5_Func004A)
endfunction
function InitTrig_Tut_ans_5 takes nothing returns nothing
set gg_trg_Tut_ans_5=CreateTrigger()
call TriggerRegisterDialogEventBJ(gg_trg_Tut_ans_5,udg_Tutorial)
call TriggerAddCondition(gg_trg_Tut_ans_5,Condition(function Trig_Tut_ans_5_Conditions))
call TriggerAddAction(gg_trg_Tut_ans_5,function Trig_Tut_ans_5_Actions)
endfunction
function Trig_Tut_ans_6_Conditions takes nothing returns boolean
if(not(GetClickedButtonBJ()==udg_Tutorisl_ask6))then
return false
endif
return true
endfunction
function Trig_Tut_ans_6_Func004A takes nothing returns nothing
call CinematicModeBJ(false,GetPlayersAll())
endfunction
function Trig_Tut_ans_6_Actions takes nothing returns nothing
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),gg_unit_H00A_0031,"TRIGSTR_2670",gg_snd_tutor9,"TRIGSTR_2671",bj_TIMETYPE_ADD,0,true)
call TriggerSleepAction(2)
call ForForce(GetPlayersAll(),function Trig_Tut_ans_6_Func004A)
endfunction
function InitTrig_Tut_ans_6 takes nothing returns nothing
set gg_trg_Tut_ans_6=CreateTrigger()
call TriggerRegisterDialogEventBJ(gg_trg_Tut_ans_6,udg_Tutorial)
call TriggerAddCondition(gg_trg_Tut_ans_6,Condition(function Trig_Tut_ans_6_Conditions))
call TriggerAddAction(gg_trg_Tut_ans_6,function Trig_Tut_ans_6_Actions)
endfunction
function Trig_Town_Arbalet_Func006001 takes nothing returns boolean
return(GetSpellAbilityId()==0x41303142)
endfunction
function Trig_Town_Arbalet_Func006002 takes nothing returns boolean
return(GetUnitTypeId(GetSpellTargetUnit())==0x4830305A)
endfunction
function Trig_Town_Arbalet_Conditions takes nothing returns boolean
if(not GetBooleanAnd((GetSpellAbilityId()==0x41303142),(GetUnitTypeId(GetSpellTargetUnit())==0x4830305A)))then
return false
endif
return true
endfunction
function Trig_Town_Arbalet_Func005A takes nothing returns nothing
call DialogDisplayBJ(true,udg_Town_speak,GetEnumPlayer())
endfunction
function Trig_Town_Arbalet_Actions takes nothing returns nothing
set udg_Town_Speaker=GetSpellTargetUnit()
call CinematicModeBJ(true,GetPlayersAll())
call SetUnitFacingToFaceUnitTimed(GetSpellTargetUnit(),GetSpellAbilityUnit(),0.50)
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),GetSpellTargetUnit(),GetHeroProperName(udg_Town_Speaker),null,"TRIGSTR_2907",bj_TIMETYPE_ADD,0,true)
call ForForce(GetPlayersAll(),function Trig_Town_Arbalet_Func005A)
endfunction
function InitTrig_Town_Arbalet takes nothing returns nothing
set gg_trg_Town_Arbalet=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Town_Arbalet,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(gg_trg_Town_Arbalet,Condition(function Trig_Town_Arbalet_Conditions))
call TriggerAddAction(gg_trg_Town_Arbalet,function Trig_Town_Arbalet_Actions)
endfunction
function Trig_Town_Sailor_Func006001 takes nothing returns boolean
return(GetSpellAbilityId()==0x41303142)
endfunction
function Trig_Town_Sailor_Func006002 takes nothing returns boolean
return(GetUnitTypeId(GetSpellTargetUnit())==0x48303031)
endfunction
function Trig_Town_Sailor_Conditions takes nothing returns boolean
if(not GetBooleanAnd((GetSpellAbilityId()==0x41303142),(GetUnitTypeId(GetSpellTargetUnit())==0x48303031)))then
return false
endif
return true
endfunction
function Trig_Town_Sailor_Func005A takes nothing returns nothing
call DialogDisplayBJ(true,udg_Town_speak,GetEnumPlayer())
endfunction
function Trig_Town_Sailor_Actions takes nothing returns nothing
set udg_Town_Speaker=GetSpellTargetUnit()
call CinematicModeBJ(true,GetPlayersAll())
call SetUnitFacingToFaceUnitTimed(GetSpellTargetUnit(),GetSpellAbilityUnit(),0.50)
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),GetSpellTargetUnit(),GetHeroProperName(GetSpellTargetUnit()),gg_snd_tutor1,"TRIGSTR_2955",bj_TIMETYPE_ADD,0,true)
call ForForce(GetPlayersAll(),function Trig_Town_Sailor_Func005A)
endfunction
function InitTrig_Town_Sailor takes nothing returns nothing
set gg_trg_Town_Sailor=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Town_Sailor,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(gg_trg_Town_Sailor,Condition(function Trig_Town_Sailor_Conditions))
call TriggerAddAction(gg_trg_Town_Sailor,function Trig_Town_Sailor_Actions)
endfunction
function Trig_Town_Woman_Func006001 takes nothing returns boolean
return(GetSpellAbilityId()==0x41303142)
endfunction
function Trig_Town_Woman_Func006002 takes nothing returns boolean
return(GetUnitTypeId(GetSpellTargetUnit())==0x48303032)
endfunction
function Trig_Town_Woman_Conditions takes nothing returns boolean
if(not GetBooleanAnd((GetSpellAbilityId()==0x41303142),(GetUnitTypeId(GetSpellTargetUnit())==0x48303032)))then
return false
endif
return true
endfunction
function Trig_Town_Woman_Func005A takes nothing returns nothing
call DialogDisplayBJ(true,udg_Town_speak,GetEnumPlayer())
endfunction
function Trig_Town_Woman_Actions takes nothing returns nothing
set udg_Town_Speaker=GetSpellTargetUnit()
call CinematicModeBJ(true,GetPlayersAll())
call SetUnitFacingToFaceUnitTimed(GetSpellTargetUnit(),GetSpellAbilityUnit(),0.50)
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),GetSpellTargetUnit(),GetHeroProperName(GetSpellTargetUnit()),gg_snd_tutor1,"TRIGSTR_2956",bj_TIMETYPE_ADD,0,true)
call ForForce(GetPlayersAll(),function Trig_Town_Woman_Func005A)
endfunction
function InitTrig_Town_Woman takes nothing returns nothing
set gg_trg_Town_Woman=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Town_Woman,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(gg_trg_Town_Woman,Condition(function Trig_Town_Woman_Conditions))
call TriggerAddAction(gg_trg_Town_Woman,function Trig_Town_Woman_Actions)
endfunction
function Trig_Town_Korsar_Func006001 takes nothing returns boolean
return(GetSpellAbilityId()==0x41303142)
endfunction
function Trig_Town_Korsar_Func006002 takes nothing returns boolean
return(GetUnitTypeId(GetSpellTargetUnit())==0x48303034)
endfunction
function Trig_Town_Korsar_Conditions takes nothing returns boolean
if(not GetBooleanAnd((GetSpellAbilityId()==0x41303142),(GetUnitTypeId(GetSpellTargetUnit())==0x48303034)))then
return false
endif
return true
endfunction
function Trig_Town_Korsar_Func005A takes nothing returns nothing
call DialogDisplayBJ(true,udg_Town_speak,GetEnumPlayer())
endfunction
function Trig_Town_Korsar_Actions takes nothing returns nothing
set udg_Town_Speaker=GetSpellTargetUnit()
call CinematicModeBJ(true,GetPlayersAll())
call SetUnitFacingToFaceUnitTimed(GetSpellTargetUnit(),GetSpellAbilityUnit(),0.50)
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),GetSpellTargetUnit(),GetHeroProperName(GetSpellTargetUnit()),gg_snd_tutor1,"TRIGSTR_2958",bj_TIMETYPE_ADD,0,true)
call ForForce(GetPlayersAll(),function Trig_Town_Korsar_Func005A)
endfunction
function InitTrig_Town_Korsar takes nothing returns nothing
set gg_trg_Town_Korsar=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Town_Korsar,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(gg_trg_Town_Korsar,Condition(function Trig_Town_Korsar_Conditions))
call TriggerAddAction(gg_trg_Town_Korsar,function Trig_Town_Korsar_Actions)
endfunction
function Trig_Town_Woman_2_Func006001 takes nothing returns boolean
return(GetSpellAbilityId()==0x41303142)
endfunction
function Trig_Town_Woman_2_Func006002 takes nothing returns boolean
return(GetUnitTypeId(GetSpellTargetUnit())==0x48303146)
endfunction
function Trig_Town_Woman_2_Conditions takes nothing returns boolean
if(not GetBooleanAnd((GetSpellAbilityId()==0x41303142),(GetUnitTypeId(GetSpellTargetUnit())==0x48303146)))then
return false
endif
return true
endfunction
function Trig_Town_Woman_2_Func005A takes nothing returns nothing
call DialogDisplayBJ(true,udg_Town_speak,GetEnumPlayer())
endfunction
function Trig_Town_Woman_2_Actions takes nothing returns nothing
set udg_Town_Speaker=GetSpellTargetUnit()
call CinematicModeBJ(true,GetPlayersAll())
call SetUnitFacingToFaceUnitTimed(GetSpellTargetUnit(),GetSpellAbilityUnit(),0.50)
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),GetSpellTargetUnit(),GetHeroProperName(GetSpellTargetUnit()),gg_snd_tutor1,"TRIGSTR_2959",bj_TIMETYPE_ADD,0,true)
call ForForce(GetPlayersAll(),function Trig_Town_Woman_2_Func005A)
endfunction
function InitTrig_Town_Woman_2 takes nothing returns nothing
set gg_trg_Town_Woman_2=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Town_Woman_2,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(gg_trg_Town_Woman_2,Condition(function Trig_Town_Woman_2_Conditions))
call TriggerAddAction(gg_trg_Town_Woman_2,function Trig_Town_Woman_2_Actions)
endfunction
function Trig_Town_Arena_figther_Func005001 takes nothing returns boolean
return(GetSpellAbilityId()==0x41303142)
endfunction
function Trig_Town_Arena_figther_Func005002 takes nothing returns boolean
return(GetUnitTypeId(GetSpellTargetUnit())==0x48303044)
endfunction
function Trig_Town_Arena_figther_Conditions takes nothing returns boolean
if(not GetBooleanAnd((GetSpellAbilityId()==0x41303142),(GetUnitTypeId(GetSpellTargetUnit())==0x48303044)))then
return false
endif
return true
endfunction
function Trig_Town_Arena_figther_Actions takes nothing returns nothing
call CinematicModeBJ(true,GetPlayersAll())
call SetUnitFacingToFaceUnitTimed(GetSpellTargetUnit(),GetSpellAbilityUnit(),0.50)
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),GetSpellTargetUnit(),GetHeroProperName(GetSpellTargetUnit()),gg_snd_tutor1,"TRIGSTR_2963",bj_TIMETYPE_ADD,0,true)
call CinematicModeBJ(false,GetPlayersAll())
endfunction
function InitTrig_Town_Arena_figther takes nothing returns nothing
set gg_trg_Town_Arena_figther=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Town_Arena_figther,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(gg_trg_Town_Arena_figther,Condition(function Trig_Town_Arena_figther_Conditions))
call TriggerAddAction(gg_trg_Town_Arena_figther,function Trig_Town_Arena_figther_Actions)
endfunction
function Trig_Town_News_Conditions takes nothing returns boolean
if(not(GetClickedButtonBJ()==udg_Town_News))then
return false
endif
return true
endfunction
function Trig_Town_News_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if(not(GetRandomInt(1,10)==10))then
return false
endif
return true
endfunction
function Trig_Town_News_Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if(not(GetRandomInt(1,10)==9))then
return false
endif
return true
endfunction
function Trig_Town_News_Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if(not(GetRandomInt(1,10)==8))then
return false
endif
return true
endfunction
function Trig_Town_News_Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if(not(GetRandomInt(1,10)==7))then
return false
endif
return true
endfunction
function Trig_Town_News_Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if(not(GetRandomInt(1,10)==6))then
return false
endif
return true
endfunction
function Trig_Town_News_Func001Func001Func001Func001Func001C takes nothing returns boolean
if(not(GetRandomInt(1,10)==5))then
return false
endif
return true
endfunction
function Trig_Town_News_Func001Func001Func001Func001C takes nothing returns boolean
if(not(GetRandomInt(1,10)==4))then
return false
endif
return true
endfunction
function Trig_Town_News_Func001Func001Func001C takes nothing returns boolean
if(not(GetRandomInt(1,10)==3))then
return false
endif
return true
endfunction
function Trig_Town_News_Func001Func001C takes nothing returns boolean
if(not(GetRandomInt(1,10)==2))then
return false
endif
return true
endfunction
function Trig_Town_News_Func001C takes nothing returns boolean
if(not(GetRandomInt(1,10)==1))then
return false
endif
return true
endfunction
function Trig_Town_News_Actions takes nothing returns nothing
if(Trig_Town_News_Func001C())then
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),udg_Town_Speaker,GetHeroProperName(udg_Town_Speaker),null,"TRIGSTR_2910",bj_TIMETYPE_ADD,0,true)
else
if(Trig_Town_News_Func001Func001C())then
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),udg_Town_Speaker,GetHeroProperName(udg_Town_Speaker),null,"TRIGSTR_2914",bj_TIMETYPE_ADD,0,true)
else
if(Trig_Town_News_Func001Func001Func001C())then
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),udg_Town_Speaker,GetHeroProperName(udg_Town_Speaker),null,"TRIGSTR_2916",bj_TIMETYPE_ADD,0,true)
else
if(Trig_Town_News_Func001Func001Func001Func001C())then
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),udg_Town_Speaker,GetHeroProperName(udg_Town_Speaker),null,"TRIGSTR_2918",bj_TIMETYPE_ADD,0,true)
else
if(Trig_Town_News_Func001Func001Func001Func001Func001C())then
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),udg_Town_Speaker,GetHeroProperName(udg_Town_Speaker),null,"TRIGSTR_2920",bj_TIMETYPE_ADD,0,true)
else
if(Trig_Town_News_Func001Func001Func001Func001Func001Func001C())then
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),udg_Town_Speaker,GetHeroProperName(udg_Town_Speaker),null,"TRIGSTR_2922",bj_TIMETYPE_ADD,0,true)
else
if(Trig_Town_News_Func001Func001Func001Func001Func001Func001Func001C())then
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),udg_Town_Speaker,GetHeroProperName(udg_Town_Speaker),null,"TRIGSTR_2924",bj_TIMETYPE_ADD,0,true)
else
if(Trig_Town_News_Func001Func001Func001Func001Func001Func001Func001Func001C())then
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),udg_Town_Speaker,GetHeroProperName(udg_Town_Speaker),null,"TRIGSTR_2926",bj_TIMETYPE_ADD,0,true)
else
if(Trig_Town_News_Func001Func001Func001Func001Func001Func001Func001Func001Func001C())then
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),udg_Town_Speaker,GetHeroProperName(udg_Town_Speaker),null,"TRIGSTR_2928",bj_TIMETYPE_ADD,0,true)
else
if(Trig_Town_News_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C())then
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),udg_Town_Speaker,GetHeroProperName(udg_Town_Speaker),null,"TRIGSTR_2930",bj_TIMETYPE_ADD,0,true)
else
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),udg_Town_Speaker,GetHeroProperName(udg_Town_Speaker),null,"TRIGSTR_2953",bj_TIMETYPE_ADD,0,true)
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
call TriggerSleepAction(2)
call DialogDisplayBJ(true,udg_Town_speak,Player(0))
endfunction
function InitTrig_Town_News takes nothing returns nothing
set gg_trg_Town_News=CreateTrigger()
call TriggerRegisterDialogEventBJ(gg_trg_Town_News,udg_Town_speak)
call TriggerAddCondition(gg_trg_Town_News,Condition(function Trig_Town_News_Conditions))
call TriggerAddAction(gg_trg_Town_News,function Trig_Town_News_Actions)
endfunction
function Trig_Town_BB_Conditions takes nothing returns boolean
if(not(GetClickedButtonBJ()==udg_Town_bb))then
return false
endif
return true
endfunction
function Trig_Town_BB_Actions takes nothing returns nothing
call TriggerSleepAction(2)
call DialogDisplayBJ(false,udg_Town_speak,Player(0))
call CinematicModeBJ(false,GetPlayersAll())
endfunction
function InitTrig_Town_BB takes nothing returns nothing
set gg_trg_Town_BB=CreateTrigger()
call TriggerRegisterDialogEventBJ(gg_trg_Town_BB,udg_Town_speak)
call TriggerAddCondition(gg_trg_Town_BB,Condition(function Trig_Town_BB_Conditions))
call TriggerAddAction(gg_trg_Town_BB,function Trig_Town_BB_Actions)
endfunction
function Trig_Guard_Func005001 takes nothing returns boolean
return(GetSpellAbilityId()==0x41303142)
endfunction
function Trig_Guard_Func005002 takes nothing returns boolean
return(GetUnitTypeId(GetSpellTargetUnit())==0x48303045)
endfunction
function Trig_Guard_Conditions takes nothing returns boolean
if(not GetBooleanAnd((GetSpellAbilityId()==0x41303142),(GetUnitTypeId(GetSpellTargetUnit())==0x48303045)))then
return false
endif
return true
endfunction
function Trig_Guard_Func004A takes nothing returns nothing
call DialogDisplayBJ(true,udg_Guard,GetEnumPlayer())
endfunction
function Trig_Guard_Actions takes nothing returns nothing
call CinematicModeBJ(true,GetPlayersAll())
call SetUnitFacingToFaceUnitTimed(gg_unit_H00E_0401,GetSpellAbilityUnit(),0.50)
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),gg_unit_H00E_0401,"TRIGSTR_2740",gg_snd_tutor1,"TRIGSTR_2741",bj_TIMETYPE_ADD,0,true)
call ForForce(GetPlayersAll(),function Trig_Guard_Func004A)
endfunction
function InitTrig_Guard takes nothing returns nothing
set gg_trg_Guard=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Guard,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(gg_trg_Guard,Condition(function Trig_Guard_Conditions))
call TriggerAddAction(gg_trg_Guard,function Trig_Guard_Actions)
endfunction
function Trig_Quest_Guard_v1_Conditions takes nothing returns boolean
if(not(GetClickedButtonBJ()==udg_Guard_take_quest))then
return false
endif
return true
endfunction
function Trig_Quest_Guard_v1_Func003Func005Func001C takes nothing returns boolean
if(not(GetRandomInt(1,3)==2))then
return false
endif
return true
endfunction
function Trig_Quest_Guard_v1_Func003Func005C takes nothing returns boolean
if(not(GetRandomInt(1,3)==1))then
return false
endif
return true
endfunction
function Trig_Quest_Guard_v1_Func003Func006Func001Func001Func001C takes nothing returns boolean
if(not(GetRandomInt(1,5)==5))then
return false
endif
return true
endfunction
function Trig_Quest_Guard_v1_Func003Func006Func001Func001C takes nothing returns boolean
if(not(GetRandomInt(1,5)==4))then
return false
endif
return true
endfunction
function Trig_Quest_Guard_v1_Func003Func006Func001Func007C takes nothing returns boolean
if(not(GetRandomInt(1,1)==1))then
return false
endif
return true
endfunction
function Trig_Quest_Guard_v1_Func003Func006Func001C takes nothing returns boolean
if(not(GetRandomInt(1,5)==3))then
return false
endif
return true
endfunction
function Trig_Quest_Guard_v1_Func003Func006Func009C takes nothing returns boolean
if(not(GetRandomInt(1,2)==2))then
return false
endif
return true
endfunction
function Trig_Quest_Guard_v1_Func003Func006C takes nothing returns boolean
if(not(GetRandomInt(1,5)==2))then
return false
endif
return true
endfunction
function Trig_Quest_Guard_v1_Func003C takes nothing returns boolean
if(not(GetRandomInt(1,5)==1))then
return false
endif
return true
endfunction
function Trig_Quest_Guard_v1_Actions takes nothing returns nothing
if(Trig_Quest_Guard_v1_Func003C())then
call CreateNUnitsAtLoc(1,0x48303054,Player(8),GetRectCenter(gg_rct_Region_050),bj_UNIT_FACING)
set udg_Guard_Quest_Bandit=GetLastCreatedUnit()
set udg_Exp_hero=I2R(GetHeroXP(udg_player1hero))
call AddHeroXPSwapped(R2I((udg_Exp_hero-GetRandomReal(1.00,500.00))),udg_Guard_Quest_Bandit,false)
if(Trig_Quest_Guard_v1_Func003Func005C())then
call SetUnitPositionLoc(GetLastCreatedUnit(),GetRectCenter(gg_rct_Quest_Guard_1))
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),gg_unit_H00E_0401,"TRIGSTR_2727",null,("Опасного бандита "+(GetHeroProperName(GetLastCreatedUnit())+" видели не далеко от города. По предварительным данным он сейчас возле покинутой фермы. За его убийство ты получишь хорошую награду.")),bj_TIMETYPE_ADD,0,true)
call CreateQuestBJ(bj_QUESTTYPE_REQ_DISCOVERED,"TRIGSTR_2728",("-Найти  и убить бандита "+(GetHeroProperName(GetLastCreatedUnit()))),"ReplaceableTextures\\CommandButtons\\BTNBandit.blp")
set udg_Guard_Quest1=GetLastCreatedQuestBJ()
call CinematicModeBJ(false,GetPlayersAll())
call EnableTrigger(gg_trg_Quest_Guard_1_finish)
else
if(Trig_Quest_Guard_v1_Func003Func005Func001C())then
call SetUnitPositionLoc(GetLastCreatedUnit(),GetRectCenter(gg_rct_Quest_Guard_2))
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),gg_unit_H00E_0401,"TRIGSTR_2725",null,("Опасного бандита "+(GetHeroProperName(GetLastCreatedUnit())+" видели не далеко от города. По предварительным данным он сейчас возле лагеря брутсилов. За его убийство ты получишь хорошую награду.")),bj_TIMETYPE_ADD,0,true)
call CreateQuestBJ(bj_QUESTTYPE_REQ_DISCOVERED,"TRIGSTR_2726",("-Найти  и убить бандита "+(GetHeroProperName(GetLastCreatedUnit()))),"ReplaceableTextures\\CommandButtons\\BTNBandit.blp")
set udg_Guard_Quest1=GetLastCreatedQuestBJ()
call CinematicModeBJ(false,GetPlayersAll())
call EnableTrigger(gg_trg_Quest_Guard_1_finish)
else
call SetUnitPositionLoc(GetLastCreatedUnit(),GetRectCenter(gg_rct_Quest_Guard_3))
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),gg_unit_H00E_0401,"TRIGSTR_2723",null,("Опасного бандита "+(GetHeroProperName(GetLastCreatedUnit())+" видели не далеко от города. По предварительным данным он сейчас возле монастыря. За его убийство ты получишь хорошую награду.")),bj_TIMETYPE_ADD,0,true)
call CreateQuestBJ(bj_QUESTTYPE_REQ_DISCOVERED,"TRIGSTR_2724",("-Найти  и убить бандита "+(GetHeroProperName(GetLastCreatedUnit()))),"ReplaceableTextures\\CommandButtons\\BTNBandit.blp")
set udg_Guard_Quest1=GetLastCreatedQuestBJ()
call CinematicModeBJ(false,GetPlayersAll())
call EnableTrigger(gg_trg_Quest_Guard_1_finish)
endif
endif
else
if(Trig_Quest_Guard_v1_Func003Func006C())then
call CreateNUnitsAtLoc(1,0x68303033,Player(10),GetRectCenter(gg_rct_Region_064),bj_UNIT_FACING)
set udg_Karavan=GetLastCreatedUnit()
call SetUnitPositionLoc(udg_Karavan,GetRectCenter(gg_rct_Region_064))
call CreateNUnitsAtLoc(1,0x48303045,GetOwningPlayer(GetSpellAbilityUnit()),GetRectCenter(gg_rct_Region_064),bj_UNIT_FACING)
set udg_Karavan_Guard=GetLastCreatedUnit()
call SetUnitPositionLoc(GetLastCreatedUnit(),GetRectCenter(gg_rct_Region_064))
call AddHeroXPSwapped(R2I((udg_Exp_hero-GetRandomReal(1.00,500.00))),udg_Karavan_Guard,false)
if(Trig_Quest_Guard_v1_Func003Func006Func009C())then
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),gg_unit_H00E_0401,"TRIGSTR_2780",null,"TRIGSTR_2782",bj_TIMETYPE_ADD,0,true)
call CreateQuestBJ(bj_QUESTTYPE_REQ_DISCOVERED,"TRIGSTR_2781","TRIGSTR_2783","ReplaceableTextures\\CommandButtons\\BTNRiderlessHorse.blp")
set udg_Guard_Quest1=GetLastCreatedQuestBJ()
call CinematicModeBJ(false,GetPlayersAll())
call EnableTrigger(gg_trg_Quest_Guard_2_1)
call EnableTrigger(gg_trg_Quest_Guard_2_finish)
call EnableTrigger(gg_trg_Quest_Guard_2_fale)
else
call CreateNUnitsAtLoc(1,0x68303033,Player(8),GetRectCenter(gg_rct_Region_064),bj_UNIT_FACING)
set udg_Karavan=GetLastCreatedUnit()
call SetUnitPositionLoc(udg_Karavan,GetRectCenter(gg_rct_Region_064))
call CreateNUnitsAtLoc(1,0x48303045,GetOwningPlayer(GetSpellAbilityUnit()),GetRectCenter(gg_rct_Region_064),bj_UNIT_FACING)
set udg_Karavan_Guard=GetLastCreatedUnit()
call SetUnitPositionLoc(GetLastCreatedUnit(),GetRectCenter(gg_rct_Region_064))
call AddHeroXPSwapped(R2I((udg_Exp_hero-GetRandomReal(1.00,500.00))),udg_Karavan_Guard,false)
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),gg_unit_H00E_0401,"TRIGSTR_2817",null,"TRIGSTR_2818",bj_TIMETYPE_ADD,0,true)
call CreateQuestBJ(bj_QUESTTYPE_REQ_DISCOVERED,"TRIGSTR_2819","TRIGSTR_2820","ReplaceableTextures\\CommandButtons\\BTNRiderlessHorse.blp")
set udg_Guard_Quest1=GetLastCreatedQuestBJ()
call CinematicModeBJ(false,GetPlayersAll())
call EnableTrigger(gg_trg_Quest_Guard_2_1)
call EnableTrigger(gg_trg_Quest_Guard_2_finish)
call EnableTrigger(gg_trg_Quest_Guard_2_fale)
endif
else
if(Trig_Quest_Guard_v1_Func003Func006Func001C())then
call CreateNUnitsAtLoc(4,0x48303054,Player(8),GetRandomLocInRect(gg_rct_Quest_Guard_1),bj_UNIT_FACING)
set udg_Quest_G_Bandits=GetUnitsInRectAll(gg_rct_Quest_Guard_1)
set udg_Quest_Banda=CountUnitsInGroup(udg_Quest_G_Bandits)
set udg_Exp_hero=I2R(GetHeroXP(udg_player1hero))
call AddHeroXPSwapped(R2I((udg_Exp_hero-GetRandomReal(1.00,500.00))),udg_Guard_Quest_Bandit,false)
if(Trig_Quest_Guard_v1_Func003Func006Func001Func007C())then
call SetUnitPositionLoc(GetLastCreatedUnit(),GetRectCenter(gg_rct_Quest_Guard_1))
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),gg_unit_H00E_0401,"TRIGSTR_2836",null,"TRIGSTR_2837",bj_TIMETYPE_ADD,0,true)
call CreateQuestBJ(bj_QUESTTYPE_REQ_DISCOVERED,"TRIGSTR_2838",("-Найти  и убить бандита "+(GetHeroProperName(GetLastCreatedUnit()))),"ReplaceableTextures\\CommandButtons\\BTNBandit.blp")
set udg_Guard_Quest1=GetLastCreatedQuestBJ()
call CreateNUnitsAtLoc(1,0x48303045,Player(10),GetRectCenter(gg_rct_Region_065),bj_UNIT_FACING)
call IssueTargetOrderBJ(GetLastCreatedUnit(),"smart",udg_player1hero)
set udg_Gurad_Friend=GetLastCreatedUnit()
call CinematicModeBJ(false,GetPlayersAll())
call EnableTrigger(gg_trg_Quest_Guard_uncom)
call EnableTrigger(gg_trg_Quest_Guard_3_finish)
else
endif
else
if(Trig_Quest_Guard_v1_Func003Func006Func001Func001C())then
call SetUnitPositionLoc(GetLastCreatedUnit(),GetRectCenter(gg_rct_Quest_Guard_1))
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),gg_unit_H00E_0401,"TRIGSTR_2855",null,"TRIGSTR_2856",bj_TIMETYPE_ADD,0,true)
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),gg_unit_H00E_0401,"TRIGSTR_2858",null,"TRIGSTR_2859",bj_TIMETYPE_ADD,0,true)
call CreateQuestBJ(bj_QUESTTYPE_REQ_DISCOVERED,"TRIGSTR_2857",(("-Убить ещё "+I2S(udg_G_quest_dino))+" ящеров"),"ReplaceableTextures\\CommandButtons\\BTNGreenDragonSpawn.blp")
set udg_Guard_Quest1=GetLastCreatedQuestBJ()
call CinematicModeBJ(false,GetPlayersAll())
call EnableTrigger(gg_trg_Quest_Guard_4_finish)
call EnableTrigger(gg_trg_Quest_Guard_4_integer)
else
if(Trig_Quest_Guard_v1_Func003Func006Func001Func001Func001C())then
call SetUnitPositionLoc(GetLastCreatedUnit(),GetRectCenter(gg_rct_Quest_Guard_1))
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),gg_unit_H00E_0401,"TRIGSTR_2893",null,"TRIGSTR_2894",bj_TIMETYPE_ADD,0,true)
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),gg_unit_H00E_0401,"TRIGSTR_2895",null,"TRIGSTR_2896",bj_TIMETYPE_ADD,0,true)
call CreateQuestBJ(bj_QUESTTYPE_REQ_DISCOVERED,"TRIGSTR_2897",(("-Убить ещё "+I2S(udg_G_quest_dino))+" вепрей"),"ReplaceableTextures\\CommandButtons\\BTNGenericCreepBuilding.blp")
set udg_Guard_Quest1=GetLastCreatedQuestBJ()
call CinematicModeBJ(false,GetPlayersAll())
call EnableTrigger(gg_trg_Quest_Guard_5_finish)
call EnableTrigger(gg_trg_Quest_Guard_5_integer)
else
call SetUnitPositionLoc(GetLastCreatedUnit(),GetRectCenter(gg_rct_Quest_Guard_1))
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),gg_unit_H00E_0401,"TRIGSTR_2900",null,"TRIGSTR_2901",bj_TIMETYPE_ADD,0,true)
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),gg_unit_H00E_0401,"TRIGSTR_2902",null,"TRIGSTR_2903",bj_TIMETYPE_ADD,0,true)
call CreateQuestBJ(bj_QUESTTYPE_REQ_DISCOVERED,"TRIGSTR_2904",(("-Убить ещё "+I2S(udg_G_quest_dino))+" вепрей"),"ReplaceableTextures\\CommandButtons\\BTNGenericCreepBuilding.blp")
set udg_Guard_Quest1=GetLastCreatedQuestBJ()
call CinematicModeBJ(false,GetPlayersAll())
call EnableTrigger(gg_trg_Quest_Guard_5_finish)
call EnableTrigger(gg_trg_Quest_Guard_5_integer)
endif
endif
endif
endif
endif
call DisableTrigger(GetTriggeringTrigger())
call EnableTrigger(gg_trg_Quest_Guard_uncom)
endfunction
function InitTrig_Quest_Guard_v1 takes nothing returns nothing
set gg_trg_Quest_Guard_v1=CreateTrigger()
call TriggerRegisterDialogEventBJ(gg_trg_Quest_Guard_v1,udg_Guard)
call TriggerAddCondition(gg_trg_Quest_Guard_v1,Condition(function Trig_Quest_Guard_v1_Conditions))
call TriggerAddAction(gg_trg_Quest_Guard_v1,function Trig_Quest_Guard_v1_Actions)
endfunction
function Trig_Quest_Guard_uncom_Conditions takes nothing returns boolean
if(not(GetClickedButtonBJ()==udg_Guard_take_quest))then
return false
endif
return true
endfunction
function Trig_Quest_Guard_uncom_Actions takes nothing returns nothing
call CinematicModeBJ(true,GetPlayersAll())
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),gg_unit_H00E_0401,"TRIGSTR_2735",null,"TRIGSTR_2736",bj_TIMETYPE_ADD,0,true)
call CinematicModeBJ(false,GetPlayersAll())
endfunction
function InitTrig_Quest_Guard_uncom takes nothing returns nothing
set gg_trg_Quest_Guard_uncom=CreateTrigger()
call DisableTrigger(gg_trg_Quest_Guard_uncom)
call TriggerRegisterDialogEventBJ(gg_trg_Quest_Guard_uncom,udg_Guard)
call TriggerAddCondition(gg_trg_Quest_Guard_uncom,Condition(function Trig_Quest_Guard_uncom_Conditions))
call TriggerAddAction(gg_trg_Quest_Guard_uncom,function Trig_Quest_Guard_uncom_Actions)
endfunction
function Trig_Quest_Guard_bb_Conditions takes nothing returns boolean
if(not(GetClickedButtonBJ()==udg_Guard_bb))then
return false
endif
return true
endfunction
function Trig_Quest_Guard_bb_Actions takes nothing returns nothing
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),gg_unit_H00E_0401,"TRIGSTR_2871",null,"TRIGSTR_2872",bj_TIMETYPE_ADD,0,true)
call CinematicModeBJ(false,GetPlayersAll())
endfunction
function InitTrig_Quest_Guard_bb takes nothing returns nothing
set gg_trg_Quest_Guard_bb=CreateTrigger()
call TriggerRegisterDialogEventBJ(gg_trg_Quest_Guard_bb,udg_Guard)
call TriggerAddCondition(gg_trg_Quest_Guard_bb,Condition(function Trig_Quest_Guard_bb_Conditions))
call TriggerAddAction(gg_trg_Quest_Guard_bb,function Trig_Quest_Guard_bb_Actions)
endfunction
function Trig_Quest_Guard_about_city_Conditions takes nothing returns boolean
if(not(GetClickedButtonBJ()==udg_Guard_about_city))then
return false
endif
return true
endfunction
function Trig_Quest_Guard_about_city_Actions takes nothing returns nothing
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),gg_unit_H00E_0401,"TRIGSTR_2873",null,"TRIGSTR_2874",bj_TIMETYPE_ADD,0,true)
call DialogDisplayBJ(true,udg_Guard,Player(0))
endfunction
function InitTrig_Quest_Guard_about_city takes nothing returns nothing
set gg_trg_Quest_Guard_about_city=CreateTrigger()
call TriggerRegisterDialogEventBJ(gg_trg_Quest_Guard_about_city,udg_Guard)
call TriggerAddCondition(gg_trg_Quest_Guard_about_city,Condition(function Trig_Quest_Guard_about_city_Conditions))
call TriggerAddAction(gg_trg_Quest_Guard_about_city,function Trig_Quest_Guard_about_city_Actions)
endfunction
function Trig_Quest_Guard_1_finish_Conditions takes nothing returns boolean
if(not(GetDyingUnit()==udg_Guard_Quest_Bandit))then
return false
endif
return true
endfunction
function Trig_Quest_Guard_1_finish_Actions takes nothing returns nothing
call QuestSetCompletedBJ(udg_Guard_Quest1,true)
call QuestMessageBJ(GetPlayersAll(),bj_QUESTMESSAGE_COMPLETED,"TRIGSTR_2738")
call AdjustPlayerStateBJ(200,GetOwningPlayer(GetKillingUnitBJ()),PLAYER_STATE_RESOURCE_GOLD)
call QuestMessageBJ(GetPlayersAll(),bj_QUESTMESSAGE_COMPLETED,"TRIGSTR_2739")
set udg_R_Guard=(udg_R_Guard+5)
call QuestMessageBJ(GetPlayersAll(),bj_QUESTMESSAGE_COMPLETED,"TRIGSTR_2751")
call DisableTrigger(GetTriggeringTrigger())
call EnableTrigger(gg_trg_Quest_Guard_v1)
call DisableTrigger(gg_trg_Quest_Guard_uncom)
endfunction
function InitTrig_Quest_Guard_1_finish takes nothing returns nothing
set gg_trg_Quest_Guard_1_finish=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Quest_Guard_1_finish,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(gg_trg_Quest_Guard_1_finish,Condition(function Trig_Quest_Guard_1_finish_Conditions))
call TriggerAddAction(gg_trg_Quest_Guard_1_finish,function Trig_Quest_Guard_1_finish_Actions)
endfunction
function Trig_Quest_Guard_2_1_Conditions takes nothing returns boolean
if(not(GetEnteringUnit()==udg_player1hero))then
return false
endif
return true
endfunction
function Trig_Quest_Guard_2_1_Actions takes nothing returns nothing
call IssueTargetOrderBJ(udg_Karavan,"smart",udg_player1hero)
call IssueTargetOrderBJ(udg_Karavan_Guard,"smart",udg_player1hero)
call DisableTrigger(GetTriggeringTrigger())
call EnableTrigger(gg_trg_Quest_Guard_2_finish)
endfunction
function InitTrig_Quest_Guard_2_1 takes nothing returns nothing
set gg_trg_Quest_Guard_2_1=CreateTrigger()
call DisableTrigger(gg_trg_Quest_Guard_2_1)
call TriggerRegisterEnterRectSimple(gg_trg_Quest_Guard_2_1,gg_rct_Region_065)
call TriggerAddCondition(gg_trg_Quest_Guard_2_1,Condition(function Trig_Quest_Guard_2_1_Conditions))
call TriggerAddAction(gg_trg_Quest_Guard_2_1,function Trig_Quest_Guard_2_1_Actions)
endfunction
function Trig_Quest_Guard_3_finish_Conditions takes nothing returns boolean
if(not(CountUnitsInGroup(udg_Quest_G_Bandits)==0))then
return false
endif
return true
endfunction
function Trig_Quest_Guard_3_finish_Actions takes nothing returns nothing
call QuestSetCompletedBJ(udg_Guard_Quest1,true)
call QuestMessageBJ(GetPlayersAll(),bj_QUESTMESSAGE_COMPLETED,"TRIGSTR_2839")
call AdjustPlayerStateBJ(400,GetOwningPlayer(udg_player1hero),PLAYER_STATE_RESOURCE_GOLD)
call QuestMessageBJ(GetPlayersAll(),bj_QUESTMESSAGE_COMPLETED,"TRIGSTR_2840")
set udg_R_Guard=(udg_R_Guard+5)
call SetUnitPositionLoc(udg_Gurad_Friend,GetRectCenter(GetPlayableMapRect()))
call KillUnit(udg_Gurad_Friend)
call DisableTrigger(GetTriggeringTrigger())
call DisableTrigger(gg_trg_Quest_Guard_uncom)
call EnableTrigger(gg_trg_Quest_Guard_v1)
endfunction
function InitTrig_Quest_Guard_3_finish takes nothing returns nothing
set gg_trg_Quest_Guard_3_finish=CreateTrigger()
call DisableTrigger(gg_trg_Quest_Guard_3_finish)
call TriggerRegisterTimerEventPeriodic(gg_trg_Quest_Guard_3_finish,2)
call TriggerAddCondition(gg_trg_Quest_Guard_3_finish,Condition(function Trig_Quest_Guard_3_finish_Conditions))
call TriggerAddAction(gg_trg_Quest_Guard_3_finish,function Trig_Quest_Guard_3_finish_Actions)
endfunction
function Trig_Quest_Guard_4_finish_Conditions takes nothing returns boolean
if(not(udg_G_quest_dino==0))then
return false
endif
return true
endfunction
function Trig_Quest_Guard_4_finish_Actions takes nothing returns nothing
call QuestSetCompletedBJ(udg_Guard_Quest1,true)
call QuestMessageBJ(GetPlayersAll(),bj_QUESTMESSAGE_COMPLETED,"TRIGSTR_2860")
call AdjustPlayerStateBJ(400,GetOwningPlayer(udg_player1hero),PLAYER_STATE_RESOURCE_GOLD)
call QuestMessageBJ(GetPlayersAll(),bj_QUESTMESSAGE_COMPLETED,"TRIGSTR_2861")
set udg_R_Guard=(udg_R_Guard+5)
set udg_G_quest_dino=10
call DisableTrigger(GetTriggeringTrigger())
call DisableTrigger(gg_trg_Quest_Guard_uncom)
call DisableTrigger(gg_trg_Quest_Guard_4_integer)
call EnableTrigger(gg_trg_Quest_Guard_v1)
endfunction
function InitTrig_Quest_Guard_4_finish takes nothing returns nothing
set gg_trg_Quest_Guard_4_finish=CreateTrigger()
call DisableTrigger(gg_trg_Quest_Guard_4_finish)
call TriggerRegisterTimerEventPeriodic(gg_trg_Quest_Guard_4_finish,2)
call TriggerAddCondition(gg_trg_Quest_Guard_4_finish,Condition(function Trig_Quest_Guard_4_finish_Conditions))
call TriggerAddAction(gg_trg_Quest_Guard_4_finish,function Trig_Quest_Guard_4_finish_Actions)
endfunction
function Trig_Quest_Guard_4_integer_Func002001 takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())==0x6E303044)
endfunction
function Trig_Quest_Guard_4_integer_Func002002 takes nothing returns boolean
return(GetOwningPlayer(GetKillingUnitBJ())==Player(0))
endfunction
function Trig_Quest_Guard_4_integer_Conditions takes nothing returns boolean
if(not GetBooleanAnd((GetUnitTypeId(GetDyingUnit())==0x6E303044),(GetOwningPlayer(GetKillingUnitBJ())==Player(0))))then
return false
endif
return true
endfunction
function Trig_Quest_Guard_4_integer_Actions takes nothing returns nothing
set udg_G_quest_dino=(udg_G_quest_dino-1)
endfunction
function InitTrig_Quest_Guard_4_integer takes nothing returns nothing
set gg_trg_Quest_Guard_4_integer=CreateTrigger()
call DisableTrigger(gg_trg_Quest_Guard_4_integer)
call TriggerRegisterPlayerUnitEventSimple(gg_trg_Quest_Guard_4_integer,Player(PLAYER_NEUTRAL_AGGRESSIVE),EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(gg_trg_Quest_Guard_4_integer,Condition(function Trig_Quest_Guard_4_integer_Conditions))
call TriggerAddAction(gg_trg_Quest_Guard_4_integer,function Trig_Quest_Guard_4_integer_Actions)
endfunction
function Trig_Quest_Guard_5_finish_Conditions takes nothing returns boolean
if(not(udg_G_quest_pig==0))then
return false
endif
return true
endfunction
function Trig_Quest_Guard_5_finish_Actions takes nothing returns nothing
call QuestSetCompletedBJ(udg_Guard_Quest1,true)
call QuestMessageBJ(GetPlayersAll(),bj_QUESTMESSAGE_COMPLETED,"TRIGSTR_2898")
call AdjustPlayerStateBJ(400,GetOwningPlayer(udg_player1hero),PLAYER_STATE_RESOURCE_GOLD)
call QuestMessageBJ(GetPlayersAll(),bj_QUESTMESSAGE_COMPLETED,"TRIGSTR_2899")
set udg_R_Guard=(udg_R_Guard+5)
set udg_G_quest_pig=5
call DisableTrigger(GetTriggeringTrigger())
call DisableTrigger(gg_trg_Quest_Guard_uncom)
call DisableTrigger(gg_trg_Quest_Guard_5_integer)
call EnableTrigger(gg_trg_Quest_Guard_v1)
endfunction
function InitTrig_Quest_Guard_5_finish takes nothing returns nothing
set gg_trg_Quest_Guard_5_finish=CreateTrigger()
call DisableTrigger(gg_trg_Quest_Guard_5_finish)
call TriggerRegisterTimerEventPeriodic(gg_trg_Quest_Guard_5_finish,2)
call TriggerAddCondition(gg_trg_Quest_Guard_5_finish,Condition(function Trig_Quest_Guard_5_finish_Conditions))
call TriggerAddAction(gg_trg_Quest_Guard_5_finish,function Trig_Quest_Guard_5_finish_Actions)
endfunction
function Trig_Quest_Guard_5_integer_Func002001 takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())==0x6E303035)
endfunction
function Trig_Quest_Guard_5_integer_Func002002 takes nothing returns boolean
return(GetOwningPlayer(GetKillingUnitBJ())==Player(0))
endfunction
function Trig_Quest_Guard_5_integer_Conditions takes nothing returns boolean
if(not GetBooleanAnd((GetUnitTypeId(GetDyingUnit())==0x6E303035),(GetOwningPlayer(GetKillingUnitBJ())==Player(0))))then
return false
endif
return true
endfunction
function Trig_Quest_Guard_5_integer_Actions takes nothing returns nothing
set udg_G_quest_pig=(udg_G_quest_pig-1)
endfunction
function InitTrig_Quest_Guard_5_integer takes nothing returns nothing
set gg_trg_Quest_Guard_5_integer=CreateTrigger()
call DisableTrigger(gg_trg_Quest_Guard_5_integer)
call TriggerRegisterPlayerUnitEventSimple(gg_trg_Quest_Guard_5_integer,Player(PLAYER_NEUTRAL_AGGRESSIVE),EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(gg_trg_Quest_Guard_5_integer,Condition(function Trig_Quest_Guard_5_integer_Conditions))
call TriggerAddAction(gg_trg_Quest_Guard_5_integer,function Trig_Quest_Guard_5_integer_Actions)
endfunction
function Trig_Quest_Guard_2_finish_Func011001 takes nothing returns boolean
return(GetUnitTypeId(GetEnteringUnit())==0x68303033)
endfunction
function Trig_Quest_Guard_2_finish_Func011002 takes nothing returns boolean
return(GetUnitTypeId(GetEnteringUnit())==0x68303033)
endfunction
function Trig_Quest_Guard_2_finish_Conditions takes nothing returns boolean
if(not GetBooleanOr((GetUnitTypeId(GetEnteringUnit())==0x68303033),(GetUnitTypeId(GetEnteringUnit())==0x68303033)))then
return false
endif
return true
endfunction
function Trig_Quest_Guard_2_finish_Actions takes nothing returns nothing
call QuestSetCompletedBJ(udg_Guard_Quest1,true)
call QuestMessageBJ(GetPlayersAll(),bj_QUESTMESSAGE_COMPLETED,"TRIGSTR_2791")
call AdjustPlayerStateBJ(200,GetOwningPlayer(GetKillingUnitBJ()),PLAYER_STATE_RESOURCE_GOLD)
call QuestMessageBJ(GetPlayersAll(),bj_QUESTMESSAGE_COMPLETED,"TRIGSTR_2792")
set udg_R_Guard=(udg_R_Guard+5)
call QuestMessageBJ(GetPlayersAll(),bj_QUESTMESSAGE_COMPLETED,"TRIGSTR_2793")
call DisableTrigger(gg_trg_Quest_Guard_2_fale)
call SetUnitPositionLoc(udg_Karavan,GetRectCenter(GetPlayableMapRect()))
call KillUnit(udg_Karavan)
call EnableTrigger(gg_trg_Quest_Guard_2_fale)
call DisableTrigger(GetTriggeringTrigger())
call DisableTrigger(gg_trg_Quest_Guard_uncom)
call EnableTrigger(gg_trg_Quest_Guard_v1)
endfunction
function InitTrig_Quest_Guard_2_finish takes nothing returns nothing
set gg_trg_Quest_Guard_2_finish=CreateTrigger()
call DisableTrigger(gg_trg_Quest_Guard_2_finish)
call TriggerRegisterEnterRectSimple(gg_trg_Quest_Guard_2_finish,gg_rct_WP_10)
call TriggerAddCondition(gg_trg_Quest_Guard_2_finish,Condition(function Trig_Quest_Guard_2_finish_Conditions))
call TriggerAddAction(gg_trg_Quest_Guard_2_finish,function Trig_Quest_Guard_2_finish_Actions)
endfunction
function Trig_Quest_Guard_2_fale_Conditions takes nothing returns boolean
if(not(GetDyingUnit()==udg_Karavan))then
return false
endif
return true
endfunction
function Trig_Quest_Guard_2_fale_Actions takes nothing returns nothing
call QuestSetCompletedBJ(udg_Guard_Quest1,false)
call QuestMessageBJ(GetPlayersAll(),bj_QUESTMESSAGE_COMPLETED,"TRIGSTR_2841")
set udg_R_Guard=(udg_R_Guard-2)
call QuestMessageBJ(GetPlayersAll(),bj_QUESTMESSAGE_COMPLETED,"TRIGSTR_2843")
call DisableTrigger(GetTriggeringTrigger())
call EnableTrigger(gg_trg_Quest_Guard_v1)
call DisableTrigger(gg_trg_Quest_Guard_uncom)
endfunction
function InitTrig_Quest_Guard_2_fale takes nothing returns nothing
set gg_trg_Quest_Guard_2_fale=CreateTrigger()
call DisableTrigger(gg_trg_Quest_Guard_2_fale)
call TriggerRegisterAnyUnitEventBJ(gg_trg_Quest_Guard_2_fale,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(gg_trg_Quest_Guard_2_fale,Condition(function Trig_Quest_Guard_2_fale_Conditions))
call TriggerAddAction(gg_trg_Quest_Guard_2_fale,function Trig_Quest_Guard_2_fale_Actions)
endfunction
function Trig_Captain_Quest_1_Func005001 takes nothing returns boolean
return(GetSpellAbilityId()==0x41303142)
endfunction
function Trig_Captain_Quest_1_Func005002 takes nothing returns boolean
return(GetSpellTargetUnit()==gg_unit_H01D_0488)
endfunction
function Trig_Captain_Quest_1_Conditions takes nothing returns boolean
if(not GetBooleanAnd((GetSpellAbilityId()==0x41303142),(GetSpellTargetUnit()==gg_unit_H01D_0488)))then
return false
endif
return true
endfunction
function Trig_Captain_Quest_1_Func004A takes nothing returns nothing
call DialogDisplayBJ(true,udg_Guard_Captain,GetEnumPlayer())
endfunction
function Trig_Captain_Quest_1_Actions takes nothing returns nothing
call CinematicModeBJ(true,GetPlayersAll())
call SetUnitFacingToFaceUnitTimed(gg_unit_H01D_0488,GetSpellAbilityUnit(),0.50)
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),gg_unit_H01D_0488,"TRIGSTR_2672",gg_snd_tutor1,"TRIGSTR_2673",bj_TIMETYPE_ADD,0,true)
call ForForce(GetPlayersAll(),function Trig_Captain_Quest_1_Func004A)
endfunction
function InitTrig_Captain_Quest_1 takes nothing returns nothing
set gg_trg_Captain_Quest_1=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Captain_Quest_1,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(gg_trg_Captain_Quest_1,Condition(function Trig_Captain_Quest_1_Conditions))
call TriggerAddAction(gg_trg_Captain_Quest_1,function Trig_Captain_Quest_1_Actions)
endfunction
function Trig_Captain_Q_in_progress_Func005001 takes nothing returns boolean
return(GetSpellAbilityId()==0x41303142)
endfunction
function Trig_Captain_Q_in_progress_Func005002 takes nothing returns boolean
return(GetSpellTargetUnit()==gg_unit_H01D_0488)
endfunction
function Trig_Captain_Q_in_progress_Conditions takes nothing returns boolean
if(not GetBooleanAnd((GetSpellAbilityId()==0x41303142),(GetSpellTargetUnit()==gg_unit_H01D_0488)))then
return false
endif
return true
endfunction
function Trig_Captain_Q_in_progress_Actions takes nothing returns nothing
call CinematicModeBJ(true,GetPlayersAll())
call SetUnitFacingToFaceUnitTimed(gg_unit_H01D_0488,GetSpellAbilityUnit(),0.50)
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),gg_unit_H00A_0031,"TRIGSTR_2711",gg_snd_tutor1,"TRIGSTR_2712",bj_TIMETYPE_ADD,0,true)
call CinematicModeBJ(false,GetPlayersAll())
endfunction
function InitTrig_Captain_Q_in_progress takes nothing returns nothing
set gg_trg_Captain_Q_in_progress=CreateTrigger()
call DisableTrigger(gg_trg_Captain_Q_in_progress)
call TriggerRegisterAnyUnitEventBJ(gg_trg_Captain_Q_in_progress,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(gg_trg_Captain_Q_in_progress,Condition(function Trig_Captain_Q_in_progress_Conditions))
call TriggerAddAction(gg_trg_Captain_Q_in_progress,function Trig_Captain_Q_in_progress_Actions)
endfunction
function Trig_Cap_Ask_1_Conditions takes nothing returns boolean
if(not(GetClickedButtonBJ()==udg_Guard_cap_1))then
return false
endif
return true
endfunction
function Trig_Cap_Ask_1_Func004A takes nothing returns nothing
call DialogDisplayBJ(true,udg_Guard_Captain,GetEnumPlayer())
endfunction
function Trig_Cap_Ask_1_Actions takes nothing returns nothing
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),gg_unit_H01D_0488,"TRIGSTR_2701",null,"TRIGSTR_2702",bj_TIMETYPE_ADD,0,true)
call TriggerSleepAction(2)
call ForForce(GetPlayersAll(),function Trig_Cap_Ask_1_Func004A)
endfunction
function InitTrig_Cap_Ask_1 takes nothing returns nothing
set gg_trg_Cap_Ask_1=CreateTrigger()
call TriggerRegisterDialogEventBJ(gg_trg_Cap_Ask_1,udg_Guard_Captain)
call TriggerAddCondition(gg_trg_Cap_Ask_1,Condition(function Trig_Cap_Ask_1_Conditions))
call TriggerAddAction(gg_trg_Cap_Ask_1,function Trig_Cap_Ask_1_Actions)
endfunction
function Trig_Cap_Ask_2_Conditions takes nothing returns boolean
if(not(GetClickedButtonBJ()==udg_Guard_cap_2))then
return false
endif
return true
endfunction
function Trig_Cap_Ask_2_Func001C takes nothing returns boolean
if(not(udg_R_Guard>=25))then
return false
endif
return true
endfunction
function Trig_Cap_Ask_2_Actions takes nothing returns nothing
if(Trig_Cap_Ask_2_Func001C())then
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),gg_unit_H01D_0488,"TRIGSTR_2703",null,"TRIGSTR_2704",bj_TIMETYPE_ADD,0,true)
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),gg_unit_H01D_0488,"TRIGSTR_2707",null,"TRIGSTR_2708",bj_TIMETYPE_ADD,0,true)
call TriggerSleepAction(2)
call CinematicModeBJ(false,GetPlayersAll())
call CreateQuestBJ(bj_QUESTTYPE_REQ_DISCOVERED,"TRIGSTR_2713","TRIGSTR_2714","ReplaceableTextures\\CommandButtons\\BTNBanditLord.blp")
set udg_Guard_Castle_save=GetLastCreatedQuestBJ()
call DisableTrigger(gg_trg_Captain_Quest_1)
call EnableTrigger(gg_trg_Captain_Q_in_progress)
else
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),gg_unit_H01D_0488,"TRIGSTR_2960",null,"TRIGSTR_2961",bj_TIMETYPE_ADD,0,true)
call QuestMessageBJ(GetPlayersAll(),bj_QUESTMESSAGE_UPDATED,"TRIGSTR_2962")
call CinematicModeBJ(false,GetPlayersAll())
endif
endfunction
function InitTrig_Cap_Ask_2 takes nothing returns nothing
set gg_trg_Cap_Ask_2=CreateTrigger()
call TriggerRegisterDialogEventBJ(gg_trg_Cap_Ask_2,udg_Guard_Captain)
call TriggerAddCondition(gg_trg_Cap_Ask_2,Condition(function Trig_Cap_Ask_2_Conditions))
call TriggerAddAction(gg_trg_Cap_Ask_2,function Trig_Cap_Ask_2_Actions)
endfunction
function Trig_Cap_Ask_3_Conditions takes nothing returns boolean
if(not(GetClickedButtonBJ()==udg_Guard_cap_3))then
return false
endif
return true
endfunction
function Trig_Cap_Ask_3_Actions takes nothing returns nothing
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),gg_unit_H01D_0488,"TRIGSTR_2705",null,"TRIGSTR_2706",bj_TIMETYPE_ADD,0,true)
call TriggerSleepAction(2)
call CinematicModeBJ(false,GetPlayersAll())
endfunction
function InitTrig_Cap_Ask_3 takes nothing returns nothing
set gg_trg_Cap_Ask_3=CreateTrigger()
call TriggerRegisterDialogEventBJ(gg_trg_Cap_Ask_3,udg_Guard_Captain)
call TriggerAddCondition(gg_trg_Cap_Ask_3,Condition(function Trig_Cap_Ask_3_Conditions))
call TriggerAddAction(gg_trg_Cap_Ask_3,function Trig_Cap_Ask_3_Actions)
endfunction
function Trig_fight1_Func004C takes nothing returns boolean
if(not(GetRandomInt(1,2)==1))then
return false
endif
return true
endfunction
function Trig_fight1_Func006C takes nothing returns boolean
if(not(GetRandomInt(1,2)==1))then
return false
endif
return true
endfunction
function Trig_fight1_Actions takes nothing returns nothing
call IssueImmediateOrderBJ(gg_unit_H00D_0035,"stop")
call IssueImmediateOrderBJ(gg_unit_H00D_0036,"stop")
call TriggerSleepAction(2)
if(Trig_fight1_Func004C())then
call IssueTargetOrderBJ(gg_unit_H00D_0036,"polymorph",gg_unit_H00D_0035)
call TriggerSleepAction(10.00)
else
call IssueTargetOrderBJ(gg_unit_H00D_0036,"attack",gg_unit_H00D_0035)
call IssueTargetOrderBJ(gg_unit_H00D_0035,"attack",gg_unit_H00D_0036)
call TriggerSleepAction(12.00)
endif
call TriggerSleepAction(2)
if(Trig_fight1_Func006C())then
call TriggerSleepAction(1.00)
call IssuePointOrderLocBJ(gg_unit_H00D_0035,"blizzard",GetUnitLoc(gg_unit_H00D_0036))
call IssueTargetOrderBJ(gg_unit_H00D_0036,"attack",gg_unit_H00D_0035)
call TriggerSleepAction(5.00)
call IssueTargetOrderBJ(gg_unit_H00D_0035,"attack",gg_unit_H00D_0036)
else
call IssueTargetOrderBJ(gg_unit_H00D_0036,"attack",gg_unit_H00D_0035)
call IssueTargetOrderBJ(gg_unit_H00D_0035,"attack",gg_unit_H00D_0036)
endif
endfunction
function InitTrig_fight1 takes nothing returns nothing
set gg_trg_fight1=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(gg_trg_fight1,10.00)
call TriggerAddAction(gg_trg_fight1,function Trig_fight1_Actions)
endfunction
function Trig_fight2_Actions takes nothing returns nothing
call DisableTrigger(gg_trg_fight1)
call IssueImmediateOrderBJ(gg_unit_H00D_0035,"stop")
call IssueImmediateOrderBJ(gg_unit_H00D_0036,"stop")
call IssuePointOrderLocBJ(gg_unit_H00D_0035,"move",GetRectCenter(gg_rct_Region_044))
call IssuePointOrderLocBJ(gg_unit_H00D_0036,"move",GetRectCenter(gg_rct_Region_045))
call TriggerSleepAction(5.00)
call SetUnitFacingToFaceUnitTimed(gg_unit_H00D_0035,gg_unit_H00D_0036,1.00)
call SetUnitFacingToFaceUnitTimed(gg_unit_H00D_0036,gg_unit_H00D_0035,1.00)
call TriggerSleepAction(15.00)
call EnableTrigger(gg_trg_fight1)
endfunction
function InitTrig_fight2 takes nothing returns nothing
set gg_trg_fight2=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(gg_trg_fight2,120.00)
call TriggerAddAction(gg_trg_fight2,function Trig_fight2_Actions)
endfunction
function Trig_Untitled_Trigger_007_Conditions takes nothing returns boolean
if(not(GetItemTypeId(GetManipulatedItem())==0x49303050))then
return false
endif
return true
endfunction
function Trig_Untitled_Trigger_007_Actions takes nothing returns nothing
call SetItemUserData(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(),0x49303050),(GetItemUserData(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(),0x49303050))+1))
endfunction
function InitTrig_Untitled_Trigger_007 takes nothing returns nothing
set gg_trg_Untitled_Trigger_007=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Untitled_Trigger_007,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerAddCondition(gg_trg_Untitled_Trigger_007,Condition(function Trig_Untitled_Trigger_007_Conditions))
call TriggerAddAction(gg_trg_Untitled_Trigger_007,function Trig_Untitled_Trigger_007_Actions)
endfunction
function Trig_B_gonzales_q_1_Func004001 takes nothing returns boolean
return(GetSpellAbilityId()==0x41303142)
endfunction
function Trig_B_gonzales_q_1_Func004002 takes nothing returns boolean
return(GetSpellTargetUnit()==gg_unit_H011_0380)
endfunction
function Trig_B_gonzales_q_1_Conditions takes nothing returns boolean
if(not GetBooleanAnd((GetSpellAbilityId()==0x41303142),(GetSpellTargetUnit()==gg_unit_H011_0380)))then
return false
endif
return true
endfunction
function Trig_B_gonzales_q_1_Func006Func002C takes nothing returns boolean
if(not(GetPlayerState(GetOwningPlayer(GetSpellAbilityUnit()),PLAYER_STATE_RESOURCE_GOLD)>=500))then
return false
endif
return true
endfunction
function Trig_B_gonzales_q_1_Func006C takes nothing returns boolean
if(not(GetItemTypeId(GetItemOfTypeFromUnitBJ(GetSpellAbilityUnit(),0x49303055))==0x49303055))then
return false
endif
return true
endfunction
function Trig_B_gonzales_q_1_Actions takes nothing returns nothing
set udg_B_gonzales_1=GetSpellAbilityUnit()
call ForceAddPlayerSimple(GetOwningPlayer(GetSpellAbilityUnit()),udg_B_gonzales_1_p)
call CinematicModeBJ(true,udg_B_gonzales_1_p)
call SetUnitFacingToFaceUnitTimed(gg_unit_H011_0380,GetSpellAbilityUnit(),0.50)
if(Trig_B_gonzales_q_1_Func006C())then
call QuestSetCompletedBJ(udg_Gonsales_q_1,true)
call TransmissionFromUnitWithNameBJ(udg_B_gonzales_1_p,gg_unit_H011_0380,"TRIGSTR_2517",null,"TRIGSTR_2518",bj_TIMETYPE_ADD,0,true)
call QuestMessageBJ(GetPlayersAll(),bj_QUESTMESSAGE_DISCOVERED,"TRIGSTR_2525")
call QuestMessageBJ(GetPlayersAll(),bj_QUESTMESSAGE_DISCOVERED,"TRIGSTR_2526")
call QuestMessageBJ(GetPlayersAll(),bj_QUESTMESSAGE_DISCOVERED,"TRIGSTR_2527")
call RemoveItem(GetItemOfTypeFromUnitBJ(GetSpellAbilityUnit(),0x49303055))
call AdjustPlayerStateBJ(200,GetOwningPlayer(GetSpellAbilityUnit()),PLAYER_STATE_RESOURCE_GOLD)
call DisableTrigger(GetTriggeringTrigger())
else
call TransmissionFromUnitWithNameBJ(udg_B_gonzales_1_p,gg_unit_H011_0380,"TRIGSTR_2519",null,"TRIGSTR_2520",bj_TIMETYPE_ADD,0,true)
if(Trig_B_gonzales_q_1_Func006Func002C())then
call TransmissionFromUnitWithNameBJ(udg_B_gonzales_1_p,gg_unit_H011_0380,"TRIGSTR_2521",null,"TRIGSTR_2522",bj_TIMETYPE_ADD,0,true)
call AdjustPlayerStateBJ(-300,GetOwningPlayer(GetSpellAbilityUnit()),PLAYER_STATE_RESOURCE_GOLD)
call QuestMessageBJ(GetPlayersAll(),bj_QUESTMESSAGE_DISCOVERED,"TRIGSTR_2528")
call TriggerSleepAction(1.00)
call QuestMessageBJ(GetPlayersAll(),bj_QUESTMESSAGE_DISCOVERED,"TRIGSTR_2529")
call QuestSetCompletedBJ(udg_Gonsales_q_1,true)
call DisableTrigger(GetTriggeringTrigger())
else
call TransmissionFromUnitWithNameBJ(udg_B_gonzales_1_p,gg_unit_H011_0380,"TRIGSTR_2523",null,"TRIGSTR_2524",bj_TIMETYPE_ADD,0,true)
call DisableTrigger(GetTriggeringTrigger())
endif
endif
call TriggerSleepAction(1.00)
call CinematicModeBJ(false,udg_B_gonzales_1_p)
call DisableTrigger(GetTriggeringTrigger())
endfunction
function InitTrig_B_gonzales_q_1 takes nothing returns nothing
set gg_trg_B_gonzales_q_1=CreateTrigger()
call DisableTrigger(gg_trg_B_gonzales_q_1)
call TriggerRegisterAnyUnitEventBJ(gg_trg_B_gonzales_q_1,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(gg_trg_B_gonzales_q_1,Condition(function Trig_B_gonzales_q_1_Conditions))
call TriggerAddAction(gg_trg_B_gonzales_q_1,function Trig_B_gonzales_q_1_Actions)
endfunction
function Trig_Bandit_Vino_Func005001 takes nothing returns boolean
return(GetSpellAbilityId()==0x41303142)
endfunction
function Trig_Bandit_Vino_Func005002 takes nothing returns boolean
return(GetSpellTargetUnit()==gg_unit_H00T_0354)
endfunction
function Trig_Bandit_Vino_Conditions takes nothing returns boolean
if(not GetBooleanAnd((GetSpellAbilityId()==0x41303142),(GetSpellTargetUnit()==gg_unit_H00T_0354)))then
return false
endif
return true
endfunction
function Trig_Bandit_Vino_Func004C takes nothing returns boolean
if(not(GetItemTypeId(GetItemOfTypeFromUnitBJ(GetSpellAbilityUnit(),0x49303053))==0x49303053))then
return false
endif
return true
endfunction
function Trig_Bandit_Vino_Actions takes nothing returns nothing
set udg_B_guard_p=GetSpellAbilityUnit()
call CinematicModeBJ(true,udg_B_guard)
call SetUnitFacingToFaceUnitTimed(gg_unit_H00T_0354,GetSpellAbilityUnit(),1.00)
if(Trig_Bandit_Vino_Func004C())then
call TransmissionFromUnitWithNameBJ(udg_B_guard,gg_unit_H00T_0354,"TRIGSTR_2373",null,"TRIGSTR_2374",bj_TIMETYPE_ADD,0,true)
call TriggerSleepAction(2)
call IssuePointOrderLocBJ(gg_unit_H00T_0354,"move",GetRectCenter(gg_rct_Region_035))
call AddHeroXPSwapped(50,GetSpellAbilityUnit(),true)
call TriggerSleepAction(3.00)
call SetUnitFacingToFaceUnitTimed(gg_unit_H00T_0354,gg_unit_H00W_0361,2.00)
call RemoveItem(GetItemOfTypeFromUnitBJ(GetSpellAbilityUnit(),0x49303053))
call QuestSetCompletedBJ(udg_Bandit_Vino,true)
call QuestMessageBJ(GetPlayersAll(),bj_QUESTMESSAGE_DISCOVERED,"TRIGSTR_2426")
call DisableTrigger(GetTriggeringTrigger())
else
call TransmissionFromUnitWithNameBJ(udg_B_guard,gg_unit_H00T_0354,"TRIGSTR_2423",null,"TRIGSTR_2424",bj_TIMETYPE_ADD,0,true)
call TriggerSleepAction(0.20)
call DisableTrigger(gg_trg_DIPLOMATY)
call TriggerSleepAction(1.00)
call IssueTargetOrderBJ(gg_unit_H00T_0354,"attackonce",GetSpellAbilityUnit())
call IssueTargetOrderBJ(gg_unit_H00T_0354,"attackonce",GetSpellAbilityUnit())
call TriggerSleepAction(1.00)
call EnableTrigger(gg_trg_DIPLOMATY)
endif
call TriggerSleepAction(2.00)
call CinematicModeBJ(false,udg_B_guard)
endfunction
function InitTrig_Bandit_Vino takes nothing returns nothing
set gg_trg_Bandit_Vino=CreateTrigger()
call DisableTrigger(gg_trg_Bandit_Vino)
call TriggerRegisterAnyUnitEventBJ(gg_trg_Bandit_Vino,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(gg_trg_Bandit_Vino,Condition(function Trig_Bandit_Vino_Conditions))
call TriggerAddAction(gg_trg_Bandit_Vino,function Trig_Bandit_Vino_Actions)
endfunction
function Trig_G_1_Enrike_Func003001 takes nothing returns boolean
return(GetSpellAbilityId()==0x41303142)
endfunction
function Trig_G_1_Enrike_Func003002 takes nothing returns boolean
return(GetSpellTargetUnit()==gg_unit_H013_0383)
endfunction
function Trig_G_1_Enrike_Conditions takes nothing returns boolean
if(not GetBooleanAnd((GetSpellAbilityId()==0x41303142),(GetSpellTargetUnit()==gg_unit_H013_0383)))then
return false
endif
return true
endfunction
function Trig_G_1_Enrike_Actions takes nothing returns nothing
call ForceAddPlayerSimple(GetOwningPlayer(GetSpellAbilityUnit()),udg_B_enrike_p)
call CinematicModeBJ(true,udg_B_enrike_p)
call SetUnitFacingToFaceUnitTimed(gg_unit_H013_0383,GetSpellAbilityUnit(),0.50)
call TriggerSleepAction(1.00)
call TransmissionFromUnitWithNameBJ(udg_B_enrike_p,gg_unit_H013_0383,"TRIGSTR_2478",null,"TRIGSTR_2479",bj_TIMETYPE_ADD,0,true)
call TransmissionFromUnitWithNameBJ(udg_B_enrike_p,gg_unit_H013_0383,"TRIGSTR_2480",null,"TRIGSTR_2481",bj_TIMETYPE_ADD,0,true)
call TriggerSleepAction(1.00)
call IssuePointOrderLocBJ(gg_unit_H013_0383,"move",GetRectCenter(gg_rct_outship))
call TriggerSleepAction(2.00)
call IssuePointOrderLocBJ(gg_unit_H013_0383,"move",GetRectCenter(gg_rct_Region_039))
call CinematicModeBJ(false,udg_B_gonzales_1_p)
call QuestMessageBJ(GetPlayersAll(),bj_QUESTMESSAGE_DISCOVERED,"TRIGSTR_2482")
call SetUnitPositionLoc(gg_unit_H00C_0385,GetRectCenter(gg_rct_Region_040))
call EnableTrigger(gg_trg_B_enrike)
call DisableTrigger(GetTriggeringTrigger())
endfunction
function InitTrig_G_1_Enrike takes nothing returns nothing
set gg_trg_G_1_Enrike=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_G_1_Enrike,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(gg_trg_G_1_Enrike,Condition(function Trig_G_1_Enrike_Conditions))
call TriggerAddAction(gg_trg_G_1_Enrike,function Trig_G_1_Enrike_Actions)
endfunction
function Trig_G_1_Trader_Func004001 takes nothing returns boolean
return(GetSpellAbilityId()==0x41303142)
endfunction
function Trig_G_1_Trader_Func004002 takes nothing returns boolean
return(GetSpellTargetUnit()==gg_unit_H00C_0385)
endfunction
function Trig_G_1_Trader_Conditions takes nothing returns boolean
if(not GetBooleanAnd((GetSpellAbilityId()==0x41303142),(GetSpellTargetUnit()==gg_unit_H00C_0385)))then
return false
endif
return true
endfunction
function Trig_G_1_Trader_Actions takes nothing returns nothing
set udg_B_trader_1=GetSpellAbilityUnit()
call ForceAddPlayerSimple(GetOwningPlayer(GetSpellAbilityUnit()),udg_B_trader_1_p)
call CinematicModeBJ(true,udg_B_trader_1_p)
call SetUnitFacingToFaceUnitTimed(gg_unit_H00C_0385,GetSpellAbilityUnit(),0.50)
call TriggerSleepAction(1.00)
call TransmissionFromUnitWithNameBJ(udg_B_trader_1_p,gg_unit_H00C_0385,"TRIGSTR_2488",null,"TRIGSTR_2489",bj_TIMETYPE_ADD,0,true)
call TriggerSleepAction(1.00)
call DialogDisplayBJ(true,udg_Bandit_Trader,GetOwningPlayer(GetSpellAbilityUnit()))
endfunction
function InitTrig_G_1_Trader takes nothing returns nothing
set gg_trg_G_1_Trader=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_G_1_Trader,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(gg_trg_G_1_Trader,Condition(function Trig_G_1_Trader_Conditions))
call TriggerAddAction(gg_trg_G_1_Trader,function Trig_G_1_Trader_Actions)
endfunction
function Trig_G_1_Trader_Ansver_1_Conditions takes nothing returns boolean
if(not(GetClickedButtonBJ()!=udg_Bandit_Trader_Ans4))then
return false
endif
return true
endfunction
function Trig_G_1_Trader_Ansver_1_Actions takes nothing returns nothing
call TransmissionFromUnitWithNameBJ(udg_B_trader_1_p,gg_unit_H00C_0385,"TRIGSTR_2497",null,"TRIGSTR_2498",bj_TIMETYPE_ADD,0,true)
call TransmissionFromUnitWithNameBJ(udg_B_trader_1_p,gg_unit_H00C_0385,"TRIGSTR_2506",null,"TRIGSTR_2507",bj_TIMETYPE_ADD,0,true)
call TriggerSleepAction(2)
call DialogDisplayBJ(true,udg_Bandit_Trader_2,GetOwningPlayer(udg_B_trader_1))
endfunction
function InitTrig_G_1_Trader_Ansver_1 takes nothing returns nothing
set gg_trg_G_1_Trader_Ansver_1=CreateTrigger()
call TriggerRegisterDialogEventBJ(gg_trg_G_1_Trader_Ansver_1,udg_Bandit_Trader)
call TriggerAddCondition(gg_trg_G_1_Trader_Ansver_1,Condition(function Trig_G_1_Trader_Ansver_1_Conditions))
call TriggerAddAction(gg_trg_G_1_Trader_Ansver_1,function Trig_G_1_Trader_Ansver_1_Actions)
endfunction
function Trig_G_1_Trader_Ansver_1_1_Conditions takes nothing returns boolean
if(not(GetClickedButtonBJ()==udg_Bandit_Trader_Ans1_1))then
return false
endif
return true
endfunction
function Trig_G_1_Trader_Ansver_1_1_Actions takes nothing returns nothing
call TransmissionFromUnitWithNameBJ(udg_B_trader_1_p,gg_unit_H00C_0385,"TRIGSTR_2503",null,"TRIGSTR_2504",bj_TIMETYPE_ADD,0,true)
call CreateItemLoc(0x49303055,GetRectCenter(gg_rct_Region_041))
call TriggerSleepAction(2)
call CinematicModeBJ(false,udg_B_trader_1_p)
call DisableTrigger(gg_trg_G_1_Trader)
call DisableTrigger(gg_trg_B_gonzales_begin)
call EnableTrigger(gg_trg_B_gonzales_q_1)
endfunction
function InitTrig_G_1_Trader_Ansver_1_1 takes nothing returns nothing
set gg_trg_G_1_Trader_Ansver_1_1=CreateTrigger()
call TriggerRegisterDialogEventBJ(gg_trg_G_1_Trader_Ansver_1_1,udg_Bandit_Trader_2)
call TriggerAddCondition(gg_trg_G_1_Trader_Ansver_1_1,Condition(function Trig_G_1_Trader_Ansver_1_1_Conditions))
call TriggerAddAction(gg_trg_G_1_Trader_Ansver_1_1,function Trig_G_1_Trader_Ansver_1_1_Actions)
endfunction
function Trig_G_1_Trader_Ansver_1_2_Conditions takes nothing returns boolean
if(not(GetClickedButtonBJ()==udg_Bandit_Trader_Ans1_2))then
return false
endif
return true
endfunction
function Trig_G_1_Trader_Ansver_1_2_Actions takes nothing returns nothing
call TransmissionFromUnitWithNameBJ(udg_B_trader_1_p,gg_unit_H00C_0385,"TRIGSTR_2509",null,"TRIGSTR_2510",bj_TIMETYPE_ADD,0,true)
call CreateItemLoc(0x72646533,GetRectCenter(gg_rct_Region_041))
call TriggerSleepAction(2)
call CinematicModeBJ(false,udg_B_trader_1_p)
call DisableTrigger(gg_trg_G_1_Trader)
call DisableTrigger(gg_trg_B_gonzales_begin)
call EnableTrigger(gg_trg_B_gonzales_q_1)
endfunction
function InitTrig_G_1_Trader_Ansver_1_2 takes nothing returns nothing
set gg_trg_G_1_Trader_Ansver_1_2=CreateTrigger()
call TriggerRegisterDialogEventBJ(gg_trg_G_1_Trader_Ansver_1_2,udg_Bandit_Trader_2)
call TriggerAddCondition(gg_trg_G_1_Trader_Ansver_1_2,Condition(function Trig_G_1_Trader_Ansver_1_2_Conditions))
call TriggerAddAction(gg_trg_G_1_Trader_Ansver_1_2,function Trig_G_1_Trader_Ansver_1_2_Actions)
endfunction
function Trig_G_1_Trader_Ansver_1_3_Conditions takes nothing returns boolean
if(not(GetClickedButtonBJ()==udg_Bandit_Trader_Ans1_3))then
return false
endif
return true
endfunction
function Trig_G_1_Trader_Ansver_1_3_Actions takes nothing returns nothing
call TransmissionFromUnitWithNameBJ(udg_B_trader_1_p,gg_unit_H00C_0385,"TRIGSTR_2511",null,"TRIGSTR_2512",bj_TIMETYPE_ADD,0,true)
call SetUnitOwner(gg_unit_H00C_0385,Player(11),true)
call TriggerSleepAction(1.00)
call CinematicModeBJ(false,udg_B_trader_1_p)
call DisableTrigger(gg_trg_G_1_Trader)
call DisableTrigger(gg_trg_B_gonzales_begin)
call EnableTrigger(gg_trg_B_gonzales_q_1)
endfunction
function InitTrig_G_1_Trader_Ansver_1_3 takes nothing returns nothing
set gg_trg_G_1_Trader_Ansver_1_3=CreateTrigger()
call TriggerRegisterDialogEventBJ(gg_trg_G_1_Trader_Ansver_1_3,udg_Bandit_Trader_2)
call TriggerAddCondition(gg_trg_G_1_Trader_Ansver_1_3,Condition(function Trig_G_1_Trader_Ansver_1_3_Conditions))
call TriggerAddAction(gg_trg_G_1_Trader_Ansver_1_3,function Trig_G_1_Trader_Ansver_1_3_Actions)
endfunction
function Trig_G_1_Trader_Ansver_1_3_1_Actions takes nothing returns nothing
call DisableTrigger(gg_trg_G_1_Trader)
call CreateItemLoc(0x49303055,GetUnitLoc(gg_unit_H00C_0385))
call CreateItemLoc(0x72646533,GetUnitLoc(gg_unit_H00C_0385))
call DisableTrigger(gg_trg_B_gonzales_begin)
call EnableTrigger(gg_trg_B_gonzales_q_1)
endfunction
function InitTrig_G_1_Trader_Ansver_1_3_1 takes nothing returns nothing
set gg_trg_G_1_Trader_Ansver_1_3_1=CreateTrigger()
call TriggerRegisterUnitEvent(gg_trg_G_1_Trader_Ansver_1_3_1,gg_unit_H00C_0385,EVENT_UNIT_DEATH)
call TriggerAddAction(gg_trg_G_1_Trader_Ansver_1_3_1,function Trig_G_1_Trader_Ansver_1_3_1_Actions)
endfunction
function Trig_G_1_Trader_Ansver_2_Conditions takes nothing returns boolean
if(not(GetClickedButtonBJ()==udg_Bandit_Trader_Ans4))then
return false
endif
return true
endfunction
function Trig_G_1_Trader_Ansver_2_Actions takes nothing returns nothing
call TransmissionFromUnitWithNameBJ(udg_B_trader_1_p,gg_unit_H00C_0385,"TRIGSTR_2501",null,"TRIGSTR_2502",bj_TIMETYPE_ADD,0,true)
call CinematicModeBJ(false,udg_B_trader_1_p)
endfunction
function InitTrig_G_1_Trader_Ansver_2 takes nothing returns nothing
set gg_trg_G_1_Trader_Ansver_2=CreateTrigger()
call TriggerRegisterDialogEventBJ(gg_trg_G_1_Trader_Ansver_2,udg_Bandit_Trader)
call TriggerAddCondition(gg_trg_G_1_Trader_Ansver_2,Condition(function Trig_G_1_Trader_Ansver_2_Conditions))
call TriggerAddAction(gg_trg_G_1_Trader_Ansver_2,function Trig_G_1_Trader_Ansver_2_Actions)
endfunction
function Trig_Untitled_Trigger_001_Conditions takes nothing returns boolean
if(not(IsUnitType(GetEnteringUnit(),UNIT_TYPE_HERO)==true))then
return false
endif
return true
endfunction
function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
call CreateNUnitsAtLoc(1,0x6E303041,Player(PLAYER_NEUTRAL_AGGRESSIVE),GetRectCenter(gg_rct_E_Arah_Big),bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,0x6E303042,Player(PLAYER_NEUTRAL_AGGRESSIVE),GetRectCenter(gg_rct_E_Arah_Liitle_2),bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,0x6E303042,Player(PLAYER_NEUTRAL_AGGRESSIVE),GetRectCenter(gg_rct_E_Arah_Liitle_1),bj_UNIT_FACING)
call DisableTrigger(GetTriggeringTrigger())
call TriggerSleepAction(1.00)
call CreateNUnitsAtLoc(1,0x6E303042,Player(PLAYER_NEUTRAL_AGGRESSIVE),GetRectCenter(gg_rct_E_Arah_Liitle_1),bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,0x6E303042,Player(PLAYER_NEUTRAL_AGGRESSIVE),GetRectCenter(gg_rct_E_Arah_Liitle_2),bj_UNIT_FACING)
call TriggerSleepAction(1.00)
call CreateNUnitsAtLoc(1,0x6E303042,Player(PLAYER_NEUTRAL_AGGRESSIVE),GetRectCenter(gg_rct_E_Arah_Liitle_1),bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,0x6E303042,Player(PLAYER_NEUTRAL_AGGRESSIVE),GetRectCenter(gg_rct_E_Arah_Liitle_2),bj_UNIT_FACING)
endfunction
function InitTrig_Untitled_Trigger_001 takes nothing returns nothing
set gg_trg_Untitled_Trigger_001=CreateTrigger()
call TriggerRegisterEnterRectSimple(gg_trg_Untitled_Trigger_001,gg_rct_Region_034)
call TriggerAddCondition(gg_trg_Untitled_Trigger_001,Condition(function Trig_Untitled_Trigger_001_Conditions))
call TriggerAddAction(gg_trg_Untitled_Trigger_001,function Trig_Untitled_Trigger_001_Actions)
endfunction
function Trig_B_enrike_Func001001 takes nothing returns boolean
return(GetSpellAbilityId()==0x41303142)
endfunction
function Trig_B_enrike_Func001002 takes nothing returns boolean
return(GetSpellTargetUnit()==gg_unit_H013_0383)
endfunction
function Trig_B_enrike_Conditions takes nothing returns boolean
if(not GetBooleanAnd((GetSpellAbilityId()==0x41303142),(GetSpellTargetUnit()==gg_unit_H013_0383)))then
return false
endif
return true
endfunction
function Trig_B_enrike_Actions takes nothing returns nothing
call SetUnitFacingToFaceUnitTimed(gg_unit_H013_0383,GetSpellAbilityUnit(),0.50)
call TransmissionFromUnitWithNameBJ(udg_B_guard,gg_unit_H013_0383,"TRIGSTR_2483",null,"TRIGSTR_2484",bj_TIMETYPE_ADD,0,true)
endfunction
function InitTrig_B_enrike takes nothing returns nothing
set gg_trg_B_enrike=CreateTrigger()
call DisableTrigger(gg_trg_B_enrike)
call TriggerRegisterAnyUnitEventBJ(gg_trg_B_enrike,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(gg_trg_B_enrike,Condition(function Trig_B_enrike_Conditions))
call TriggerAddAction(gg_trg_B_enrike,function Trig_B_enrike_Actions)
endfunction
function Trig_speak_Actions takes nothing returns nothing
call TriggerSleepAction(0.10)
call DialogAddButtonBJ(udg_Bandit_Guard_1,"TRIGSTR_2427")
set udg_Bandit_Gurad_Ans1=GetLastCreatedButtonBJ()
call DialogAddButtonBJ(udg_Bandit_Guard_1,"TRIGSTR_2428")
set udg_Bandit_Gurad_Ans2=GetLastCreatedButtonBJ()
call DialogAddButtonBJ(udg_Bandit_Guard_1,"TRIGSTR_2429")
set udg_Bandit_Gurad_Ans3=GetLastCreatedButtonBJ()
call DialogAddButtonBJ(udg_Bandit_Gonsales_1,"TRIGSTR_2436")
set udg_Bandit_Gonsales_Ans1=GetLastCreatedButtonBJ()
call DialogAddButtonBJ(udg_Bandit_Gonsales_1,"TRIGSTR_2437")
set udg_Bandit_Gonsales_Ans2=GetLastCreatedButtonBJ()
call DialogAddButtonBJ(udg_Bandit_Gonsales_1,"TRIGSTR_2438")
set udg_Bandit_Gonsales_Ans3=GetLastCreatedButtonBJ()
call DialogAddButtonBJ(udg_Bandit_Gonsales_1,"TRIGSTR_2439")
set udg_Bandit_Gonsales_Ans4=GetLastCreatedButtonBJ()
call DialogAddButtonBJ(udg_Bandit_Trader,"TRIGSTR_2493")
set udg_Bandit_Trader_Ans1=GetLastCreatedButtonBJ()
call DialogAddButtonBJ(udg_Bandit_Trader,"TRIGSTR_2494")
set udg_Bandit_Trader_Ans2=GetLastCreatedButtonBJ()
call DialogAddButtonBJ(udg_Bandit_Trader,"TRIGSTR_2495")
set udg_Bandit_Trader_Ans3=GetLastCreatedButtonBJ()
call DialogAddButtonBJ(udg_Bandit_Trader_2,"TRIGSTR_2496")
set udg_Bandit_Trader_Ans1_1=GetLastCreatedButtonBJ()
call DialogAddButtonBJ(udg_Bandit_Trader_2,"TRIGSTR_2505")
set udg_Bandit_Trader_Ans1_2=GetLastCreatedButtonBJ()
call DialogAddButtonBJ(udg_Bandit_Trader_2,"TRIGSTR_2508")
set udg_Bandit_Trader_Ans1_3=GetLastCreatedButtonBJ()
call DialogAddButtonBJ(udg_Tutorial,"TRIGSTR_2599")
set udg_Tutorisl_ask1=GetLastCreatedButtonBJ()
call DialogAddButtonBJ(udg_Tutorial,"TRIGSTR_2600")
set udg_Tutorisl_ask2=GetLastCreatedButtonBJ()
call DialogAddButtonBJ(udg_Tutorial,"TRIGSTR_2603")
set udg_Tutorisl_ask3=GetLastCreatedButtonBJ()
call DialogAddButtonBJ(udg_Tutorial,"TRIGSTR_2604")
set udg_Tutorisl_ask4=GetLastCreatedButtonBJ()
call DialogAddButtonBJ(udg_Tutorial,"TRIGSTR_2605")
set udg_Tutorisl_ask5=GetLastCreatedButtonBJ()
call DialogAddButtonBJ(udg_Tutorial,"TRIGSTR_2653")
set udg_Tutorisl_ask6=GetLastCreatedButtonBJ()
call DialogAddButtonBJ(udg_Guard_Captain,"TRIGSTR_2690")
set udg_Guard_cap_1=GetLastCreatedButtonBJ()
call DialogAddButtonBJ(udg_Guard_Captain,"TRIGSTR_2691")
set udg_Guard_cap_2=GetLastCreatedButtonBJ()
call DialogAddButtonBJ(udg_Guard_Captain,"TRIGSTR_2692")
set udg_Guard_cap_3=GetLastCreatedButtonBJ()
call DialogAddButtonBJ(udg_Guard,"TRIGSTR_2737")
set udg_Guard_about_city=GetLastCreatedButtonBJ()
call DialogAddButtonBJ(udg_Guard,"TRIGSTR_2869")
set udg_Guard_take_quest=GetLastCreatedButtonBJ()
call DialogAddButtonBJ(udg_Guard,"TRIGSTR_2870")
set udg_Guard_bb=GetLastCreatedButtonBJ()
call DialogAddButtonBJ(udg_Town_speak,"TRIGSTR_2905")
set udg_Town_News=GetLastCreatedButtonBJ()
call DialogAddButtonBJ(udg_Town_speak,"TRIGSTR_2908")
set udg_Town_bb=GetLastCreatedButtonBJ()
endfunction
function InitTrig_speak takes nothing returns nothing
set gg_trg_speak=CreateTrigger()
call TriggerAddAction(gg_trg_speak,function Trig_speak_Actions)
endfunction
function Trig_B_guard_Func004001 takes nothing returns boolean
return(GetSpellAbilityId()==0x41303142)
endfunction
function Trig_B_guard_Func004002 takes nothing returns boolean
return(GetSpellTargetUnit()==gg_unit_H00T_0354)
endfunction
function Trig_B_guard_Conditions takes nothing returns boolean
if(not GetBooleanAnd((GetSpellAbilityId()==0x41303142),(GetSpellTargetUnit()==gg_unit_H00T_0354)))then
return false
endif
return true
endfunction
function Trig_B_guard_Actions takes nothing returns nothing
set udg_B_guard_p=GetSpellAbilityUnit()
call ForceAddPlayerSimple(GetOwningPlayer(GetSpellAbilityUnit()),udg_B_guard)
call CinematicModeBJ(true,udg_B_guard)
call SetUnitFacingToFaceUnitTimed(gg_unit_H00T_0354,GetSpellAbilityUnit(),0.50)
call TriggerSleepAction(1.00)
call TransmissionFromUnitWithNameBJ(udg_B_guard,gg_unit_H00T_0354,"TRIGSTR_2345",null,"TRIGSTR_2346",bj_TIMETYPE_ADD,0,true)
call TriggerSleepAction(1.00)
call DialogDisplayBJ(true,udg_Bandit_Guard_1,GetOwningPlayer(udg_B_guard_p))
endfunction
function InitTrig_B_guard takes nothing returns nothing
set gg_trg_B_guard=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_B_guard,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(gg_trg_B_guard,Condition(function Trig_B_guard_Conditions))
call TriggerAddAction(gg_trg_B_guard,function Trig_B_guard_Actions)
endfunction
function Trig_B_gonzales_begin_Func004001 takes nothing returns boolean
return(GetSpellAbilityId()==0x41303142)
endfunction
function Trig_B_gonzales_begin_Func004002 takes nothing returns boolean
return(GetSpellTargetUnit()==gg_unit_H011_0380)
endfunction
function Trig_B_gonzales_begin_Conditions takes nothing returns boolean
if(not GetBooleanAnd((GetSpellAbilityId()==0x41303142),(GetSpellTargetUnit()==gg_unit_H011_0380)))then
return false
endif
return true
endfunction
function Trig_B_gonzales_begin_Actions takes nothing returns nothing
set udg_B_gonzales_1=GetSpellAbilityUnit()
call ForceAddPlayerSimple(GetOwningPlayer(GetSpellAbilityUnit()),udg_B_gonzales_1_p)
call CinematicModeBJ(true,udg_B_gonzales_1_p)
call SetUnitFacingToFaceUnitTimed(gg_unit_H011_0380,GetSpellAbilityUnit(),0.50)
call TriggerSleepAction(1.00)
call TransmissionFromUnitWithNameBJ(udg_B_gonzales_1_p,gg_unit_H011_0380,"TRIGSTR_2434",null,"TRIGSTR_2435",bj_TIMETYPE_ADD,0,true)
call TriggerSleepAction(1.00)
call DialogDisplayBJ(true,udg_Bandit_Gonsales_1,GetOwningPlayer(udg_B_gonzales_1))
endfunction
function InitTrig_B_gonzales_begin takes nothing returns nothing
set gg_trg_B_gonzales_begin=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_B_gonzales_begin,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(gg_trg_B_gonzales_begin,Condition(function Trig_B_gonzales_begin_Conditions))
call TriggerAddAction(gg_trg_B_gonzales_begin,function Trig_B_gonzales_begin_Actions)
endfunction
function Trig_B_gonzales_ansver_1_1_Conditions takes nothing returns boolean
if(not(GetClickedButtonBJ()==udg_Bandit_Gonsales_Ans1))then
return false
endif
return true
endfunction
function Trig_B_gonzales_ansver_1_1_Actions takes nothing returns nothing
call TransmissionFromUnitWithNameBJ(udg_B_gonzales_1_p,gg_unit_H011_0380,"TRIGSTR_2440",null,"TRIGSTR_2441",bj_TIMETYPE_ADD,0,true)
call TransmissionFromUnitWithNameBJ(udg_B_gonzales_1_p,gg_unit_H011_0380,"TRIGSTR_2445",null,"TRIGSTR_2446",bj_TIMETYPE_ADD,0,true)
call TriggerSleepAction(2)
call DialogDisplayBJ(true,udg_Bandit_Gonsales_1,GetOwningPlayer(udg_B_gonzales_1))
endfunction
function InitTrig_B_gonzales_ansver_1_1 takes nothing returns nothing
set gg_trg_B_gonzales_ansver_1_1=CreateTrigger()
call TriggerRegisterDialogEventBJ(gg_trg_B_gonzales_ansver_1_1,udg_Bandit_Gonsales_1)
call TriggerAddCondition(gg_trg_B_gonzales_ansver_1_1,Condition(function Trig_B_gonzales_ansver_1_1_Conditions))
call TriggerAddAction(gg_trg_B_gonzales_ansver_1_1,function Trig_B_gonzales_ansver_1_1_Actions)
endfunction
function Trig_B_gonzales_ansver_1_2_Conditions takes nothing returns boolean
if(not(GetClickedButtonBJ()==udg_Bandit_Gonsales_Ans2))then
return false
endif
return true
endfunction
function Trig_B_gonzales_ansver_1_2_Actions takes nothing returns nothing
call TransmissionFromUnitWithNameBJ(udg_B_gonzales_1_p,gg_unit_H011_0380,"TRIGSTR_2455",null,"TRIGSTR_2456",bj_TIMETYPE_ADD,0,true)
call TransmissionFromUnitWithNameBJ(udg_B_gonzales_1_p,gg_unit_H011_0380,"TRIGSTR_2457",null,"TRIGSTR_2458",bj_TIMETYPE_ADD,0,true)
call TransmissionFromUnitWithNameBJ(udg_B_gonzales_1_p,gg_unit_H011_0380,"TRIGSTR_2476",null,"TRIGSTR_2477",bj_TIMETYPE_ADD,0,true)
call CreateQuestBJ(bj_QUESTTYPE_REQ_DISCOVERED,"TRIGSTR_2467","TRIGSTR_2468","ReplaceableTextures\\CommandButtons\\BTNChestOfGold.blp")
call QuestSetDiscoveredBJ(GetLastCreatedQuestBJ(),true)
call QuestMessageBJ(GetPlayersAll(),bj_QUESTMESSAGE_DISCOVERED,"TRIGSTR_2475")
set udg_Gonsales_q_1=GetLastCreatedQuestBJ()
call TriggerSleepAction(2)
call SetUnitPositionLoc(gg_unit_H013_0383,GetRectCenter(gg_rct_Enrike))
call CinematicModeBJ(false,udg_B_gonzales_1_p)
call DisableTrigger(GetTriggeringTrigger())
call EnableTrigger(gg_trg_B_gonzales_ansver_1_2_unready)
endfunction
function InitTrig_B_gonzales_ansver_1_2 takes nothing returns nothing
set gg_trg_B_gonzales_ansver_1_2=CreateTrigger()
call TriggerRegisterDialogEventBJ(gg_trg_B_gonzales_ansver_1_2,udg_Bandit_Gonsales_1)
call TriggerAddCondition(gg_trg_B_gonzales_ansver_1_2,Condition(function Trig_B_gonzales_ansver_1_2_Conditions))
call TriggerAddAction(gg_trg_B_gonzales_ansver_1_2,function Trig_B_gonzales_ansver_1_2_Actions)
endfunction
function Trig_B_gonzales_ansver_1_2_unready_Conditions takes nothing returns boolean
if(not(GetClickedButtonBJ()==udg_Bandit_Gonsales_Ans2))then
return false
endif
return true
endfunction
function Trig_B_gonzales_ansver_1_2_unready_Actions takes nothing returns nothing
call TransmissionFromUnitWithNameBJ(udg_B_guard,gg_unit_H011_0380,"TRIGSTR_2461",null,"TRIGSTR_2462",bj_TIMETYPE_ADD,0,true)
call TriggerSleepAction(2)
call CinematicModeBJ(false,udg_B_gonzales_1_p)
endfunction
function InitTrig_B_gonzales_ansver_1_2_unready takes nothing returns nothing
set gg_trg_B_gonzales_ansver_1_2_unready=CreateTrigger()
call DisableTrigger(gg_trg_B_gonzales_ansver_1_2_unready)
call TriggerRegisterDialogEventBJ(gg_trg_B_gonzales_ansver_1_2_unready,udg_Bandit_Gonsales_1)
call TriggerAddCondition(gg_trg_B_gonzales_ansver_1_2_unready,Condition(function Trig_B_gonzales_ansver_1_2_unready_Conditions))
call TriggerAddAction(gg_trg_B_gonzales_ansver_1_2_unready,function Trig_B_gonzales_ansver_1_2_unready_Actions)
endfunction
function Trig_B_gonzales_ansver_1_3_Conditions takes nothing returns boolean
if(not(GetClickedButtonBJ()==udg_Bandit_Gonsales_Ans3))then
return false
endif
return true
endfunction
function Trig_B_gonzales_ansver_1_3_Actions takes nothing returns nothing
call TransmissionFromUnitWithNameBJ(udg_B_gonzales_1_p,gg_unit_H011_0380,"TRIGSTR_2447",null,"TRIGSTR_2448",bj_TIMETYPE_ADD,0,true)
call TransmissionFromUnitWithNameBJ(udg_B_gonzales_1_p,gg_unit_H011_0380,"TRIGSTR_2449",null,"TRIGSTR_2450",bj_TIMETYPE_ADD,0,true)
call TriggerSleepAction(2)
call DialogDisplayBJ(true,udg_Bandit_Gonsales_1,GetOwningPlayer(udg_B_gonzales_1))
endfunction
function InitTrig_B_gonzales_ansver_1_3 takes nothing returns nothing
set gg_trg_B_gonzales_ansver_1_3=CreateTrigger()
call TriggerRegisterDialogEventBJ(gg_trg_B_gonzales_ansver_1_3,udg_Bandit_Gonsales_1)
call TriggerAddCondition(gg_trg_B_gonzales_ansver_1_3,Condition(function Trig_B_gonzales_ansver_1_3_Conditions))
call TriggerAddAction(gg_trg_B_gonzales_ansver_1_3,function Trig_B_gonzales_ansver_1_3_Actions)
endfunction
function Trig_B_gonzales_ansver_1_4_Conditions takes nothing returns boolean
if(not(GetClickedButtonBJ()==udg_Bandit_Gonsales_Ans4))then
return false
endif
return true
endfunction
function Trig_B_gonzales_ansver_1_4_Actions takes nothing returns nothing
call TransmissionFromUnitWithNameBJ(udg_B_gonzales_1_p,gg_unit_H011_0380,"TRIGSTR_2453",null,"TRIGSTR_2454",bj_TIMETYPE_ADD,0,true)
call TriggerSleepAction(1.00)
call CinematicModeBJ(false,udg_B_gonzales_1_p)
endfunction
function InitTrig_B_gonzales_ansver_1_4 takes nothing returns nothing
set gg_trg_B_gonzales_ansver_1_4=CreateTrigger()
call TriggerRegisterDialogEventBJ(gg_trg_B_gonzales_ansver_1_4,udg_Bandit_Gonsales_1)
call TriggerAddCondition(gg_trg_B_gonzales_ansver_1_4,Condition(function Trig_B_gonzales_ansver_1_4_Conditions))
call TriggerAddAction(gg_trg_B_gonzales_ansver_1_4,function Trig_B_gonzales_ansver_1_4_Actions)
endfunction
function Trig_B_archer_Func001001 takes nothing returns boolean
return(GetSpellAbilityId()==0x41303142)
endfunction
function Trig_B_archer_Func001002 takes nothing returns boolean
return(GetSpellTargetUnit()==gg_unit_H00W_0363)
endfunction
function Trig_B_archer_Conditions takes nothing returns boolean
if(not GetBooleanAnd((GetSpellAbilityId()==0x41303142),(GetSpellTargetUnit()==gg_unit_H00W_0363)))then
return false
endif
return true
endfunction
function Trig_B_archer_Actions takes nothing returns nothing
call TriggerSleepAction(1.00)
call TransmissionFromUnitWithNameBJ(udg_B_guard,gg_unit_H00W_0363,GetHeroProperName(gg_unit_H00W_0363),null,"TRIGSTR_2433",bj_TIMETYPE_ADD,0,true)
endfunction
function InitTrig_B_archer takes nothing returns nothing
set gg_trg_B_archer=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_B_archer,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(gg_trg_B_archer,Condition(function Trig_B_archer_Conditions))
call TriggerAddAction(gg_trg_B_archer,function Trig_B_archer_Actions)
endfunction
function Trig_B_guard_ansver_1_1_Conditions takes nothing returns boolean
if(not(GetClickedButtonBJ()==udg_Bandit_Gurad_Ans1))then
return false
endif
return true
endfunction
function Trig_B_guard_ansver_1_1_Actions takes nothing returns nothing
call TransmissionFromUnitWithNameBJ(udg_B_guard,gg_unit_H00T_0354,"TRIGSTR_2348",null,"TRIGSTR_2349",bj_TIMETYPE_ADD,0,true)
call CreateQuestBJ(bj_QUESTTYPE_REQ_DISCOVERED,"TRIGSTR_2350","TRIGSTR_2351","ReplaceableTextures\\CommandButtons\\BTNPotionOfDivinity.blp")
call QuestSetDiscoveredBJ(GetLastCreatedQuestBJ(),true)
call QuestMessageBJ(GetPlayersAll(),bj_QUESTMESSAGE_DISCOVERED,"TRIGSTR_2425")
set udg_Bandit_Vino=GetLastCreatedQuestBJ()
call DisableTrigger(gg_trg_B_guard)
call EnableTrigger(gg_trg_Bandit_Vino)
call CinematicModeBJ(false,udg_B_guard)
endfunction
function InitTrig_B_guard_ansver_1_1 takes nothing returns nothing
set gg_trg_B_guard_ansver_1_1=CreateTrigger()
call TriggerRegisterDialogEventBJ(gg_trg_B_guard_ansver_1_1,udg_Bandit_Guard_1)
call TriggerAddCondition(gg_trg_B_guard_ansver_1_1,Condition(function Trig_B_guard_ansver_1_1_Conditions))
call TriggerAddAction(gg_trg_B_guard_ansver_1_1,function Trig_B_guard_ansver_1_1_Actions)
endfunction
function Trig_B_guard_ansver_1_2_Conditions takes nothing returns boolean
if(not(GetClickedButtonBJ()==udg_Bandit_Gurad_Ans2))then
return false
endif
return true
endfunction
function Trig_B_guard_ansver_1_2_Actions takes nothing returns nothing
call TransmissionFromUnitWithNameBJ(udg_B_guard,gg_unit_H00T_0354,"TRIGSTR_2408",null,"TRIGSTR_2409",bj_TIMETYPE_ADD,0,true)
call CinematicModeBJ(false,udg_B_guard)
endfunction
function InitTrig_B_guard_ansver_1_2 takes nothing returns nothing
set gg_trg_B_guard_ansver_1_2=CreateTrigger()
call TriggerRegisterDialogEventBJ(gg_trg_B_guard_ansver_1_2,udg_Bandit_Guard_1)
call TriggerAddCondition(gg_trg_B_guard_ansver_1_2,Condition(function Trig_B_guard_ansver_1_2_Conditions))
call TriggerAddAction(gg_trg_B_guard_ansver_1_2,function Trig_B_guard_ansver_1_2_Actions)
endfunction
function Trig_B_guard_ansver_1_3_Conditions takes nothing returns boolean
if(not(GetClickedButtonBJ()==udg_Bandit_Gurad_Ans3))then
return false
endif
return true
endfunction
function Trig_B_guard_ansver_1_3_Actions takes nothing returns nothing
call TransmissionFromUnitWithNameBJ(udg_B_guard,gg_unit_H00T_0354,"TRIGSTR_2420",null,"TRIGSTR_2421",bj_TIMETYPE_ADD,0,true)
call CinematicModeBJ(false,udg_B_guard)
endfunction
function InitTrig_B_guard_ansver_1_3 takes nothing returns nothing
set gg_trg_B_guard_ansver_1_3=CreateTrigger()
call TriggerRegisterDialogEventBJ(gg_trg_B_guard_ansver_1_3,udg_Bandit_Guard_1)
call TriggerAddCondition(gg_trg_B_guard_ansver_1_3,Condition(function Trig_B_guard_ansver_1_3_Conditions))
call TriggerAddAction(gg_trg_B_guard_ansver_1_3,function Trig_B_guard_ansver_1_3_Actions)
endfunction
function Trig_____________________________________007_Conditions takes nothing returns boolean
if(not(IsUnitType(GetEnteringUnit(),UNIT_TYPE_HERO)==true))then
return false
endif
return true
endfunction
function Trig_____________________________________007_Actions takes nothing returns nothing
call SetUnitOwner(gg_unit_hvlt_0253,GetOwningPlayer(GetEnteringUnit()),true)
endfunction
function InitTrig_____________________________________007 takes nothing returns nothing
set gg_trg_____________________________________007=CreateTrigger()
call TriggerRegisterEnterRectSimple(gg_trg_____________________________________007,gg_rct_firegod)
call TriggerAddCondition(gg_trg_____________________________________007,Condition(function Trig_____________________________________007_Conditions))
call TriggerAddAction(gg_trg_____________________________________007,function Trig_____________________________________007_Actions)
endfunction
function Trig_rats_drop_Func002001 takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())==0x6E303035)
endfunction
function Trig_rats_drop_Func002002 takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())==0x6E303033)
endfunction
function Trig_rats_drop_Conditions takes nothing returns boolean
if(not GetBooleanOr((GetUnitTypeId(GetDyingUnit())==0x6E303035),(GetUnitTypeId(GetDyingUnit())==0x6E303033)))then
return false
endif
return true
endfunction
function Trig_rats_drop_Func001C takes nothing returns boolean
if(not(GetRandomInt(1,5)==1))then
return false
endif
return true
endfunction
function Trig_rats_drop_Actions takes nothing returns nothing
if(Trig_rats_drop_Func001C())then
call CreateItemLoc(0x49303050,GetUnitLoc(GetDyingUnit()))
else
call DoNothing()
endif
endfunction
function InitTrig_rats_drop takes nothing returns nothing
set gg_trg_rats_drop=CreateTrigger()
call TriggerRegisterPlayerUnitEventSimple(gg_trg_rats_drop,Player(PLAYER_NEUTRAL_AGGRESSIVE),EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(gg_trg_rats_drop,Condition(function Trig_rats_drop_Conditions))
call TriggerAddAction(gg_trg_rats_drop,function Trig_rats_drop_Actions)
endfunction
function Trig_player1start_Conditions takes nothing returns boolean
if(not(GetLevelingUnit()==udg_player1hero))then
return false
endif
return true
endfunction
function Trig_player1start_Actions takes nothing returns nothing
call SetUnitOwner(gg_unit_h00G_0043,Player(0),true)
call SetUnitManaBJ(gg_unit_h00G_0043,(udg_player1stats+5.00))
endfunction
function InitTrig_player1start takes nothing returns nothing
set gg_trg_player1start=CreateTrigger()
call TriggerRegisterPlayerUnitEventSimple(gg_trg_player1start,Player(0),EVENT_PLAYER_HERO_LEVEL)
call TriggerAddCondition(gg_trg_player1start,Condition(function Trig_player1start_Conditions))
call TriggerAddAction(gg_trg_player1start,function Trig_player1start_Actions)
endfunction
function Trig_player2start_Conditions takes nothing returns boolean
if(not(GetLevelingUnit()==udg_player2hero))then
return false
endif
return true
endfunction
function Trig_player2start_Actions takes nothing returns nothing
call SetUnitOwner(gg_unit_h00G_0064,Player(1),true)
call SetUnitManaBJ(gg_unit_h00G_0064,(udg_player2stats+5.00))
endfunction
function InitTrig_player2start takes nothing returns nothing
set gg_trg_player2start=CreateTrigger()
call TriggerRegisterPlayerUnitEventSimple(gg_trg_player2start,Player(1),EVENT_PLAYER_HERO_LEVEL)
call TriggerAddCondition(gg_trg_player2start,Condition(function Trig_player2start_Conditions))
call TriggerAddAction(gg_trg_player2start,function Trig_player2start_Actions)
endfunction
function Trig_player3start_Conditions takes nothing returns boolean
if(not(GetLevelingUnit()==udg_player3hero))then
return false
endif
return true
endfunction
function Trig_player3start_Actions takes nothing returns nothing
call SetUnitOwner(gg_unit_h00G_0070,Player(2),true)
call SetUnitManaBJ(gg_unit_h00G_0070,(udg_player3stats+5.00))
endfunction
function InitTrig_player3start takes nothing returns nothing
set gg_trg_player3start=CreateTrigger()
call TriggerRegisterPlayerUnitEventSimple(gg_trg_player3start,Player(2),EVENT_PLAYER_HERO_LEVEL)
call TriggerAddCondition(gg_trg_player3start,Condition(function Trig_player3start_Conditions))
call TriggerAddAction(gg_trg_player3start,function Trig_player3start_Actions)
endfunction
function Trig_player4start_Conditions takes nothing returns boolean
if(not(GetLevelingUnit()==udg_player4hero))then
return false
endif
return true
endfunction
function Trig_player4start_Actions takes nothing returns nothing
call SetUnitOwner(gg_unit_h00G_0071,Player(3),true)
call SetUnitManaBJ(gg_unit_h00G_0071,(udg_player4stats+5.00))
endfunction
function InitTrig_player4start takes nothing returns nothing
set gg_trg_player4start=CreateTrigger()
call TriggerRegisterPlayerUnitEventSimple(gg_trg_player4start,Player(3),EVENT_PLAYER_HERO_LEVEL)
call TriggerAddCondition(gg_trg_player4start,Condition(function Trig_player4start_Conditions))
call TriggerAddAction(gg_trg_player4start,function Trig_player4start_Actions)
endfunction
function Trig_player5start_Conditions takes nothing returns boolean
if(not(GetLevelingUnit()==udg_player5hero))then
return false
endif
return true
endfunction
function Trig_player5start_Actions takes nothing returns nothing
call SetUnitOwner(gg_unit_h00G_0072,Player(4),true)
call SetUnitManaBJ(gg_unit_h00G_0072,(udg_player5stats+5.00))
endfunction
function InitTrig_player5start takes nothing returns nothing
set gg_trg_player5start=CreateTrigger()
call TriggerRegisterPlayerUnitEventSimple(gg_trg_player5start,Player(4),EVENT_PLAYER_HERO_LEVEL)
call TriggerAddCondition(gg_trg_player5start,Condition(function Trig_player5start_Conditions))
call TriggerAddAction(gg_trg_player5start,function Trig_player5start_Actions)
endfunction
function Trig_player6start_Conditions takes nothing returns boolean
if(not(GetLevelingUnit()==udg_player6hero))then
return false
endif
return true
endfunction
function Trig_player6start_Actions takes nothing returns nothing
call SetUnitOwner(gg_unit_h00G_0073,Player(5),true)
call SetUnitManaBJ(gg_unit_h00G_0073,(udg_player6stats+5.00))
endfunction
function InitTrig_player6start takes nothing returns nothing
set gg_trg_player6start=CreateTrigger()
call TriggerRegisterPlayerUnitEventSimple(gg_trg_player6start,Player(5),EVENT_PLAYER_HERO_LEVEL)
call TriggerAddCondition(gg_trg_player6start,Condition(function Trig_player6start_Conditions))
call TriggerAddAction(gg_trg_player6start,function Trig_player6start_Actions)
endfunction
function Trig_player1end_Actions takes nothing returns nothing
call SetUnitOwner(gg_unit_h00G_0043,Player(PLAYER_NEUTRAL_PASSIVE),true)
endfunction
function InitTrig_player1end takes nothing returns nothing
set gg_trg_player1end=CreateTrigger()
call TriggerRegisterUnitManaEvent(gg_trg_player1end,gg_unit_h00G_0043,EQUAL,0.00)
call TriggerAddAction(gg_trg_player1end,function Trig_player1end_Actions)
endfunction
function Trig_player2end_Actions takes nothing returns nothing
call SetUnitOwner(gg_unit_h00G_0064,Player(PLAYER_NEUTRAL_PASSIVE),true)
endfunction
function InitTrig_player2end takes nothing returns nothing
set gg_trg_player2end=CreateTrigger()
call TriggerRegisterUnitManaEvent(gg_trg_player2end,gg_unit_h00G_0064,EQUAL,0.00)
call TriggerAddAction(gg_trg_player2end,function Trig_player2end_Actions)
endfunction
function Trig_player3end_Actions takes nothing returns nothing
call SetUnitOwner(gg_unit_h00G_0070,Player(PLAYER_NEUTRAL_PASSIVE),true)
endfunction
function InitTrig_player3end takes nothing returns nothing
set gg_trg_player3end=CreateTrigger()
call TriggerRegisterUnitManaEvent(gg_trg_player3end,gg_unit_h00G_0070,EQUAL,0.00)
call TriggerAddAction(gg_trg_player3end,function Trig_player3end_Actions)
endfunction
function Trig_player4end_Actions takes nothing returns nothing
call SetUnitOwner(gg_unit_h00G_0071,Player(PLAYER_NEUTRAL_PASSIVE),true)
endfunction
function InitTrig_player4end takes nothing returns nothing
set gg_trg_player4end=CreateTrigger()
call TriggerRegisterUnitManaEvent(gg_trg_player4end,gg_unit_h00G_0071,EQUAL,0.00)
call TriggerAddAction(gg_trg_player4end,function Trig_player4end_Actions)
endfunction
function Trig_player5end_Actions takes nothing returns nothing
call SetUnitOwner(gg_unit_h00G_0072,Player(PLAYER_NEUTRAL_PASSIVE),true)
endfunction
function InitTrig_player5end takes nothing returns nothing
set gg_trg_player5end=CreateTrigger()
call TriggerRegisterUnitManaEvent(gg_trg_player5end,gg_unit_h00G_0072,EQUAL,0.00)
call TriggerAddAction(gg_trg_player5end,function Trig_player5end_Actions)
endfunction
function Trig_player6end_Actions takes nothing returns nothing
call SetUnitOwner(gg_unit_h00G_0073,Player(PLAYER_NEUTRAL_PASSIVE),true)
endfunction
function InitTrig_player6end takes nothing returns nothing
set gg_trg_player6end=CreateTrigger()
call TriggerRegisterUnitManaEvent(gg_trg_player6end,gg_unit_h00G_0073,EQUAL,0.00)
call TriggerAddAction(gg_trg_player6end,function Trig_player6end_Actions)
endfunction
function Trig_player1_Func001001 takes nothing returns boolean
return(GetSpellAbilityId()==0x41303039)
endfunction
function Trig_player1_Func002001 takes nothing returns boolean
return(GetSpellAbilityId()==0x41303042)
endfunction
function Trig_player1_Func003001 takes nothing returns boolean
return(GetSpellAbilityId()==0x41303050)
endfunction
function Trig_player1_Func004001 takes nothing returns boolean
return(GetSpellAbilityId()==0x41303043)
endfunction
function Trig_player1_Func005001 takes nothing returns boolean
return(GetSpellAbilityId()==0x41303052)
endfunction
function Trig_player1_Actions takes nothing returns nothing
if((GetSpellAbilityId()==0x41303039))then
call ModifyHeroStat(bj_HEROSTAT_AGI,udg_player1hero,bj_MODIFYMETHOD_ADD,1)
else
call DoNothing()
endif
if((GetSpellAbilityId()==0x41303042))then
call ModifyHeroStat(bj_HEROSTAT_INT,udg_player1hero,bj_MODIFYMETHOD_ADD,1)
else
call DoNothing()
endif
if((GetSpellAbilityId()==0x41303050))then
call UnitAddItemByIdSwapped(0x6D616E68,udg_player1hero)
else
call DoNothing()
endif
if((GetSpellAbilityId()==0x41303043))then
call UnitAddItemByIdSwapped(0x74737472,udg_player1hero)
else
call DoNothing()
endif
if((GetSpellAbilityId()==0x41303052))then
call UnitAddItemByIdSwapped(0x49303047,udg_player1hero)
else
call DoNothing()
endif
endfunction
function InitTrig_player1 takes nothing returns nothing
set gg_trg_player1=CreateTrigger()
call TriggerRegisterUnitEvent(gg_trg_player1,gg_unit_h00G_0043,EVENT_UNIT_SPELL_EFFECT)
call TriggerAddAction(gg_trg_player1,function Trig_player1_Actions)
endfunction
function Trig_player2_Func001001 takes nothing returns boolean
return(GetSpellAbilityId()==0x41303039)
endfunction
function Trig_player2_Func002001 takes nothing returns boolean
return(GetSpellAbilityId()==0x41303050)
endfunction
function Trig_player2_Func003001 takes nothing returns boolean
return(GetSpellAbilityId()==0x41303042)
endfunction
function Trig_player2_Func004001 takes nothing returns boolean
return(GetSpellAbilityId()==0x41303043)
endfunction
function Trig_player2_Func005001 takes nothing returns boolean
return(GetSpellAbilityId()==0x41303052)
endfunction
function Trig_player2_Actions takes nothing returns nothing
if((GetSpellAbilityId()==0x41303039))then
call ModifyHeroStat(bj_HEROSTAT_AGI,udg_player2hero,bj_MODIFYMETHOD_ADD,1)
else
call DoNothing()
endif
if((GetSpellAbilityId()==0x41303050))then
call UnitAddItemByIdSwapped(0x6D616E68,udg_player2hero)
else
call DoNothing()
endif
if((GetSpellAbilityId()==0x41303042))then
call ModifyHeroStat(bj_HEROSTAT_INT,udg_player2hero,bj_MODIFYMETHOD_ADD,1)
else
call DoNothing()
endif
if((GetSpellAbilityId()==0x41303043))then
call UnitAddItemByIdSwapped(0x74737472,udg_player2hero)
else
call DoNothing()
endif
if((GetSpellAbilityId()==0x41303052))then
call UnitAddItemByIdSwapped(0x49303047,udg_player2hero)
else
call DoNothing()
endif
endfunction
function InitTrig_player2 takes nothing returns nothing
set gg_trg_player2=CreateTrigger()
call TriggerRegisterUnitEvent(gg_trg_player2,gg_unit_h00G_0064,EVENT_UNIT_SPELL_EFFECT)
call TriggerAddAction(gg_trg_player2,function Trig_player2_Actions)
endfunction
function Trig_player3_Func001001 takes nothing returns boolean
return(GetSpellAbilityId()==0x41303039)
endfunction
function Trig_player3_Func002001 takes nothing returns boolean
return(GetSpellAbilityId()==0x41303050)
endfunction
function Trig_player3_Func003001 takes nothing returns boolean
return(GetSpellAbilityId()==0x41303042)
endfunction
function Trig_player3_Func004001 takes nothing returns boolean
return(GetSpellAbilityId()==0x41303043)
endfunction
function Trig_player3_Func005001 takes nothing returns boolean
return(GetSpellAbilityId()==0x41303052)
endfunction
function Trig_player3_Actions takes nothing returns nothing
if((GetSpellAbilityId()==0x41303039))then
call ModifyHeroStat(bj_HEROSTAT_AGI,udg_player3hero,bj_MODIFYMETHOD_ADD,1)
else
call DoNothing()
endif
if((GetSpellAbilityId()==0x41303050))then
call UnitAddItemByIdSwapped(0x6D616E68,udg_player3hero)
else
call DoNothing()
endif
if((GetSpellAbilityId()==0x41303042))then
call ModifyHeroStat(bj_HEROSTAT_INT,udg_player3hero,bj_MODIFYMETHOD_ADD,1)
else
call DoNothing()
endif
if((GetSpellAbilityId()==0x41303043))then
call UnitAddItemByIdSwapped(0x74737472,udg_player3hero)
else
call DoNothing()
endif
if((GetSpellAbilityId()==0x41303052))then
call UnitAddItemByIdSwapped(0x49303047,udg_player3hero)
else
call DoNothing()
endif
endfunction
function InitTrig_player3 takes nothing returns nothing
set gg_trg_player3=CreateTrigger()
call TriggerRegisterUnitEvent(gg_trg_player3,gg_unit_h00G_0070,EVENT_UNIT_SPELL_EFFECT)
call TriggerAddAction(gg_trg_player3,function Trig_player3_Actions)
endfunction
function Trig_player4_Func001001 takes nothing returns boolean
return(GetSpellAbilityId()==0x41303039)
endfunction
function Trig_player4_Func002001 takes nothing returns boolean
return(GetSpellAbilityId()==0x41303042)
endfunction
function Trig_player4_Func003001 takes nothing returns boolean
return(GetSpellAbilityId()==0x41303043)
endfunction
function Trig_player4_Func004001 takes nothing returns boolean
return(GetSpellAbilityId()==0x41303050)
endfunction
function Trig_player4_Func005001 takes nothing returns boolean
return(GetSpellAbilityId()==0x41303052)
endfunction
function Trig_player4_Actions takes nothing returns nothing
if((GetSpellAbilityId()==0x41303039))then
call ModifyHeroStat(bj_HEROSTAT_AGI,udg_player4hero,bj_MODIFYMETHOD_ADD,1)
else
call DoNothing()
endif
if((GetSpellAbilityId()==0x41303042))then
call ModifyHeroStat(bj_HEROSTAT_INT,udg_player4hero,bj_MODIFYMETHOD_ADD,1)
else
call DoNothing()
endif
if((GetSpellAbilityId()==0x41303043))then
call UnitAddItemByIdSwapped(0x74737472,udg_player4hero)
else
call DoNothing()
endif
if((GetSpellAbilityId()==0x41303050))then
call UnitAddItemByIdSwapped(0x6D616E68,udg_player4hero)
else
call DoNothing()
endif
if((GetSpellAbilityId()==0x41303052))then
call UnitAddItemByIdSwapped(0x49303047,udg_player4hero)
else
call DoNothing()
endif
endfunction
function InitTrig_player4 takes nothing returns nothing
set gg_trg_player4=CreateTrigger()
call TriggerRegisterUnitEvent(gg_trg_player4,gg_unit_h00G_0071,EVENT_UNIT_SPELL_EFFECT)
call TriggerAddAction(gg_trg_player4,function Trig_player4_Actions)
endfunction
function Trig_player5_Func001001 takes nothing returns boolean
return(GetSpellAbilityId()==0x41303039)
endfunction
function Trig_player5_Func002001 takes nothing returns boolean
return(GetSpellAbilityId()==0x41303042)
endfunction
function Trig_player5_Func003001 takes nothing returns boolean
return(GetSpellAbilityId()==0x41303050)
endfunction
function Trig_player5_Func004001 takes nothing returns boolean
return(GetSpellAbilityId()==0x41303052)
endfunction
function Trig_player5_Func005001 takes nothing returns boolean
return(GetSpellAbilityId()==0x41303043)
endfunction
function Trig_player5_Actions takes nothing returns nothing
if((GetSpellAbilityId()==0x41303039))then
call ModifyHeroStat(bj_HEROSTAT_AGI,udg_player5hero,bj_MODIFYMETHOD_ADD,1)
else
call DoNothing()
endif
if((GetSpellAbilityId()==0x41303042))then
call ModifyHeroStat(bj_HEROSTAT_INT,udg_player5hero,bj_MODIFYMETHOD_ADD,1)
else
call DoNothing()
endif
if((GetSpellAbilityId()==0x41303050))then
call UnitAddItemByIdSwapped(0x6D616E68,udg_player5hero)
else
call DoNothing()
endif
if((GetSpellAbilityId()==0x41303052))then
call UnitAddItemByIdSwapped(0x49303047,udg_player5hero)
else
call DoNothing()
endif
if((GetSpellAbilityId()==0x41303043))then
call UnitAddItemByIdSwapped(0x74737472,udg_player5hero)
else
call DoNothing()
endif
endfunction
function InitTrig_player5 takes nothing returns nothing
set gg_trg_player5=CreateTrigger()
call TriggerRegisterUnitEvent(gg_trg_player5,gg_unit_h00G_0072,EVENT_UNIT_SPELL_EFFECT)
call TriggerAddAction(gg_trg_player5,function Trig_player5_Actions)
endfunction
function Trig_player6_Func001001 takes nothing returns boolean
return(GetSpellAbilityId()==0x41303039)
endfunction
function Trig_player6_Func002001 takes nothing returns boolean
return(GetSpellAbilityId()==0x41303042)
endfunction
function Trig_player6_Func003001 takes nothing returns boolean
return(GetSpellAbilityId()==0x41303043)
endfunction
function Trig_player6_Func004001 takes nothing returns boolean
return(GetSpellAbilityId()==0x41303050)
endfunction
function Trig_player6_Func005001 takes nothing returns boolean
return(GetSpellAbilityId()==0x41303052)
endfunction
function Trig_player6_Actions takes nothing returns nothing
if((GetSpellAbilityId()==0x41303039))then
call ModifyHeroStat(bj_HEROSTAT_AGI,udg_player6hero,bj_MODIFYMETHOD_ADD,1)
else
call DoNothing()
endif
if((GetSpellAbilityId()==0x41303042))then
call ModifyHeroStat(bj_HEROSTAT_INT,udg_player6hero,bj_MODIFYMETHOD_ADD,1)
else
call DoNothing()
endif
if((GetSpellAbilityId()==0x41303043))then
call UnitAddItemByIdSwapped(0x74737472,udg_player6hero)
else
call DoNothing()
endif
if((GetSpellAbilityId()==0x41303050))then
call UnitAddItemByIdSwapped(0x6D616E68,udg_player6hero)
else
call DoNothing()
endif
if((GetSpellAbilityId()==0x41303052))then
call UnitAddItemByIdSwapped(0x49303047,udg_player6hero)
else
call DoNothing()
endif
endfunction
function InitTrig_player6 takes nothing returns nothing
set gg_trg_player6=CreateTrigger()
call TriggerRegisterUnitEvent(gg_trg_player6,gg_unit_h00G_0073,EVENT_UNIT_SPELL_EFFECT)
call TriggerAddAction(gg_trg_player6,function Trig_player6_Actions)
endfunction
function Trig_____________________________________003_Func002C takes nothing returns boolean
if(not(GetItemTypeId(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(),0x49303035))==0x49303035))then
return false
endif
if(not(GetItemTypeId(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(),0x49303034))==0x49303034))then
return false
endif
if(not(GetItemTypeId(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(),0x49303033))==0x49303033))then
return false
endif
if(not(GetItemTypeId(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(),0x49303036))==0x49303036))then
return false
endif
return true
endfunction
function Trig_____________________________________003_Actions takes nothing returns nothing
if(Trig_____________________________________003_Func002C())then
call RemoveItem(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(),0x49303036))
call RemoveItem(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(),0x49303035))
call RemoveItem(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(),0x49303034))
call RemoveItem(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(),0x49303033))
call CreateItemLoc(0x49303037,GetRectCenter(GetPlayableMapRect()))
call UnitAddItemSwapped(GetLastCreatedItem(),GetManipulatingUnit())
call AddSpecialEffectTargetUnitBJ("overhead",GetManipulatingUnit(),"Objects\\Spawnmodels\\Demon\\InfernalMeteor\\InfernalMeteor.mdl")
call TriggerSleepAction(2)
call DestroyEffectBJ(GetLastCreatedEffectBJ())
else
call DoNothing()
endif
endfunction
function InitTrig_____________________________________003 takes nothing returns nothing
set gg_trg_____________________________________003=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_____________________________________003,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerAddAction(gg_trg_____________________________________003,function Trig_____________________________________003_Actions)
endfunction
function Trig_pack1_Actions takes nothing returns nothing
call TriggerSleepAction(2)
call TriggerSleepAction(20.00)
call IssuePointOrderLocBJ(gg_unit_H001_0022,"move",GetRectCenter(gg_rct_npc2))
call TriggerSleepAction(10.00)
call SetUnitFacingToFaceLocTimed(gg_unit_H001_0022,GetRectCenter(gg_rct_npc21),2.00)
call TriggerSleepAction(20.00)
call IssuePointOrderLocBJ(gg_unit_H001_0022,"move",GetRectCenter(gg_rct_npc3))
call TriggerSleepAction(10.00)
call SetUnitFacingToFaceLocTimed(gg_unit_H001_0022,GetRectCenter(gg_rct_npc31),2.00)
call TriggerSleepAction(20.00)
call IssuePointOrderLocBJ(gg_unit_H001_0022,"move",GetRectCenter(gg_rct_npc4))
call TriggerSleepAction(10.00)
call SetUnitFacingToFaceLocTimed(gg_unit_H001_0022,GetRectCenter(gg_rct_npc41),2.00)
call TriggerSleepAction(20.00)
call SetUnitFacingToFaceLocTimed(gg_unit_H001_0022,GetRectCenter(gg_rct_npc41),2.00)
call TriggerSleepAction(20.00)
call TriggerSleepAction(20.00)
call TriggerSleepAction(20.00)
endfunction
function InitTrig_pack1 takes nothing returns nothing
set gg_trg_pack1=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(gg_trg_pack1,112.00)
call TriggerAddAction(gg_trg_pack1,function Trig_pack1_Actions)
endfunction
function Trig_pack3_Actions takes nothing returns nothing
call IssuePointOrderLocBJ(gg_unit_H002_0438,"move",GetRandomLocInRect(gg_rct_City))
call IssuePointOrderLocBJ(gg_unit_H00Z_0446,"move",GetRandomLocInRect(gg_rct_City))
call IssuePointOrderLocBJ(gg_unit_H015_0445,"move",GetRandomLocInRect(gg_rct_City))
call IssuePointOrderLocBJ(gg_unit_H002_0440,"move",GetRandomLocInRect(gg_rct_City))
call IssuePointOrderLocBJ(gg_unit_H00Z_0408,"move",GetRandomLocInRect(gg_rct_City))
call IssuePointOrderLocBJ(gg_unit_H002_0034,"move",GetRandomLocInRect(gg_rct_City))
call IssuePointOrderLocBJ(gg_unit_H015_0435,"move",GetRandomLocInRect(gg_rct_City))
call IssuePointOrderLocBJ(gg_unit_H00B_0449,"move",GetRandomLocInRect(gg_rct_City))
call IssuePointOrderLocBJ(gg_unit_H015_0437,"move",GetRandomLocInRect(gg_rct_City))
call IssuePointOrderLocBJ(gg_unit_H00Z_0408,"move",GetRandomLocInRect(gg_rct_City))
call IssuePointOrderLocBJ(gg_unit_H015_0425,"move",GetRandomLocInRect(gg_rct_City))
call IssuePointOrderLocBJ(gg_unit_H00O_0444,"move",GetRandomLocInRect(gg_rct_City))
call IssuePointOrderLocBJ(gg_unit_H00Y_0433,"move",GetRandomLocInRect(gg_rct_City))
call IssuePointOrderLocBJ(gg_unit_H01F_0503,"move",GetRandomLocInRect(gg_rct_City))
call IssuePointOrderLocBJ(gg_unit_H01F_0501,"move",GetRandomLocInRect(gg_rct_City))
call IssuePointOrderLocBJ(gg_unit_H01F_0502,"move",GetRandomLocInRect(gg_rct_City))
call IssuePointOrderLocBJ(gg_unit_H004_0504,"move",GetRandomLocInRect(gg_rct_City))
call IssuePointOrderLocBJ(gg_unit_H004_0505,"move",GetRandomLocInRect(gg_rct_City))
call IssuePointOrderLocBJ(gg_unit_H004_0506,"move",GetRandomLocInRect(gg_rct_City))
endfunction
function InitTrig_pack3 takes nothing returns nothing
set gg_trg_pack3=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(gg_trg_pack3,15.00)
call TriggerAddAction(gg_trg_pack3,function Trig_pack3_Actions)
endfunction
function Trig_pack2_Actions takes nothing returns nothing
call TriggerSleepAction(5.00)
call IssuePointOrderLocBJ(gg_unit_H00E_0026,"move",GetRectCenter(gg_rct_npc5))
call TriggerSleepAction(15.00)
call SetUnitFacingToFaceLocTimed(gg_unit_H00E_0026,GetRectCenter(gg_rct_npc51),2.00)
call TriggerSleepAction(25.00)
call IssuePointOrderLocBJ(gg_unit_H00E_0026,"move",GetRectCenter(gg_rct_npc2))
call TriggerSleepAction(10.00)
call SetUnitFacingToFaceLocTimed(gg_unit_H00E_0026,GetRectCenter(gg_rct_npc21),2.00)
call TriggerSleepAction(15.00)
call IssuePointOrderLocBJ(gg_unit_H00E_0026,"move",GetRectCenter(gg_rct_npc6))
call TriggerSleepAction(10.00)
call SetUnitFacingToFaceLocTimed(gg_unit_H00E_0026,GetRectCenter(gg_rct_npc61),2.00)
call TriggerSleepAction(25.00)
call IssuePointOrderLocBJ(gg_unit_H00E_0026,"move",GetRectCenter(gg_rct_npc7))
call TriggerSleepAction(15.00)
call SetUnitFacingToFaceLocTimed(gg_unit_H00E_0026,GetRectCenter(gg_rct_npc71),2.00)
call TriggerSleepAction(25.00)
endfunction
function InitTrig_pack2 takes nothing returns nothing
set gg_trg_pack2=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(gg_trg_pack2,145.00)
call TriggerAddAction(gg_trg_pack2,function Trig_pack2_Actions)
endfunction
function InitTrig_SCS takes nothing returns nothing
endfunction
function Trig_camdebug_Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if(not(GetUnitTypeId(udg_Unit[GetConvertedPlayerId(GetTriggerPlayer())])==0x48303053))then
return false
endif
return true
endfunction
function Trig_camdebug_Func001Func001Func001Func001Func001C takes nothing returns boolean
if(not(GetUnitTypeId(udg_Unit[GetConvertedPlayerId(GetTriggerPlayer())])==0x48303056))then
return false
endif
return true
endfunction
function Trig_camdebug_Func001Func001Func001Func001C takes nothing returns boolean
if(not(GetUnitTypeId(udg_Unit[GetConvertedPlayerId(GetTriggerPlayer())])==0x48303053))then
return false
endif
return true
endfunction
function Trig_camdebug_Func001Func001Func001C takes nothing returns boolean
if(not(GetUnitTypeId(udg_Unit[GetConvertedPlayerId(GetTriggerPlayer())])==0x48303038))then
return false
endif
return true
endfunction
function Trig_camdebug_Func001Func001C takes nothing returns boolean
if(not(GetUnitTypeId(udg_Unit[GetConvertedPlayerId(GetTriggerPlayer())])==0x48303130))then
return false
endif
return true
endfunction
function Trig_camdebug_Func001C takes nothing returns boolean
if(not(GetUnitTypeId(udg_Unit[GetConvertedPlayerId(GetTriggerPlayer())])==0x48303035))then
return false
endif
return true
endfunction
function Trig_camdebug_Actions takes nothing returns nothing
if(Trig_camdebug_Func001C())then
call SCS_Associate(udg_Unit[GetPlayerId(GetTriggerPlayer())],GetTriggerPlayer(),1,false)
else
if(Trig_camdebug_Func001Func001C())then
call SCS_Associate(udg_Unit[GetPlayerId(GetTriggerPlayer())],GetTriggerPlayer(),3,false)
else
if(Trig_camdebug_Func001Func001Func001C())then
call SCS_Associate(udg_Unit[GetPlayerId(GetTriggerPlayer())],GetTriggerPlayer(),8,false)
else
if(Trig_camdebug_Func001Func001Func001Func001C())then
call SCS_Associate(udg_Unit[GetPlayerId(GetTriggerPlayer())],GetTriggerPlayer(),2,false)
else
if(Trig_camdebug_Func001Func001Func001Func001Func001C())then
call SCS_Associate(udg_Unit[GetPlayerId(GetTriggerPlayer())],GetTriggerPlayer(),1,false)
else
if(Trig_camdebug_Func001Func001Func001Func001Func001Func001C())then
call SCS_Associate(udg_Unit[GetPlayerId(GetTriggerPlayer())],GetTriggerPlayer(),2,false)
else
endif
endif
endif
endif
endif
endif
call SCS_SetControl(GetTriggerPlayer(),true)
call SCS_SetCamera(GetTriggerPlayer(),true)
endfunction
function InitTrig_camdebug takes nothing returns nothing
set gg_trg_camdebug=CreateTrigger()
call TriggerRegisterPlayerChatEvent(gg_trg_camdebug,Player(0),"-r",true)
call TriggerRegisterPlayerChatEvent(gg_trg_camdebug,Player(1),"-r",true)
call TriggerRegisterPlayerChatEvent(gg_trg_camdebug,Player(2),"-r",true)
call TriggerRegisterPlayerChatEvent(gg_trg_camdebug,Player(3),"-r",true)
call TriggerRegisterPlayerChatEvent(gg_trg_camdebug,Player(4),"-r",true)
call TriggerRegisterPlayerChatEvent(gg_trg_camdebug,Player(5),"-r",true)
call TriggerAddAction(gg_trg_camdebug,function Trig_camdebug_Actions)
endfunction
function Trig_Init_Actions takes nothing returns nothing
local location loc=GetUnitLoc(GetSpellAbilityUnit())
local integer i=GetSpellAbilityId()
if i==0x41303032 then
call CreateNUnitsAtLoc(1,0x48303035,GetOwningPlayer(GetSpellAbilityUnit()),loc,bj_UNIT_FACING)
call RemoveUnit(GetSpellAbilityUnit())
set udg_Unit[(GetConvertedPlayerId(GetTriggerPlayer())-1)]=GetLastCreatedUnit()
call SetCameraTargetControllerNoZForPlayer(GetOwningPlayer(GetLastCreatedUnit()),GetLastCreatedUnit(),0,0,true)
call SelectUnit(udg_Unit[GetPlayerId(GetTriggerPlayer())],true)
call SCS_Associate(udg_Unit[GetPlayerId(GetTriggerPlayer())],GetTriggerPlayer(),1,false)
call SCS_SetControl(GetTriggerPlayer(),true)
call SCS_SetCamera(GetTriggerPlayer(),true)
endif
if i==0x41303037 then
call CreateNUnitsAtLoc(1,0x48303038,GetOwningPlayer(GetSpellAbilityUnit()),loc,bj_UNIT_FACING)
call RemoveUnit(GetSpellAbilityUnit())
set udg_Unit[(GetConvertedPlayerId(GetTriggerPlayer())-1)]=GetLastCreatedUnit()
call SetCameraTargetControllerNoZForPlayer(GetOwningPlayer(GetLastCreatedUnit()),GetLastCreatedUnit(),0,0,true)
call SelectUnit(udg_Unit[GetPlayerId(GetTriggerPlayer())],true)
call SCS_Associate(udg_Unit[GetPlayerId(GetTriggerPlayer())],GetTriggerPlayer(),9,false)
call SCS_SetControl(GetTriggerPlayer(),true)
call SCS_SetCamera(GetTriggerPlayer(),true)
endif
if i==0x41303044 then
call CreateNUnitsAtLoc(1,0x48303130,GetOwningPlayer(GetSpellAbilityUnit()),loc,bj_UNIT_FACING)
call RemoveUnit(GetSpellAbilityUnit())
set udg_Unit[(GetConvertedPlayerId(GetTriggerPlayer())-1)]=GetLastCreatedUnit()
call SetCameraTargetControllerNoZForPlayer(GetOwningPlayer(GetLastCreatedUnit()),GetLastCreatedUnit(),0,0,true)
call SelectUnit(udg_Unit[GetPlayerId(GetTriggerPlayer())],true)
call SCS_Associate(udg_Unit[GetPlayerId(GetTriggerPlayer())],GetTriggerPlayer(),2,false)
call SCS_SetControl(GetTriggerPlayer(),true)
call SCS_SetCamera(GetTriggerPlayer(),true)
endif
if i==0x41303045 then
call CreateNUnitsAtLoc(1,0x48303053,GetOwningPlayer(GetSpellAbilityUnit()),loc,bj_UNIT_FACING)
call RemoveUnit(GetSpellAbilityUnit())
set udg_Unit[(GetConvertedPlayerId(GetTriggerPlayer())-1)]=GetLastCreatedUnit()
call SetCameraTargetControllerNoZForPlayer(GetOwningPlayer(GetLastCreatedUnit()),GetLastCreatedUnit(),0,0,true)
call SelectUnit(udg_Unit[GetPlayerId(GetTriggerPlayer())],true)
call SCS_Associate(udg_Unit[GetPlayerId(GetTriggerPlayer())],GetTriggerPlayer(),2,false)
call SCS_SetControl(GetTriggerPlayer(),true)
call SCS_SetCamera(GetTriggerPlayer(),true)
endif
if i==0x41303143 then
call CreateNUnitsAtLoc(1,0x48303052,GetOwningPlayer(GetSpellAbilityUnit()),loc,bj_UNIT_FACING)
call RemoveUnit(GetSpellAbilityUnit())
set udg_Unit[(GetConvertedPlayerId(GetTriggerPlayer())-1)]=GetLastCreatedUnit()
call SetCameraTargetControllerNoZForPlayer(GetOwningPlayer(GetLastCreatedUnit()),GetLastCreatedUnit(),0,0,true)
call SelectUnit(udg_Unit[GetPlayerId(GetTriggerPlayer())],true)
call SCS_Associate(udg_Unit[GetPlayerId(GetTriggerPlayer())],GetTriggerPlayer(),2,false)
call SCS_SetControl(GetTriggerPlayer(),true)
call SCS_SetCamera(GetTriggerPlayer(),true)
endif
if i==0x41303046 then
call CreateNUnitsAtLoc(1,0x48303056,GetOwningPlayer(GetSpellAbilityUnit()),loc,bj_UNIT_FACING)
call RemoveUnit(GetSpellAbilityUnit())
set udg_Unit[(GetConvertedPlayerId(GetTriggerPlayer())-1)]=GetLastCreatedUnit()
call SetCameraTargetControllerNoZForPlayer(GetOwningPlayer(GetLastCreatedUnit()),GetLastCreatedUnit(),0,0,true)
call SelectUnit(udg_Unit[GetPlayerId(GetTriggerPlayer())],true)
call SCS_Associate(udg_Unit[GetPlayerId(GetTriggerPlayer())],GetTriggerPlayer(),1,false)
call SCS_SetControl(GetTriggerPlayer(),true)
call SCS_SetCamera(GetTriggerPlayer(),true)
endif
call RemoveLocation(loc)
set loc=null
endfunction
function InitTrig_Init takes nothing returns nothing
set gg_trg_Init=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Init,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddAction(gg_trg_Init,function Trig_Init_Actions)
endfunction
function Trig_____________________________________001_____________________u_Actions takes nothing returns nothing
set udg_i=S2I(GetEventPlayerChatString())
call SetUnitAnimationByIndex(udg_Unit[0],udg_i)
endfunction
function InitTrig_____________________________________001_____________________u takes nothing returns nothing
set gg_trg_____________________________________001_____________________u=CreateTrigger()
call TriggerRegisterPlayerChatEvent(gg_trg_____________________________________001_____________________u,Player(0),"0",false)
call TriggerRegisterPlayerChatEvent(gg_trg_____________________________________001_____________________u,Player(0),"1",false)
call TriggerRegisterPlayerChatEvent(gg_trg_____________________________________001_____________________u,Player(0),"2",false)
call TriggerRegisterPlayerChatEvent(gg_trg_____________________________________001_____________________u,Player(0),"3",false)
call TriggerRegisterPlayerChatEvent(gg_trg_____________________________________001_____________________u,Player(0),"4",false)
call TriggerRegisterPlayerChatEvent(gg_trg_____________________________________001_____________________u,Player(0),"5",false)
call TriggerRegisterPlayerChatEvent(gg_trg_____________________________________001_____________________u,Player(0),"6",false)
call TriggerRegisterPlayerChatEvent(gg_trg_____________________________________001_____________________u,Player(0),"7",false)
call TriggerRegisterPlayerChatEvent(gg_trg_____________________________________001_____________________u,Player(0),"8",false)
call TriggerRegisterPlayerChatEvent(gg_trg_____________________________________001_____________________u,Player(0),"9",false)
call TriggerRegisterPlayerChatEvent(gg_trg_____________________________________001_____________________u,Player(0),"10",false)
call TriggerRegisterPlayerChatEvent(gg_trg_____________________________________001_____________________u,Player(0),"11",false)
call TriggerRegisterPlayerChatEvent(gg_trg_____________________________________001_____________________u,Player(0),"12",false)
call TriggerRegisterPlayerChatEvent(gg_trg_____________________________________001_____________________u,Player(0),"13",false)
call TriggerRegisterPlayerChatEvent(gg_trg_____________________________________001_____________________u,Player(0),"14",false)
call TriggerRegisterPlayerChatEvent(gg_trg_____________________________________001_____________________u,Player(0),"15",false)
call TriggerRegisterPlayerChatEvent(gg_trg_____________________________________001_____________________u,Player(0),"16",false)
call TriggerRegisterPlayerChatEvent(gg_trg_____________________________________001_____________________u,Player(0),"18",false)
call TriggerAddAction(gg_trg_____________________________________001_____________________u,function Trig_____________________________________001_____________________u_Actions)
endfunction
function Trig_cam4_Actions takes nothing returns nothing
set SCS_angle=200
set SCS_distance=550
endfunction
function InitTrig_cam4 takes nothing returns nothing
set gg_trg_cam4=CreateTrigger()
call TriggerRegisterPlayerChatEvent(gg_trg_cam4,Player(0),"-cam4",false)
call TriggerRegisterPlayerChatEvent(gg_trg_cam4,Player(1),"-cam4",false)
call TriggerRegisterPlayerChatEvent(gg_trg_cam4,Player(2),"-cam4",false)
call TriggerRegisterPlayerChatEvent(gg_trg_cam4,Player(3),"-cam4",false)
call TriggerRegisterPlayerChatEvent(gg_trg_cam4,Player(4),"-cam4",false)
call TriggerRegisterPlayerChatEvent(gg_trg_cam4,Player(5),"-cam4",false)
call TriggerAddAction(gg_trg_cam4,function Trig_cam4_Actions)
endfunction
function Trig_cam5_Actions takes nothing returns nothing
set SCS_angle=300
set SCS_distance=170
endfunction
function InitTrig_cam5 takes nothing returns nothing
set gg_trg_cam5=CreateTrigger()
call TriggerRegisterPlayerChatEvent(gg_trg_cam5,Player(0),"-cam5",false)
call TriggerRegisterPlayerChatEvent(gg_trg_cam5,Player(1),"-cam4",false)
call TriggerRegisterPlayerChatEvent(gg_trg_cam5,Player(2),"-cam4",false)
call TriggerRegisterPlayerChatEvent(gg_trg_cam5,Player(3),"-cam4",false)
call TriggerRegisterPlayerChatEvent(gg_trg_cam5,Player(4),"-cam4",false)
call TriggerRegisterPlayerChatEvent(gg_trg_cam5,Player(5),"-cam4",false)
call TriggerAddAction(gg_trg_cam5,function Trig_cam5_Actions)
endfunction
function Trig_cam2_Actions takes nothing returns nothing
set SCS_angle=149.68
set SCS_distance=451.57
endfunction
function InitTrig_cam2 takes nothing returns nothing
set gg_trg_cam2=CreateTrigger()
call TriggerRegisterPlayerChatEvent(gg_trg_cam2,Player(0),"-cam2",false)
call TriggerRegisterPlayerChatEvent(gg_trg_cam2,Player(1),"-cam2",false)
call TriggerRegisterPlayerChatEvent(gg_trg_cam2,Player(2),"-cam2",false)
call TriggerRegisterPlayerChatEvent(gg_trg_cam2,Player(3),"-cam2",false)
call TriggerRegisterPlayerChatEvent(gg_trg_cam2,Player(4),"-cam2",false)
call TriggerRegisterPlayerChatEvent(gg_trg_cam2,Player(5),"-cam1",false)
call TriggerRegisterPlayerChatEvent(gg_trg_cam2,Player(6),"-cam1",false)
call TriggerRegisterPlayerChatEvent(gg_trg_cam2,Player(7),"-cam1",false)
call TriggerAddAction(gg_trg_cam2,function Trig_cam2_Actions)
endfunction
function Trig_cam3_Actions takes nothing returns nothing
set SCS_angle=149.68
set SCS_distance=251.57
endfunction
function InitTrig_cam3 takes nothing returns nothing
set gg_trg_cam3=CreateTrigger()
call TriggerRegisterPlayerChatEvent(gg_trg_cam3,Player(0),"-cam3",false)
call TriggerRegisterPlayerChatEvent(gg_trg_cam3,Player(1),"-cam3",false)
call TriggerRegisterPlayerChatEvent(gg_trg_cam3,Player(2),"-cam3",false)
call TriggerRegisterPlayerChatEvent(gg_trg_cam3,Player(3),"-cam3",false)
call TriggerRegisterPlayerChatEvent(gg_trg_cam3,Player(4),"-cam3",false)
call TriggerRegisterPlayerChatEvent(gg_trg_cam3,Player(5),"-cam3",false)
call TriggerRegisterPlayerChatEvent(gg_trg_cam3,Player(6),"-cam3",false)
call TriggerRegisterPlayerChatEvent(gg_trg_cam3,Player(7),"-cam3",false)
call TriggerAddAction(gg_trg_cam3,function Trig_cam3_Actions)
endfunction
function Trig_cam1_Actions takes nothing returns nothing
set SCS_angle=349.68
set SCS_distance=101.57
endfunction
function InitTrig_cam1 takes nothing returns nothing
set gg_trg_cam1=CreateTrigger()
call TriggerRegisterPlayerChatEvent(gg_trg_cam1,Player(0),"-cam1",false)
call TriggerRegisterPlayerChatEvent(gg_trg_cam1,Player(1),"-cam1",false)
call TriggerRegisterPlayerChatEvent(gg_trg_cam1,Player(2),"-cam1",false)
call TriggerRegisterPlayerChatEvent(gg_trg_cam1,Player(3),"-cam1",false)
call TriggerRegisterPlayerChatEvent(gg_trg_cam1,Player(4),"-cam1",false)
call TriggerRegisterPlayerChatEvent(gg_trg_cam1,Player(5),"-cam1",false)
call TriggerRegisterPlayerChatEvent(gg_trg_cam1,Player(6),"-cam1",false)
call TriggerRegisterPlayerChatEvent(gg_trg_cam1,Player(7),"-cam1",false)
call TriggerAddAction(gg_trg_cam1,function Trig_cam1_Actions)
endfunction
function Trig_DarkHealth_Conditions takes nothing returns boolean
if(not(GetSpellAbilityId()==0x41303230))then
return false
endif
return true
endfunction
function Trig_DarkHealth_Actions takes nothing returns nothing
call UnitDamageTargetBJ(GetSpellAbilityUnit(),GetSpellTargetUnit(),400.00,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_UNKNOWN)
call SetUnitLifeBJ(GetSpellAbilityUnit(),(GetUnitStateSwap(UNIT_STATE_LIFE,GetSpellAbilityUnit())+400.00))
call AddSpecialEffectTargetUnitBJ("overhead",GetSpellTargetUnit(),"Abilities\\Spells\\Undead\\RaiseSkeletonWarrior\\RaiseSkeleton.mdl")
call DestroyEffectBJ(GetLastCreatedEffectBJ())
call AddSpecialEffectTargetUnitBJ("overhead",GetSpellAbilityUnit(),"Abilities\\Spells\\Other\\Charm\\CharmTarget.mdl")
call DestroyEffectBJ(GetLastCreatedEffectBJ())
endfunction
function InitTrig_DarkHealth takes nothing returns nothing
set gg_trg_DarkHealth=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_DarkHealth,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(gg_trg_DarkHealth,Condition(function Trig_DarkHealth_Conditions))
call TriggerAddAction(gg_trg_DarkHealth,function Trig_DarkHealth_Actions)
endfunction
function Trig_SuperKick_Conditions takes nothing returns boolean
return GetSpellAbilityId()==0x41303148
endfunction
function SuperKickDestruble takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer h=GetHandleId(t)-0x100000
local destructable d=GetEnumDestructable()
call KillDestructable(d)
set udg_Int[h]=udg_Int[h]+1
set d=null
set t=null
endfunction
function SuperKickRun takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer h=GetHandleId(t)-0x100000
local rect Drect=Rect(GetUnitX(udg_Target[h])-100,GetUnitY(udg_Target[h])-100,GetUnitX(udg_Target[h])+100,GetUnitY(udg_Target[h])+100)
call SetUnitX(udg_Target[h],GetUnitX(udg_Target[h])-30*Cos(GetUnitFacing(udg_Target[h])*bj_DEGTORAD))
call SetUnitY(udg_Target[h],GetUnitY(udg_Target[h])-30*Sin(GetUnitFacing(udg_Target[h])*bj_DEGTORAD))
call EnumDestructablesInRect(Drect,null,function SuperKickDestruble)
set Drect=null
if udg_Int[h]!=0 or IsTerrainPathable(GetUnitX(udg_Target[h]),GetUnitY(udg_Target[h]),PATHING_TYPE_WALKABILITY)==true then
call UnitDamageTarget(udg_Unit[h],udg_Target[h],100.00,true,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
set udg_Int[h]=0
call PauseUnit(udg_Target[h],false)
set udg_Unit[h]=null
set udg_Target[h]=null
call DestroyTimer(t)
set t=null
endif
set t=null
set udg_Int[h]=0
call RemoveRect(Drect)
set Drect=null
endfunction
function Trig_SuperKick_Actions takes nothing returns nothing
local timer t=CreateTimer()
local integer h=GetHandleId(t)-0x100000
set udg_Unit[h]=GetSpellAbilityUnit()
set udg_Target[h]=GetSpellTargetUnit()
set udg_Int[h]=0
call UnitDamageTarget(udg_Unit[h],udg_Target[h],I2R(GetUnitAbilityLevel(udg_Unit[h],0x41303034))*100.00,true,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
call PauseUnit(udg_Target[h],true)
call SetUnitFacing(udg_Target[h],GetUnitFacing(udg_Unit[h])-180)
call TimerStart(t,0.04,true,function SuperKickRun)
set t=null
endfunction
function InitTrig_Cunami takes nothing returns nothing
local trigger SuperKick=CreateTrigger()
local integer i=0
loop
exitwhen i>15
call TriggerRegisterPlayerUnitEvent(SuperKick,Player(i),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set i=i+1
endloop
call TriggerAddCondition(SuperKick,Condition(function Trig_SuperKick_Conditions))
call TriggerAddAction(SuperKick,function Trig_SuperKick_Actions)
endfunction
function Trig_Vakuum_Conditions takes nothing returns boolean
return GetSpellAbilityId()==0x41303157
endfunction
function VakuumAttackRemove takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer h=GetHandleId(t)-0x100000
if udg_TmInt[h]!=0 then
set udg_TmInt[h]=udg_TmInt[h]-1
else
call UnitRemoveAbility(udg_Target[h],0x4162756E)
call DestroyEffect(udg_Effect[h])
set udg_Unit[h]=null
set udg_Target[h]=null
set udg_Effect[h]=null
call DestroyTimer(t)
set t=null
endif
set t=null
endfunction
function Trig_Vakuum_Actions takes nothing returns nothing
local timer t=CreateTimer()
local integer h=GetHandleId(t)-0x100000
set udg_Unit[h]=GetSpellAbilityUnit()
set udg_Target[h]=GetSpellTargetUnit()
set udg_TmInt[h]=(2+(GetUnitAbilityLevel(udg_Unit[h],0x41303157)*1))
set udg_Effect[h]=AddSpecialEffectTarget("Abilities\\Spells\\NightElf\\EntanglingRoots\\EntanglingRootsTarget.mdl",udg_Target[h],"chest")
call UnitDamageTarget(udg_Unit[h],udg_Target[h],300.00+(I2R(GetUnitAbilityLevel(udg_Unit[h],0x41303033))*100.00),true,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Undead\\RaiseSkeletonWarrior\\RaiseSkeleton.mdl",GetUnitX(udg_Target[h]),GetUnitY(udg_Target[h])))
call UnitAddAbility(udg_Target[h],0x4162756E)
call TimerStart(t,1,true,function VakuumAttackRemove)
set t=null
endfunction
function InitTrig_Opletenie takes nothing returns nothing
local trigger Vakuum=CreateTrigger()
local integer i=0
loop
exitwhen i>15
call TriggerRegisterPlayerUnitEvent(Vakuum,Player(i),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set i=i+1
endloop
call TriggerAddCondition(Vakuum,Condition(function Trig_Vakuum_Conditions))
call TriggerAddAction(Vakuum,function Trig_Vakuum_Actions)
endfunction
function Trig_Zaxvat_Conditions takes nothing returns boolean
return GetSpellAbilityId()==0x41303158
endfunction
function Trig_ZaxvatTimer takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer h=GetHandleId(t)-0x100000
set udg_Int[h]=udg_Int[h]-1
call SetUnitAnimation(udg_Unit[h],"attack")
call PauseUnit(udg_Unit[h],true)
call SetUnitInvulnerable(udg_Unit[h],true)
call UnitDamageTarget(udg_Unit[h],udg_Target[h],30+I2R(GetUnitAbilityLevel(udg_Unit[h],0x41303031))*15,true,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl",GetUnitX(udg_Target[h]),GetUnitY(udg_Target[h])))
if udg_Int[h]==0 then
call SetUnitTimeScale(udg_Unit[h],100*0.01)
call PauseUnit(udg_Unit[h],false)
call SetUnitInvulnerable(udg_Unit[h],false)
set udg_Target[h]=null
set udg_Unit[h]=null
call DestroyTimer(t)
set t=null
endif
set t=null
endfunction
function Trig_Zaxvat_Actions takes nothing returns nothing
local timer t=CreateTimer()
local integer h=GetHandleId(t)-0x100000
set udg_Unit[h]=GetSpellAbilityUnit()
set udg_Target[h]=GetSpellTargetUnit()
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl",GetUnitX(udg_Target[h]),GetUnitY(udg_Target[h])))
call SetUnitTimeScale(udg_Unit[h],300*0.01)
set udg_Int[h]=6
call TimerStart(t,0.3,true,function Trig_ZaxvatTimer)
set t=null
endfunction
function InitTrig_WaterKick takes nothing returns nothing
local trigger Zaxvat=CreateTrigger()
local integer i=0
loop
exitwhen i>15
call TriggerRegisterPlayerUnitEvent(Zaxvat,Player(i),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set i=i+1
endloop
call TriggerAddCondition(Zaxvat,Condition(function Trig_Zaxvat_Conditions))
call TriggerAddAction(Zaxvat,function Trig_Zaxvat_Actions)
endfunction
function TornadoConditions takes nothing returns boolean
return GetSpellAbilityId()==0x41303159
endfunction
function TornadoGroup takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer h=GetHandleId(t)-0x100000
set udg_TrUnit[h]=GetEnumUnit()
call SetUnitX(udg_TrUnit[h],GetUnitX(udg_TrUnit[h])+15*Cos(bj_RADTODEG*Atan2(GetUnitY(udg_Target[h])-GetUnitY(udg_TrUnit[h]),GetUnitX(udg_Target[h])-GetUnitX(udg_TrUnit[h]))*bj_DEGTORAD))
call SetUnitY(udg_TrUnit[h],GetUnitY(udg_TrUnit[h])+15*Sin(bj_RADTODEG*Atan2(GetUnitY(udg_Target[h])-GetUnitY(udg_TrUnit[h]),GetUnitX(udg_Target[h])-GetUnitX(udg_TrUnit[h]))*bj_DEGTORAD))
call UnitDamageTarget(udg_Unit[h],udg_TrUnit[h],I2R(GetUnitAbilityLevel(udg_Unit[h],0x41303159))*3,true,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
set udg_TrUnit[h]=null
set t=null
endfunction
function EnumUnitsT takes nothing returns boolean
local timer t=GetExpiredTimer()
local integer h=GetHandleId(t)-0x100000
set t=null
return GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>0 and IsPlayerEnemy(GetOwningPlayer(GetFilterUnit()),GetOwningPlayer(udg_Target[h]))==true
endfunction
function DestructablesTornadoAction takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer h=GetHandleId(t)-0x100000
local destructable d
set d=GetEnumDestructable()
call DestroyTimer(t)
set t=null
call RemoveUnit(udg_Target[h])
set udg_Target[h]=null
set udg_TrUnit[h]=null
set udg_Unit[h]=null
call DestroyGroup(udg_Group[h])
set udg_Group[h]=null
endfunction
function DestructablesTornado takes nothing returns boolean
return true
endfunction
function TornadoMove takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer h=GetHandleId(t)-0x100000
local rect Drect
local real x
local real y
set udg_Group[h]=CreateGroup()
set x=GetUnitX(udg_Target[h])+8*Cos(GetUnitFacing(udg_Target[h])*bj_DEGTORAD)
set y=GetUnitY(udg_Target[h])+8*Sin(GetUnitFacing(udg_Target[h])*bj_DEGTORAD)
call SetUnitX(udg_Target[h],x)
call SetUnitY(udg_Target[h],y)
set Drect=Rect(x-100,y-100,x+100,y+100)
call GroupEnumUnitsInRange(udg_Group[h],GetUnitX(udg_Target[h]),GetUnitY(udg_Target[h]),300,Condition(function EnumUnitsT))
call ForGroup(udg_Group[h],function TornadoGroup)
call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl",GetUnitX(udg_Target[h]),GetUnitY(udg_Target[h])))
call EnumDestructablesInRect(Drect,Condition(function DestructablesTornado),function DestructablesTornadoAction)
if IsTerrainPathable(GetUnitX(udg_Target[h]),GetUnitY(udg_Target[h]),PATHING_TYPE_WALKABILITY)==true then
call DestroyTimer(t)
set t=null
call RemoveUnit(udg_Target[h])
set udg_Target[h]=null
set udg_TrUnit[h]=null
set udg_Unit[h]=null
call DestroyGroup(udg_Group[h])
set udg_Group[h]=null
endif
set t=null
set udg_TrUnit[h]=null
call DestroyGroup(udg_Group[h])
set udg_Group[h]=null
set t=null
set x=0
set y=0
endfunction
function TornadoActions takes nothing returns nothing
local timer t=CreateTimer()
local integer h=GetHandleId(t)-0x100000
set udg_Unit[h]=GetSpellAbilityUnit()
set udg_Target[h]=CreateUnit(GetOwningPlayer(udg_Unit[h]),0x68303150,GetUnitX(udg_Unit[h]),GetUnitY(udg_Unit[h]),GetUnitFacing(udg_Unit[h]))
set udg_TmInt[h]=150
call TimerStart(t,0.04,true,function TornadoMove)
set t=null
endfunction
function InitTrig_Tornado takes nothing returns nothing
local integer i=0
local trigger Tornado=CreateTrigger()
loop
exitwhen i>15
call TriggerRegisterPlayerUnitEvent(Tornado,Player(i),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set i=i+1
endloop
call TriggerAddCondition(Tornado,Condition(function TornadoConditions))
call TriggerAddAction(Tornado,function TornadoActions)
endfunction
function Trig_Earthslam_Conditions takes nothing returns boolean
return GetSpellAbilityId()==0x41303156
endfunction
function Earthslamgf takes nothing returns boolean
return GetOwningPlayer(GetFilterUnit())!=GetOwningPlayer(udg_Unit[1])
endfunction
function Trig_Earthslam_Actions takes nothing returns nothing
local unit u=GetSpellAbilityUnit()
local group g=CreateGroup()
local unit t
local integer i=0
set udg_Unit[1]=GetSpellAbilityUnit()
loop
exitwhen i>10
call GroupEnumUnitsInRange(g,GetUnitX(u),GetUnitY(u),400,Condition(function Earthslamgf))
set t=FirstOfGroup(g)
call SetUnitX(t,GetUnitX(u))
call SetUnitY(t,GetUnitY(u))
set i=i+1
endloop
set u=null
set t=null
set udg_Unit[1]=null
call DestroyGroup(g)
set g=null
endfunction
function InitTrig_Earthslam takes nothing returns nothing
local trigger Earthslam=CreateTrigger()
local integer i=0
loop
exitwhen i>11
call TriggerRegisterPlayerUnitEvent(Earthslam,Player(i),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set i=i+1
endloop
call TriggerAddCondition(Earthslam,Condition(function Trig_Earthslam_Conditions))
call TriggerAddAction(Earthslam,function Trig_Earthslam_Actions)
endfunction
function Trig_Earth_Shake_Conditions takes nothing returns boolean
return GetSpellAbilityId()==0x41303149
endfunction
function Trig_Earth_Shake_Actions takes nothing returns nothing
local location l=GetSpellTargetLoc()
local unit u
local unit c=GetSpellAbilityUnit()
set u=CreateUnit(GetOwningPlayer(c),0x6830314F,GetLocationX(l),GetLocationY(l),0)
call UnitAddAbility(u,0x4130314A)
call IssueImmediateOrder(u,"thunderclap")
call RemoveLocation(l)
set l=null
set c=null
call TriggerSleepAction(0.5)
call RemoveUnit(u)
set u=null
endfunction
function InitTrig_Earth_Shake takes nothing returns nothing
local trigger EarthShake=CreateTrigger()
local integer i=0
loop
exitwhen i>11
call TriggerRegisterPlayerUnitEvent(EarthShake,Player(i),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set i=i+1
endloop
call TriggerAddCondition(EarthShake,Condition(function Trig_Earth_Shake_Conditions))
call TriggerAddAction(EarthShake,function Trig_Earth_Shake_Actions)
endfunction
function Trig_DeathBall_Conditions takes nothing returns boolean
if(not(GetSpellAbilityId()==0x41303154))then
return false
endif
return true
endfunction
function Trig_DeathBall_Actions takes nothing returns nothing
call CreateNUnitsAtLoc(1,0x6830314E,GetOwningPlayer(GetSpellAbilityUnit()),PolarProjectionBJ(GetUnitLoc(GetSpellAbilityUnit()),30.00,GetUnitFacing(GetSpellAbilityUnit())),GetUnitFacing(GetSpellAbilityUnit()))
set udg_number=(udg_number+1)
set udg_RunOrNO[udg_number]=true
set udg_moved[udg_number]=GetLastCreatedUnit()
set udg_MoveFacing[udg_number]=GetUnitFacing(GetLastCreatedUnit())
set udg_MovedAvtoFacing[udg_number]=false
set udg_MovedDeath[udg_number]=false
set udg_MovedIsSnorads[udg_number]=true
set udg_MovedDamage[udg_number]=500.00
set udg_MovedRang[udg_number]=500.00
set udg_realMove[udg_number]=30.00
set udg_realStop[udg_number]=0.00
endfunction
function InitTrig_DeathBall takes nothing returns nothing
set gg_trg_DeathBall=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_DeathBall,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_DeathBall,Condition(function Trig_DeathBall_Conditions))
call TriggerAddAction(gg_trg_DeathBall,function Trig_DeathBall_Actions)
endfunction
function Trig_SunPower_Conditions takes nothing returns boolean
if(not(GetSpellAbilityId()==0x41303153))then
return false
endif
return true
endfunction
function Trig_SunPower_Func001Func001C takes nothing returns boolean
if(not(IsPlayerEnemy(GetOwningPlayer(GetEnumUnit()),GetOwningPlayer(GetSpellAbilityUnit()))==true))then
return false
endif
if(not(IsUnitType(GetEnumUnit(),UNIT_TYPE_STRUCTURE)==false))then
return false
endif
return true
endfunction
function Trig_SunPower_Func001A takes nothing returns nothing
if(Trig_SunPower_Func001Func001C())then
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl",GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit())))
set udg_number=(udg_number+1)
set udg_RunOrNO[udg_number]=true
set udg_moved[udg_number]=GetEnumUnit()
set udg_MoveFacing[udg_number]=AngleBetweenPoints(GetUnitLoc(GetSpellAbilityUnit()),GetUnitLoc(GetEnumUnit()))
set udg_MovedAvtoFacing[udg_number]=false
set udg_MovedDamage[udg_number]=0.00
set udg_MovedDeath[udg_number]=false
set udg_MovedIsSnorads[udg_number]=false
set udg_MovedRang[udg_number]=0.00
set udg_realMove[udg_number]=30.00
set udg_realStop[udg_number]=1.50
else
endif
endfunction
function Trig_SunPower_Actions takes nothing returns nothing
call ForGroupBJ(GetUnitsInRangeOfLocAll(350.00,GetUnitLoc(GetSpellAbilityUnit())),function Trig_SunPower_Func001A)
endfunction
function InitTrig_SunPower takes nothing returns nothing
set gg_trg_SunPower=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_SunPower,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_SunPower,Condition(function Trig_SunPower_Conditions))
call TriggerAddAction(gg_trg_SunPower,function Trig_SunPower_Actions)
endfunction
function Trig_Moving_system_Func001Func001Func001Func003Func004Func004Func004Func004C takes nothing returns boolean
if(not(udg_RunOrNO[udg_number]==false))then
return false
endif
if(not(udg_number>udg_biginInteger))then
return false
endif
return true
endfunction
function Trig_Moving_system_Func001Func001Func001Func003Func004Func004Func004C takes nothing returns boolean
if(not(udg_RunOrNO[udg_number]==false))then
return false
endif
if(not(udg_number>udg_biginInteger))then
return false
endif
return true
endfunction
function Trig_Moving_system_Func001Func001Func001Func003Func004Func004C takes nothing returns boolean
if(not(udg_RunOrNO[udg_number]==false))then
return false
endif
if(not(udg_number>udg_biginInteger))then
return false
endif
return true
endfunction
function Trig_Moving_system_Func001Func001Func001Func003Func004C takes nothing returns boolean
if(not(udg_RunOrNO[udg_number]==false))then
return false
endif
if(not(udg_number>udg_biginInteger))then
return false
endif
return true
endfunction
function Trig_Moving_system_Func001Func001Func001Func003C takes nothing returns boolean
if(not(GetForLoopIndexA()==udg_number))then
return false
endif
if(not(udg_number>udg_biginInteger))then
return false
endif
return true
endfunction
function Trig_Moving_system_Func001Func001Func001C takes nothing returns boolean
return true
endfunction
function Trig_Moving_system_Func001Func001Func002Func002Func009C takes nothing returns boolean
if(not(DistanceBetweenPoints(GetUnitLoc(udg_moved[GetForLoopIndexA()]),udg_MovedPozition[GetForLoopIndexA()])>(udg_realMove[GetForLoopIndexA()]/5.00)))then
return false
endif
return true
endfunction
function Trig_Moving_system_Func001Func001Func002Func002C takes nothing returns boolean
if(not(udg_MovedAvtoFacing[GetForLoopIndexA()]==true))then
return false
endif
return true
endfunction
function Trig_Moving_system_Func001Func001Func002Func003Func001Func001Func002Func005Func001C takes nothing returns boolean
if(not(IsUnitAliveBJ(GetEnumUnit())==true))then
return false
endif
if(not(IsPlayerEnemy(GetOwningPlayer(udg_moved[GetForLoopIndexA()]),GetOwningPlayer(GetEnumUnit()))==true))then
return false
endif
return true
endfunction
function Trig_Moving_system_Func001Func001Func002Func003Func001Func001Func002Func005A takes nothing returns nothing
if(Trig_Moving_system_Func001Func001Func002Func003Func001Func001Func002Func005Func001C())then
call UnitDamageTargetBJ(udg_moved[GetForLoopIndexA()],GetEnumUnit(),udg_MovedDamage[GetForLoopIndexA()],ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL)
call TriggerSleepAction(0.01)
call RemoveUnit(udg_moved[GetForLoopIndexA()])
else
endif
endfunction
function Trig_Moving_system_Func001Func001Func002Func003Func001Func001Func002C takes nothing returns boolean
if(not(GetUnitTypeId(udg_moved[GetForLoopIndexA()])==0x6830314E))then
return false
endif
return true
endfunction
function Trig_Moving_system_Func001Func001Func002Func003Func001Func001C takes nothing returns boolean
return true
endfunction
function Trig_Moving_system_Func001Func001Func002Func003Func001C takes nothing returns boolean
if(not(DistanceBetweenPoints(GetUnitLoc(udg_moved[GetForLoopIndexA()]),udg_MovedPozition[GetForLoopIndexA()])>(udg_realMove[GetForLoopIndexA()]/5.00)))then
return false
endif
return true
endfunction
function Trig_Moving_system_Func001Func001Func002Func003C takes nothing returns boolean
if(not(udg_MovedIsSnorads[GetForLoopIndexA()]==true))then
return false
endif
return true
endfunction
function Trig_Moving_system_Func001Func001Func002Func004Func003Func004Func004Func004Func004C takes nothing returns boolean
if(not(udg_RunOrNO[udg_number]==false))then
return false
endif
if(not(udg_number>udg_biginInteger))then
return false
endif
return true
endfunction
function Trig_Moving_system_Func001Func001Func002Func004Func003Func004Func004Func004C takes nothing returns boolean
if(not(udg_RunOrNO[udg_number]==false))then
return false
endif
if(not(udg_number>udg_biginInteger))then
return false
endif
return true
endfunction
function Trig_Moving_system_Func001Func001Func002Func004Func003Func004Func004C takes nothing returns boolean
if(not(udg_RunOrNO[udg_number]==false))then
return false
endif
if(not(udg_number>udg_biginInteger))then
return false
endif
return true
endfunction
function Trig_Moving_system_Func001Func001Func002Func004Func003Func004C takes nothing returns boolean
if(not(udg_RunOrNO[udg_number]==false))then
return false
endif
if(not(udg_number>udg_biginInteger))then
return false
endif
return true
endfunction
function Trig_Moving_system_Func001Func001Func002Func004Func003C takes nothing returns boolean
if(not(GetForLoopIndexA()==udg_number))then
return false
endif
if(not(udg_number>udg_biginInteger))then
return false
endif
return true
endfunction
function Trig_Moving_system_Func001Func001Func002Func004C takes nothing returns boolean
if(not(udg_MoveOforON[GetForLoopIndexA()]==false))then
return false
endif
if(not(udg_realMove[GetForLoopIndexA()]<1.00))then
return false
endif
return true
endfunction
function Trig_Moving_system_Func001Func001Func002C takes nothing returns boolean
return true
endfunction
function Trig_Moving_system_Func001Func001Func004C takes nothing returns boolean
if((udg_MovedDeath[GetForLoopIndexA()]==true))then
return true
endif
if((IsUnitAliveBJ(udg_moved[GetForLoopIndexA()])==true))then
return true
endif
return false
endfunction
function Trig_Moving_system_Func001Func001C takes nothing returns boolean
if(not(udg_RunOrNO[GetForLoopIndexA()]==true))then
return false
endif
if(not Trig_Moving_system_Func001Func001Func004C())then
return false
endif
return true
endfunction
function Trig_Moving_system_Actions takes nothing returns nothing
set bj_forLoopAIndex=udg_biginInteger
set bj_forLoopAIndexEnd=udg_number
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(Trig_Moving_system_Func001Func001C())then
if((true))then
set udg_realMove[GetForLoopIndexA()]=(udg_realMove[GetForLoopIndexA()]-udg_realStop[GetForLoopIndexA()])
if(Trig_Moving_system_Func001Func001Func002Func002C())then
set udg_p=GetUnitLoc(udg_moved[GetForLoopIndexA()])
call MoveLocation(udg_p,GetLocationX(udg_p)+udg_realMove[GetForLoopIndexA()]*CosBJ(GetUnitFacing(udg_moved[GetForLoopIndexA()])),GetLocationY(udg_p)+udg_realMove[GetForLoopIndexA()]*SinBJ(GetUnitFacing(udg_moved[GetForLoopIndexA()])))
call SetUnitPositionLoc(udg_moved[GetForLoopIndexA()],udg_p)
set udg_MovedPozition[GetForLoopIndexA()]=udg_p
else
set udg_p=GetUnitLoc(udg_moved[GetForLoopIndexA()])
call MoveLocation(udg_p,GetLocationX(udg_p)+udg_realMove[GetForLoopIndexA()]*CosBJ(udg_MoveFacing[GetForLoopIndexA()]),GetLocationY(udg_p)+udg_realMove[GetForLoopIndexA()]*SinBJ(udg_MoveFacing[GetForLoopIndexA()]))
call SetUnitPositionLoc(udg_moved[GetForLoopIndexA()],udg_p)
set udg_MovedPozition[GetForLoopIndexA()]=udg_p
if(Trig_Moving_system_Func001Func001Func002Func002Func009C())then
set udg_MoveFacing[GetForLoopIndexA()]=AngleBetweenPoints(udg_MovedPozition[GetForLoopIndexA()],GetUnitLoc(udg_moved[GetForLoopIndexA()]))
else
endif
endif
if(Trig_Moving_system_Func001Func001Func002Func003C())then
if(Trig_Moving_system_Func001Func001Func002Func003Func001C())then
if((true))then
call KillUnit(udg_moved[GetForLoopIndexA()])
if(Trig_Moving_system_Func001Func001Func002Func003Func001Func001Func002C())then
call AddSpecialEffectLocBJ(GetUnitLoc(udg_moved[GetForLoopIndexA()]),"Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl")
call DestroyEffectBJ(GetLastCreatedEffectBJ())
call TerrainDeformationWaveBJ(0.5,GetUnitLoc(udg_moved[GetForLoopIndexA()]),GetUnitLoc(udg_moved[GetForLoopIndexA()]),300.00,96.00,0.10)
set udg_Picked_Units_Groop=GetUnitsInRangeOfLocAll(udg_MovedRang[GetForLoopIndexA()],GetUnitLoc(udg_moved[GetForLoopIndexA()]))
call ForGroupBJ(udg_Picked_Units_Groop,function Trig_Moving_system_Func001Func001Func002Func003Func001Func001Func002Func005A)
else
endif
else
endif
else
endif
else
endif
if(Trig_Moving_system_Func001Func001Func002Func004C())then
set udg_RunOrNO[GetForLoopIndexA()]=false
set udg_moved[GetForLoopIndexA()]=null
if(Trig_Moving_system_Func001Func001Func002Func004Func003C())then
set udg_number=(udg_number-1)
if(Trig_Moving_system_Func001Func001Func002Func004Func003Func004C())then
set udg_number=(udg_number-1)
if(Trig_Moving_system_Func001Func001Func002Func004Func003Func004Func004C())then
set udg_number=(udg_number-1)
if(Trig_Moving_system_Func001Func001Func002Func004Func003Func004Func004Func004C())then
set udg_number=(udg_number-1)
if(Trig_Moving_system_Func001Func001Func002Func004Func003Func004Func004Func004Func004C())then
set udg_number=(udg_number-1)
else
endif
else
endif
else
endif
else
endif
else
endif
else
endif
else
endif
else
if((true))then
set udg_RunOrNO[GetForLoopIndexA()]=false
set udg_moved[GetForLoopIndexA()]=null
if(Trig_Moving_system_Func001Func001Func001Func003C())then
set udg_number=(udg_number-1)
if(Trig_Moving_system_Func001Func001Func001Func003Func004C())then
set udg_number=(udg_number-1)
if(Trig_Moving_system_Func001Func001Func001Func003Func004Func004C())then
set udg_number=(udg_number-1)
if(Trig_Moving_system_Func001Func001Func001Func003Func004Func004Func004C())then
set udg_number=(udg_number-1)
if(Trig_Moving_system_Func001Func001Func001Func003Func004Func004Func004Func004C())then
set udg_number=(udg_number-1)
else
endif
else
endif
else
endif
else
endif
else
endif
else
endif
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endfunction
function InitTrig_Moving_system takes nothing returns nothing
set gg_trg_Moving_system=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(gg_trg_Moving_system,0.04)
call TriggerAddAction(gg_trg_Moving_system,function Trig_Moving_system_Actions)
endfunction
function Trig_lvl_Ini_Func002Func001C takes nothing returns boolean
if(not(GetRandomInt(1,3)==2))then
return false
endif
return true
endfunction
function Trig_lvl_Ini_Func002C takes nothing returns boolean
if(not(GetRandomInt(1,3)==1))then
return false
endif
return true
endfunction
function Trig_lvl_Ini_Func003Func001C takes nothing returns boolean
if(not(GetRandomInt(1,3)==2))then
return false
endif
return true
endfunction
function Trig_lvl_Ini_Func003C takes nothing returns boolean
if(not(GetRandomInt(1,3)==1))then
return false
endif
return true
endfunction
function Trig_lvl_Ini_Func004Func002C takes nothing returns boolean
if(not(GetRandomInt(1,3)==2))then
return false
endif
return true
endfunction
function Trig_lvl_Ini_Func004C takes nothing returns boolean
if(not(GetRandomInt(1,3)==1))then
return false
endif
return true
endfunction
function Trig_lvl_Ini_Func005Func001C takes nothing returns boolean
if(not(GetRandomInt(1,3)==2))then
return false
endif
return true
endfunction
function Trig_lvl_Ini_Func005C takes nothing returns boolean
if(not(GetRandomInt(1,3)==1))then
return false
endif
return true
endfunction
function Trig_lvl_Ini_Func006Func001C takes nothing returns boolean
if(not(GetRandomInt(1,3)==2))then
return false
endif
return true
endfunction
function Trig_lvl_Ini_Func006C takes nothing returns boolean
if(not(GetRandomInt(1,3)==1))then
return false
endif
return true
endfunction
function Trig_lvl_Ini_Func007Func001C takes nothing returns boolean
if(not(GetRandomInt(1,3)==2))then
return false
endif
return true
endfunction
function Trig_lvl_Ini_Func007C takes nothing returns boolean
if(not(GetRandomInt(1,3)==1))then
return false
endif
return true
endfunction
function Trig_lvl_Ini_Func008Func001C takes nothing returns boolean
if(not(GetRandomInt(1,3)==2))then
return false
endif
return true
endfunction
function Trig_lvl_Ini_Func008C takes nothing returns boolean
if(not(GetRandomInt(1,3)==1))then
return false
endif
return true
endfunction
function Trig_lvl_Ini_Func009Func002C takes nothing returns boolean
if(not(GetRandomInt(1,3)==2))then
return false
endif
return true
endfunction
function Trig_lvl_Ini_Func009C takes nothing returns boolean
if(not(GetRandomInt(1,3)==1))then
return false
endif
return true
endfunction
function Trig_lvl_Ini_Func010Func001C takes nothing returns boolean
if(not(GetRandomInt(1,3)==2))then
return false
endif
return true
endfunction
function Trig_lvl_Ini_Func010C takes nothing returns boolean
if(not(GetRandomInt(1,3)==1))then
return false
endif
return true
endfunction
function Trig_lvl_Ini_Func011Func001C takes nothing returns boolean
if(not(GetRandomInt(1,3)==2))then
return false
endif
return true
endfunction
function Trig_lvl_Ini_Func011C takes nothing returns boolean
if(not(GetRandomInt(1,3)==1))then
return false
endif
return true
endfunction
function Trig_lvl_Ini_Func012Func001C takes nothing returns boolean
if(not(GetRandomInt(1,3)==2))then
return false
endif
return true
endfunction
function Trig_lvl_Ini_Func012C takes nothing returns boolean
if(not(GetRandomInt(1,3)==1))then
return false
endif
return true
endfunction
function Trig_lvl_Ini_Func013Func001C takes nothing returns boolean
if(not(GetRandomInt(1,3)==2))then
return false
endif
return true
endfunction
function Trig_lvl_Ini_Func013C takes nothing returns boolean
if(not(GetRandomInt(1,3)==1))then
return false
endif
return true
endfunction
function Trig_lvl_Ini_Func014Func002C takes nothing returns boolean
if(not(GetRandomInt(1,3)==2))then
return false
endif
return true
endfunction
function Trig_lvl_Ini_Func014C takes nothing returns boolean
if(not(GetRandomInt(1,3)==1))then
return false
endif
return true
endfunction
function Trig_lvl_Ini_Func015Func001C takes nothing returns boolean
if(not(GetRandomInt(1,3)==2))then
return false
endif
return true
endfunction
function Trig_lvl_Ini_Func015C takes nothing returns boolean
if(not(GetRandomInt(1,3)==1))then
return false
endif
return true
endfunction
function Trig_lvl_Ini_Func016Func001C takes nothing returns boolean
if(not(GetRandomInt(1,3)==2))then
return false
endif
return true
endfunction
function Trig_lvl_Ini_Func016C takes nothing returns boolean
if(not(GetRandomInt(1,3)==1))then
return false
endif
return true
endfunction
function Trig_lvl_Ini_Func017Func001C takes nothing returns boolean
if(not(GetRandomInt(1,3)==2))then
return false
endif
return true
endfunction
function Trig_lvl_Ini_Func017C takes nothing returns boolean
if(not(GetRandomInt(1,3)==1))then
return false
endif
return true
endfunction
function Trig_lvl_Ini_Func018Func001C takes nothing returns boolean
if(not(GetRandomInt(1,3)==2))then
return false
endif
return true
endfunction
function Trig_lvl_Ini_Func018C takes nothing returns boolean
if(not(GetRandomInt(1,3)==1))then
return false
endif
return true
endfunction
function Trig_lvl_Ini_Func019Func002C takes nothing returns boolean
if(not(GetRandomInt(1,3)==2))then
return false
endif
return true
endfunction
function Trig_lvl_Ini_Func019C takes nothing returns boolean
if(not(GetRandomInt(1,3)==1))then
return false
endif
return true
endfunction
function Trig_lvl_Ini_Func020Func001C takes nothing returns boolean
if(not(GetRandomInt(1,3)==2))then
return false
endif
return true
endfunction
function Trig_lvl_Ini_Func020C takes nothing returns boolean
if(not(GetRandomInt(1,3)==1))then
return false
endif
return true
endfunction
function Trig_lvl_Ini_Func021Func001C takes nothing returns boolean
if(not(GetRandomInt(1,3)==2))then
return false
endif
return true
endfunction
function Trig_lvl_Ini_Func021C takes nothing returns boolean
if(not(GetRandomInt(1,3)==1))then
return false
endif
return true
endfunction
function Trig_lvl_Ini_Func022Func001C takes nothing returns boolean
if(not(GetRandomInt(1,3)==2))then
return false
endif
return true
endfunction
function Trig_lvl_Ini_Func022C takes nothing returns boolean
if(not(GetRandomInt(1,3)==1))then
return false
endif
return true
endfunction
function Trig_lvl_Ini_Func023Func001C takes nothing returns boolean
if(not(GetRandomInt(1,3)==2))then
return false
endif
return true
endfunction
function Trig_lvl_Ini_Func023C takes nothing returns boolean
if(not(GetRandomInt(1,3)==1))then
return false
endif
return true
endfunction
function Trig_lvl_Ini_Func024Func002C takes nothing returns boolean
if(not(GetRandomInt(1,3)==2))then
return false
endif
return true
endfunction
function Trig_lvl_Ini_Func024C takes nothing returns boolean
if(not(GetRandomInt(1,3)==1))then
return false
endif
return true
endfunction
function Trig_lvl_Ini_Func025Func001C takes nothing returns boolean
if(not(GetRandomInt(1,3)==2))then
return false
endif
return true
endfunction
function Trig_lvl_Ini_Func025C takes nothing returns boolean
if(not(GetRandomInt(1,3)==1))then
return false
endif
return true
endfunction
function Trig_lvl_Ini_Func026Func001C takes nothing returns boolean
if(not(GetRandomInt(1,3)==2))then
return false
endif
return true
endfunction
function Trig_lvl_Ini_Func026C takes nothing returns boolean
if(not(GetRandomInt(1,3)==1))then
return false
endif
return true
endfunction
function Trig_lvl_Ini_Actions takes nothing returns nothing
call TriggerSleepAction(15.00)
if(Trig_lvl_Ini_Func002C())then
call ModifyHeroStat(bj_HEROSTAT_STR,udg_player2hero,bj_MODIFYMETHOD_ADD,1)
else
if(Trig_lvl_Ini_Func002Func001C())then
call UnitAddItemByIdSwapped(0x6D616E68,udg_player2hero)
else
call ModifyHeroStat(bj_HEROSTAT_AGI,udg_player2hero,bj_MODIFYMETHOD_ADD,1)
endif
endif
if(Trig_lvl_Ini_Func003C())then
call ModifyHeroStat(bj_HEROSTAT_INT,udg_player2hero,bj_MODIFYMETHOD_ADD,1)
else
if(Trig_lvl_Ini_Func003Func001C())then
call ModifyHeroStat(bj_HEROSTAT_AGI,udg_player2hero,bj_MODIFYMETHOD_ADD,1)
else
call UnitAddItemByIdSwapped(0x6D616E68,udg_player2hero)
endif
endif
if(Trig_lvl_Ini_Func004C())then
call ModifyHeroStat(bj_HEROSTAT_AGI,udg_player2hero,bj_MODIFYMETHOD_ADD,1)
else
if(Trig_lvl_Ini_Func004Func002C())then
call UnitAddItemByIdSwapped(0x6D616E68,udg_player2hero)
else
call ModifyHeroStat(bj_HEROSTAT_STR,udg_player2hero,bj_MODIFYMETHOD_ADD,1)
endif
endif
if(Trig_lvl_Ini_Func005C())then
call ModifyHeroStat(bj_HEROSTAT_STR,udg_player2hero,bj_MODIFYMETHOD_ADD,1)
else
if(Trig_lvl_Ini_Func005Func001C())then
call UnitAddItemByIdSwapped(0x6D616E68,udg_player2hero)
else
call ModifyHeroStat(bj_HEROSTAT_INT,udg_player2hero,bj_MODIFYMETHOD_ADD,1)
endif
endif
if(Trig_lvl_Ini_Func006C())then
call ModifyHeroStat(bj_HEROSTAT_AGI,udg_player2hero,bj_MODIFYMETHOD_ADD,1)
else
if(Trig_lvl_Ini_Func006Func001C())then
call UnitAddItemByIdSwapped(0x6D616E68,udg_player2hero)
else
call ModifyHeroStat(bj_HEROSTAT_STR,udg_player2hero,bj_MODIFYMETHOD_ADD,1)
endif
endif
if(Trig_lvl_Ini_Func007C())then
call ModifyHeroStat(bj_HEROSTAT_STR,udg_player3hero,bj_MODIFYMETHOD_ADD,1)
else
if(Trig_lvl_Ini_Func007Func001C())then
call UnitAddItemByIdSwapped(0x6D616E68,udg_player3hero)
else
call ModifyHeroStat(bj_HEROSTAT_AGI,udg_player3hero,bj_MODIFYMETHOD_ADD,1)
endif
endif
if(Trig_lvl_Ini_Func008C())then
call ModifyHeroStat(bj_HEROSTAT_INT,udg_player3hero,bj_MODIFYMETHOD_ADD,1)
else
if(Trig_lvl_Ini_Func008Func001C())then
call ModifyHeroStat(bj_HEROSTAT_AGI,udg_player3hero,bj_MODIFYMETHOD_ADD,1)
else
call UnitAddItemByIdSwapped(0x6D616E68,udg_player3hero)
endif
endif
if(Trig_lvl_Ini_Func009C())then
call ModifyHeroStat(bj_HEROSTAT_AGI,udg_player3hero,bj_MODIFYMETHOD_ADD,1)
else
if(Trig_lvl_Ini_Func009Func002C())then
call UnitAddItemByIdSwapped(0x6D616E68,udg_player3hero)
else
call ModifyHeroStat(bj_HEROSTAT_STR,udg_player3hero,bj_MODIFYMETHOD_ADD,1)
endif
endif
if(Trig_lvl_Ini_Func010C())then
call ModifyHeroStat(bj_HEROSTAT_STR,udg_player3hero,bj_MODIFYMETHOD_ADD,1)
else
if(Trig_lvl_Ini_Func010Func001C())then
call UnitAddItemByIdSwapped(0x6D616E68,udg_player3hero)
else
call ModifyHeroStat(bj_HEROSTAT_INT,udg_player3hero,bj_MODIFYMETHOD_ADD,1)
endif
endif
if(Trig_lvl_Ini_Func011C())then
call ModifyHeroStat(bj_HEROSTAT_AGI,udg_player3hero,bj_MODIFYMETHOD_ADD,1)
else
if(Trig_lvl_Ini_Func011Func001C())then
call UnitAddItemByIdSwapped(0x6D616E68,udg_player3hero)
else
call ModifyHeroStat(bj_HEROSTAT_STR,udg_player3hero,bj_MODIFYMETHOD_ADD,1)
endif
endif
if(Trig_lvl_Ini_Func012C())then
call ModifyHeroStat(bj_HEROSTAT_STR,udg_player4hero,bj_MODIFYMETHOD_ADD,1)
else
if(Trig_lvl_Ini_Func012Func001C())then
call UnitAddItemByIdSwapped(0x6D616E68,udg_player4hero)
else
call ModifyHeroStat(bj_HEROSTAT_AGI,udg_player4hero,bj_MODIFYMETHOD_ADD,1)
endif
endif
if(Trig_lvl_Ini_Func013C())then
call ModifyHeroStat(bj_HEROSTAT_INT,udg_player4hero,bj_MODIFYMETHOD_ADD,1)
else
if(Trig_lvl_Ini_Func013Func001C())then
call ModifyHeroStat(bj_HEROSTAT_AGI,udg_player4hero,bj_MODIFYMETHOD_ADD,1)
else
call UnitAddItemByIdSwapped(0x6D616E68,udg_player4hero)
endif
endif
if(Trig_lvl_Ini_Func014C())then
call ModifyHeroStat(bj_HEROSTAT_AGI,udg_player4hero,bj_MODIFYMETHOD_ADD,1)
else
if(Trig_lvl_Ini_Func014Func002C())then
call UnitAddItemByIdSwapped(0x6D616E68,udg_player4hero)
else
call ModifyHeroStat(bj_HEROSTAT_STR,udg_player4hero,bj_MODIFYMETHOD_ADD,1)
endif
endif
if(Trig_lvl_Ini_Func015C())then
call ModifyHeroStat(bj_HEROSTAT_STR,udg_player4hero,bj_MODIFYMETHOD_ADD,1)
else
if(Trig_lvl_Ini_Func015Func001C())then
call UnitAddItemByIdSwapped(0x6D616E68,udg_player4hero)
else
call ModifyHeroStat(bj_HEROSTAT_INT,udg_player4hero,bj_MODIFYMETHOD_ADD,1)
endif
endif
if(Trig_lvl_Ini_Func016C())then
call ModifyHeroStat(bj_HEROSTAT_AGI,udg_player4hero,bj_MODIFYMETHOD_ADD,1)
else
if(Trig_lvl_Ini_Func016Func001C())then
call UnitAddItemByIdSwapped(0x6D616E68,udg_player4hero)
else
call ModifyHeroStat(bj_HEROSTAT_STR,udg_player4hero,bj_MODIFYMETHOD_ADD,1)
endif
endif
if(Trig_lvl_Ini_Func017C())then
call ModifyHeroStat(bj_HEROSTAT_STR,udg_player5hero,bj_MODIFYMETHOD_ADD,1)
else
if(Trig_lvl_Ini_Func017Func001C())then
call UnitAddItemByIdSwapped(0x6D616E68,udg_player5hero)
else
call ModifyHeroStat(bj_HEROSTAT_AGI,udg_player5hero,bj_MODIFYMETHOD_ADD,1)
endif
endif
if(Trig_lvl_Ini_Func018C())then
call ModifyHeroStat(bj_HEROSTAT_INT,udg_player5hero,bj_MODIFYMETHOD_ADD,1)
else
if(Trig_lvl_Ini_Func018Func001C())then
call ModifyHeroStat(bj_HEROSTAT_AGI,udg_player5hero,bj_MODIFYMETHOD_ADD,1)
else
call UnitAddItemByIdSwapped(0x6D616E68,udg_player5hero)
endif
endif
if(Trig_lvl_Ini_Func019C())then
call ModifyHeroStat(bj_HEROSTAT_AGI,udg_player5hero,bj_MODIFYMETHOD_ADD,1)
else
if(Trig_lvl_Ini_Func019Func002C())then
call UnitAddItemByIdSwapped(0x6D616E68,udg_player5hero)
else
call ModifyHeroStat(bj_HEROSTAT_STR,udg_player5hero,bj_MODIFYMETHOD_ADD,1)
endif
endif
if(Trig_lvl_Ini_Func020C())then
call ModifyHeroStat(bj_HEROSTAT_STR,udg_player5hero,bj_MODIFYMETHOD_ADD,1)
else
if(Trig_lvl_Ini_Func020Func001C())then
call UnitAddItemByIdSwapped(0x6D616E68,udg_player5hero)
else
call ModifyHeroStat(bj_HEROSTAT_INT,udg_player5hero,bj_MODIFYMETHOD_ADD,1)
endif
endif
if(Trig_lvl_Ini_Func021C())then
call ModifyHeroStat(bj_HEROSTAT_AGI,udg_player5hero,bj_MODIFYMETHOD_ADD,1)
else
if(Trig_lvl_Ini_Func021Func001C())then
call UnitAddItemByIdSwapped(0x6D616E68,udg_player5hero)
else
call ModifyHeroStat(bj_HEROSTAT_STR,udg_player5hero,bj_MODIFYMETHOD_ADD,1)
endif
endif
if(Trig_lvl_Ini_Func022C())then
call ModifyHeroStat(bj_HEROSTAT_STR,udg_player6hero,bj_MODIFYMETHOD_ADD,1)
else
if(Trig_lvl_Ini_Func022Func001C())then
call UnitAddItemByIdSwapped(0x6D616E68,udg_player6hero)
else
call ModifyHeroStat(bj_HEROSTAT_AGI,udg_player6hero,bj_MODIFYMETHOD_ADD,1)
endif
endif
if(Trig_lvl_Ini_Func023C())then
call ModifyHeroStat(bj_HEROSTAT_INT,udg_player6hero,bj_MODIFYMETHOD_ADD,1)
else
if(Trig_lvl_Ini_Func023Func001C())then
call ModifyHeroStat(bj_HEROSTAT_AGI,udg_player6hero,bj_MODIFYMETHOD_ADD,1)
else
call UnitAddItemByIdSwapped(0x6D616E68,udg_player6hero)
endif
endif
if(Trig_lvl_Ini_Func024C())then
call ModifyHeroStat(bj_HEROSTAT_AGI,udg_player6hero,bj_MODIFYMETHOD_ADD,1)
else
if(Trig_lvl_Ini_Func024Func002C())then
call UnitAddItemByIdSwapped(0x6D616E68,udg_player6hero)
else
call ModifyHeroStat(bj_HEROSTAT_STR,udg_player6hero,bj_MODIFYMETHOD_ADD,1)
endif
endif
if(Trig_lvl_Ini_Func025C())then
call ModifyHeroStat(bj_HEROSTAT_STR,udg_player6hero,bj_MODIFYMETHOD_ADD,1)
else
if(Trig_lvl_Ini_Func025Func001C())then
call UnitAddItemByIdSwapped(0x6D616E68,udg_player6hero)
else
call ModifyHeroStat(bj_HEROSTAT_INT,udg_player6hero,bj_MODIFYMETHOD_ADD,1)
endif
endif
if(Trig_lvl_Ini_Func026C())then
call ModifyHeroStat(bj_HEROSTAT_AGI,udg_player6hero,bj_MODIFYMETHOD_ADD,1)
else
if(Trig_lvl_Ini_Func026Func001C())then
call UnitAddItemByIdSwapped(0x6D616E68,udg_player6hero)
else
call ModifyHeroStat(bj_HEROSTAT_STR,udg_player6hero,bj_MODIFYMETHOD_ADD,1)
endif
endif
endfunction
function InitTrig_lvl_Ini takes nothing returns nothing
set gg_trg_lvl_Ini=CreateTrigger()
call TriggerAddAction(gg_trg_lvl_Ini,function Trig_lvl_Ini_Actions)
endfunction
function Trig_lvlup_p2_Conditions takes nothing returns boolean
if(not(GetOwningPlayer(GetLevelingUnit())==Player(1)))then
return false
endif
return true
endfunction
function Trig_lvlup_p2_Func001Func001C takes nothing returns boolean
if(not(GetRandomInt(1,3)==2))then
return false
endif
return true
endfunction
function Trig_lvlup_p2_Func001C takes nothing returns boolean
if(not(GetRandomInt(1,3)==1))then
return false
endif
return true
endfunction
function Trig_lvlup_p2_Func002Func001C takes nothing returns boolean
if(not(GetRandomInt(1,3)==2))then
return false
endif
return true
endfunction
function Trig_lvlup_p2_Func002C takes nothing returns boolean
if(not(GetRandomInt(1,3)==1))then
return false
endif
return true
endfunction
function Trig_lvlup_p2_Func003Func002C takes nothing returns boolean
if(not(GetRandomInt(1,3)==2))then
return false
endif
return true
endfunction
function Trig_lvlup_p2_Func003C takes nothing returns boolean
if(not(GetRandomInt(1,3)==1))then
return false
endif
return true
endfunction
function Trig_lvlup_p2_Func004Func001C takes nothing returns boolean
if(not(GetRandomInt(1,3)==2))then
return false
endif
return true
endfunction
function Trig_lvlup_p2_Func004C takes nothing returns boolean
if(not(GetRandomInt(1,3)==1))then
return false
endif
return true
endfunction
function Trig_lvlup_p2_Func005Func001C takes nothing returns boolean
if(not(GetRandomInt(1,3)==2))then
return false
endif
return true
endfunction
function Trig_lvlup_p2_Func005C takes nothing returns boolean
if(not(GetRandomInt(1,3)==1))then
return false
endif
return true
endfunction
function Trig_lvlup_p2_Actions takes nothing returns nothing
if(Trig_lvlup_p2_Func001C())then
call ModifyHeroStat(bj_HEROSTAT_STR,udg_player2hero,bj_MODIFYMETHOD_ADD,1)
else
if(Trig_lvlup_p2_Func001Func001C())then
call UnitAddItemByIdSwapped(0x6D616E68,udg_player2hero)
else
call ModifyHeroStat(bj_HEROSTAT_AGI,udg_player2hero,bj_MODIFYMETHOD_ADD,1)
endif
endif
if(Trig_lvlup_p2_Func002C())then
call ModifyHeroStat(bj_HEROSTAT_INT,udg_player2hero,bj_MODIFYMETHOD_ADD,1)
else
if(Trig_lvlup_p2_Func002Func001C())then
call ModifyHeroStat(bj_HEROSTAT_AGI,udg_player2hero,bj_MODIFYMETHOD_ADD,1)
else
call UnitAddItemByIdSwapped(0x6D616E68,udg_player2hero)
endif
endif
if(Trig_lvlup_p2_Func003C())then
call ModifyHeroStat(bj_HEROSTAT_AGI,udg_player2hero,bj_MODIFYMETHOD_ADD,1)
else
if(Trig_lvlup_p2_Func003Func002C())then
call UnitAddItemByIdSwapped(0x6D616E68,udg_player2hero)
else
call ModifyHeroStat(bj_HEROSTAT_STR,udg_player2hero,bj_MODIFYMETHOD_ADD,1)
endif
endif
if(Trig_lvlup_p2_Func004C())then
call ModifyHeroStat(bj_HEROSTAT_STR,udg_player2hero,bj_MODIFYMETHOD_ADD,1)
else
if(Trig_lvlup_p2_Func004Func001C())then
call UnitAddItemByIdSwapped(0x6D616E68,udg_player2hero)
else
call ModifyHeroStat(bj_HEROSTAT_INT,udg_player2hero,bj_MODIFYMETHOD_ADD,1)
endif
endif
if(Trig_lvlup_p2_Func005C())then
call ModifyHeroStat(bj_HEROSTAT_AGI,udg_player2hero,bj_MODIFYMETHOD_ADD,1)
else
if(Trig_lvlup_p2_Func005Func001C())then
call UnitAddItemByIdSwapped(0x6D616E68,udg_player2hero)
else
call ModifyHeroStat(bj_HEROSTAT_STR,udg_player2hero,bj_MODIFYMETHOD_ADD,1)
endif
endif
endfunction
function InitTrig_lvlup_p2 takes nothing returns nothing
set gg_trg_lvlup_p2=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_lvlup_p2,EVENT_PLAYER_HERO_LEVEL)
call TriggerAddCondition(gg_trg_lvlup_p2,Condition(function Trig_lvlup_p2_Conditions))
call TriggerAddAction(gg_trg_lvlup_p2,function Trig_lvlup_p2_Actions)
endfunction
function Trig_lvlup_p3_Conditions takes nothing returns boolean
if(not(GetOwningPlayer(GetLevelingUnit())==Player(2)))then
return false
endif
return true
endfunction
function Trig_lvlup_p3_Func001Func001C takes nothing returns boolean
if(not(GetRandomInt(1,3)==2))then
return false
endif
return true
endfunction
function Trig_lvlup_p3_Func001C takes nothing returns boolean
if(not(GetRandomInt(1,3)==1))then
return false
endif
return true
endfunction
function Trig_lvlup_p3_Func002Func001C takes nothing returns boolean
if(not(GetRandomInt(1,3)==2))then
return false
endif
return true
endfunction
function Trig_lvlup_p3_Func002C takes nothing returns boolean
if(not(GetRandomInt(1,3)==1))then
return false
endif
return true
endfunction
function Trig_lvlup_p3_Func003Func002C takes nothing returns boolean
if(not(GetRandomInt(1,3)==2))then
return false
endif
return true
endfunction
function Trig_lvlup_p3_Func003C takes nothing returns boolean
if(not(GetRandomInt(1,3)==1))then
return false
endif
return true
endfunction
function Trig_lvlup_p3_Func004Func001C takes nothing returns boolean
if(not(GetRandomInt(1,3)==2))then
return false
endif
return true
endfunction
function Trig_lvlup_p3_Func004C takes nothing returns boolean
if(not(GetRandomInt(1,3)==1))then
return false
endif
return true
endfunction
function Trig_lvlup_p3_Func005Func001C takes nothing returns boolean
if(not(GetRandomInt(1,3)==2))then
return false
endif
return true
endfunction
function Trig_lvlup_p3_Func005C takes nothing returns boolean
if(not(GetRandomInt(1,3)==1))then
return false
endif
return true
endfunction
function Trig_lvlup_p3_Actions takes nothing returns nothing
if(Trig_lvlup_p3_Func001C())then
call ModifyHeroStat(bj_HEROSTAT_STR,udg_player3hero,bj_MODIFYMETHOD_ADD,1)
else
if(Trig_lvlup_p3_Func001Func001C())then
call UnitAddItemByIdSwapped(0x6D616E68,udg_player3hero)
else
call ModifyHeroStat(bj_HEROSTAT_AGI,udg_player3hero,bj_MODIFYMETHOD_ADD,1)
endif
endif
if(Trig_lvlup_p3_Func002C())then
call ModifyHeroStat(bj_HEROSTAT_INT,udg_player3hero,bj_MODIFYMETHOD_ADD,1)
else
if(Trig_lvlup_p3_Func002Func001C())then
call ModifyHeroStat(bj_HEROSTAT_AGI,udg_player3hero,bj_MODIFYMETHOD_ADD,1)
else
call UnitAddItemByIdSwapped(0x6D616E68,udg_player3hero)
endif
endif
if(Trig_lvlup_p3_Func003C())then
call ModifyHeroStat(bj_HEROSTAT_AGI,udg_player3hero,bj_MODIFYMETHOD_ADD,1)
else
if(Trig_lvlup_p3_Func003Func002C())then
call UnitAddItemByIdSwapped(0x6D616E68,udg_player3hero)
else
call ModifyHeroStat(bj_HEROSTAT_STR,udg_player3hero,bj_MODIFYMETHOD_ADD,1)
endif
endif
if(Trig_lvlup_p3_Func004C())then
call ModifyHeroStat(bj_HEROSTAT_STR,udg_player3hero,bj_MODIFYMETHOD_ADD,1)
else
if(Trig_lvlup_p3_Func004Func001C())then
call UnitAddItemByIdSwapped(0x6D616E68,udg_player3hero)
else
call ModifyHeroStat(bj_HEROSTAT_INT,udg_player3hero,bj_MODIFYMETHOD_ADD,1)
endif
endif
if(Trig_lvlup_p3_Func005C())then
call ModifyHeroStat(bj_HEROSTAT_AGI,udg_player3hero,bj_MODIFYMETHOD_ADD,1)
else
if(Trig_lvlup_p3_Func005Func001C())then
call UnitAddItemByIdSwapped(0x6D616E68,udg_player3hero)
else
call ModifyHeroStat(bj_HEROSTAT_STR,udg_player3hero,bj_MODIFYMETHOD_ADD,1)
endif
endif
endfunction
function InitTrig_lvlup_p3 takes nothing returns nothing
set gg_trg_lvlup_p3=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_lvlup_p3,EVENT_PLAYER_HERO_LEVEL)
call TriggerAddCondition(gg_trg_lvlup_p3,Condition(function Trig_lvlup_p3_Conditions))
call TriggerAddAction(gg_trg_lvlup_p3,function Trig_lvlup_p3_Actions)
endfunction
function Trig_lvlup_p4_Conditions takes nothing returns boolean
if(not(GetOwningPlayer(GetLevelingUnit())==Player(3)))then
return false
endif
return true
endfunction
function Trig_lvlup_p4_Func001Func001C takes nothing returns boolean
if(not(GetRandomInt(1,3)==2))then
return false
endif
return true
endfunction
function Trig_lvlup_p4_Func001C takes nothing returns boolean
if(not(GetRandomInt(1,3)==1))then
return false
endif
return true
endfunction
function Trig_lvlup_p4_Func002Func001C takes nothing returns boolean
if(not(GetRandomInt(1,3)==2))then
return false
endif
return true
endfunction
function Trig_lvlup_p4_Func002C takes nothing returns boolean
if(not(GetRandomInt(1,3)==1))then
return false
endif
return true
endfunction
function Trig_lvlup_p4_Func003Func002C takes nothing returns boolean
if(not(GetRandomInt(1,3)==2))then
return false
endif
return true
endfunction
function Trig_lvlup_p4_Func003C takes nothing returns boolean
if(not(GetRandomInt(1,3)==1))then
return false
endif
return true
endfunction
function Trig_lvlup_p4_Func004Func001C takes nothing returns boolean
if(not(GetRandomInt(1,3)==2))then
return false
endif
return true
endfunction
function Trig_lvlup_p4_Func004C takes nothing returns boolean
if(not(GetRandomInt(1,3)==1))then
return false
endif
return true
endfunction
function Trig_lvlup_p4_Func005Func001C takes nothing returns boolean
if(not(GetRandomInt(1,3)==2))then
return false
endif
return true
endfunction
function Trig_lvlup_p4_Func005C takes nothing returns boolean
if(not(GetRandomInt(1,3)==1))then
return false
endif
return true
endfunction
function Trig_lvlup_p4_Actions takes nothing returns nothing
if(Trig_lvlup_p4_Func001C())then
call ModifyHeroStat(bj_HEROSTAT_STR,udg_player4hero,bj_MODIFYMETHOD_ADD,1)
else
if(Trig_lvlup_p4_Func001Func001C())then
call UnitAddItemByIdSwapped(0x6D616E68,udg_player4hero)
else
call ModifyHeroStat(bj_HEROSTAT_AGI,udg_player4hero,bj_MODIFYMETHOD_ADD,1)
endif
endif
if(Trig_lvlup_p4_Func002C())then
call ModifyHeroStat(bj_HEROSTAT_INT,udg_player4hero,bj_MODIFYMETHOD_ADD,1)
else
if(Trig_lvlup_p4_Func002Func001C())then
call ModifyHeroStat(bj_HEROSTAT_AGI,udg_player4hero,bj_MODIFYMETHOD_ADD,1)
else
call UnitAddItemByIdSwapped(0x6D616E68,udg_player4hero)
endif
endif
if(Trig_lvlup_p4_Func003C())then
call ModifyHeroStat(bj_HEROSTAT_AGI,udg_player4hero,bj_MODIFYMETHOD_ADD,1)
else
if(Trig_lvlup_p4_Func003Func002C())then
call UnitAddItemByIdSwapped(0x6D616E68,udg_player4hero)
else
call ModifyHeroStat(bj_HEROSTAT_STR,udg_player4hero,bj_MODIFYMETHOD_ADD,1)
endif
endif
if(Trig_lvlup_p4_Func004C())then
call ModifyHeroStat(bj_HEROSTAT_STR,udg_player4hero,bj_MODIFYMETHOD_ADD,1)
else
if(Trig_lvlup_p4_Func004Func001C())then
call UnitAddItemByIdSwapped(0x6D616E68,udg_player4hero)
else
call ModifyHeroStat(bj_HEROSTAT_INT,udg_player4hero,bj_MODIFYMETHOD_ADD,1)
endif
endif
if(Trig_lvlup_p4_Func005C())then
call ModifyHeroStat(bj_HEROSTAT_AGI,udg_player4hero,bj_MODIFYMETHOD_ADD,1)
else
if(Trig_lvlup_p4_Func005Func001C())then
call UnitAddItemByIdSwapped(0x6D616E68,udg_player4hero)
else
call ModifyHeroStat(bj_HEROSTAT_STR,udg_player4hero,bj_MODIFYMETHOD_ADD,1)
endif
endif
endfunction
function InitTrig_lvlup_p4 takes nothing returns nothing
set gg_trg_lvlup_p4=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_lvlup_p4,EVENT_PLAYER_HERO_LEVEL)
call TriggerAddCondition(gg_trg_lvlup_p4,Condition(function Trig_lvlup_p4_Conditions))
call TriggerAddAction(gg_trg_lvlup_p4,function Trig_lvlup_p4_Actions)
endfunction
function Trig_lvlup_p5_Conditions takes nothing returns boolean
if(not(GetOwningPlayer(GetLevelingUnit())==Player(1)))then
return false
endif
return true
endfunction
function Trig_lvlup_p5_Func001Func001C takes nothing returns boolean
if(not(GetRandomInt(1,3)==2))then
return false
endif
return true
endfunction
function Trig_lvlup_p5_Func001C takes nothing returns boolean
if(not(GetRandomInt(1,3)==1))then
return false
endif
return true
endfunction
function Trig_lvlup_p5_Func002Func001C takes nothing returns boolean
if(not(GetRandomInt(1,3)==2))then
return false
endif
return true
endfunction
function Trig_lvlup_p5_Func002C takes nothing returns boolean
if(not(GetRandomInt(1,3)==1))then
return false
endif
return true
endfunction
function Trig_lvlup_p5_Func003Func002C takes nothing returns boolean
if(not(GetRandomInt(1,3)==2))then
return false
endif
return true
endfunction
function Trig_lvlup_p5_Func003C takes nothing returns boolean
if(not(GetRandomInt(1,3)==1))then
return false
endif
return true
endfunction
function Trig_lvlup_p5_Func004Func001C takes nothing returns boolean
if(not(GetRandomInt(1,3)==2))then
return false
endif
return true
endfunction
function Trig_lvlup_p5_Func004C takes nothing returns boolean
if(not(GetRandomInt(1,3)==1))then
return false
endif
return true
endfunction
function Trig_lvlup_p5_Func005Func001C takes nothing returns boolean
if(not(GetRandomInt(1,3)==2))then
return false
endif
return true
endfunction
function Trig_lvlup_p5_Func005C takes nothing returns boolean
if(not(GetRandomInt(1,3)==1))then
return false
endif
return true
endfunction
function Trig_lvlup_p5_Actions takes nothing returns nothing
if(Trig_lvlup_p5_Func001C())then
call ModifyHeroStat(bj_HEROSTAT_STR,udg_player5hero,bj_MODIFYMETHOD_ADD,1)
else
if(Trig_lvlup_p5_Func001Func001C())then
call UnitAddItemByIdSwapped(0x6D616E68,udg_player5hero)
else
call ModifyHeroStat(bj_HEROSTAT_AGI,udg_player5hero,bj_MODIFYMETHOD_ADD,1)
endif
endif
if(Trig_lvlup_p5_Func002C())then
call ModifyHeroStat(bj_HEROSTAT_INT,udg_player5hero,bj_MODIFYMETHOD_ADD,1)
else
if(Trig_lvlup_p5_Func002Func001C())then
call ModifyHeroStat(bj_HEROSTAT_AGI,udg_player5hero,bj_MODIFYMETHOD_ADD,1)
else
call UnitAddItemByIdSwapped(0x6D616E68,udg_player5hero)
endif
endif
if(Trig_lvlup_p5_Func003C())then
call ModifyHeroStat(bj_HEROSTAT_AGI,udg_player5hero,bj_MODIFYMETHOD_ADD,1)
else
if(Trig_lvlup_p5_Func003Func002C())then
call UnitAddItemByIdSwapped(0x6D616E68,udg_player5hero)
else
call ModifyHeroStat(bj_HEROSTAT_STR,udg_player5hero,bj_MODIFYMETHOD_ADD,1)
endif
endif
if(Trig_lvlup_p5_Func004C())then
call ModifyHeroStat(bj_HEROSTAT_STR,udg_player5hero,bj_MODIFYMETHOD_ADD,1)
else
if(Trig_lvlup_p5_Func004Func001C())then
call UnitAddItemByIdSwapped(0x6D616E68,udg_player5hero)
else
call ModifyHeroStat(bj_HEROSTAT_INT,udg_player5hero,bj_MODIFYMETHOD_ADD,1)
endif
endif
if(Trig_lvlup_p5_Func005C())then
call ModifyHeroStat(bj_HEROSTAT_AGI,udg_player5hero,bj_MODIFYMETHOD_ADD,1)
else
if(Trig_lvlup_p5_Func005Func001C())then
call UnitAddItemByIdSwapped(0x6D616E68,udg_player5hero)
else
call ModifyHeroStat(bj_HEROSTAT_STR,udg_player5hero,bj_MODIFYMETHOD_ADD,1)
endif
endif
endfunction
function InitTrig_lvlup_p5 takes nothing returns nothing
set gg_trg_lvlup_p5=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_lvlup_p5,EVENT_PLAYER_HERO_LEVEL)
call TriggerAddCondition(gg_trg_lvlup_p5,Condition(function Trig_lvlup_p5_Conditions))
call TriggerAddAction(gg_trg_lvlup_p5,function Trig_lvlup_p5_Actions)
endfunction
function Trig_lvlup_p6_Conditions takes nothing returns boolean
if(not(GetOwningPlayer(GetLevelingUnit())==Player(1)))then
return false
endif
return true
endfunction
function Trig_lvlup_p6_Func001Func001C takes nothing returns boolean
if(not(GetRandomInt(1,3)==2))then
return false
endif
return true
endfunction
function Trig_lvlup_p6_Func001C takes nothing returns boolean
if(not(GetRandomInt(1,3)==1))then
return false
endif
return true
endfunction
function Trig_lvlup_p6_Func002Func001C takes nothing returns boolean
if(not(GetRandomInt(1,3)==2))then
return false
endif
return true
endfunction
function Trig_lvlup_p6_Func002C takes nothing returns boolean
if(not(GetRandomInt(1,3)==1))then
return false
endif
return true
endfunction
function Trig_lvlup_p6_Func003Func002C takes nothing returns boolean
if(not(GetRandomInt(1,3)==2))then
return false
endif
return true
endfunction
function Trig_lvlup_p6_Func003C takes nothing returns boolean
if(not(GetRandomInt(1,3)==1))then
return false
endif
return true
endfunction
function Trig_lvlup_p6_Func004Func001C takes nothing returns boolean
if(not(GetRandomInt(1,3)==2))then
return false
endif
return true
endfunction
function Trig_lvlup_p6_Func004C takes nothing returns boolean
if(not(GetRandomInt(1,3)==1))then
return false
endif
return true
endfunction
function Trig_lvlup_p6_Func005Func001C takes nothing returns boolean
if(not(GetRandomInt(1,3)==2))then
return false
endif
return true
endfunction
function Trig_lvlup_p6_Func005C takes nothing returns boolean
if(not(GetRandomInt(1,3)==1))then
return false
endif
return true
endfunction
function Trig_lvlup_p6_Actions takes nothing returns nothing
if(Trig_lvlup_p6_Func001C())then
call ModifyHeroStat(bj_HEROSTAT_STR,udg_player6hero,bj_MODIFYMETHOD_ADD,1)
else
if(Trig_lvlup_p6_Func001Func001C())then
call UnitAddItemByIdSwapped(0x6D616E68,udg_player6hero)
else
call ModifyHeroStat(bj_HEROSTAT_AGI,udg_player6hero,bj_MODIFYMETHOD_ADD,1)
endif
endif
if(Trig_lvlup_p6_Func002C())then
call ModifyHeroStat(bj_HEROSTAT_INT,udg_player6hero,bj_MODIFYMETHOD_ADD,1)
else
if(Trig_lvlup_p6_Func002Func001C())then
call ModifyHeroStat(bj_HEROSTAT_AGI,udg_player6hero,bj_MODIFYMETHOD_ADD,1)
else
call UnitAddItemByIdSwapped(0x6D616E68,udg_player6hero)
endif
endif
if(Trig_lvlup_p6_Func003C())then
call ModifyHeroStat(bj_HEROSTAT_AGI,udg_player6hero,bj_MODIFYMETHOD_ADD,1)
else
if(Trig_lvlup_p6_Func003Func002C())then
call UnitAddItemByIdSwapped(0x6D616E68,udg_player6hero)
else
call ModifyHeroStat(bj_HEROSTAT_STR,udg_player6hero,bj_MODIFYMETHOD_ADD,1)
endif
endif
if(Trig_lvlup_p6_Func004C())then
call ModifyHeroStat(bj_HEROSTAT_STR,udg_player6hero,bj_MODIFYMETHOD_ADD,1)
else
if(Trig_lvlup_p6_Func004Func001C())then
call UnitAddItemByIdSwapped(0x6D616E68,udg_player6hero)
else
call ModifyHeroStat(bj_HEROSTAT_INT,udg_player6hero,bj_MODIFYMETHOD_ADD,1)
endif
endif
if(Trig_lvlup_p6_Func005C())then
call ModifyHeroStat(bj_HEROSTAT_AGI,udg_player6hero,bj_MODIFYMETHOD_ADD,1)
else
if(Trig_lvlup_p6_Func005Func001C())then
call UnitAddItemByIdSwapped(0x6D616E68,udg_player6hero)
else
call ModifyHeroStat(bj_HEROSTAT_STR,udg_player6hero,bj_MODIFYMETHOD_ADD,1)
endif
endif
endfunction
function InitTrig_lvlup_p6 takes nothing returns nothing
set gg_trg_lvlup_p6=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_lvlup_p6,EVENT_PLAYER_HERO_LEVEL)
call TriggerAddCondition(gg_trg_lvlup_p6,Condition(function Trig_lvlup_p6_Conditions))
call TriggerAddAction(gg_trg_lvlup_p6,function Trig_lvlup_p6_Actions)
endfunction
function Trig_dead_p2_Actions takes nothing returns nothing
call TriggerSleepAction(10.00)
call IssuePointOrderLocBJ(udg_player2hero,"patrol",GetRandomLocInRect(gg_rct_boloto))
endfunction
function InitTrig_dead_p2 takes nothing returns nothing
set gg_trg_dead_p2=CreateTrigger()
call TriggerRegisterPlayerUnitEventSimple(gg_trg_dead_p2,Player(1),EVENT_PLAYER_HERO_REVIVE_FINISH)
call TriggerAddAction(gg_trg_dead_p2,function Trig_dead_p2_Actions)
endfunction
function Trig_dead_p3_Actions takes nothing returns nothing
call TriggerSleepAction(10.00)
call IssuePointOrderLocBJ(udg_player3hero,"patrol",GetRandomLocInRect(gg_rct_boloto))
endfunction
function InitTrig_dead_p3 takes nothing returns nothing
set gg_trg_dead_p3=CreateTrigger()
call TriggerRegisterPlayerUnitEventSimple(gg_trg_dead_p3,Player(2),EVENT_PLAYER_HERO_REVIVE_FINISH)
call TriggerAddAction(gg_trg_dead_p3,function Trig_dead_p3_Actions)
endfunction
function Trig_dead_p4_Actions takes nothing returns nothing
call TriggerSleepAction(10.00)
call IssuePointOrderLocBJ(udg_player4hero,"patrol",GetRandomLocInRect(gg_rct_boloto))
endfunction
function InitTrig_dead_p4 takes nothing returns nothing
set gg_trg_dead_p4=CreateTrigger()
call TriggerRegisterPlayerUnitEventSimple(gg_trg_dead_p4,Player(3),EVENT_PLAYER_HERO_REVIVE_FINISH)
call TriggerAddAction(gg_trg_dead_p4,function Trig_dead_p4_Actions)
endfunction
function Trig_dead_p5_Actions takes nothing returns nothing
call TriggerSleepAction(10.00)
call IssuePointOrderLocBJ(udg_player5hero,"patrol",GetRandomLocInRect(gg_rct_boloto))
endfunction
function InitTrig_dead_p5 takes nothing returns nothing
set gg_trg_dead_p5=CreateTrigger()
call TriggerRegisterPlayerUnitEventSimple(gg_trg_dead_p5,Player(4),EVENT_PLAYER_HERO_REVIVE_FINISH)
call TriggerAddAction(gg_trg_dead_p5,function Trig_dead_p5_Actions)
endfunction
function Trig_dead_p6_Actions takes nothing returns nothing
call TriggerSleepAction(10.00)
call IssuePointOrderLocBJ(udg_player6hero,"patrol",GetRandomLocInRect(gg_rct_boloto))
endfunction
function InitTrig_dead_p6 takes nothing returns nothing
set gg_trg_dead_p6=CreateTrigger()
call TriggerRegisterPlayerUnitEventSimple(gg_trg_dead_p6,Player(5),EVENT_PLAYER_HERO_REVIVE_FINISH)
call TriggerAddAction(gg_trg_dead_p6,function Trig_dead_p6_Actions)
endfunction
function Trig_heal_Conditions takes nothing returns boolean
if(not(GetUnitLifePercent(udg_player2hero)<=15.00))then
return false
endif
return true
endfunction
function Trig_heal_Actions takes nothing returns nothing
call IssuePointOrderLocBJ(udg_player2hero,"move",GetRectCenter(gg_rct_resp))
call EnableTrigger(gg_trg_heal_p2)
call DisableTrigger(GetTriggeringTrigger())
endfunction
function InitTrig_heal takes nothing returns nothing
set gg_trg_heal=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(gg_trg_heal,2)
call TriggerAddCondition(gg_trg_heal,Condition(function Trig_heal_Conditions))
call TriggerAddAction(gg_trg_heal,function Trig_heal_Actions)
endfunction
function Trig_heal_p2_Conditions takes nothing returns boolean
if(not(GetUnitLifePercent(udg_player2hero)>=95.00))then
return false
endif
return true
endfunction
function Trig_heal_p2_Actions takes nothing returns nothing
call DisableTrigger(GetTriggeringTrigger())
call TriggerSleepAction(20.00)
call IssuePointOrderLocBJ(udg_player2hero,"patrol",GetRandomLocInRect(gg_rct_boloto))
call EnableTrigger(gg_trg_heal)
endfunction
function InitTrig_heal_p2 takes nothing returns nothing
set gg_trg_heal_p2=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(gg_trg_heal_p2,2)
call TriggerAddCondition(gg_trg_heal_p2,Condition(function Trig_heal_p2_Conditions))
call TriggerAddAction(gg_trg_heal_p2,function Trig_heal_p2_Actions)
endfunction
function Trig_heal_p3_Conditions takes nothing returns boolean
if(not(GetUnitLifePercent(udg_player3hero)>=95.00))then
return false
endif
return true
endfunction
function Trig_heal_p3_Actions takes nothing returns nothing
call DisableTrigger(GetTriggeringTrigger())
call TriggerSleepAction(20.00)
call IssuePointOrderLocBJ(udg_player3hero,"patrol",GetRandomLocInRect(gg_rct_boloto))
call EnableTrigger(gg_trg_heal)
endfunction
function InitTrig_heal_p3 takes nothing returns nothing
set gg_trg_heal_p3=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(gg_trg_heal_p3,2)
call TriggerAddCondition(gg_trg_heal_p3,Condition(function Trig_heal_p3_Conditions))
call TriggerAddAction(gg_trg_heal_p3,function Trig_heal_p3_Actions)
endfunction
function Trig_heal_p4_Conditions takes nothing returns boolean
if(not(GetUnitLifePercent(udg_player4hero)>=95.00))then
return false
endif
return true
endfunction
function Trig_heal_p4_Actions takes nothing returns nothing
call DisableTrigger(GetTriggeringTrigger())
call TriggerSleepAction(20.00)
call IssuePointOrderLocBJ(udg_player4hero,"patrol",GetRandomLocInRect(gg_rct_boloto))
call EnableTrigger(gg_trg_heal)
endfunction
function InitTrig_heal_p4 takes nothing returns nothing
set gg_trg_heal_p4=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(gg_trg_heal_p4,2)
call TriggerAddCondition(gg_trg_heal_p4,Condition(function Trig_heal_p4_Conditions))
call TriggerAddAction(gg_trg_heal_p4,function Trig_heal_p4_Actions)
endfunction
function Trig_heal_p5_Conditions takes nothing returns boolean
if(not(GetUnitLifePercent(udg_player5hero)>=95.00))then
return false
endif
return true
endfunction
function Trig_heal_p5_Actions takes nothing returns nothing
call TriggerSleepAction(20.00)
call IssuePointOrderLocBJ(udg_player5hero,"patrol",GetRandomLocInRect(gg_rct_boloto))
call EnableTrigger(gg_trg_heal)
call DisableTrigger(GetTriggeringTrigger())
endfunction
function InitTrig_heal_p5 takes nothing returns nothing
set gg_trg_heal_p5=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(gg_trg_heal_p5,2)
call TriggerAddCondition(gg_trg_heal_p5,Condition(function Trig_heal_p5_Conditions))
call TriggerAddAction(gg_trg_heal_p5,function Trig_heal_p5_Actions)
endfunction
function Trig_heal_p6_Conditions takes nothing returns boolean
if(not(GetUnitLifePercent(udg_player6hero)>=95.00))then
return false
endif
return true
endfunction
function Trig_heal_p6_Actions takes nothing returns nothing
call TriggerSleepAction(20.00)
call IssuePointOrderLocBJ(udg_player6hero,"patrol",GetRandomLocInRect(gg_rct_boloto))
call EnableTrigger(gg_trg_heal)
call DisableTrigger(GetTriggeringTrigger())
endfunction
function InitTrig_heal_p6 takes nothing returns nothing
set gg_trg_heal_p6=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(gg_trg_heal_p6,2)
call TriggerAddCondition(gg_trg_heal_p6,Condition(function Trig_heal_p6_Conditions))
call TriggerAddAction(gg_trg_heal_p6,function Trig_heal_p6_Actions)
endfunction
function Trig_buttons_Func002001 takes nothing returns boolean
return(GetSpellAbilityId()==0x41303142)
endfunction
function Trig_buttons_Func002002 takes nothing returns boolean
return(GetUnitTypeId(GetSpellTargetUnit())==0x48303059)
endfunction
function Trig_buttons_Conditions takes nothing returns boolean
if(not GetBooleanAnd((GetSpellAbilityId()==0x41303142),(GetUnitTypeId(GetSpellTargetUnit())==0x48303059)))then
return false
endif
return true
endfunction
function Trig_buttons_Func004C takes nothing returns boolean
if(not(GetSpellAbilityUnit()==udg_Unit[(GetConvertedPlayerId(GetTriggerPlayer())-1)]))then
return false
endif
if(not(UnitHasItem(udg_Unit[(GetConvertedPlayerId(GetTriggerPlayer())-1)],udg_stone)==true))then
return false
endif
return true
endfunction
function Trig_buttons_Func005C takes nothing returns boolean
if(not(GetEnteringUnit()==udg_tempunit))then
return false
endif
return true
endfunction
function Trig_buttons_Actions takes nothing returns nothing
set udg_necr=GetSpellTargetUnit()
if(Trig_buttons_Func004C())then
call CinematicModeBJ(true,GetPlayersAll())
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),GetSpellTargetUnit(),"TRIGSTR_3195",null,"TRIGSTR_3196",bj_TIMETYPE_ADD,3.00,true)
call CinematicModeBJ(false,GetPlayersAll())
call QuestMessageBJ(GetPlayersAll(),bj_QUESTMESSAGE_COMPLETED,"TRIGSTR_3197")
call QuestSetCompletedBJ(udg_quest[3],true)
else
call CinematicModeBJ(true,GetPlayersAll())
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),GetSpellTargetUnit(),"TRIGSTR_3190",null,"TRIGSTR_3191",bj_TIMETYPE_ADD,3.00,true)
call CinematicModeBJ(false,GetPlayersAll())
call DialogAddButtonBJ(udg_window,"TRIGSTR_3192")
call DialogSetMessageBJ(udg_window,"TRIGSTR_3193")
set udg_button[0]=GetLastCreatedButtonBJ()
call DialogAddButtonBJ(udg_window,"TRIGSTR_3194")
set udg_button[1]=GetLastCreatedButtonBJ()
call DialogDisplayBJ(true,udg_window,Player(0))
endif
if(Trig_buttons_Func005C())then
call CinematicModeBJ(true,GetPlayersAll())
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),udg_necr,"TRIGSTR_3198",null,"TRIGSTR_3199",bj_TIMETYPE_ADD,3.00,true)
call CinematicModeBJ(false,GetPlayersAll())
call RemoveUnit(udg_tempunit)
call QuestMessageBJ(GetPlayersAll(),bj_QUESTMESSAGE_COMPLETED,"TRIGSTR_3200")
call QuestSetCompletedBJ(udg_quest[0],true)
call DisableTrigger(gg_trg_check)
else
endif
endfunction
function InitTrig_buttons takes nothing returns nothing
set gg_trg_buttons=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_buttons,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(gg_trg_buttons,Condition(function Trig_buttons_Conditions))
call TriggerAddAction(gg_trg_buttons,function Trig_buttons_Actions)
endfunction
function Trig_quests_Func002C takes nothing returns boolean
if(not(GetClickedButtonBJ()==udg_button[0]))then
return false
endif
return true
endfunction
function Trig_quests_Actions takes nothing returns nothing
local integer i=GetRandomInt(1,4)
if(Trig_quests_Func002C())then
call DialogDisplayBJ(false,udg_window,Player(0))
call DialogClearBJ(udg_window)
if i==1 then
call CinematicModeBJ(true,GetPlayersAll())
call CinematicModeBJ(false,GetPlayersAll())
call CreateQuestBJ(bj_QUESTTYPE_REQ_DISCOVERED,"TRIGSTR_3162","TRIGSTR_3163","ReplaceableTextures\\CommandButtons\\BTNSkeletalOrcGrunt.blp")
set udg_quest[0]=GetLastCreatedQuestBJ()
call QuestMessageBJ(GetPlayersAll(),bj_QUESTMESSAGE_DISCOVERED,"TRIGSTR_3164")
set udg_tempunit=GetLastCreatedUnit()
call EnableTrigger(gg_trg_skelet_quest)
elseif i==2 then
call CinematicModeBJ(true,GetPlayersAll())
call CinematicModeBJ(false,GetPlayersAll())
call CreateQuestBJ(bj_QUESTTYPE_REQ_DISCOVERED,"TRIGSTR_3167","TRIGSTR_3168","ReplaceableTextures\\CommandButtons\\BTNRifleman.blp")
set udg_quest[1]=GetLastCreatedQuestBJ()
call QuestMessageBJ(GetPlayersAll(),bj_QUESTMESSAGE_DISCOVERED,"TRIGSTR_3169")
set udg_tempunit=GetLastCreatedUnit()
elseif i==3 then
call CinematicModeBJ(true,GetPlayersAll())
call CinematicModeBJ(false,GetPlayersAll())
call CreateQuestBJ(bj_QUESTTYPE_REQ_DISCOVERED,"TRIGSTR_3172","TRIGSTR_3173","ReplaceableTextures\\CommandButtons\\BTNRifleman.blp")
set udg_quest[2]=GetLastCreatedQuestBJ()
call QuestMessageBJ(GetPlayersAll(),bj_QUESTMESSAGE_DISCOVERED,"TRIGSTR_3174")
elseif i==4 then
call CinematicModeBJ(true,GetPlayersAll())
call CinematicModeBJ(false,GetPlayersAll())
call CreateQuestBJ(bj_QUESTTYPE_REQ_DISCOVERED,"TRIGSTR_3177","TRIGSTR_3178","ReplaceableTextures\\CommandButtons\\BTNResStone.blp")
set udg_quest[3]=GetLastCreatedQuestBJ()
call QuestMessageBJ(GetPlayersAll(),bj_QUESTMESSAGE_DISCOVERED,"TRIGSTR_3179")
set udg_tempunit=GetLastCreatedUnit()
call UnitAddItemByIdSwapped(0x617A6872,udg_tempunit)
set udg_stone=UnitItemInSlotBJ(udg_tempunit,1)
endif
else
call DialogDisplayBJ(false,udg_window,Player(0))
endif
endfunction
function InitTrig_quests takes nothing returns nothing
set gg_trg_quests=CreateTrigger()
call TriggerRegisterDialogEventBJ(gg_trg_quests,udg_window)
call TriggerAddAction(gg_trg_quests,function Trig_quests_Actions)
endfunction
function Trig_skelet_quest_Func001C takes nothing returns boolean
if(not(GetUnitTypeId(udg_tempunit)==0x6E647231))then
return false
endif
return true
endfunction
function Trig_skelet_quest_Actions takes nothing returns nothing
if(Trig_skelet_quest_Func001C())then
call CinematicModeBJ(true,GetPlayersAll())
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),udg_tempunit,"TRIGSTR_3180",null,"TRIGSTR_3181",bj_TIMETYPE_ADD,3.00,true)
call TransmissionFromUnitWithNameBJ(GetPlayersAll(),udg_tempunit,"TRIGSTR_3184",null,"TRIGSTR_3185",bj_TIMETYPE_ADD,3.00,true)
call CinematicModeBJ(false,GetPlayersAll())
call QuestMessageBJ(GetPlayersAll(),bj_QUESTMESSAGE_UPDATED,"TRIGSTR_3186")
else
endif
endfunction
function InitTrig_skelet_quest takes nothing returns nothing
set gg_trg_skelet_quest=CreateTrigger()
call DisableTrigger(gg_trg_skelet_quest)
call TriggerAddAction(gg_trg_skelet_quest,function Trig_skelet_quest_Actions)
endfunction
function Trig_check_Func001C takes nothing returns boolean
if(not(GetUnitStateSwap(UNIT_STATE_LIFE,udg_tempunit)<=0.00))then
return false
endif
return true
endfunction
function Trig_check_Actions takes nothing returns nothing
if(Trig_check_Func001C())then
call QuestSetFailedBJ(udg_quest[0],true)
call QuestMessageBJ(GetPlayersAll(),bj_QUESTMESSAGE_MISSIONFAILED,"TRIGSTR_3187")
call DisableTrigger(GetTriggeringTrigger())
else
endif
endfunction
function InitTrig_check takes nothing returns nothing
set gg_trg_check=CreateTrigger()
call DisableTrigger(gg_trg_check)
call TriggerRegisterTimerEventPeriodic(gg_trg_check,1.00)
call TriggerAddAction(gg_trg_check,function Trig_check_Actions)
endfunction
function Trig_defender_Conditions takes nothing returns boolean
if(not(GetDyingUnit()==udg_tempunit))then
return false
endif
return true
endfunction
function Trig_defender_Actions takes nothing returns nothing
call QuestSetCompletedBJ(udg_quest[1],true)
call QuestMessageBJ(GetPlayersAll(),bj_QUESTMESSAGE_COMPLETED,"TRIGSTR_3188")
call DisableTrigger(GetTriggeringTrigger())
endfunction
function InitTrig_defender takes nothing returns nothing
set gg_trg_defender=CreateTrigger()
call DisableTrigger(gg_trg_defender)
call TriggerRegisterAnyUnitEventBJ(gg_trg_defender,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(gg_trg_defender,Condition(function Trig_defender_Conditions))
call TriggerAddAction(gg_trg_defender,function Trig_defender_Actions)
endfunction
function Trig_zhertva_Func006C takes nothing returns boolean
if(not(GetUnitTypeId(GetDyingUnit())==0x6E776C74))then
return false
endif
if(not(GetUnitTypeId(GetDyingUnit())==0x6E716231))then
return false
endif
if(not(GetUnitTypeId(GetDyingUnit())==0x6E6C746C))then
return false
endif
return true
endfunction
function Trig_zhertva_Conditions takes nothing returns boolean
if(not Trig_zhertva_Func006C())then
return false
endif
return true
endfunction
function Trig_zhertva_Actions takes nothing returns nothing
set udg_count=(udg_count+1)
if udg_count==5 then
call QuestSetCompletedBJ(udg_quest[2],true)
call QuestMessageBJ(GetPlayersAll(),bj_QUESTMESSAGE_COMPLETED,"TRIGSTR_3189")
endif
endfunction
function InitTrig_zhertva takes nothing returns nothing
set gg_trg_zhertva=CreateTrigger()
call DisableTrigger(gg_trg_zhertva)
call TriggerRegisterAnyUnitEventBJ(gg_trg_zhertva,EVENT_PLAYER_UNIT_DEATH)
call TriggerRegisterTimerEventPeriodic(gg_trg_zhertva,1.00)
call TriggerAddCondition(gg_trg_zhertva,Condition(function Trig_zhertva_Conditions))
call TriggerAddAction(gg_trg_zhertva,function Trig_zhertva_Actions)
endfunction
function InitCustomTriggers takes nothing returns nothing
call InitTrig_Earth_end()
call InitTrig_Earth_start()
call InitTrig_Killer_Bandit()
call InitTrig_Killer_Guard()
call InitTrig_Set()
call InitTrig_Untitled_Trigger_003()
call InitTrig_Fire_fix()
call InitTrig_Run_fix()
call InitTrig_Anim_orc_fix()
call InitTrig_Animations()
call InitTrig_every1second()
call InitTrig_sethero()
call InitTrig_initialization()
call InitTrig_HeroDeath()
call InitTrig_mob_res()
call InitTrig_DIPLOMATY()
call InitTrig_Chip_clother()
call InitTrig_Black()
call InitTrig_Blue()
call InitTrig_Exp()
call InitTrig_Fog_1()
call InitTrig_Fog_2()
call InitTrig_Fog_3()
call InitTrig_N_speak()
call InitTrig_Spawn()
call InitTrig_Ilven()
call InitTrig_Orc()
call InitTrig_Human()
call InitTrig_Orc_Party()
call InitTrig_Orc_Story()
call InitTrig_Orc_Bb()
call InitTrig_Ilven_Party()
call InitTrig_Ilven_Story()
call InitTrig_Ilven_Bb()
call InitTrig_Wolf_lvl1_res()
call InitTrig_Wolf_lvl2_res()
call InitTrig_Wolf_lvl3_res()
call InitTrig_Wolf_lvl4_res()
call InitTrig_wolf_evolution_1()
call InitTrig_wolf_evolution_2()
call InitTrig_wolf_evolution_3()
call InitTrig_wolf_evolution_4()
call InitTrig_Set_player_pet()
call InitTrig_Wolf_lvl1_stat()
call InitTrig_Wolf_lvl2_stat()
call InitTrig_Wolf_lvl3_stat()
call InitTrig_Wolf_lvl4_stat()
call InitTrig_Wolf_lvl5_stat()
call InitTrig_ship1()
call InitTrig_ship1_Copy()
call InitTrig_ship2()
call InitTrig_ship2_Copy()
call InitTrig_Tutorial()
call InitTrig_Tut_ans_1()
call InitTrig_Tut_ans_2()
call InitTrig_Tut_ans_3()
call InitTrig_Tut_ans_4()
call InitTrig_Tut_ans_5()
call InitTrig_Tut_ans_6()
call InitTrig_Town_Arbalet()
call InitTrig_Town_Sailor()
call InitTrig_Town_Woman()
call InitTrig_Town_Korsar()
call InitTrig_Town_Woman_2()
call InitTrig_Town_Arena_figther()
call InitTrig_Town_News()
call InitTrig_Town_BB()
call InitTrig_Guard()
call InitTrig_Quest_Guard_v1()
call InitTrig_Quest_Guard_uncom()
call InitTrig_Quest_Guard_bb()
call InitTrig_Quest_Guard_about_city()
call InitTrig_Quest_Guard_1_finish()
call InitTrig_Quest_Guard_2_1()
call InitTrig_Quest_Guard_3_finish()
call InitTrig_Quest_Guard_4_finish()
call InitTrig_Quest_Guard_4_integer()
call InitTrig_Quest_Guard_5_finish()
call InitTrig_Quest_Guard_5_integer()
call InitTrig_Quest_Guard_2_finish()
call InitTrig_Quest_Guard_2_fale()
call InitTrig_Captain_Quest_1()
call InitTrig_Captain_Q_in_progress()
call InitTrig_Cap_Ask_1()
call InitTrig_Cap_Ask_2()
call InitTrig_Cap_Ask_3()
call InitTrig_fight1()
call InitTrig_fight2()
call InitTrig_Untitled_Trigger_007()
call InitTrig_B_gonzales_q_1()
call InitTrig_Bandit_Vino()
call InitTrig_G_1_Enrike()
call InitTrig_G_1_Trader()
call InitTrig_G_1_Trader_Ansver_1()
call InitTrig_G_1_Trader_Ansver_1_1()
call InitTrig_G_1_Trader_Ansver_1_2()
call InitTrig_G_1_Trader_Ansver_1_3()
call InitTrig_G_1_Trader_Ansver_1_3_1()
call InitTrig_G_1_Trader_Ansver_2()
call InitTrig_Untitled_Trigger_001()
call InitTrig_B_enrike()
call InitTrig_speak()
call InitTrig_B_guard()
call InitTrig_B_gonzales_begin()
call InitTrig_B_gonzales_ansver_1_1()
call InitTrig_B_gonzales_ansver_1_2()
call InitTrig_B_gonzales_ansver_1_2_unready()
call InitTrig_B_gonzales_ansver_1_3()
call InitTrig_B_gonzales_ansver_1_4()
call InitTrig_B_archer()
call InitTrig_B_guard_ansver_1_1()
call InitTrig_B_guard_ansver_1_2()
call InitTrig_B_guard_ansver_1_3()
call InitTrig_____________________________________007()
call InitTrig_rats_drop()
call InitTrig_player1start()
call InitTrig_player2start()
call InitTrig_player3start()
call InitTrig_player4start()
call InitTrig_player5start()
call InitTrig_player6start()
call InitTrig_player1end()
call InitTrig_player2end()
call InitTrig_player3end()
call InitTrig_player4end()
call InitTrig_player5end()
call InitTrig_player6end()
call InitTrig_player1()
call InitTrig_player2()
call InitTrig_player3()
call InitTrig_player4()
call InitTrig_player5()
call InitTrig_player6()
call InitTrig_____________________________________003()
call InitTrig_pack1()
call InitTrig_pack3()
call InitTrig_pack2()
call InitTrig_SCS()
call InitTrig_camdebug()
call InitTrig_Init()
call InitTrig_____________________________________001_____________________u()
call InitTrig_cam4()
call InitTrig_cam5()
call InitTrig_cam2()
call InitTrig_cam3()
call InitTrig_cam1()
call InitTrig_DarkHealth()
call InitTrig_Cunami()
call InitTrig_Opletenie()
call InitTrig_WaterKick()
call InitTrig_Tornado()
call InitTrig_Earthslam()
call InitTrig_Earth_Shake()
call InitTrig_DeathBall()
call InitTrig_SunPower()
call InitTrig_Moving_system()
call InitTrig_lvl_Ini()
call InitTrig_lvlup_p2()
call InitTrig_lvlup_p3()
call InitTrig_lvlup_p4()
call InitTrig_lvlup_p5()
call InitTrig_lvlup_p6()
call InitTrig_dead_p2()
call InitTrig_dead_p3()
call InitTrig_dead_p4()
call InitTrig_dead_p5()
call InitTrig_dead_p6()
call InitTrig_heal()
call InitTrig_heal_p2()
call InitTrig_heal_p3()
call InitTrig_heal_p4()
call InitTrig_heal_p5()
call InitTrig_heal_p6()
call InitTrig_buttons()
call InitTrig_quests()
call InitTrig_skelet_quest()
call InitTrig_check()
call InitTrig_defender()
call InitTrig_zhertva()
endfunction
function RunInitializationTriggers takes nothing returns nothing
call ConditionalTriggerExecute(gg_trg_Set)
call ConditionalTriggerExecute(gg_trg_Untitled_Trigger_003)
call ConditionalTriggerExecute(gg_trg_Animations)
call ConditionalTriggerExecute(gg_trg_initialization)
call ConditionalTriggerExecute(gg_trg_N_speak)
call ConditionalTriggerExecute(gg_trg_speak)
call ConditionalTriggerExecute(gg_trg_pack1)
call ConditionalTriggerExecute(gg_trg_pack2)
call ConditionalTriggerExecute(gg_trg_lvl_Ini)
endfunction
function InitCustomPlayerSlots takes nothing returns nothing
call SetPlayerStartLocation(Player(0),0)
call SetPlayerColor(Player(0),ConvertPlayerColor(0))
call SetPlayerRacePreference(Player(0),RACE_PREF_HUMAN)
call SetPlayerRaceSelectable(Player(0),false)
call SetPlayerController(Player(0),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(1),1)
call SetPlayerColor(Player(1),ConvertPlayerColor(1))
call SetPlayerRacePreference(Player(1),RACE_PREF_HUMAN)
call SetPlayerRaceSelectable(Player(1),false)
call SetPlayerController(Player(1),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(2),2)
call SetPlayerColor(Player(2),ConvertPlayerColor(2))
call SetPlayerRacePreference(Player(2),RACE_PREF_HUMAN)
call SetPlayerRaceSelectable(Player(2),false)
call SetPlayerController(Player(2),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(3),3)
call SetPlayerColor(Player(3),ConvertPlayerColor(3))
call SetPlayerRacePreference(Player(3),RACE_PREF_HUMAN)
call SetPlayerRaceSelectable(Player(3),false)
call SetPlayerController(Player(3),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(4),4)
call SetPlayerColor(Player(4),ConvertPlayerColor(4))
call SetPlayerRacePreference(Player(4),RACE_PREF_HUMAN)
call SetPlayerRaceSelectable(Player(4),false)
call SetPlayerController(Player(4),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(5),5)
call SetPlayerColor(Player(5),ConvertPlayerColor(5))
call SetPlayerRacePreference(Player(5),RACE_PREF_HUMAN)
call SetPlayerRaceSelectable(Player(5),false)
call SetPlayerController(Player(5),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(6),6)
call SetPlayerColor(Player(6),ConvertPlayerColor(6))
call SetPlayerRacePreference(Player(6),RACE_PREF_NIGHTELF)
call SetPlayerRaceSelectable(Player(6),false)
call SetPlayerController(Player(6),MAP_CONTROL_COMPUTER)
call SetPlayerStartLocation(Player(7),7)
call SetPlayerColor(Player(7),ConvertPlayerColor(7))
call SetPlayerRacePreference(Player(7),RACE_PREF_HUMAN)
call SetPlayerRaceSelectable(Player(7),false)
call SetPlayerController(Player(7),MAP_CONTROL_USER)
call SetPlayerStartLocation(Player(8),8)
call SetPlayerColor(Player(8),ConvertPlayerColor(8))
call SetPlayerRacePreference(Player(8),RACE_PREF_HUMAN)
call SetPlayerRaceSelectable(Player(8),false)
call SetPlayerController(Player(8),MAP_CONTROL_COMPUTER)
call SetPlayerStartLocation(Player(9),9)
call SetPlayerColor(Player(9),ConvertPlayerColor(9))
call SetPlayerRacePreference(Player(9),RACE_PREF_ORC)
call SetPlayerRaceSelectable(Player(9),false)
call SetPlayerController(Player(9),MAP_CONTROL_COMPUTER)
call SetPlayerStartLocation(Player(10),10)
call SetPlayerColor(Player(10),ConvertPlayerColor(10))
call SetPlayerRacePreference(Player(10),RACE_PREF_HUMAN)
call SetPlayerRaceSelectable(Player(10),false)
call SetPlayerController(Player(10),MAP_CONTROL_COMPUTER)
call SetPlayerStartLocation(Player(11),11)
call SetPlayerColor(Player(11),ConvertPlayerColor(11))
call SetPlayerRacePreference(Player(11),RACE_PREF_HUMAN)
call SetPlayerRaceSelectable(Player(11),false)
call SetPlayerController(Player(11),MAP_CONTROL_COMPUTER)
endfunction
function InitCustomTeams takes nothing returns nothing
call SetPlayerTeam(Player(0),0)
call SetPlayerState(Player(0),PLAYER_STATE_ALLIED_VICTORY,1)
call SetPlayerTeam(Player(1),0)
call SetPlayerState(Player(1),PLAYER_STATE_ALLIED_VICTORY,1)
call SetPlayerTeam(Player(2),0)
call SetPlayerState(Player(2),PLAYER_STATE_ALLIED_VICTORY,1)
call SetPlayerTeam(Player(3),0)
call SetPlayerState(Player(3),PLAYER_STATE_ALLIED_VICTORY,1)
call SetPlayerTeam(Player(4),0)
call SetPlayerState(Player(4),PLAYER_STATE_ALLIED_VICTORY,1)
call SetPlayerTeam(Player(5),0)
call SetPlayerState(Player(5),PLAYER_STATE_ALLIED_VICTORY,1)
call SetPlayerTeam(Player(6),0)
call SetPlayerState(Player(6),PLAYER_STATE_ALLIED_VICTORY,1)
call SetPlayerTeam(Player(7),0)
call SetPlayerState(Player(7),PLAYER_STATE_ALLIED_VICTORY,1)
call SetPlayerTeam(Player(8),0)
call SetPlayerState(Player(8),PLAYER_STATE_ALLIED_VICTORY,1)
call SetPlayerTeam(Player(9),0)
call SetPlayerState(Player(9),PLAYER_STATE_ALLIED_VICTORY,1)
call SetPlayerTeam(Player(10),0)
call SetPlayerState(Player(10),PLAYER_STATE_ALLIED_VICTORY,1)
call SetPlayerTeam(Player(11),0)
call SetPlayerState(Player(11),PLAYER_STATE_ALLIED_VICTORY,1)
call SetPlayerAllianceStateAllyBJ(Player(0),Player(1),true)
call SetPlayerAllianceStateAllyBJ(Player(0),Player(2),true)
call SetPlayerAllianceStateAllyBJ(Player(0),Player(3),true)
call SetPlayerAllianceStateAllyBJ(Player(0),Player(4),true)
call SetPlayerAllianceStateAllyBJ(Player(0),Player(5),true)
call SetPlayerAllianceStateAllyBJ(Player(0),Player(6),true)
call SetPlayerAllianceStateAllyBJ(Player(0),Player(7),true)
call SetPlayerAllianceStateAllyBJ(Player(0),Player(8),true)
call SetPlayerAllianceStateAllyBJ(Player(0),Player(9),true)
call SetPlayerAllianceStateAllyBJ(Player(0),Player(10),true)
call SetPlayerAllianceStateAllyBJ(Player(0),Player(11),true)
call SetPlayerAllianceStateAllyBJ(Player(1),Player(0),true)
call SetPlayerAllianceStateAllyBJ(Player(1),Player(2),true)
call SetPlayerAllianceStateAllyBJ(Player(1),Player(3),true)
call SetPlayerAllianceStateAllyBJ(Player(1),Player(4),true)
call SetPlayerAllianceStateAllyBJ(Player(1),Player(5),true)
call SetPlayerAllianceStateAllyBJ(Player(1),Player(6),true)
call SetPlayerAllianceStateAllyBJ(Player(1),Player(7),true)
call SetPlayerAllianceStateAllyBJ(Player(1),Player(8),true)
call SetPlayerAllianceStateAllyBJ(Player(1),Player(9),true)
call SetPlayerAllianceStateAllyBJ(Player(1),Player(10),true)
call SetPlayerAllianceStateAllyBJ(Player(1),Player(11),true)
call SetPlayerAllianceStateAllyBJ(Player(2),Player(0),true)
call SetPlayerAllianceStateAllyBJ(Player(2),Player(1),true)
call SetPlayerAllianceStateAllyBJ(Player(2),Player(3),true)
call SetPlayerAllianceStateAllyBJ(Player(2),Player(4),true)
call SetPlayerAllianceStateAllyBJ(Player(2),Player(5),true)
call SetPlayerAllianceStateAllyBJ(Player(2),Player(6),true)
call SetPlayerAllianceStateAllyBJ(Player(2),Player(7),true)
call SetPlayerAllianceStateAllyBJ(Player(2),Player(8),true)
call SetPlayerAllianceStateAllyBJ(Player(2),Player(9),true)
call SetPlayerAllianceStateAllyBJ(Player(2),Player(10),true)
call SetPlayerAllianceStateAllyBJ(Player(2),Player(11),true)
call SetPlayerAllianceStateAllyBJ(Player(3),Player(0),true)
call SetPlayerAllianceStateAllyBJ(Player(3),Player(1),true)
call SetPlayerAllianceStateAllyBJ(Player(3),Player(2),true)
call SetPlayerAllianceStateAllyBJ(Player(3),Player(4),true)
call SetPlayerAllianceStateAllyBJ(Player(3),Player(5),true)
call SetPlayerAllianceStateAllyBJ(Player(3),Player(6),true)
call SetPlayerAllianceStateAllyBJ(Player(3),Player(7),true)
call SetPlayerAllianceStateAllyBJ(Player(3),Player(8),true)
call SetPlayerAllianceStateAllyBJ(Player(3),Player(9),true)
call SetPlayerAllianceStateAllyBJ(Player(3),Player(10),true)
call SetPlayerAllianceStateAllyBJ(Player(3),Player(11),true)
call SetPlayerAllianceStateAllyBJ(Player(4),Player(0),true)
call SetPlayerAllianceStateAllyBJ(Player(4),Player(1),true)
call SetPlayerAllianceStateAllyBJ(Player(4),Player(2),true)
call SetPlayerAllianceStateAllyBJ(Player(4),Player(3),true)
call SetPlayerAllianceStateAllyBJ(Player(4),Player(5),true)
call SetPlayerAllianceStateAllyBJ(Player(4),Player(6),true)
call SetPlayerAllianceStateAllyBJ(Player(4),Player(7),true)
call SetPlayerAllianceStateAllyBJ(Player(4),Player(8),true)
call SetPlayerAllianceStateAllyBJ(Player(4),Player(9),true)
call SetPlayerAllianceStateAllyBJ(Player(4),Player(10),true)
call SetPlayerAllianceStateAllyBJ(Player(4),Player(11),true)
call SetPlayerAllianceStateAllyBJ(Player(5),Player(0),true)
call SetPlayerAllianceStateAllyBJ(Player(5),Player(1),true)
call SetPlayerAllianceStateAllyBJ(Player(5),Player(2),true)
call SetPlayerAllianceStateAllyBJ(Player(5),Player(3),true)
call SetPlayerAllianceStateAllyBJ(Player(5),Player(4),true)
call SetPlayerAllianceStateAllyBJ(Player(5),Player(6),true)
call SetPlayerAllianceStateAllyBJ(Player(5),Player(7),true)
call SetPlayerAllianceStateAllyBJ(Player(5),Player(8),true)
call SetPlayerAllianceStateAllyBJ(Player(5),Player(9),true)
call SetPlayerAllianceStateAllyBJ(Player(5),Player(10),true)
call SetPlayerAllianceStateAllyBJ(Player(5),Player(11),true)
call SetPlayerAllianceStateAllyBJ(Player(6),Player(0),true)
call SetPlayerAllianceStateAllyBJ(Player(6),Player(1),true)
call SetPlayerAllianceStateAllyBJ(Player(6),Player(2),true)
call SetPlayerAllianceStateAllyBJ(Player(6),Player(3),true)
call SetPlayerAllianceStateAllyBJ(Player(6),Player(4),true)
call SetPlayerAllianceStateAllyBJ(Player(6),Player(5),true)
call SetPlayerAllianceStateAllyBJ(Player(6),Player(7),true)
call SetPlayerAllianceStateAllyBJ(Player(6),Player(8),true)
call SetPlayerAllianceStateAllyBJ(Player(6),Player(9),true)
call SetPlayerAllianceStateAllyBJ(Player(6),Player(10),true)
call SetPlayerAllianceStateAllyBJ(Player(6),Player(11),true)
call SetPlayerAllianceStateAllyBJ(Player(7),Player(0),true)
call SetPlayerAllianceStateAllyBJ(Player(7),Player(1),true)
call SetPlayerAllianceStateAllyBJ(Player(7),Player(2),true)
call SetPlayerAllianceStateAllyBJ(Player(7),Player(3),true)
call SetPlayerAllianceStateAllyBJ(Player(7),Player(4),true)
call SetPlayerAllianceStateAllyBJ(Player(7),Player(5),true)
call SetPlayerAllianceStateAllyBJ(Player(7),Player(6),true)
call SetPlayerAllianceStateAllyBJ(Player(7),Player(8),true)
call SetPlayerAllianceStateAllyBJ(Player(7),Player(9),true)
call SetPlayerAllianceStateAllyBJ(Player(7),Player(10),true)
call SetPlayerAllianceStateAllyBJ(Player(7),Player(11),true)
call SetPlayerAllianceStateAllyBJ(Player(8),Player(0),true)
call SetPlayerAllianceStateAllyBJ(Player(8),Player(1),true)
call SetPlayerAllianceStateAllyBJ(Player(8),Player(2),true)
call SetPlayerAllianceStateAllyBJ(Player(8),Player(3),true)
call SetPlayerAllianceStateAllyBJ(Player(8),Player(4),true)
call SetPlayerAllianceStateAllyBJ(Player(8),Player(5),true)
call SetPlayerAllianceStateAllyBJ(Player(8),Player(6),true)
call SetPlayerAllianceStateAllyBJ(Player(8),Player(7),true)
call SetPlayerAllianceStateAllyBJ(Player(8),Player(9),true)
call SetPlayerAllianceStateAllyBJ(Player(8),Player(10),true)
call SetPlayerAllianceStateAllyBJ(Player(8),Player(11),true)
call SetPlayerAllianceStateAllyBJ(Player(9),Player(0),true)
call SetPlayerAllianceStateAllyBJ(Player(9),Player(1),true)
call SetPlayerAllianceStateAllyBJ(Player(9),Player(2),true)
call SetPlayerAllianceStateAllyBJ(Player(9),Player(3),true)
call SetPlayerAllianceStateAllyBJ(Player(9),Player(4),true)
call SetPlayerAllianceStateAllyBJ(Player(9),Player(5),true)
call SetPlayerAllianceStateAllyBJ(Player(9),Player(6),true)
call SetPlayerAllianceStateAllyBJ(Player(9),Player(7),true)
call SetPlayerAllianceStateAllyBJ(Player(9),Player(8),true)
call SetPlayerAllianceStateAllyBJ(Player(9),Player(10),true)
call SetPlayerAllianceStateAllyBJ(Player(9),Player(11),true)
call SetPlayerAllianceStateAllyBJ(Player(10),Player(0),true)
call SetPlayerAllianceStateAllyBJ(Player(10),Player(1),true)
call SetPlayerAllianceStateAllyBJ(Player(10),Player(2),true)
call SetPlayerAllianceStateAllyBJ(Player(10),Player(3),true)
call SetPlayerAllianceStateAllyBJ(Player(10),Player(4),true)
call SetPlayerAllianceStateAllyBJ(Player(10),Player(5),true)
call SetPlayerAllianceStateAllyBJ(Player(10),Player(6),true)
call SetPlayerAllianceStateAllyBJ(Player(10),Player(7),true)
call SetPlayerAllianceStateAllyBJ(Player(10),Player(8),true)
call SetPlayerAllianceStateAllyBJ(Player(10),Player(9),true)
call SetPlayerAllianceStateAllyBJ(Player(10),Player(11),true)
call SetPlayerAllianceStateAllyBJ(Player(11),Player(0),true)
call SetPlayerAllianceStateAllyBJ(Player(11),Player(1),true)
call SetPlayerAllianceStateAllyBJ(Player(11),Player(2),true)
call SetPlayerAllianceStateAllyBJ(Player(11),Player(3),true)
call SetPlayerAllianceStateAllyBJ(Player(11),Player(4),true)
call SetPlayerAllianceStateAllyBJ(Player(11),Player(5),true)
call SetPlayerAllianceStateAllyBJ(Player(11),Player(6),true)
call SetPlayerAllianceStateAllyBJ(Player(11),Player(7),true)
call SetPlayerAllianceStateAllyBJ(Player(11),Player(8),true)
call SetPlayerAllianceStateAllyBJ(Player(11),Player(9),true)
call SetPlayerAllianceStateAllyBJ(Player(11),Player(10),true)
call SetPlayerAllianceStateVisionBJ(Player(0),Player(1),true)
call SetPlayerAllianceStateVisionBJ(Player(0),Player(2),true)
call SetPlayerAllianceStateVisionBJ(Player(0),Player(3),true)
call SetPlayerAllianceStateVisionBJ(Player(0),Player(4),true)
call SetPlayerAllianceStateVisionBJ(Player(0),Player(5),true)
call SetPlayerAllianceStateVisionBJ(Player(0),Player(6),true)
call SetPlayerAllianceStateVisionBJ(Player(0),Player(7),true)
call SetPlayerAllianceStateVisionBJ(Player(0),Player(8),true)
call SetPlayerAllianceStateVisionBJ(Player(0),Player(9),true)
call SetPlayerAllianceStateVisionBJ(Player(0),Player(10),true)
call SetPlayerAllianceStateVisionBJ(Player(0),Player(11),true)
call SetPlayerAllianceStateVisionBJ(Player(1),Player(0),true)
call SetPlayerAllianceStateVisionBJ(Player(1),Player(2),true)
call SetPlayerAllianceStateVisionBJ(Player(1),Player(3),true)
call SetPlayerAllianceStateVisionBJ(Player(1),Player(4),true)
call SetPlayerAllianceStateVisionBJ(Player(1),Player(5),true)
call SetPlayerAllianceStateVisionBJ(Player(1),Player(6),true)
call SetPlayerAllianceStateVisionBJ(Player(1),Player(7),true)
call SetPlayerAllianceStateVisionBJ(Player(1),Player(8),true)
call SetPlayerAllianceStateVisionBJ(Player(1),Player(9),true)
call SetPlayerAllianceStateVisionBJ(Player(1),Player(10),true)
call SetPlayerAllianceStateVisionBJ(Player(1),Player(11),true)
call SetPlayerAllianceStateVisionBJ(Player(2),Player(0),true)
call SetPlayerAllianceStateVisionBJ(Player(2),Player(1),true)
call SetPlayerAllianceStateVisionBJ(Player(2),Player(3),true)
call SetPlayerAllianceStateVisionBJ(Player(2),Player(4),true)
call SetPlayerAllianceStateVisionBJ(Player(2),Player(5),true)
call SetPlayerAllianceStateVisionBJ(Player(2),Player(6),true)
call SetPlayerAllianceStateVisionBJ(Player(2),Player(7),true)
call SetPlayerAllianceStateVisionBJ(Player(2),Player(8),true)
call SetPlayerAllianceStateVisionBJ(Player(2),Player(9),true)
call SetPlayerAllianceStateVisionBJ(Player(2),Player(10),true)
call SetPlayerAllianceStateVisionBJ(Player(2),Player(11),true)
call SetPlayerAllianceStateVisionBJ(Player(3),Player(0),true)
call SetPlayerAllianceStateVisionBJ(Player(3),Player(1),true)
call SetPlayerAllianceStateVisionBJ(Player(3),Player(2),true)
call SetPlayerAllianceStateVisionBJ(Player(3),Player(4),true)
call SetPlayerAllianceStateVisionBJ(Player(3),Player(5),true)
call SetPlayerAllianceStateVisionBJ(Player(3),Player(6),true)
call SetPlayerAllianceStateVisionBJ(Player(3),Player(7),true)
call SetPlayerAllianceStateVisionBJ(Player(3),Player(8),true)
call SetPlayerAllianceStateVisionBJ(Player(3),Player(9),true)
call SetPlayerAllianceStateVisionBJ(Player(3),Player(10),true)
call SetPlayerAllianceStateVisionBJ(Player(3),Player(11),true)
call SetPlayerAllianceStateVisionBJ(Player(4),Player(0),true)
call SetPlayerAllianceStateVisionBJ(Player(4),Player(1),true)
call SetPlayerAllianceStateVisionBJ(Player(4),Player(2),true)
call SetPlayerAllianceStateVisionBJ(Player(4),Player(3),true)
call SetPlayerAllianceStateVisionBJ(Player(4),Player(5),true)
call SetPlayerAllianceStateVisionBJ(Player(4),Player(6),true)
call SetPlayerAllianceStateVisionBJ(Player(4),Player(7),true)
call SetPlayerAllianceStateVisionBJ(Player(4),Player(8),true)
call SetPlayerAllianceStateVisionBJ(Player(4),Player(9),true)
call SetPlayerAllianceStateVisionBJ(Player(4),Player(10),true)
call SetPlayerAllianceStateVisionBJ(Player(4),Player(11),true)
call SetPlayerAllianceStateVisionBJ(Player(5),Player(0),true)
call SetPlayerAllianceStateVisionBJ(Player(5),Player(1),true)
call SetPlayerAllianceStateVisionBJ(Player(5),Player(2),true)
call SetPlayerAllianceStateVisionBJ(Player(5),Player(3),true)
call SetPlayerAllianceStateVisionBJ(Player(5),Player(4),true)
call SetPlayerAllianceStateVisionBJ(Player(5),Player(6),true)
call SetPlayerAllianceStateVisionBJ(Player(5),Player(7),true)
call SetPlayerAllianceStateVisionBJ(Player(5),Player(8),true)
call SetPlayerAllianceStateVisionBJ(Player(5),Player(9),true)
call SetPlayerAllianceStateVisionBJ(Player(5),Player(10),true)
call SetPlayerAllianceStateVisionBJ(Player(5),Player(11),true)
call SetPlayerAllianceStateVisionBJ(Player(6),Player(0),true)
call SetPlayerAllianceStateVisionBJ(Player(6),Player(1),true)
call SetPlayerAllianceStateVisionBJ(Player(6),Player(2),true)
call SetPlayerAllianceStateVisionBJ(Player(6),Player(3),true)
call SetPlayerAllianceStateVisionBJ(Player(6),Player(4),true)
call SetPlayerAllianceStateVisionBJ(Player(6),Player(5),true)
call SetPlayerAllianceStateVisionBJ(Player(6),Player(7),true)
call SetPlayerAllianceStateVisionBJ(Player(6),Player(8),true)
call SetPlayerAllianceStateVisionBJ(Player(6),Player(9),true)
call SetPlayerAllianceStateVisionBJ(Player(6),Player(10),true)
call SetPlayerAllianceStateVisionBJ(Player(6),Player(11),true)
call SetPlayerAllianceStateVisionBJ(Player(7),Player(0),true)
call SetPlayerAllianceStateVisionBJ(Player(7),Player(1),true)
call SetPlayerAllianceStateVisionBJ(Player(7),Player(2),true)
call SetPlayerAllianceStateVisionBJ(Player(7),Player(3),true)
call SetPlayerAllianceStateVisionBJ(Player(7),Player(4),true)
call SetPlayerAllianceStateVisionBJ(Player(7),Player(5),true)
call SetPlayerAllianceStateVisionBJ(Player(7),Player(6),true)
call SetPlayerAllianceStateVisionBJ(Player(7),Player(8),true)
call SetPlayerAllianceStateVisionBJ(Player(7),Player(9),true)
call SetPlayerAllianceStateVisionBJ(Player(7),Player(10),true)
call SetPlayerAllianceStateVisionBJ(Player(7),Player(11),true)
call SetPlayerAllianceStateVisionBJ(Player(8),Player(0),true)
call SetPlayerAllianceStateVisionBJ(Player(8),Player(1),true)
call SetPlayerAllianceStateVisionBJ(Player(8),Player(2),true)
call SetPlayerAllianceStateVisionBJ(Player(8),Player(3),true)
call SetPlayerAllianceStateVisionBJ(Player(8),Player(4),true)
call SetPlayerAllianceStateVisionBJ(Player(8),Player(5),true)
call SetPlayerAllianceStateVisionBJ(Player(8),Player(6),true)
call SetPlayerAllianceStateVisionBJ(Player(8),Player(7),true)
call SetPlayerAllianceStateVisionBJ(Player(8),Player(9),true)
call SetPlayerAllianceStateVisionBJ(Player(8),Player(10),true)
call SetPlayerAllianceStateVisionBJ(Player(8),Player(11),true)
call SetPlayerAllianceStateVisionBJ(Player(9),Player(0),true)
call SetPlayerAllianceStateVisionBJ(Player(9),Player(1),true)
call SetPlayerAllianceStateVisionBJ(Player(9),Player(2),true)
call SetPlayerAllianceStateVisionBJ(Player(9),Player(3),true)
call SetPlayerAllianceStateVisionBJ(Player(9),Player(4),true)
call SetPlayerAllianceStateVisionBJ(Player(9),Player(5),true)
call SetPlayerAllianceStateVisionBJ(Player(9),Player(6),true)
call SetPlayerAllianceStateVisionBJ(Player(9),Player(7),true)
call SetPlayerAllianceStateVisionBJ(Player(9),Player(8),true)
call SetPlayerAllianceStateVisionBJ(Player(9),Player(10),true)
call SetPlayerAllianceStateVisionBJ(Player(9),Player(11),true)
call SetPlayerAllianceStateVisionBJ(Player(10),Player(0),true)
call SetPlayerAllianceStateVisionBJ(Player(10),Player(1),true)
call SetPlayerAllianceStateVisionBJ(Player(10),Player(2),true)
call SetPlayerAllianceStateVisionBJ(Player(10),Player(3),true)
call SetPlayerAllianceStateVisionBJ(Player(10),Player(4),true)
call SetPlayerAllianceStateVisionBJ(Player(10),Player(5),true)
call SetPlayerAllianceStateVisionBJ(Player(10),Player(6),true)
call SetPlayerAllianceStateVisionBJ(Player(10),Player(7),true)
call SetPlayerAllianceStateVisionBJ(Player(10),Player(8),true)
call SetPlayerAllianceStateVisionBJ(Player(10),Player(9),true)
call SetPlayerAllianceStateVisionBJ(Player(10),Player(11),true)
call SetPlayerAllianceStateVisionBJ(Player(11),Player(0),true)
call SetPlayerAllianceStateVisionBJ(Player(11),Player(1),true)
call SetPlayerAllianceStateVisionBJ(Player(11),Player(2),true)
call SetPlayerAllianceStateVisionBJ(Player(11),Player(3),true)
call SetPlayerAllianceStateVisionBJ(Player(11),Player(4),true)
call SetPlayerAllianceStateVisionBJ(Player(11),Player(5),true)
call SetPlayerAllianceStateVisionBJ(Player(11),Player(6),true)
call SetPlayerAllianceStateVisionBJ(Player(11),Player(7),true)
call SetPlayerAllianceStateVisionBJ(Player(11),Player(8),true)
call SetPlayerAllianceStateVisionBJ(Player(11),Player(9),true)
call SetPlayerAllianceStateVisionBJ(Player(11),Player(10),true)
endfunction
function InitAllyPriorities takes nothing returns nothing
call SetStartLocPrioCount(0,2)
call SetStartLocPrio(0,0,1,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(0,1,4,MAP_LOC_PRIO_HIGH)
call SetStartLocPrioCount(1,1)
call SetStartLocPrio(1,0,0,MAP_LOC_PRIO_HIGH)
call SetStartLocPrioCount(2,3)
call SetStartLocPrio(2,0,3,MAP_LOC_PRIO_LOW)
call SetStartLocPrio(2,1,4,MAP_LOC_PRIO_LOW)
call SetStartLocPrio(2,2,5,MAP_LOC_PRIO_HIGH)
call SetStartLocPrioCount(3,1)
call SetStartLocPrio(3,0,4,MAP_LOC_PRIO_HIGH)
call SetStartLocPrioCount(4,2)
call SetStartLocPrio(4,0,0,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(4,1,3,MAP_LOC_PRIO_HIGH)
call SetStartLocPrioCount(5,1)
call SetStartLocPrio(5,0,2,MAP_LOC_PRIO_HIGH)
call SetStartLocPrioCount(6,1)
call SetStartLocPrio(6,0,7,MAP_LOC_PRIO_HIGH)
call SetStartLocPrioCount(7,4)
call SetStartLocPrio(7,0,0,MAP_LOC_PRIO_LOW)
call SetStartLocPrio(7,1,1,MAP_LOC_PRIO_LOW)
call SetStartLocPrio(7,2,3,MAP_LOC_PRIO_LOW)
call SetStartLocPrio(7,3,4,MAP_LOC_PRIO_HIGH)
call SetStartLocPrioCount(8,4)
call SetStartLocPrio(8,0,1,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(8,1,2,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(8,2,4,MAP_LOC_PRIO_LOW)
call SetStartLocPrio(8,3,11,MAP_LOC_PRIO_HIGH)
call SetStartLocPrioCount(9,4)
call SetStartLocPrio(9,0,1,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(9,1,2,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(9,2,4,MAP_LOC_PRIO_LOW)
call SetStartLocPrio(9,3,11,MAP_LOC_PRIO_HIGH)
call SetStartLocPrioCount(10,4)
call SetStartLocPrio(10,0,1,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(10,1,2,MAP_LOC_PRIO_HIGH)
call SetStartLocPrio(10,2,4,MAP_LOC_PRIO_LOW)
call SetStartLocPrio(10,3,11,MAP_LOC_PRIO_HIGH)
call SetStartLocPrioCount(11,1)
call SetStartLocPrio(11,0,2,MAP_LOC_PRIO_HIGH)
endfunction
function main takes nothing returns nothing
call SetCameraBounds(-10752.0+GetCameraMargin(CAMERA_MARGIN_LEFT),-32256.0+GetCameraMargin(CAMERA_MARGIN_BOTTOM),26112.0-GetCameraMargin(CAMERA_MARGIN_RIGHT),-3584.0-GetCameraMargin(CAMERA_MARGIN_TOP),-10752.0+GetCameraMargin(CAMERA_MARGIN_LEFT),-3584.0-GetCameraMargin(CAMERA_MARGIN_TOP),26112.0-GetCameraMargin(CAMERA_MARGIN_RIGHT),-32256.0+GetCameraMargin(CAMERA_MARGIN_BOTTOM))
call SetDayNightModels("Environment\\DNC\\DNCLordaeron\\DNCLordaeronTerrain\\DNCLordaeronTerrain.mdl","Environment\\DNC\\DNCLordaeron\\DNCLordaeronUnit\\DNCLordaeronUnit.mdl")
call SetTerrainFogEx(0,0.0,5000.0,0.000,1.000,1.000,1.000)
call SetWaterBaseColor(59,170,25,255)
call NewSoundEnvironment("Default")
call SetAmbientDaySound("VillageDay")
call SetAmbientNightSound("VillageNight")
call SetMapMusic("Music",true,0)
call InitSounds()
call CreateRegions()
call CreateCameras()
call CreateAllDestructables()
call CreateAllItems()
call CreateAllUnits()
call InitBlizzard()
call ExecuteFunc("SCS__init")
call InitGlobals()
call InitCustomTriggers()
call RunInitializationTriggers()
endfunction
function config takes nothing returns nothing
call SetMapName("TRIGSTR_001")
call SetMapDescription("")
call SetPlayers(12)
call SetTeams(12)
call SetGamePlacement(MAP_PLACEMENT_TEAMS_TOGETHER)
call DefineStartLocation(0,3328.0,-21440.0)
call DefineStartLocation(1,-1344.0,-22080.0)
call DefineStartLocation(2,11008.0,-18240.0)
call DefineStartLocation(3,10752.0,-25792.0)
call DefineStartLocation(4,6784.0,-24448.0)
call DefineStartLocation(5,15424.0,-15808.0)
call DefineStartLocation(6,3712.0,-30656.0)
call DefineStartLocation(7,3008.0,-29888.0)
call DefineStartLocation(8,9344.0,-22656.0)
call DefineStartLocation(9,-1088.0,-28480.0)
call DefineStartLocation(10,2496.0,-15808.0)
call DefineStartLocation(11,8704.0,-19968.0)
call InitCustomPlayerSlots()
call InitCustomTeams()
call InitAllyPriorities()
endfunction